Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Random photo Album

Asked Modified Viewed 1,997 times
D
Driud
D
Driud 10
  • Newbie, joined since
  • Contributed 7 posts on the community forums.
  • Started 4 threads in the forums
  • Started this discussions
asked
Newbie

is it possible to have the random photo panel to display a specific photo album????
Edited by Driud on 17-09-2006 14:52,
0 replies

1 post

B
bmonkey
B
www.omschallom.com/../../images/news_cats/omschallom.png
mods.omschallom.com/../../images/clockwork_button.png
  • Junior Member, joined since
  • Contributed 36 posts on the community forums.
  • Started 5 threads in the forums
answered
Junior Member

Try this:

<?php

[color=red]$albumid = 5;[/color]

$result=dbquery(
"SELECT photo_id,photo_title,photo_thumb1 FROM ".$db_prefix."photos
WHERE album_id = $albumid
ORDER BY RAND() LIMIT 1"
);

opentable("Random Photo");

while ($data = dbarray($result)) {


echo "<center><a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' class='gallery'>
<img src='".PHOTOS."album_".$albumid."/".$data['photo_thumb1']."' title='".$data['photo_title']."' alt='".$data['photo_title']."'></a><br /><a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."'>".$data['photo_title']."</a></center>";

}


closetable();

?>
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 1 post
  • Votes 0 votes
  • Topic users 2 members

0 participants

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet