WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-26-2007, 07:56 AM
dharrison's Avatar
Moderator
WebProWorld Moderator
 

Join Date: May 2005
Location: Essex, UK
Posts: 1,394
dharrison RepRank 3dharrison RepRank 3
Default How would you tackle this?

Hi all

I am delving into the project of revamping my site at long last (hence the long-ish stay away).

I have a problem: I would like random shots of recent projects and a bit of wording to come up on my home page and possibly a few others.

My question is what is the best method to accomplish this? PHP, XML, database or miscellaneous?

Any help will be gratefully received.
__________________
Deb Harrison
DVH Design
Essex Web Design | Web Design Blog
Reply With Quote
  #2 (permalink)  
Old 03-26-2007, 08:04 AM
DaveSawers's Avatar
WebProWorld Veteran
 

Join Date: Dec 2006
Location: Calgary, Alberta, Canada
Posts: 354
DaveSawers RepRank 1
Default

I do that on my site for portfolio display on the side panel. Each picture filename, link and related text is on a MySQL database and PHP randomly selects a record for display. A very simple piece of code.
__________________
Dynamic Software Development
www.activeminds.ca
Reply With Quote
  #3 (permalink)  
Old 03-26-2007, 09:15 AM
dharrison's Avatar
Moderator
WebProWorld Moderator
 

Join Date: May 2005
Location: Essex, UK
Posts: 1,394
dharrison RepRank 3dharrison RepRank 3
Default

Thanks David. Is that php rand() ?
__________________
Deb Harrison
DVH Design
Essex Web Design | Web Design Blog
Reply With Quote
  #4 (permalink)  
Old 03-26-2007, 09:53 AM
pagetta's Avatar
WebProWorld Veteran
 

Join Date: Nov 2004
Location: UK
Posts: 504
pagetta RepRank 2
Default

hi
we do this on our site each refresh randomly displays the contents of a file kept in a list - i'm not sure if its the slickest way of doing it but it works on our news item display (codestone)

it uses some simple php code
<?php
$sTextfile = "files.txt";
if ($aFiles = @file($sTextfile))
{
$sFileToInclude = rtrim($aFiles[array_rand($aFiles)]);
include "$sFileToInclude";
}
?>

'files.txt' is kept in the root folder and simply lists the absolute URL of each content html file.

HTH :-)
Reply With Quote
  #5 (permalink)  
Old 03-26-2007, 10:13 AM
sands's Avatar
WebProWorld Veteran
 

Join Date: Sep 2005
Location: Kerala, India
Posts: 397
sands RepRank 1
Default

You had posted this earlier, hadn't you?

Looking for a Rotation Script for Images AND Text

Check out 2 more options there. Maybe you were too busy to check for replies.
__________________
My Nook | My Biz
Reply With Quote
  #6 (permalink)  
Old 03-26-2007, 10:33 AM
dharrison's Avatar
Moderator
WebProWorld Moderator
 

Join Date: May 2005
Location: Essex, UK
Posts: 1,394
dharrison RepRank 3dharrison RepRank 3
Default

Yeah you are right sands, apologies for that. I did originally post last year, but I am finally getting round to tackling the website (its only taken me 3 years to get round to revamping my own site).

Thanks for directing me onto the old post sands - there s a lot of good info on there.

And thanks all of you for your help. :)
__________________
Deb Harrison
DVH Design
Essex Web Design | Web Design Blog
Reply With Quote
  #7 (permalink)  
Old 03-27-2007, 07:44 PM
jannmirch's Avatar
WebProWorld Member
 

Join Date: Sep 2005
Location: Yorktown Heights, NY
Posts: 78
jannmirch RepRank 0
Default

If I may...Do you really feel that random shots is the best way to present your portfolio? Why not allow your visitor to see all your stuff?

You might want to consider organizing your portfolio into different types of projects, offering thumbnails that your visitor can select, which would link to more detailed info.

Others will be better able to advise on the most efficient way to set this up.
__________________
Graphic & Web Design
www.jannmirch.com
Reply With Quote
  #8 (permalink)  
Old 04-19-2007, 05:52 AM
dharrison's Avatar
Moderator
WebProWorld Moderator
 

Join Date: May 2005
Location: Essex, UK
Posts: 1,394
dharrison RepRank 3dharrison RepRank 3
Default

Thanks jannmirch

I already do have a portfolio page, but I am looking to have either random screenshots on the major pages (Home and services pages)or testimonials that I have collected from my existing customers.
__________________
Deb Harrison
DVH Design
Essex Web Design | Web Design Blog
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Tags: ,



Thread Tools
Display Modes

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

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


Search Engine Optimization by vBSEO 3.2.0