PascalGR
12-22-2006, 08:42 PM
Hi all,
I've search the forum but didn't find any similar question.
I've integrated the forum with the rest of my site and I use vBulletin as a sort of content management tool except from forum.
So in some of my PHP pages I need to display news with photos. Both news and images come from specific sub-forums (posts are news and photos are the attachments).
I've written a PHP function that is called within the img src to do so:
function cms_forum_attachment ($id, $thumbnail = false) {
global $CMS_FORUM_PATH;
return $CMS_FORUM_PATH . "attachment.php?attachmentid=$id&stc=1" . (($thumbnail == true) ? "&thumb=1": "");
}
but sometimes it doesn't display images at all. I've allowed unregistered users to download attatchments but it didn't fix anything. I've also added a delay so that it won't be called many times/sec but nothing.
Any ideas?
Thanks a lot!
I've search the forum but didn't find any similar question.
I've integrated the forum with the rest of my site and I use vBulletin as a sort of content management tool except from forum.
So in some of my PHP pages I need to display news with photos. Both news and images come from specific sub-forums (posts are news and photos are the attachments).
I've written a PHP function that is called within the img src to do so:
function cms_forum_attachment ($id, $thumbnail = false) {
global $CMS_FORUM_PATH;
return $CMS_FORUM_PATH . "attachment.php?attachmentid=$id&stc=1" . (($thumbnail == true) ? "&thumb=1": "");
}
but sometimes it doesn't display images at all. I've allowed unregistered users to download attatchments but it didn't fix anything. I've also added a delay so that it won't be called many times/sec but nothing.
Any ideas?
Thanks a lot!