Log in

View Full Version : Replacing images with text/image when viewed as guest (not working)


The Equivocate
06-26-2005, 10:30 PM
I have a babes forum (id #12) and I want guests to see a custom image I made when they try and view the pics. This should only happen in this forum; everywhere else, they can see images. Here's what I did to functions_bbcodeparse.php and it's not working (the guests can still see the babe images):

if($dobbimagecode AND ($bbuserinfo['userid'] == 0 OR $bbuserinfo['showimages']))
{
// do https://vborg.vbsupport.ru/
if($forum[forumid]==12) {
// replace image with error for guests.
$bbcode = preg_replace("|\[img\](.*)\[/img\]|i", "<a href=\"http://www.thesquaredcircle.com/register.php\"><div class=\"panel\" style=\"width:400px;\"><strong><img border=\"0\" src=\"http://www.thesquaredcircle.com/regview.gif\"></div></a>", $bbcode);
} else {
// members get to see the image.
$bbcode = preg_replace('#\[img\]\s*(https?://([^<>*"' . iif(!$vboptions['allowdynimg'], '?&') . ']+|[a-z0-9/\\._\- !]+))\[/img\]#iUe', "handle_bbcode_img_match('\\1')", $bbcode);
}

I also tried if ($forum['forumid'] == '12' && $bbuserinfo['userid'] == '0') { in the third line and it didn't work either... what am I doing wrong?