vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Block Images and Signatures to Unregitered Guest (https://vborg.vbsupport.ru/showthread.php?t=71456)

DILLIGAF 11-06-2004 10:00 PM

Block Images and Signatures to Unregitered Guest
 
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. :(

[high]* TwinForMe clicks uninstall[/high]

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:
PHP Code:

// do [img]https://vborg.vbsupport.ru/[/img]
$bbcode preg_replace('#\[img\]\s*(https?://([^<>*"' iif(!$vboptions['allowdynimg'], '?&') . ']+|[a-z0-9/\\._\- !]+))\[/img\]#iUe'"handle_bbcode_img_match('\\1')"$bbcode); 

replace with:
PHP Code:

// 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)

bold 12-09-2004 01:25 AM

Quote:

Originally Posted by Moparx
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:
PHP Code:

// do [img]https://vborg.vbsupport.ru/[/img]
$bbcode preg_replace('#\[img\]\s*(https?://([^<>*"' iif(!$vboptions['allowdynimg'], '?&') . ']+|[a-z0-9/\\._\- !]+))\[/img\]#iUe'"handle_bbcode_img_match('\\1')"$bbcode); 

replace with:
PHP Code:

// 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)

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

PHP Code:

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

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:
Code:

                <if condition="$post['signature']">
to:
Code:

                <if condition="$post['signature'] AND $show['member']">

SnitchSeeker 02-03-2007 12:56 PM

Quote:

Originally Posted by zylstra (Post 957289)
For just blocking signatures for 3.5, all that is needed is to change the postbit template from:
Code:

                <if condition="$post['signature']">
to:
Code:

                <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.

EDIT 2: I found one that worked for me on vBulletin.com: http://www.vbulletin.com/forum/showthread.php?t=166091


All times are GMT. The time now is 11:38 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01070 seconds
  • Memory Usage 1,765KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (6)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete