Quote:
Originally Posted by TransAmDan
Thanks for the response, much appreciated.
Where would i put the var_dump? in the Template? I have tried a few different formats, but either get an error or no output.
{vb:raw var_dump($pictures)}
{vb:var_dump($pictures)}
|
Put it in album.php just after you run the query associated with $pictures.
Might also be worth putting exit after it too, so the var_dump is the only output.
PHP Code:
$pictures = $db->query_read("
SELECT
a.attachmentid, a.userid, a.caption, a.dateline, a.state, a.filename, a.external_source,
fd.filesize, IF(fd.thumbnail_filesize > 0, 1, 0) AS hasthumbnail, fd.thumbnail_dateline, fd.thumbnail_width, fd.thumbnail_height
$hook_query_fields
FROM " . TABLE_PREFIX . "attachment AS a
INNER JOIN " . TABLE_PREFIX . "filedata AS fd ON (fd.filedataid = a.filedataid)
$hook_query_joins
WHERE
a.contentid = $albuminfo[albumid]
AND
a.contenttypeid = " . intval($contenttypeid) . "
" . ((!can_moderate(0, 'canmoderatepictures') AND $albuminfo['userid'] != $vbulletin->userinfo['userid']) ? "AND a.state = 'visible'" : "") . "
$hook_query_where
ORDER BY a.dateline DESC
LIMIT $start, $perpage
");
echo "<pre>";
var_dump($pictures);
echo "</pre>";
exit;
I assume you are testing this on a different environment than live?