Im building a hockey website for someone and i would like to have a player rotational thing on the right hand side of the screen a bit like this
http://redwings.nhl.com/
u see when u refresh each page the player in the top right changes. Anyone know anything about those type of things, i see that one is a javascript file.
Rotating Images each page load
-
buntrosgali
- Forum Members

- Posts: 167
- Joined: Thu Apr 17, 2008 9:02 pm
-
cyberman
Re: Rotating Images each page load
Make a search with "random" in forge
http://dev.cmsmadesimple.org/search/?ty ... arch=Suche
and you will found some image rotators
.
http://dev.cmsmadesimple.org/search/?ty ... arch=Suche
and you will found some image rotators
-
buntrosgali
- Forum Members

- Posts: 167
- Joined: Thu Apr 17, 2008 9:02 pm
Re: Rotating Images each page load
cheers man i have tried installing that rotator but im getting string errors.
http://www.pigsflymedia.com/cms/
any advice? i dont think i have labelled the images folder properly but im not sure the images are here http://www.scotwellhouse.com/uploads/im ... m/img1.jpg
and the code is here
http://www.pigsflymedia.com/cms/
any advice? i dont think i have labelled the images folder properly but im not sure the images are here http://www.scotwellhouse.com/uploads/im ... m/img1.jpg
and the code is here
anyone help?0)
{
$imageNumber = (time()+(microtime()*1000000)) % count($fileList);
$img = $folder.$fileList[$imageNumber];
$filename = $fileList[$imageNumber];
}
#Check if user has specified ID-tag
if (isset($params['id']))
{
$id = " id="".$params['id'].""";
} else {
$id = "";
}
#Check if user has specified ALT-tag, otherwise use default (image file name)
if (isset($params['alt']))
{
$alt = " alt="".$params['alt'].""";
} else {
$alt = " alt="".$filename.""";
}
#Check if user has specified image height, otherwise use default
if (isset($params['height']))
{
$height = " height="".$params['height'].""";
} else {
$height = "";
}
#Check if user has specified image width, otherwise use default
if (isset($params['width']))
{
$width = " width="".$params['width'].""";
} else {
$width = "";
}
#Check if user has specified image alignment, otherwise use default
if (isset($params['align']))
{
$align = " align="".$params['align'].""";
} else {
$align = "";
}
return "";
}
function smarty_cms_help_function_random_image() {
?>
What does this do?
Shows a random image.
How do I use it?
Just insert the tag into your template/page like: {random_image}
What parameters does it take?
(optional) folder - ("http://www.scotwellhouse.com/uploads/im ... m/img1.jpg").
(optional) height - Image height (579px).
(optional) width - Image width (default is unspecified, eg. actual image width).
(optional) align - Image alignment (default is unspecified).
(optional) alt - Image description/mouse-over text (default is image file name).
(optional) id - Image id (default is unspecified).
Hints and Tips
-A good idea might be to organize your random images in folders (ex): uploads/images/random/pagename/ a.s.o.
-Specifying width and not height (or viceversa) prohibits your images from exceeding that certain width (or height). Pretty useful sometimes.
-Thumbnail images are automatically excluded (images starting with "thumb_")
Author: Anders Hansen <baconburgare@hotmail.com>
Thanks to Greg for hinting on the ID-tag
Version: 1.2
Change History:
1.0a - Alpha version released.
1.0 - Added ALT-tag. Changed default values for Height, Width and Align
1.1 - Images starting with "thumb_" (thumbnails) prevented from being displayed
1.2 - Added ID-tag and changed IMG tag to comply with W3C standard. Also fixed a bug where the same image was selected when you had several random images on the same page.
Last edited by buntrosgali on Tue Jun 10, 2008 9:45 am, edited 1 time in total.
Re: Rotating Images each page load
Did you try the http://dev.cmsmadesimple.org/projects/image-rotator/ plugin, download this and put it in the \functions folder of your CMSMS installation. It will be listed then in the Extensions -> Tags list and its help is selectable then...
Ronny
Ronny
-
buntrosgali
- Forum Members

- Posts: 167
- Joined: Thu Apr 17, 2008 9:02 pm
Re: Rotating Images each page load
cool man got that working
http://pigsflymedia.com/cms/index.php?page=our-services
but if i want it on outside like this
http://www.scotwellhouse.com/uploads/im ... wantit.jpg
do i have to create a new div area or something in stylesheet?
http://pigsflymedia.com/cms/index.php?page=our-services
but if i want it on outside like this
http://www.scotwellhouse.com/uploads/im ... wantit.jpg
do i have to create a new div area or something in stylesheet?
Re: Rotating Images each page load
That would be a new div out side of main position:absolute then you will have to mess with the position: for main to get it to show up over the image, or cut the missing white part out and make it transparent...
EDIT: you don't have to add the http:// to you image URLs in CSS just 'images/bgnav2alternate.gif', and your best off putting them in a folder in uploads...
EDIT: you don't have to add the http:// to you image URLs in CSS just 'images/bgnav2alternate.gif', and your best off putting them in a folder in uploads...
Last edited by Anonymous on Wed Jun 11, 2008 7:38 am, edited 1 time in total.


