Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
Anonym.to URL Redirector Details »»
Anonym.to URL Redirector
Version: 1.00, by The M.I.P. The M.I.P. is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.0.x Rating:
Released: 11-01-2004 Last Update: Never Installs: 5
 
No support by the author.

This tiny modification adds a redirector like http://anonym.to/? to external (non local) URLs. External links open in a new browser window, local ones open in the same window.
Have a look on the Active Link Security modification which does pretty much the same.

Use the patch below to apply the needed changes to your includes/functions_bbcode.php.

To apply it manually, open your includes/functions_bbcode.php and search for "function handle_bbcode_url".
Replace the lines beginning with "-" inside the patch with those beginning with "+" (don't include the "+/-").

Code:
diff -urw vbb.303/upload/includes/functions_bbcodeparse.php vbb.303.urlprefix/upload/includes/functions_bbcodeparse.php
--- vbb.303/upload/includes/functions_bbcodeparse.php	Wed Aug 25 09:36:06 2004
+++ vbb.303.urlprefix/upload/includes/functions_bbcodeparse.php	Tue Aug 31 15:58:59 2004
@@ -1437,7 +1442,7 @@
 // ###################### Start handle_bbcode_url #######################
 function handle_bbcode_url($text, $link, $type = 'url')
 {
-	global $wysiwygparse;
+	global $wysiwygparse, $vboptions;
 
 	if (trim($text) == '')
 	{
@@ -1475,8 +1480,18 @@
 
 	if ($type == 'url')
 	{
+		if (stristr($rightlink,$vboptions['bburl']))
+		{
+		  	$urlprefix = '';
+		  	$target = "_self";
+		}
+		else
+		{
+		  	$urlprefix = $vboptions['urlprefix'];
+		  	$target = "_blank";
+		}
 		// standard URL hyperlink
-		return "<a href=\"$rightlink\" target=\"_blank\">$text</a>";
+		return "<a href=\"{$urlprefix}{$rightlink}\" target=\"{$target}\">$text</a>";
 	}
 	else
 	{
Now switch into debug mode by adding a line $debug = true; to your includes/config.php.

Go into your vBulletin Options in your administration control panel (AdminCP). Choose an appropiate setting group (e.g. "General Settings").

Add a new setting (you need to be in debug mode for this) for your URL redirector:
Varname: urlprefix
Title: URL Prefix/Redirector
Description: URL Prefix like http://anonym.to/?
Default: http://anonym.to/?
vBulletin Default: No


Save the new setting, check if it appears in your vBulletin Options (again, save it), remove the debug mode line in your config.php and you're done.

Show Your Support

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

Comments
  #2  
Old 11-02-2004, 03:26 PM
nexialys
Guest
 
Posts: n/a
Default

this is a known hack released by time to time... seems that nobody is willing to have a real website,...lol
Reply With Quote
  #3  
Old 11-02-2004, 05:57 PM
The M.I.P.'s Avatar
The M.I.P. The M.I.P. is offline
 
Join Date: Nov 2002
Location: 127.0.0.1
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by nexialys
this is a known hack released by time to time... seems that nobody is willing to have a real website,...lol
Yep, but I got too many requests for this **** by users in my forums, so I decided to post it here.
Reply With Quote
  #4  
Old 11-02-2004, 06:20 PM
Blam Forumz Blam Forumz is offline
 
Join Date: Jun 2004
Posts: 554
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Its been done...
Reply With Quote
  #5  
Old 11-04-2004, 11:11 PM
dndog dndog is offline
 
Join Date: Apr 2004
Posts: 134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am still confused about the concept of this hack. Does it block the originating website from being tracked?
Reply With Quote
  #6  
Old 11-05-2004, 05:19 PM
aranthorn's Avatar
aranthorn aranthorn is offline
 
Join Date: Jun 2004
Location: Chicago
Posts: 137
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't care about different releases, it's about making the effort to share something.

Nice job, keep it up.
Reply With Quote
  #7  
Old 11-08-2004, 10:44 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the post.

Think there is a small typo in the source you posted. making local links also be run through the anonymizer:
Code:
+		if (stristr($righturl,$vboptions['bburl']))
+		{
Should be:
Code:
+		if (stristr($rightlink,$vboptions['bburl']))
+		{
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 03:55 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.03977 seconds
  • Memory Usage 2,253KB
  • Queries Executed 20 (?)
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
  • (3)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (7)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete