![]() |
Perhaps "$vbphrase[pictures]" is not defined in phrases section?
Thanks in advance. |
Quote:
I would love it to have emtpy albums to not show...somehow. Here is a link to it. |
Quote:
SELECT album.*, picture.pictureid, picture.extension, picture.idhash, picture.thumbnail_dateline, picture.thumbnail_width, picture.thumbnail_height, user.* FROM " . TABLE_PREFIX . "album AS album LEFT JOIN " . TABLE_PREFIX . "picture AS picture ON (album.coverpictureid = picture.pictureid AND picture.thumbnail_filesize > 0) LEFT JOIN " . TABLE_PREFIX . "user AS user ON (album.userid = user.userid) WHERE album.state IN ('" . implode("', '", $state) . "') AND album.visible > 0 ORDER BY $sortname $sortorder LIMIT $start, $perpage "); |
I still get the error:
MySQL Error : Unknown column 'album.visible' in 'where clause' |
Is that the same error you had before? I'm using this mod on 3.7.2 and the album.visible hack worked just fine, its just another condition thrown into the query. Are you able to access your forum database and see if there is a column called 'visible' in your table named 'album'?
|
in table vb_album there is a column named visible.
All Columns: albumid userid createdate lastpicturedate visible moderation title description state coverpictureid Error Message emailed to me: Invalid SQL: SELECT COUNT(*) AS total FROM vb_album WHERE state IN ('public', 'private', 'profile') AND album.visible > 0; MySQL Error : Unknown column 'album.visible' in 'where clause' Error Number : 1054 --------------------Added to--------------- $albumcount = $db->query_first(" SELECT COUNT(*) AS total FROM " . TABLE_PREFIX . "album WHERE state IN ('" . implode("', '", $state) . "') AND album.visible > 0 "); ------------And-------------- $albums = $db->query_read(" SELECT album.*, picture.pictureid, picture.extension, picture.idhash, picture.thumbnail_dateline, picture.thumbnail_width, picture.thumbnail_height, user.* FROM " . TABLE_PREFIX . "album AS album LEFT JOIN " . TABLE_PREFIX . "picture AS picture ON (album.coverpictureid = picture.pictureid AND picture.thumbnail_filesize > 0) LEFT JOIN " . TABLE_PREFIX . "user AS user ON (album.userid = user.userid) WHERE album.state IN ('" . implode("', '", $state) . "') AND album.visible > 0 ORDER BY $sortname $sortorder LIMIT $start, $perpage "); |
Okay I think you're getting closer - since you have a table prefix of vb_ try this
$albumcount = $db->query_first(" SELECT COUNT(*) AS total FROM " . TABLE_PREFIX . "album WHERE state IN ('" . implode("', '", $state) . "') AND vb_album.visible > 0 "); but leave the second SELECT statement as album.visible don't change that one to vb_album.visible and see what happens |
Quote:
|
woohoo! glad to help, ProtoPC. :)
|
One of the most usful addons, altho this should have been default with vbulletin, go copyright it and make them pay you to use it. :)
|
All times are GMT. The time now is 12:37 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|