PDA

View Full Version : Displaying attached images through PHP?


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!

PascalGR
12-24-2006, 07:11 PM
I've found the problem yesterday. It's the mod_security that causes the problem. So, vBulleting was not the finest way to do easy content management for my site.

Regards