Random Image Scripts
I am trying to apply a random image ont he front of a store. does it need special tags inorder to work? I posted teh script here.
http://www.rinju.com/getRandomImage.zip thanks -mikey |
did you rap
did you rap the include script with smarty tags like this
{php} include("http://www.yourwebsite.com/path/to/randomscript.php"); {/php} it works great on my site, i just put this in the welcome template, works awesome, i also put multiple randomizing scripts in head.tpl & copyright.tpl so that everything changes when refreshed except the navigation menus at top remain the same, totally cool. |
heres a random image script that i cant get working but you may find useful:
save as sig1.php Quote:
|
rinjuanimation & barabbas try this script
this scipt is much easier and simple, just save it as randomscript.php or whatever you want, change the paths to your images and upload the script to your website, then in your welcome template put this include function
{php} include("http://www.yourwebsite.com/path/to/randomscript.php"); {/php} and change the paths to where you uploaded the file, let me know if it works, this is a great script and you can change the paths to an html file or another website, whatever you want really Quote:
just PM if you want to see this script in action |
|
Wouldn't be just as easy to use a random javascript?
|
but then everyone could see (read: steal) your code :wink:
|
Can the above script be made to make the images 'clickable' to a specified page/url?
Thanks |
Here is one for you... It is a little more work, but is is nice:) Make a new file in /skin1/customer/main/ named randoms.tpl. In this file put:
Code:
<a href=product.php?productid={$images[0].productid}> Create a new file in /customer/ named random.php. In this file put: Code:
<? Next, insert this into your welcome.tpl file: Code:
{include file="customer/main/randoms.tpl"} Next, in the customer/home.php file look for Code:
require "../include/categories.php"; and insert this line under it: Code:
include "./random.php"; *This is for version 3.4.x and will work with inages stored in a File System or in the Database.[/code] |
Nice mod,
MOved to Custom templates :wink: |
All times are GMT -8. The time now is 06:26 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.