Member
Member
Martius   2007-07-19, 05:53
#1

Hello, I've a problem with these hacks. I installed the latest photos, highest rated photos hack and video hack. All three hacks are running perfect.If I'm in album I can see a video thumbnail so it's great too. But If I'm on index (where I've the latest photos etc.) I see only thumbnails of photos. I know where's a problem - in function latest_photos in code is

``

And it makes the problem. $filname mean full name of file - so if it is JPG file, it makes normal photo URL (....photo.jpg) but if it's video (myvideo.flv) it looks for thumbnail with the video name (myvideo.flv)

So how make that it will look for myvideo.jpg like in album where video thumbnails are running perfect?

Thanks

Member
Member
kenoji   2007-07-19, 14:59
#2

This is because zenphoto is meant for photos, and it pulls the thumbnail from the previous image's thumnail (index

Member
Member
Martius   2007-07-19, 18:11
#3

This is not the problem - I wrote it - it's in the $filename
Code of highest rated photos, look down - you can see this - ...src="'.WEBPATH.'/zen/i.php?a='.$album.'&i='.[b]$filename[/b].'&s=thumb">....

so if it's photo, thumbnail URL looks like this
/galerie/zen/i.php?a=fotky&i=photo.jpg&s=thumb
but if it's video, thumbnail URL looks like this
/galerie/zen/i.php?a=fotky&i=video.flv&s=thumb

And that's the problem!

`function show_highest_rated($number) {

      $images = query_full_array("SELECT images.albumid, images.filename AS filename, images.title AS title, ratings.total_value AS totalvalue, ratings.total_votes as votes, albums.folder AS folder FROM ".prefix('images')." AS images, ".('ratings')." AS ratings, ".prefix('albums')." AS albums WHERE images.albumid = albums.id AND images.show = 1 ORDER BY (ratings.total_value/ratings.total_votes) DESC LIMIT $number");

      $size = '_'.zp_conf('thumb_size').'_cw'.zp_conf('thumb_crop_width').'_ch'.zp_conf('thumb_crop_height');

      foreach ($images as $image) {

          $filename = $image['filename'];

          $name = $image['name'];

          $album = $image['folder'];

          $desc = $image['title'];

          $totalvalue = @number_format($image['totalvalue']/$image['votes'],2); 

            echo '

        ';

              if (zp_conf('mod_rewrite') == true) {

                  echo '';

              } else {

                  echo '';

              }

          echo '[img]'.WEBPATH.'/zen/i.php?a='.$album.'&i='.$filename.'&s=thumb[/img]';

          echo '';

      }

 }  `
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.