Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Link Anonymizer Details »»
Link Anonymizer
Version: 1.10, by Marco van Herwaarden Marco van Herwaarden is offline
Developer Last Online: Dec 2010 Show Printable Version Email this Page

Version: 3.5.1 Rating:
Released: 09-05-2005 Last Update: 11-24-2005 Installs: 154
Uses Plugins
 
No support by the author.

Link Anonymizer v1.02a & 1.03, 1.04, 1.05.3 & 1.10

Author: MarcoH64

vBulletin Version: 3.5.1

Warning: Version 1.02 might create double anonym links if you edit a post multiple times. Version 1.03 has been reported not to be working for some people. Please read posts in this thread if you plan on using this hack, until i had time to look into this.
v1.05 and higher should be the best versions
1.10 Is an updated version of 1.05.3 and is considered a stable release. Only version 1.10 will be supported now.

Description:
This Product will add a self configurable anonymising link to all external urls in posts.

Installation:
Install the XML-file as Product.

Configuration:
vBulletin Options->Link Anonymizer :
  • Local Addresses
Local addresses are not anonymized. If you leave this option blank, the value for vBulletin Options Cookie Domain will be used. Do not use a http:// prefix.

If you start the name with a dot (.mydomain.com) all server addresses ending with this will be considered local. If you want to add mulitple domain/servernames, seperate them by a single space.


Link to a anonymizer function. Use preceding / if needed. Other Usable Anonymizers:
Code:
http://anon.free.anonymizer.com/ 
 
http://anonym.webgurus.de (Thanks Wachtmeister)

  • Allways anonymize Unparseble URLs (* New in version 1.10)
Please click install if you are using this hack.

Donations are always welcomed at Paypal: marcoh64 AT gmail.com

