Adapting a Joomla 1.5 extension to Joomla 2.5
From Joomla! Documentation
Revision as of 13:35, 2 November 2011 by JulienV
I believe that was valuable information (including the link to Andrew Eddies site) http://docs.joomla.org/index.php?title=Upgrading_a_Joomla_1.5_extension_to_Joomla_1.6&diff=0&oldid=35451 --Elkuku 18:31, 18 January 2011 (UTC)
There are several reasons for removing external links. We don't have the resources that would be required to monitor the sites being linked to; links can easily be turned into malware distribution sites. I'm not saying that that is the case here, but such links are often added for commercial reasons, in order to drive traffic to sites that carry advertisements or products for sale or simply to increase search-engine ranking. In order that the wiki does not become a link-fest for every commercial organisation in the community hoping to grab traffic, it is only fair that no such links are allowed. Although Andrew has the highest standing within the community I'm sure he would agree that it would be unfair to allow links to his site but not to others. But perhaps most importantly, the presence of external links discourages potential contributors from improving the documentation here on the wiki. I would prefer that anyone considering adding a link to an external site instead think about how the information in the wiki can be added to or improved for the benefit of all our users. Perhaps the author of the external site can even be persuaded to donate the material; I know that Andrew has already contributed a great deal in that way so perhaps others can too. Chris Davenport 18:59, 18 January 2011 (UTC)
Some more useful regular expressions to adapt language files and language strings to 1.7
- to make sure all keys are properly prefixed, for example by the component name: search ^(?!COM_MYCOMP)([^\n=]+)= replace with COM_MYCOMP_$1=
- to replace spaces before the = sign replace (COM_MYCOMP[^\s\n=]*)( )([^\n=]*)= with $1_$3= (run several times...)
- find keys with illegal characters in language files: ^([\w]+([^\w=])[^\n=]*)=
- for xml files, label and descriptions prefixes, replace (label|description)="(?!COM_MYCOMP)([^"]+)" with $1="COM_MYCOMP_$2"
- for xml files, label and descriptions spaces replace (label|description)="([^\s"]*)[\s]+([^"]*)" with $1="$2_$3" (several times)
- in php files, for prefixes replace JText::_\(\s*\'(?!COM_MYCOMP)([^']*)\' with JText::_('COM_MYCOMP_$1' (same with sprintf, and you might need to run it with double quote too)
- in php files, for spaces replace JText::_\(\s*'([^'\s]*)( )([^']*)' with JText::_('$1_$3'
(JulienV 13:35, 2 November 2011 (CDT))