Webforumz's RSS FeedRSS Webforumz RegistrationRegister Contact Webforumz StaffContact

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.


 Subscribe in a reader

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

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Jul 21st, 2006, 17: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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2  
Old Jul 21st, 2006, 17: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
Re: Image Bank

You can do this is both javascript and php/asp which do you prefer?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Jul 21st, 2006, 18: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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Jul 21st, 2006, 18:07
Elite Veteran
Join Date: Aug 2005
Location: That Place
Posts: 2,044
Blog Entries: 1
Thanks: 0
Thanked 37 Times in 37 Posts
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)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Jul 21st, 2006, 19: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
Re: Image Bank

I made a really simple script ages ago. Ill dig it up for you.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Jul 21st, 2006, 19: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
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' />";
  }
?>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Jul 21st, 2006, 21:42
Elite Veteran
Join Date: Aug 2005
Location: That Place
Posts: 2,044
Blog Entries: 1
Thanks: 0
Thanked 37 Times in 37 Posts
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)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old Jul 25th, 2006, 12: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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9  
Old Jul 25th, 2006, 13:37
Elite Veteran
Join Date: Aug 2005
Location: That Place
Posts: 2,044
Blog Entries: 1
Thanks: 0
Thanked 37 Times in 37 Posts
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)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
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 15:38
Oracle DBA - Investment Bank Web JobBot Job Opportunities 0 Feb 20th, 2007 12:30
graphic-bank.com yayfur Free Web Site Critique 3 Sep 3rd, 2006 21:26
Background image overlaping footer image at bottom of div lw_d Web Page Design 4 Mar 21st, 2006 01:27
Trust me, don't bank on making validated XHTML documents!!! subynesimean Web Page Design 13 Jul 30th, 2005 23:39


All times are GMT. The time now is 19:21.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8