adding php into the gallery.

matt275

Joined: 2004-12-15
Posts: 4
Posted: Mon, 2007-02-12 17:50

I'd like to ad a small image rotating script into my gallery, under the main menu (where the blocks usually go).. I have it on my main page for sponsor links. this is what i have on there. just a simple little script...

Quote:

include "../ads/sponsors.php"; <-- list of images and links in an array..

shuffle($links);
$linkstoshow = 4;

for($i=0; $i<$linkstoshow; $i++)
{
echo("<a href='" . $links[$i][0] . "'><img src=" . $links[$i][1] . " border=0></a><br />\n" .

"<img src='../spacer.gif'width=1 height=5><br>\n"
);
}

can anyone help ?????? do i need to create a module?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2007-02-12 18:31

http://smarty.php.net/manual/en/language.function.php.php

if you areine using the matrix theme then sidbar.tpl is the file you want to edit.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team || G2 Theme Contest!

 
matt275

Joined: 2004-12-15
Posts: 4
Posted: Mon, 2007-02-12 20:32

Thank you floridave !!!!!!!!!!!!!!!! :)