Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

Reply
 
Thread Tools
vB3 Block PHP, CODE and HTML from unregistered users Details »»
vB3 Block PHP, CODE and HTML from unregistered users
Version: 1.00, by Boofo Boofo is offline
Developer Last Online: Jun 2012 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 01-03-2004 Last Update: Never Installs: 42
 
No support by the author.

vB3 Block PHP, CODE and HTML from unregistered visitors v1.1
(By Boofo)

What does this hack do?
This will block all php, code and html code from all unregistered users. Any code bewteen those tags will be replaced will a line telling them they are not allowed to view the code and to please register. (You can change the messages to whatever you like.) Included is also the code for the QUOTE boxes. I don't use the QUOTE boxes bypass on my board, but I have the option ready in case someone decides to quote code, php or html code to bypass this hack. Anything between the code, php or html tags will be parsed out, even quote tags, as long as it is between one of the other tags within the quote itself. If someone just puts QUOTE tags around the code itself, then it will show as normal (unless you add the quote bypass below).

Version Information:
Version 1.0 --Initial release
Version 1.1 --Updated to now work in the archive. Also added the ability to double-click the code box to copy the code to the clipboard. Only works in IE so far. Will be adding the double-clicking ability for other browers as I find what will work with them.

Installation overview:
Files to edit: (2)
--includes/functions_bbcodeparse.php
--archive/index.php
Templates to edit: 3 (Optional: 2)
--bbcode_code
--bbcode_html
--bbcode_php
(Optional)
--bbcode_sql
--bbcode_quote
Phrases to add: 3 (Optional: 2)
--bf2_block_code
--bf2_block_html
--bf2_block_php
(Optional)
--bf2_sql_code
--bbcode_quote

If you find this hack useful, please click the install button.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 04-22-2004, 03:09 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can't believe it has changed that much where it won't work in 3.0.1. Carefully go through the hack again and make sure you didn't miss anything. Then, let me know and we will see what needs to be done to get it working for you.
Reply With Quote
  #33  
Old 04-22-2004, 10:47 PM
Mr. HillBilly Mr. HillBilly is offline
 
Join Date: Oct 2003
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Boofo, I think people are having problems with 3.0.1 because the hacks templates are out of date.


I added the lines needed into the default vB 3.0.1 BBcode templates so it will work with the latest versions. I have tested this on an vB 3.0.1 board.


bbcode_code:
[CODE]
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px">$vbphrase
Code:
:</div>
<pre class="alt2" style="margin:0px; padding:$stylevar[cellpadding]px; border:1px inset; width:$stylevar[codeblockwidth]; height:{$blockheight}px; overflow:auto"><if condition="$bbuserinfo['userid']">$code<else />$vbphrase[bf2_block_code]</if></pre>
</div>
bbcode_html:
Code:
 
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px">$vbphrase[html_code]:</div>
<pre class="alt2" style="margin:0px; padding:$stylevar[cellpadding]px; border:1px inset; width:$stylevar[codeblockwidth]; height:{$blockheight}px; overflow:auto"><if condition="$bbuserinfo['userid']">$code<else />$vbphrase[bf2_block_html]</if></pre>
</div>
bbcode_php:
Code:
 
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px">$vbphrase[php_code]:</div>
<div class="alt2" style="margin:0px; padding:$stylevar[cellpadding]px; border:1px inset; width:$stylevar[codeblockwidth]; height:{$blockheight}px; overflow:auto">
<code style="white-space:nowrap">
<!-- php buffer start --><if condition="$bbuserinfo['userid']">$code<else />$vbphrase[bf2_block_php]</if><!-- php buffer end -->
</code>
</div>
</div>
bbcode_quote:
Code:
<div style="margin:20px; margin-top:5px; <if condition="$show['iewidthfix']">width: 100%;</if>">
<div class="smallfont" style="margin-bottom:2px">$vbphrase[quote]:</div>
<table cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%">
<if condition="$bbuserinfo['userid']">
<tr>
<td class="alt2" style="border:1px inset">
<if condition="$show['username']">
	<div><phrase 1="$username">$vbphrase[originally_posted_by_x]</phrase></div>
	<div style="font-style:italic">$message</div>
