SAPR: Advanced Post Rating system (ajax)

search the forum first next time before requesting please...

http://www.vbteam.info/vb-3-7-x-add...67-sapr-advanced-post-rating-system-ajax.html
http://www.vbteam.info/vb-3-7-x-addons-template-modifications/2552-vb-news-cms.html
http://www.vbteam.info/vb-3-7-x-addons-template-modifications/2155-more-info-thread-ratings.html


STEPS:

1. Copy the album.php file and rename to (say) gallery.php
2. Open this new file in a text / php editor and navigate to line 1370 approx
3. Replace this part of the code

PHP Code:
Code:
 // fetch data and prepare data - took out  WHERE album.userid = $userinfo[userid]
 $albums = $db->query_read("
  SELECT album.*,
   picture.pictureid, picture.extension, picture.idhash,
   picture.thumbnail_dateline, picture.thumbnail_width, picture.thumbnail_height
   $hook_query_fields
  FROM " . TABLE_PREFIX . "album AS album
  LEFT JOIN " . TABLE_PREFIX . "picture AS picture ON (album.coverpictureid = picture.pictureid AND picture.thumbnail_filesize > 0)
  $hook_query_joins
   WHERE album.userid = $userinfo[userid]
   AND album.state IN ('" . implode("', '", $state) . "')
   $hook_query_where
  ORDER BY album.lastpicturedate DESC
  LIMIT $start, $perpage
 ");
with

PHP Code:
Code:
 // fetch data and prepare data - took out WHERE album.userid = $userinfo[userid]
 $albums = $db->query_read("
  SELECT album.*,
   picture.pictureid, picture.extension, picture.idhash,
   picture.thumbnail_dateline, picture.thumbnail_width, picture.thumbnail_height
   $hook_query_fields
  FROM " . TABLE_PREFIX . "album AS album
  LEFT JOIN " . TABLE_PREFIX . "picture AS picture ON (album.coverpictureid = picture.pictureid AND picture.thumbnail_filesize > 0)
  $hook_query_joins
   WHERE album.state IN ('" . implode("', '", $state) . "')
   $hook_query_where
  ORDER BY album.lastpicturedate DESC
  LIMIT $start, $perpage
 ");
It's as simple as that!
 
Back
Top