Banner
Home Forum
Qivva Forum
Welcome, Guest
Please Login or Register.    Lost Password?
Language dependent modules in joomla 1.5 template
(1 viewing) 1 Guest
Go to bottom
TOPIC: Language dependent modules in joomla 1.5 template
#1871
smallfish
Fresh Boarder
Posts: 2
graphgraph
User Offline
Language dependent modules in joomla 1.5 template 2 Years, 1 Month ago Karma: 0
Hi, my question is did the template code for language depending module changed in 2.0 beta2 ?

I previously used this code bellow in 1.1.x to change modules depending on the language selected from the joomfish module..and now i cant get it to work on joomla 1.5..

<?php
if ($mosConfig_lang== english )
{mosLoadModules ( 'user6', -2 );}
?>
<?php
if ($mosConfig_lang== slovenian )
{mosLoadModules ( 'user5', -2 );}
?>

Can you please help me solve this and correct the code to work?
 
Logged Logged
  The administrator has disabled public write access.
#1873
admin
Platinum Boarder
Posts: 677
graph
User Offline
Re:Language dependent modules in joomla 1.5 template 2 Years, 1 Month ago Karma: 14
You can't use any of the "mos" syntax in Joomla 1.5
You need to replace them with their Joomla 1.5 equivalents.

This is a useful article:
theartofjoomla.com/converting-old-extensions.html

And you can find lots more on the Joomla.org site.

This is a Joomla 1.5 statement to get the language:
Code:

$lang =& JFactory::getLanguage();


Replace
Code:

mosLoadModules( $position_name, $style );
with
Code:

<jdoc:include type="modules" name=$position_name style=$style />
. (Note: the 1.0 template's PHP syntax may use single or double quotes. Jdoc expressions require double quotes, and won't work with single quotes.)

Regards
Toni
 
Logged Logged
 
Last Edit: 2009/12/14 13:57 By .
  The administrator has disabled public write access.
Go to top