random thumb in anycontent ? random thumb in anycontent ?
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

random thumb in anycontent ?

Started by antisa33, June 01, 2007, 12:50:24 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

antisa33

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


antisa33

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

antisa33

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

Gephri

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";
?>

Joachim Müller

<?
    $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";
?>

Gephri


Alfinators

Super! And how i make picture with border=0?

Alfinators

  ;)
<?
    $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";
?>