<else />
	$message
</if>
					<else />$vbphrase[bf2_block_quote]
				 </if>
</td>
</tr>
</table>
</div>
I suggest people use this code on their 3.0.1 boards.

Also, could you provide a way to make it so guests can't see the code in the threads archive?
Reply With Quote
  #34  
Old 04-23-2004, 05:33 PM
Bulent Tekcan Bulent Tekcan is offline
 
Join Date: Oct 2003
Location: TURKEY - Istanbul
Posts: 437
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did you different change in functions_bbcodeparse.php ? Because my board still not work.
Reply With Quote
  #35  
Old 04-23-2004, 06:32 PM
Mr. HillBilly Mr. HillBilly is offline
 
Join Date: Oct 2003
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by turkeyforum
Did you different change in functions_bbcodeparse.php ? Because my board still not work.
Nope. Make sure you got ever line because the instructions can be confusing since they look the same.
Reply With Quote
  #36  
Old 04-23-2004, 06:59 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Mr. HillBilly
Boofo, I think people are having problems with 3.0.1 because the hacks templates are out of date.


I added the lines needed into the default vB 3.0.1 BBcode templates so it will work with the latest versions. I have tested this on an vB 3.0.1 board.

I suggest people use this code on their 3.0.1 boards.

Also, could you provide a way to make it so guests can't see the code in the threads archive?
Can you attach a txt file of the exact code for those templates in a default 3.0.1 installation? I have an update to do for this and I have other code that needs to be added to them as well (Click in box to copy to clipboard, etc.). Also, was the code to find in the php files different?
Reply With Quote
  #37  
Old 04-23-2004, 07:33 PM
vau7 vau7 is offline
 
Join Date: Mar 2004
Posts: 199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How can i use it with the url-tag? I would like to make Links hidden to guests.
Reply With Quote
  #38  
Old 04-23-2004, 08:37 PM
Mr. HillBilly Mr. HillBilly is offline
 
Join Date: Oct 2003
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo
Can you attach a txt file of the exact code for those templates in a default 3.0.1 installation? I have an update to do for this and I have other code that needs to be added to them as well (Click in box to copy to clipboard, etc.). Also, was the code to find in the php files different?
PHP files had no different code.


Heres the .txt you requested
Reply With Quote
  #39  
Old 04-23-2004, 08:39 PM
Liquid1ce's Avatar
Liquid1ce Liquid1ce is offline
 
Join Date: Feb 2004
Location: /root
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

what about bbcode for links?
IE: [url] tags?
Reply With Quote
  #40  
Old 04-23-2004, 08:46 PM
Mr. HillBilly Mr. HillBilly is offline
 
Join Date: Oct 2003
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Liquid1ce
what about bbcode for links?
IE: [url] tags?
Let me see if I can do this
Reply With Quote
  #41  
Old 04-23-2004, 08:54 PM
Liquid1ce's Avatar
Liquid1ce Liquid1ce is offline
 
Join Date: Feb 2004
Location: /root
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This would hide the links to unreg'd?

Code:
<if condition="$bbuserinfo[userid]">
<if condition="$show['url_bbcode']">
<td><div class="imagebutton" id="cmd_wrap0_code"><img src="$stylevar[imgdir_editor]/code.gif" alt="$vbphrase[wrap_code_tags]" width="21" height="20" /></div></td>
</if>
<else />
<td><img src="$stylevar[imgdir_editor]/mustreg.gif" alt="Must be registered to use these BB codes" width="92" height="20" /></td>
</if>
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:07 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.12540 seconds
  • Memory Usage 2,312KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (5)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete