Version: 1.00, by DILLIGAF
Developer Last Online: Oct 2010
Version: 3.0.3
Rating:
Released: 11-06-2004
Last Update: Never
Installs: 2
No support by the author.
This is my first submitted hack to Vb.org, so please go easy on me.
I will be unable to provide any support for this little hack so please do use it at your own risk. I honestly feel you will have no problems with this hack do to there is very little editing and it can also be reversed.
NAME: Chriss Image and Signature Blocker to Unregistered Members.
VERSION SUPPORTED: Vb 3.0.0 or better
FILES TO EDIT: One
QUARRIES TO RUN: None
INSTALL TIME: Less then two minutes
SUPPORT OFFERED: None
I wrote this hack for my website to stop eveyone from leaching members pictures from our forums. We had a bad case of hyper-linking and other issues like this.
It will also aid in increasing your forums traffic, and member count.
I will try to check this thread as often as I can to get your feedback, but I am one busy person. Our site gets on adv. about 10,000 hits a day.
Take care and hope you can find some use for this.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Will this also affect Guests being able to view emoticon/smilies images? And if not, you may want to add the instructions for doing that, too. I'll be installing this tomorrow I think.
the problem with your way is if a post full of text has an image in it, it removes the entire post's content from the guests view instead of just the image... which isnt good.
// do [img]https://vborg.vbsupport.ru/[/img]
if($bbuserinfo[userid]== 0) {
// replace image with error for guests.
$bbcode = preg_replace("|\[img\](.*)\[/img\]|i", "<a href=\"http://www.your-url-here.com/register.php\"><div class=\"panel\" style=\"width:500px;\"><strong>ERROR: </strong>Guests may not view user posted images. Click here to join our forum!</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);
}
(dont forget to replace 'your-url-here' with your forum's url)
the problem with your way is if a post full of text has an image in it, it removes the entire post's content from the guests view instead of just the image... which isnt good.
// do [img]https://vborg.vbsupport.ru/[/img]
if($bbuserinfo[userid]== 0) {
// replace image with error for guests.
$bbcode = preg_replace("|\[img\](.*)\[/img\]|i", "<a href=\"http://www.your-url-here.com/register.php\"><div class=\"panel\" style=\"width:500px;\"><strong>ERROR: </strong>Guests may not view user posted images. Click here to join our forum!</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);
}
(dont forget to replace 'your-url-here' with your forum's url)
if ($post['showsignature'] AND $vboptions['allowsignatures'] AND trim($post['signature']) != '' AND (!$bbuserinfo['userid'] OR $bbuserinfo['showsignatures'] ) AND $checkperms["$post[userid]"]['genericpermissions'] & CANUSESIGNATURE)
replace
PHP Code:
if ($post['showsignature'] AND $vboptions['allowsignatures'] AND trim($post['signature']) != '' AND (!$bbuserinfo['userid'] OR $bbuserinfo['showsignatures']) AND $bbuserinfo['usergroupid'] != '1' AND $checkperms["$post[userid]"]['genericpermissions'] & CANUSESIGNATURE)