Image Bank

This is a discussion on "Image Bank" within the Web Page Design section. This forum, and the thread "Image Bank are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jul 21st, 2006, 16:24
Junior Member
Join Date: Jul 2006
Location: Maine
Posts: 49
Thanks: 0
Thanked 0 Times in 0 Posts
Image Bank

How do I create a bank of images so when someone enters my site the top image is always random?

Thanks
Reply With Quote

  #2 (permalink)  
Old Jul 21st, 2006, 16:38
Most Reputable Member
Join Date: Aug 2005
Location: North Wales, United Kingdom
Age: 21
Posts: 1,093
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to sypher
Re: Image Bank

You can do this is both javascript and php/asp which do you prefer?
Reply With Quote
  #3 (permalink)  
Old Jul 21st, 2006, 17:04
Junior Member
Join Date: Jul 2006
Location: Maine
Posts: 49
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Image Bank

I am comfortable with Javascript and php.
Reply With Quote
  #4 (permalink)  
Old Jul 21st, 2006, 17:07
moojoo's Avatar
Moderator
Join Date: Aug 2005
Location: Texas
Age: 31
Posts: 1,738
Blog Entries: 1
Thanks: 0
Thanked 17 Times in 17 Posts
Send a message via AIM to moojoo Send a message via MSN to moojoo Send a message via Yahoo to moojoo
Re: Image Bank

This kicks major butt. http://automaticlabs.com/products/rotator
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Reply With Quote
  #5 (permalink)  
Old Jul 21st, 2006, 18:25
Most Reputable Member
Join Date: Aug 2005
Location: North Wales, United Kingdom
Age: 21
Posts: 1,093
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to sypher
Re: Image Bank

I made a really simple script ages ago. Ill dig it up for you.
Reply With Quote
  #6 (permalink)  
Old Jul 21st, 2006, 18:31
Most Reputable Member
Join Date: Aug 2005
Location: North Wales, United Kingdom
Age: 21
Posts: 1,093
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to sypher
Re: Image Bank

PHP: Select all

  <?php
// This generates a random number between 1 and 3, if you need more images just increase the latter number to your required number.
$imagevar=rand(13);
// If the random number matches this specific number then show the image, replace all path/to/image.jpg with your own images.
if($imagevar==1)
  {
    print 
"<img src='path/to/image1.jpg' />";
  }
else if(
$imagevar==2)
  {
   print 
"<img src='path/to/image2.jpg' />";
  }
else if(
$imagevar==3)
  {
   print 
"<img src='path/to/image3.jpg' />";
  }
?>
Reply With Quote
  #7 (permalink)  
Old Jul 21st, 2006, 20:42
moojoo's Avatar
Moderator
Join Date: Aug 2005
Location: Texas
Age: 31
Posts: 1,738
Blog Entries: 1
Thanks: 0
Thanked 17 Times in 17 Posts
Send a message via AIM to moojoo Send a message via MSN to moojoo Send a message via Yahoo to moojoo
Re: Image Bank

The one I posted you just put the script in a folder you want random images to pull from, upload your images to that folder and the script automatically reads them all. Just put the path to the php file in the image src. But yours works too!
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Reply With Quote
  #8 (permalink)  
Old Jul 25th, 2006, 11:38
Junior Member
Join Date: Jun 2006
Location: Sheffield, UK
Age: 23
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Image Bank

Hi, what is the javascript way because i was thinking of including something similar in a design i'm doing but want to keep away from server side.

Thanks,

B x
Reply With Quote
  #9 (permalink)  
Old Jul 25th, 2006, 12:37
moojoo's Avatar
Moderator
Join Date: Aug 2005
Location: Texas
Age: 31
Posts: 1,738
Blog Entries: 1
Thanks: 0
Thanked 17 Times in 17 Posts
Send a message via AIM to moojoo Send a message via MSN to moojoo Send a message via Yahoo to moojoo
Re: Image Bank

Lightbox.js is very popular http://www.huddletogether.com/projects/lightbox/ and you can style it with your own images and css.
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Reply With Quote
Reply

Tags
image, bank

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] multiple image rollover not restoring image snappy JavaScript Forum 4 Nov 5th, 2007 14:38
Oracle DBA - Investment Bank Web JobBot Job Opportunities 0 Feb 20th, 2007 11:30
graphic-bank.com yayfur Free Web Site Critique 3 Sep 3rd, 2006 20:26
Background image overlaping footer image at bottom of div lw_d Web Page Design 4 Mar 21st, 2006 00:27
Trust me, don't bank on making validated XHTML documents!!! subynesimean Web Page Design 13 Jul 30th, 2005 22:39


All times are GMT. The time now is 20:49.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43