TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

April 30, 2024, 03:38:08 PM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,174
  • Total Topics: 21,220
  • Online today: 147
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 123
  • Total: 123

[Block] Random Image Rotator [PHP]

Started by akulion, May 03, 2006, 02:09:08 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

akulion

Hi

Nothing much to it...

1. Create a directory on your server anywhere you want

2. Download this file (rightclick and save as)

3. Unzip and Upload the file you downloaded to your directory

4. Upload the images to the same directory - dosent matter what their names or format or size or dimensions are...as long as its a png, gif or jpg file

5. add this code to a SCRIPT / HTML block



<img src="http://www.mysite.com/myfolder/rotate.php" alt="A Random Image" />



Be sure to change www.mysite.com/myfolder to your website addy and folder path!

Each time your page loads it will display a random image from your folder :)
And thats all - enjoy :)

Details of how this thing works and its homepage can be found HERE

Uthn

Thanks a lot, this one works fine for me !  ;D

(was having a fight with the one from this topic : http://www.tinyportal.net/smf/index.php?topic=4220.0

Mitchâ„¢

Quote from: Uthn on May 03, 2006, 12:16:24 PM
Thanks a lot, this one works fine for me !  ;D

(was having a fight with the one from this topic : http://www.tinyportal.net/smf/index.php?topic=4220.0

I am sorry that you didnt find it to your needing.

HappyFace

How do i add the code to a script/block?

akulion

You must be logged in as Admin

Click on Manage blocks ---> Add Center Block ---> scriptbox + Send

Put the script in the box that appears and press send and then activate your block

HappyFace

Quote from: akulion on May 03, 2006, 02:41:25 PM
You must be logged in as Admin

Click on Manage blocks ---> Add Center Block ---> scriptbox + Send

Put the script in the box that appears and press send and then activate your block

I only have this:

TinyPortal
Settings
Blocks
Articles
Downloads Manager

akulion

Ok then click on blocks :) it should be there - since the version im using says "manage blocks" so maybe in your version it just says "blocks"

Try it

HappyFace

I have " Add MenuItem  " but no center block.. im using the latest TPortal as far as i know.
www.happyserver.be

G6Cad

You have to activate the center bar.

Admin/tinyportal/settings/check the catbox (use centerbar)

technodragon73

is there a way to set a maximum size for this?  I want to use it to show random images from my gallery but some of them are pretty big so i want to put a "cap" on the size so they don't explode my forum...lol