by David Tong » August 24th, 2011, 5:18 am
Hi James,
There is currently no web interface allowing modifications of the text on the site, don't think there will be one in the near future due to the fact that there are too may of them.
But, the application is designed to support multiple site configurations and language override with some PHP editing. All the site text strings are stored in multiple language files and are separate from the main source files. Here is the trick to override any text on your site:
1. Find the file inside system/application/language/english that contains the text you like to change. For this example I am going to use the file unit_lang.php and changing the text for unit title and description on the unit page. These 2 text strings look like this inside unit_lang.php:
-----
$lang['unit_title'] = 'Unit Title';
$lang['unit_description'] = 'Unit Description';
-----
2. Create a folder named "todcm" inside system/application/language/english/site.
3. Create an empty file named exactly same as what you found in step 1 inside the "todcm" folder. In this example that is unit_lang.php.
4. Now you have created the file system/application/language/english/site/todcm/unit_lang.php, add the following to this file:
-----
<?php
$lang['unit_title'] = 'My Unit Title';
$lang['unit_description'] = 'My Unit Description';
-----
5. Now, go to any unit page on the site and you will see the new title and desc.
Try to put in only the necessary language overrides else it will be very messy for you to maintain. When it comes to upgrade, just make sure your todcm folder is in the same place.
I have worked on numerous open source projects and the language text modification is always an issue when it comes time to upgrade. So, I designed our system with this language override. It has been working really well for me so far.
If you are considering modifying the site other than the language files then there is another trick to create your own set of templates and let them stay the same throughout all future upgrades. I can talk about this if anyone is interested.