Change log:
6-9-2005 v1.01
- 1 setting was missing from product file due to wrong Product. Fixed
7-9-2005 v1.02
- Under some conditions a newly posted post with only a link would not get anonymized. Fixed.
7-9-2005 v1.02a
- Fixed bug when handling generic local domain (starting with a dot '.'') Sorry for the many updates.
8-10-2005 v1.03
- Totally new way of doing this, on view instead of on write.
- Solved doubling the anonym link on edit
10-10-2005 v1.04
- Link not didn't get anonym prefix if URL= didn't contain http://. Solved.
- Added truncate table post_parsed to install routine.
1-11-2005 v1.05
- Standard Editor fixed
- Simple URL's in standard editor fixed.
- Default anonymizer changed
2-11-2005 v1.05.1
- Fixed bug where only the last url to the same domain in a single post was anonymised.
9-11-2005 v1.05.2
- Added option to ignore certain protocols in the vBulletin Options (ie. ignore https, ftp, ....).
- Attempt to fix reported bug where an inline fragment (#fragment) would also be anonymized.
10.11.2005 v1.05.3
- Another attempt to ignore fragments
25.11.2005 v1.10
- Fixed a bug where some urls could lead to a parse error. Example of an url leading to this error:
Code:
http://mymail@mymail.com:password@www.mydomain.com
- Added new parameter to vB Options: Always anonimyze unparseble URLs
- This is considered a very stable release. No bug reports pending
- All previous versions are from now on unsupported

Upgrades:
If you are running an older version and want to upgrade, simply do an overwrite install.

It is possible that there are still double links in the database from old versions. If you wish to remove these, run the following queries (make backup first!!):

SQL Query: (how to run queries)
update post set pagetext = replace(pagetext, "http://YOURANONIMIZERLINK/","");

Show Your Support

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

Comments
  #72  
Old 10-22-2005, 01:04 AM
bigmonay2k bigmonay2k is offline
 
Join Date: May 2004
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarcoH64
Sorry huys, i have been real busy the last week. I will try to have a look at the issues and the suggestions next week.
thanks dude
Reply With Quote
  #73  
Old 10-25-2005, 03:29 AM
Moosehunter Moosehunter is offline
 
Join Date: Dec 2003
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Computer Angel. Works great.

Quote:
Originally Posted by Computer_Angel
This is my solution for ver 1.04:

PHP Code:
if ($post['pagetext'])
{
    if (
preg_match_all("/(\[URL=\")(.[^\"\]]*)/i"$post['pagetext'], $matches))
    {
        
$localdomains = ($vbulletin->options['mh_anolink_localaddresses'] ? explode(" "$vbulletin->options['mh_anolink_localaddresses']) : ($vbulletin->options['cookiedomain'] ? array($vbulletin->options['cookiedomain']) : array($_SERVER['SERVER_NAME'])));
        
$preg_search = array();
        
$preg_replace = array();
        
        foreach (
$matches[2] AS $key=>$serverurl)
        {
            
// Do we have a local url?
            
$parsed_url parse_url($serverurl);
            
$servername $parsed_url['host'];
            foreach (
$localdomains AS $localdomain)
            {
                if (
substr($localdomain01) == ".")
                {
                    if (
preg_match("/$localdomain$/i"$servername))
                    {
                        continue 
2;
                    }
                }
                else
                {
                    if (
$localdomain == $servername)
                    {
                        continue 
2;
                    }
                }
            }
            
$anonymurl $vbulletin->options['mh_anolink_anonymizer'] . $serverurl;            
            
//$preg_search["$servername"] = "[URL=\"$serverurl";
            
$preg_search["$servername"] = $matches[0]["$key"];
            
//$preg_replace["$servername"] = "[URL=\"" . $anonymurl;
            
$preg_replace["$servername"] = $matches[1]["$key"].$anonymurl;            
            if (
$preg_search)
            {
                
$post['pagetext'] = str_replace($preg_search$preg_replace$post['pagetext']);            
            }
        }        
    }
    
//[URL]link[/URL]
    
if (preg_match_all("/(\[URL)(])(.[^\]]*)/i"$post['pagetext'], $matches))
    {
        
$localdomains = ($vbulletin->options['mh_anolink_localaddresses'] ? explode(" "$vbulletin->options['mh_anolink_localaddresses']) : ($vbulletin->options['cookiedomain'] ? array($vbulletin->options['cookiedomain']) : array($_SERVER['SERVER_NAME'])));
        
$preg_search = array();
        
$preg_replace = array();
        
        foreach (
$matches[3] AS $key=>$serverurl)
        {
            
// Do we have a local url?
            
$parsed_url parse_url($serverurl);
            
$servername $parsed_url['host'];
            foreach (
$localdomains AS $localdomain)
            {
                if (
substr($localdomain01) == ".")
                {
                    if (
preg_match("/$localdomain$/i"$servername))
                    {
                        continue 
2;
                    }
                }
                else
                {
                    if (
$localdomain == $servername)
                    {
                        continue 
2;
                    }
                }
            }
            
$anonymurl $vbulletin->options['mh_anolink_anonymizer'] . substr($serverurl,0,strlen($serverurl)-5);
            
$preg_search["$servername"] = $matches[0]["$key"];
            
$preg_replace["$servername"] = $matches[1]["$key"]."=\"".$anonymurl."\"".$matches[2]["$key"].$serverurl;                        
            if (
$preg_search)
            {
                
$post['pagetext'] = str_replace($preg_search$preg_replace$post['pagetext']);
            }
        }        
    }

Reply With Quote
  #74  
Old 10-25-2005, 08:33 AM
Catlover Catlover is offline
 
Join Date: Jul 2005
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How to anonimyze links in Private Messages and in signatures? Thanks for solution it works fine in posts.
Reply With Quote
  #75  
Old 10-26-2005, 07:06 AM
dasdingansich dasdingansich is offline
 
Join Date: Jan 2005
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Computer_Angel
This is my solution for ver 1.04:

PHP Code:
if ($post['pagetext'])
{
    if (
preg_match_all("/(\[URL=\")(.[^\"\]]*)/i"$post['pagetext'], $matches))
    {
        
$localdomains = ($vbulletin->options['mh_anolink_localaddresses'] ? explode(" "$vbulletin->options['mh_anolink_localaddresses']) : ($vbulletin->options['cookiedomain'] ? array($vbulletin->options['cookiedomain']) : array($_SERVER['SERVER_NAME'])));
        
$preg_search = array();
        
$preg_replace = array();
        
        foreach (
$matches[2] AS $key=>$serverurl)
        {
            
// Do we have a local url?
            
$parsed_url parse_url($serverurl);
            
$servername $parsed_url['host'];
            foreach (
$localdomains AS $localdomain)
            {
                if (
substr($localdomain01) == ".")
                {
                    if (
preg_match("/$localdomain$/i"$servername))
                    {
                        continue 
2;
                    }
                }
                else
                {
                    if (
$localdomain == $servername)
                    {
                        continue 
2;
                    }
                }
            }
            
$anonymurl $vbulletin->options['mh_anolink_anonymizer'] . $serverurl;            
            
//$preg_search["$servername"] = "[URL=\"$serverurl";
            
$preg_search["$servername"] = $matches[0]["$key"];
            
//$preg_replace["$servername"] = "[URL=\"" . $anonymurl;
            
$preg_replace["$servername"] = $matches[1]["$key"].$anonymurl;            
            if (
$preg_search)
            {
                
$post['pagetext'] = str_replace($preg_search$preg_replace$post['pagetext']);            
            }
        }        
    }
    
//[URL]link[/URL]
    
if (preg_match_all("/(\[URL)(])(.[^\]]*)/i"$post['pagetext'], $matches))
    {
        
$localdomains = ($vbulletin->options['mh_anolink_localaddresses'] ? explode(" "$vbulletin->options['mh_anolink_localaddresses']) : ($vbulletin->options['cookiedomain'] ? array($vbulletin->options['cookiedomain']) : array($_SERVER['SERVER_NAME'])));
        
$preg_search = array();
        
$preg_replace = array();
        
        foreach (
$matches[3] AS $key=>$serverurl)
        {
            
// Do we have a local url?
            
$parsed_url parse_url($serverurl);
            
$servername $parsed_url['host'];
            foreach (
$localdomains AS $localdomain)
            {
                if (
substr($localdomain01) == ".")
                {
                    if (
preg_match("/$localdomain$/i"$servername))
                    {
                        continue 
2;
                    }
                }
                else
                {
                    if (
$localdomain == $servername)
                    {
                        continue 
2;
                    }
                }
            }
            
$anonymurl $vbulletin->options['mh_anolink_anonymizer'] . substr($serverurl,0,strlen($serverurl)-5);
            
$preg_search["$servername"] = $matches[0]["$key"];
            
$preg_replace["$servername"] = $matches[1]["$key"]."=\"".$anonymurl."\"".$matches[2]["$key"].$serverurl;                        
            if (
$preg_search)
            {
                
$post['pagetext'] = str_replace($preg_search$preg_replace$post['pagetext']);
            }
        }        
    }

perfect, works fine, with all kinds of links.
@Marco: maybe make this the official one, until youu find more time.

thanks guys!

take care
Flint Stelter
http://www.ddas.de
Reply With Quote
  #76  
Old 10-26-2005, 03:58 PM
Lord Brar's Avatar
Lord Brar Lord Brar is offline
 
Join Date: Jul 2004
Posts: 102
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarcoH64
New version v1.04, should fix the reported bugs.

Will wait to see if this is working good for everyone (did some more extensive testing this time). If all is ok, i will have a look at the feature suggestions.

@dasdingansich
You can configure what anonymizer you want to use, but maybe i should change the default if that one is too much limited.
I installed it but nothing seems to happen. Could someone tell me where I could have gone wrong?
Reply With Quote
  #77  
Old 10-26-2005, 07:21 PM
tokenyank tokenyank is offline
 
Join Date: Jul 2005
Location: London
Posts: 142
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Marco, this seems much more robust than this one but I do not wish to use an external anon server like safeurl or whatever... Would/could this hack work using the links.php in the other hack for non-anon parsed url's?
Reply With Quote
  #78  
Old 10-26-2005, 09:01 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@tokenyank, i don't know, never looked at the other hack.

@Lord Brar
PM me MSN contact info and i will try to get in contact tomorrow.
Reply With Quote
  #79  
Old 10-26-2005, 10:38 PM
tokenyank tokenyank is offline
 
Join Date: Jul 2005
Location: London
Posts: 142
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In principal, it should work yeah? As safeurl works with a ?domain switch as does the other hack...

Hmm... I may play with it and find out for myself... Thanks anyway
Reply With Quote
  #80  
Old 10-28-2005, 05:43 PM
Computer_Angel Computer_Angel is offline
 
Join Date: Aug 2004
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Marco, this seems much more robust than this one but I do not wish to use an external anon server like safeurl or whatever... Would/could this hack work using the links.php in the other hack for non-anon parsed url's?
1.You can use links.php, just config your anonymous site to your site.
Ex: http://www.xxx.com/links.php?url=
2. The hack you said is which I don't like because It modified the class_bbcode.php code, so when you upgrade to new version --> need to hack again.
Reply With Quote
  #81  
Old 10-30-2005, 10:20 PM
tokenyank tokenyank is offline
 
Join Date: Jul 2005
Location: London
Posts: 142
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Computer_Angel
1.You can use links.php, just config your anonymous site to your site.
Ex: http://www.xxx.com/links.php?url=
2. The hack you said is which I don't like because It modified the class_bbcode.php code, so when you upgrade to new version --> need to hack again.
Just to confirm, it does work, though using the settings in the AdminCP did not do anything... Almost as if they weren't saving...

I modified the xml to reflect what anon service I wanted to use though and reinstalled and it works fine!

Thanks... Installed
Reply With Quote
Reply


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 04:25 AM.


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.05003 seconds
  • Memory Usage 2,406KB
  • 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
  • (2)bbcode_code
  • (2)bbcode_php
  • (6)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
  • (1)pagenav_pagelinkrel
  • (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