forum.coppermine-gallery.net
Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: antisa33 on June 01, 2007, 12:50:24 am
-
Hello all people
I need to see a random thumbnail in the anycontent.php file.
Is there a way to do it easily ?
Best regards
-
I have found this one
<?
$randoms = 1;
for($i=0; $i < $randoms; $i++){
$image = get_pic_data('random', $count, $album_name, 0, 1, false);
$image = current($image);
$random_images = "<a href=\"displayimage.php?album=".$image['aid']."&pos=-{$image['pid']} \">".
"<img src=\"" . get_pic_url($image, 'thumb') . "\" ".
"class=\"leftmenuimage\"\></a><br /><br />";
}
echo "$random_images";
?>
But i need a thumb from only the categorie 3, how can i do it ?
Thanks
-
Sorry for my post but i dont find the "edit" option :-\
I cant do what i want with cpmfetch because I need in anycontent.php, to select by rand() a swf file from the categorie 3 with a lot of albums for example.
Then i need to play with this swf file on the anycontent and i have to see a link to this swf file in his album.
Is it possible?
Thanks a lot
-
The following code (posted earlier) works great for pulling a single random image onto anycontent.php - but how can it be tweaked to pull in 5 random images horizontally?
Please.
<?
$randoms = 1;
for($i=0; $i < $randoms; $i++){
$image = get_pic_data('random', $count, $album_name, 0, 1, false);
$image = current($image);
$random_images = "<a href=\"displayimage.php?album=".$image['aid']."&pos=-{$image['pid']} \">".
"<img src=\"" . get_pic_url($image, 'thumb') . "\" ".
"class=\"leftmenuimage\"\></a><br /><br />";
}
echo "$random_images";
?>
-
<?
$randoms = 5;
for($i=0; $i < $randoms; $i++){
$image = get_pic_data('random', $count, $album_name, 0, 1, false);
$image = current($image);
$random_images .= "<a href=\"displayimage.php?album=".$image['aid']."&pos=-{$image['pid']} \">".
"<img src=\"" . get_pic_url($image, 'thumb') . "\" ".
"class=\"leftmenuimage\"\></a>";
}
echo "$random_images";
?>
-
thanks a bunch
-
Super! And how i make picture with border=0?
-
;)
<?
$randoms = 1;
for($i=0; $i < $randoms; $i++){
$image = get_pic_data('random', $count, $album_name, 0, 1, false);
$image = current($image);
$random_images .= "<a href=\"displayimage.php?album=".$image['aid']."&pos=-{$image['pid']} \">".
"<img src=\"" . get_pic_url($image, 'thumb') . "\" ".
"class=\"leftmenuimage\" border=\"0\"\></a>";
}
echo "$random_images";
?>