• Downloading from our site will require you to have a paid membership. Upgrade to a Premium Membership from 10$ a month today!

    Dont forget read our Rules! Also anyone caught Sharing this content will be banned. By using this site you are agreeing to our rules so read them. Saying I did not know is simply not an excuse! You have been warned.

Title Tag Fetcher (Auto Replace URL with Titletag)

Admin

Well-Known Member
Staff member
Administrator
Hi there.

Since I needed a new URL Autotext Generator, I always loved the prework of Jafo232 and his Replace URL's With Page Title.
I just did some modifications on this Mod and for some forseeing mistypings, I also leaned out the checking of the "www" if given.

For those who don't know that mod it's quite simple:
If you post an URL in the Forums, this Mod just loads the <title>XXXXXX</title> out of the linked website.

The title won't be read if the following conditions occur:
  • The linked page simply has no <title>-Tag
  • The page is down or the <title>-Tag is not being found within the first 60 seconds
  • The <title>-Tag is not being found within the first 1000 lines of code.
Installation:
Just import the XML via the ACP and thats all.

Uninstall:
Just kill it out of your ACP.

01.09.2008 Update
Fixed Typo which got us a parse error
This actually works just fine on VB4, you just have to edit the XML file to allow it to install.

Download the mod, open the XML file in notepad or another text editor.

Find the line:
<dependency dependencytype="vbulletin" minversion="3.6.0" maxversion="4.0.0 alpha 1" />[/B]
It will be near the top...
Then simply change the max version to 5.0.1:
<dependency dependencytype="vbulletin" minversion="3.6.0" maxversion="5.3.0" />
Any way to add urls for this mod to ignore? for example facebook comes back as

So would like to just ignore facebook and other urls that i find to be incompatible
It will now install and work.
In the plugin for this mod find the line:

PHP:
return "[url=\"" . $text[2] . $text[4] . "\"]" . preg_replace("/\&.+\;/", '', $title[1]) . "[/url]";

And replace it with the following:

PHP:
$fullurl = $text[2].$text[4];
$baddomains = array ('facebook.com',
                     'wikipedia.com',
                     'microsoft.com'  );

foreach ($baddomains AS $thisbad)
{
  if (stripos('x'.$fullurl, $thisbad) //If the bad domain is found in the URL
    return "[url=\"" . $fullurl . "\"]" .$fullurl . "[/url]";
}
//If we get this far it's not a bad domain...
return "[url=\"" . $fullurl . "\"]" . preg_replace("/\&.+\;/", '', $title[1]) . "[/url]";

And obviously you add or remove domain names by making sure they are between single quotes with a comma between each, like facebook.com, wikipedia.com, and microsoft.com in the example. No idea if those are really bad domains or not. I've had trouble with Wikipedia in the past.
Download tuoitreit.vn_Title-Tag-Replacer.zip (1.4 kb)
 

Facebook Comments

New posts New threads New resources

Back
Top