View Single Post
Old April 4th, 2006, 01:55 PM   #1 (permalink)
flavoflav
Member
Verified Customer
 
Join Date: Jan 2005
Location: Lafayette, CA
Posts: 31
Send a message via AIM to flavoflav Send a message via Yahoo to flavoflav
inc_photopost.php and inc_features.php

Okay I run photopost pro and have tried to integrate it with my vbulletin board. I have it running and it works, but it has strange behavior. I have 3 thumbnails - I have it set to the Random feature and it will not show member galleries. I have inc_photopost.php set to show member galleries on the index - I allow non logged in people to view all my galleries.

These are the sql select statements from inc_features.php - what can I add to have them include the member galleries?

switch ($q_switch) {
case "most_view":
$query = "SELECT p.id,p.user,p.userid,p.cat,p.bigimage,p.height,p.width,c.catname,c.photos,c.posts
FROM {$pp_db_prefix}photos p
LEFT JOIN {$pp_db_prefix}categories c ON c.id = p.cat
WHERE c.cattype = 'c' AND p.cat != 500 AND p.storecat = 0
ORDER BY views DESC";
break;

case "latest":
$query = "SELECT p.id,p.user,p.userid,p.cat,p.bigimage,p.height,p.width,c.catname,c.photos,c.posts
FROM {$pp_db_prefix}photos p
LEFT JOIN {$pp_db_prefix}categories c ON c.id = p.cat
WHERE c.cattype = 'c' AND p.cat != 500 AND p.storecat = 0
ORDER BY date DESC";
break;

default:
$query = "SELECT p.id,p.user,p.userid,p.cat,p.bigimage,p.height,p.width,c.catname,c.photos,c.posts
FROM {$pp_db_prefix}photos p
LEFT JOIN {$pp_db_prefix}categories c ON c.id = p.cat
WHERE c.cattype = 'c' AND p.cat != 500 AND p.storecat = 0
ORDER BY RAND()";
flavoflav is offline   Reply With Quote