What version of smarty is being used in CMSMS? I wanted to download the correct doc file from smarty.net but did not see a version of docs for 2.60 which seems to be the version in current use with CMSMS.
So which version from here... http://www.smarty.net/download-docs.php would be the most appropriate version of the documentation to get?
A quick trick to display a random image
Re: A quick trick to display a random image
In CMSMS there is 2.6.18 versioncnymike wrote: What version of smarty is being used in CMSMS? I wanted to download the correct doc file from smarty.net but did not see a version of docs for 2.60 which seems to be the version in current use with CMSMS.
So which version from here... http://www.smarty.net/download-docs.php would be the most appropriate version of the documentation to get?
2.6.14 documentation it's ok, nothing has changed in functions
Alby
-
- Forum Members
- Posts: 247
- Joined: Sun Oct 28, 2007 4:14 am
- Location: Australia
Re: A quick trick to display Several random images
I used this piece of code on a site which had three little images in a left hand column under the menu. I thought
"Why not use some random images." So I put the code in three times, which works except sometimes you would get the same images showing. So I changed the code like this: (still with 10 images)
{capture assign='num'}{1|rand:8}{/capture}
and I put this before the code for the images.
Then for the images I have the following:
Now no more duplicates. Nothing very smart from a programmer's perspective, but I was pleased.
Andrew
"Why not use some random images." So I put the code in three times, which works except sometimes you would get the same images showing. So I changed the code like this: (still with 10 images)
{capture assign='num'}{1|rand:8}{/capture}
and I put this before the code for the images.
Then for the images I have the following:
Now no more duplicates. Nothing very smart from a programmer's perspective, but I was pleased.

Andrew
Re: A quick trick to display a random image
Thank you for the tip, Andrew.
Feel free to write it in the wiki with your forum account.
Have fun with CMSms !
Pierre M.
Feel free to write it in the wiki with your forum account.
Have fun with CMSms !
Pierre M.
Re: A quick trick to display a random image
This is an old post but this technique works great. I have been using this to offer a different background image each time a page is loaded.
Can anyone suggest a go way to preload the background images used? These are fairly large and my understanding is the browser will look for the preloaded image only if it has an identical path.
I've tried several different CSS methods without success that I attribute to using the [[root_url]] coding in the style sheet which doesn't match the image path in the template.
Thanks for looking,
Elkman
Can anyone suggest a go way to preload the background images used? These are fairly large and my understanding is the browser will look for the preloaded image only if it has an identical path.
I've tried several different CSS methods without success that I attribute to using the [[root_url]] coding in the style sheet which doesn't match the image path in the template.
Thanks for looking,
Elkman