Hi,
I dunno where to put this one, so forgive if im posting the wrong place..
I want to make a template where the top_picture is changing to another picture for different menus.
is it possible and doesany one have a example that i can use and learn from ?
Thanks in advance
Noit
dynamic change top_picture
Re: dynamic change top_picture
Noit,
this is possible and as I remember it is explained here in the forum or in the old one, www.cmsimple.dk/forum
but unfortunately I do not know the exact syntax, you must do it with cmsimple scripting
I am sure you will get better info soon
Connie
this is possible and as I remember it is explained here in the forum or in the old one, www.cmsimple.dk/forum
but unfortunately I do not know the exact syntax, you must do it with cmsimple scripting
I am sure you will get better info soon
Connie
|---
Connie Müller-Gödecke, http://www.webdeerns.de
Connie Müller-Gödecke, http://www.webdeerns.de
Re: dynamic change top_picture
Hi Noit
Here are a few examples
http://cmsimple.de/cmsimple/index.php?H ... eitentitel
http://www.cmsimple.dk/forum/viewtopic. ... 55f#p20720
/ZiPs
Here are a few examples
http://cmsimple.de/cmsimple/index.php?H ... eitentitel
http://www.cmsimple.dk/forum/viewtopic. ... 55f#p20720
/ZiPs
Preben Dahl | Webmaster cmsimple.dk | Projekt-og domæne ejer Gert Ebersbach
Re: dynamic change top_picture
Hi,
there are some solutions explained on the wiki:
http://cmsimplewiki.com/doku.php/tips_a ... tion/start
Holger
there are some solutions explained on the wiki:
http://cmsimplewiki.com/doku.php/tips_a ... tion/start
Holger
Re: dynamic change top_picture
Hi,
Thanks
I found a lot of goodies to work on which soluton ill use i dunno yet...
Thanks again
Thanks
I found a lot of goodies to work on which soluton ill use i dunno yet...
Thanks again
Re: dynamic change top_picture
Put in top of template:
When naming the images, remove all special charts form the larst part of the URL and use that for filename - on Linux remember, it is case sensitive.
For http://www.cmsimple.com/?Installer%27s_Manual the file name would be Installers_Manual.jpg
Insert the image using:
<?php echo image();?>
Code: Select all
function image(){global $title,$s,$u,$pth,$l;
if(isset($l[$s])){
$c=explode(':',$u[$s]);
$t=count($c)-1;
for($i=$t;$i>-1 ;$i--){
$c[$i]=preg_replace("/\%../is","",$c[$i]);
if(is_file($pth['folder']['images'].$c[$i].'.jpg')){$img=$c[$i];break;}
}}
if(!isset($img)){if($title!='')$img=$title;else $img='default';}
if(!is_file($pth['folder']['images'].$img.'.jpg'))$img='default';
return '<img src="'.$pth['folder']['images'].$img.'.jpg" width="190" height="190">';}
For http://www.cmsimple.com/?Installer%27s_Manual the file name would be Installers_Manual.jpg
Insert the image using:
<?php echo image();?>