PDA

View Full Version : Block Images and Signatures to Unregitered Guest


DILLIGAF
11-06-2004, 10:00 PM
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: Chris’s 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.

ecarabin
11-20-2004, 07:02 PM
clicked on install.

thanx ^_^

Mythor
12-01-2004, 01:51 PM
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. :)

TwinsForMe
12-07-2004, 05:56 AM
I ended up with a parse error on line 454. :(

* TwinForMe clicks uninstall

Moparx
12-08-2004, 08:18 PM
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.

this is what i use for my forum:

open functions_bbcodeparse.php and find:
// do https://vborg.vbsupport.ru/
$bbcode = preg_replace('#\[img\]\s*(https?://([^<>*"' . iif(!$vboptions['allowdynimg'], '?&') . ']+|[a-z0-9/\\._\- !]+))\[/img\]#iUe', "handle_bbcode_img_match('\\1')", $bbcode);
replace with:
// do https://vborg.vbsupport.ru/
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)

bold
12-09-2004, 01:25 AM
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.

this is what i use for my forum:

open functions_bbcodeparse.php and find:
// do https://vborg.vbsupport.ru/
$bbcode = preg_replace('#\[img\]\s*(https?://([^<>*"' . iif(!$vboptions['allowdynimg'], '?&') . ']+|[a-z0-9/\\._\- !]+))\[/img\]#iUe', "handle_bbcode_img_match('\\1')", $bbcode);
replace with:
// do https://vborg.vbsupport.ru/
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)
thanks moparx :)

NineToez
12-17-2005, 05:27 AM
Can someone please port this for 3.5.x?

Moment
03-04-2006, 08:52 PM
SIGNATURE

this for 3.0.7

open
and edit the file functions_showthread.php



find

if ($post['showsignature'] AND $vboptions['allowsignatures'] AND trim($post['signature']) != '' AND (!$bbuserinfo['userid'] OR $bbuserinfo['showsignatures'] ) AND $checkperms["$post[userid]"]['genericpermissions'] & CANUSESIGNATURE)

replace

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)

and save

zylstra
04-22-2006, 07:40 PM
For just blocking signatures for 3.5, all that is needed is to change the postbit template from: <if condition="$post['signature']">
to: <if condition="$post['signature'] AND $show['member']">

SnitchSeeker
02-03-2007, 12:56 PM
For just blocking signatures for 3.5, all that is needed is to change the postbit template from: <if condition="$post['signature']">
to: <if condition="$post['signature'] AND $show['member']">


Thank you, that's what I was looking for. :)

EDIT: That didn't work for me. I can still see siggies when I am not logged in on my site (http://snitchseeker.com/forum/).

EDIT 2: I found one that worked for me (http://www.vbulletin.com/forum/showpost.php?p=1193513&postcount=2) on vBulletin.com: http://www.vbulletin.com/forum/showthread.php?t=166091

zylstra
02-03-2007, 04:47 PM
EDIT: That didn't work for me. I can still see siggies when I am not logged in on my site (http://snitchseeker.com/forum/).
Yes, I was just providing a simple solution to what this mod, Signature Blocker to Unregistered Members, accomplished.

Carlos2
11-13-2007, 08:25 AM
Hi, how can i block images and signatures with 3.6¿¿?

mallick
11-16-2008, 05:46 PM
does this block guests from viewing images inside tags?? i would really like to do it for my forum.. Vbulletin 3.7.4 .. help please.