• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
 Post subject: [SOLVED] Conflict between {$lang} and CGCalendar?
PostPosted: Thu Sep 30, 2010 3:32 pm 
Offline
New Member
New Member

Joined: Thu Sep 30, 2010 3:23 pm
Posts: 6
Hi!

Config :
CMSMS MLE : 1.8.2 toliara
CGCalendar : 1.5.5

I'm making a multilingual site. I have to use images as title, so i needed a solution to change the image depending on the language.

I've found that solution that works great ...


So i think, there is a conflict between {$lang} and CGcalendar, but i don(t know how to fix it...

Thanks!


Last edited by nicks on Fri Oct 01, 2010 9:08 am, edited 1 time in total.

Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Conflict between {$lang} and CGCalendar?
PostPosted: Thu Sep 30, 2010 3:35 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 8144
Location: Fernie British Columbia, Canada
We do not support CMSMS MLE.

_________________
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Conflict between {$lang} and CGCalendar?
PostPosted: Thu Sep 30, 2010 3:56 pm 
Offline
New Member
New Member

Joined: Thu Sep 30, 2010 3:23 pm
Posts: 6
Ok... I suppose that means "don't waste your time"...


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Conflict between {$lang} and CGCalendar?
PostPosted: Thu Sep 30, 2010 9:50 pm 
Offline
Forum Members
Forum Members
User avatar

Joined: Sun Feb 19, 2006 5:42 pm
Posts: 201
Location: Litomyšl, Czech Republic
Please post your report to the MLE section. Perhaps there will be someone, who will be able to help you.

_________________
Others are others and me is me.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Conflict between {$lang} and CGCalendar?
PostPosted: Fri Oct 01, 2010 6:46 am 
Offline
Power Poster
Power Poster
User avatar

Joined: Thu May 14, 2009 8:11 pm
Posts: 1264
Location: Lithuania
I have tested {$lang} on page before {CGCalendar} and in calendar template - everything looks ok. What is your template ?

In case it really interferes you could save {$lang} value to temp variable and use it inside CGCalendar.
Code:
{assign var='cgc_lang' value=$lang}
   {cms_module module="CGCalendar" display='calendar'}
{assign var='lang' value=$cgc_lang}

_________________
My best friends are: FAQ: How can I debug my code/site ?...showtemplate=false...module_customhow to create a patch, {process_pagedata}
And Yours ? :)


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Conflict between {$lang} and CGCalendar?
PostPosted: Fri Oct 01, 2010 9:07 am 
Offline
New Member
New Member

Joined: Thu Sep 30, 2010 3:23 pm
Posts: 6
Hi! Thanks for the replies. Actually, "Jean le Chauve" on the french forum, solved my problem by creating an UDT.
The condition is that URL Rewrite is turned on and makes something like that : "mydomain.com/en_USA/mypage", "mydomain.com/fr_FR/mypage" etc...

So, this is the UDT content :
Code:
$pageURL = 'http';
$lang = '';
if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
 $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
 $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
if (strpos($pageURL, '/fr_FR/') > 0) $lang = 'fr_FR';
elseif (strpos($pageURL, '/en_USA/') > 0) $lang = 'en_US';

// Add other languages here...

global $gCms;
$smarty = &$gCms->GetSmarty();
$smarty->assign('suffixeImage', $lang);


Then in my template (or page) i call the udt and the image like this :

Code:
{myUDT}<img src="images/imagename-{$suffixeImage}.jpg" />


And that's all!

You can follow the entire discussion (in french) here :

http://www.cmsmadesimple.fr/forum/viewtopic.php?id=2951


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
A2 Hosting