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)
-   -   Disallow visitors to see the 'images' (https://vborg.vbsupport.ru/showthread.php?t=75880)

Creative Suite 02-06-2005 10:00 PM

Disallow visitors to see the 'images'
 
What it does ?

Disallows visitors to see the images in the Forum :)


++++++++
----------
++++++++


in the functions_bbcodeparse.php find :

PHP Code:

    $link strip_smilies(str_replace('\\"''"'$link));

    
// remove double spaces -- fixes issues with wordwrap
    
$link str_replace('  '''$link);
    return 
'<img src="' .  $link '" border="0" alt="" />'

replace it with :

PHP Code:

global $bbuserinfo;
    
$link strip_smilies(str_replace('\\"''"'$link));

    
// remove double spaces -- fixes issues with wordwrap
    
$link str_replace('  '''$link);
if(
$bbuserinfo[userid] != 0){ 
    return 
'<img src="' .  $link '" border="0" alt="" />';
}else{
return 
"
<b><font color='#FF0000' face='Microsoft Sans Serif' size='2'>
<a target='_blank' href='register.php'><font color='#FF0000'>
<span style='text-decoration: none'>[<span lang='ar-kw'>
</span>Sorry you can</font><font color='#FF0000' face='Tahoma' size='2'>'</font><font color='#FF0000' face='Microsoft Sans Serif' size='2'>t see this image before </font>
</span></font></a><a target='_blank' href='register.php'>
<span style='text-decoration: none'>
<font color='#008000' face='Microsoft Sans Serif' size='2'>registering</font><font color='#FF0000' face='Microsoft Sans Serif' size='2'><span lang='ar-kw'>
</span>]</font></span></a></b>
"
;


all done :)

don't forget to click install* :p

tnguy3n 02-07-2005 07:07 AM

interesting! however, this would be much simplier using template mod. i.e
Code:

<if conditional="$bbuserinfo==0">message<else>show image</if>

SmEdD 02-07-2005 07:18 AM

He isn't doing attached images, he is removing the [ IMG ] tags and replacing them!

Phalynx 02-07-2005 08:45 AM

Nice, thanks!

Beermonster 02-07-2005 09:14 AM

good idea will also save bandwidth :)

[high]* Beermonster clicks install[/high]

Creative Suite 02-07-2005 01:28 PM

Thanks 4 replying 2 all :)

kall 02-07-2005 07:43 PM

"Registering"

Other than that, nice idea. :)

Creative Suite 02-07-2005 07:52 PM

kall

error with writing on the keyboard :) , been edited ;)

msimplay 02-07-2005 08:10 PM

hmm it also takes away the text thats in those posts

good idea but needs a bit of work

apfparadise 02-07-2005 10:08 PM

Another Great hack CS. Installed.

BUT, here are a couple of things I would like to be better:

1. The word "registering" should be a link to the register.php page. I dont know how to do it, but it seems easy. I thought it was from your images, but it does not click.

2. It takes out the whole post, there could be tons of text, but it takes it all out, can it be limited to just IMG and URL links, but leave the text intact? That would be great.

Eagerly waiting for the fixes :)


All times are GMT. The time now is 08:45 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.01382 seconds
  • Memory Usage 1,735KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_php_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