vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Link Anonymizer (https://vborg.vbsupport.ru/showthread.php?t=95753)

RMS-Chef 10-10-2005 03:20 PM

I am back again to v1.2a
Sorry brother but v1.4, like v1.3 just does not work for me.
Again, I tried to first just overwrite. Then uninstalled the reinstalled v1.4 and it simply is not doing anything. I am on v3.5 Gold now.

v1.2a is perfect for me except for the WYSIWYG Editor issue.
I appreciate your efforts sir.

Chad F. 10-10-2005 03:49 PM

I installed 1.04 and..

- All of the old links are untouched by the anonymizer.

- Some of the links in new posts are anonymized and the rest have "http://anonym.to/?" in front of it 6 times.

Marco van Herwaarden 10-10-2005 06:42 PM

Quote:

Originally Posted by Chad F.
Some of the links in new posts are anonymized and the rest have "http://anonym.to/?" in front of it 6 times.

This could still be left overs from 1.02, i promised you i would give you the exact SQL to fix it, but didn't have time for it yet.

If one of you who still have 1.04 installed would let me have a llok at their board, i could maybe figure out why it is not working for you. If you're interested, please pm me contact info.

Chad F. 10-10-2005 07:45 PM

Quote:

Originally Posted by MarcoH64
This could still be left overs from 1.02, i promised you i would give you the exact SQL to fix it, but didn't have time for it yet.

If one of you who still have 1.04 installed would let me have a llok at their board, i could maybe figure out why it is not working for you. If you're interested, please pm me contact info.

Oh ok sorry, anyways I PMed you.

RMS-Chef 10-10-2005 08:47 PM

Quote:

Originally Posted by MarcoH64
This could still be left overs from 1.02, i promised you i would give you the exact SQL to fix it, but didn't have time for it yet.

If one of you who still have 1.04 installed would let me have a llok at their board, i could maybe figure out why it is not working for you. If you're interested, please pm me contact info.

OK MarcoH64, thanks again for your diligence.

Behavior for current 1.4
WYSIWYG:
-Working fine with WYSIWYG
-Editing issues seem fixed with WYSIWYG

Standard Editor:
-Does not prefix with anon properly if you only type the URL and have the board parse after you hit submit.
-Does work in standard if you click the add link button (https://vborg.vbsupport.ru/external/2009/12/3.gif)

Also a note, with your procedure for 1.2a, all links, even pre-existing links are prefixed with anon properly. With your current 1.3/4 method, pre-existing links created in WYSIWYG or in standard with the create link button are prefixed properly but regular typed URLs that were done in a standard editor do not seem to be prefixed after this install.

It seems to me that your original method works best, if you could iron out the Enhanced Editor issues with it. I would use 1.4 in it's current form if only I could force everyone to use WYSIWYG but that is a user option. My last couple posts reporting this as not working for me are because I had not reinstated the WYSIWYG editor on the board that I had disabled due to the v1.3+ issues. I am back to 1.2a right now and not missing WYSIWYG at this point as much as I thought I would. ;)

Hope I explained that clearly enough....I tend to ramble sometimes. ;)

bigmonay2k 10-16-2005 03:10 AM

No Go For Me :ermm:

Chad F. 10-16-2005 08:29 PM

What happened to Marco? :ermm:

Computer_Angel 10-18-2005 02:20 AM

1. Case sensitive bugs:
just detect URL tag, but no for url, URl, uRl, Url ...
when typeing like this no anonymizer anymore.
2. Just parsing the pattern
[ URL = "xxxxxxx" ] xxxxx [ / URL ]
no for
[ URL ] xxxxxx [ / URL]

Computer_Angel 10-20-2005 07:19 AM

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']);
            }
        }        
    }



Marco van Herwaarden 10-20-2005 07:59 PM

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.


All times are GMT. The time now is 05:04 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.01312 seconds
  • Memory Usage 1,792KB
  • 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_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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