Back to vBulletin 3.5 Add-ons

Auto Parse Onsite URL's
Mod Version: 1.00, by Mr Blunt

This modification is in the archives.
vB Version: 3.5.0 Beta 3 Rating: (0 vote - 0 average) Installs: 5
Released: 30 Jun 2005 Last Update: Never Downloads: 9
Not Supported Code Changes  

This post is basically the same as lone text file in the zip.
Download is merely available for convenience.
Here goes.......

If anyone can improve upon this and/or find a way to make this a plugin, SPEAK UP!! Personally I think something like this should be standard, but hey, can't have it all.

By default, vbulletin autoparses all links so most won't need a hack like this.
However, I don't like offsite links so I made a plugin to clear the checkbox.

index.php?t=91390

But I love onsite links like to other threads and files which reside on my subdomain, so I put together a few file edits that will automatically call the url parser if the subdomain name is found anywhere in the text message. It's no surprise your just adding a bit more code to any/all lines which check if the parse url's box is checked, because the line that follows these is what calls the parser.

The only quirk that people find odd is that it's an "all or nothing" type thing. If the message has a mixture of onsite AND offsite url's, all links will parse. Meaning it checks the message in "one lump".

Please note you can pick and choose from these file modifications!!
Each one works independantly and the file names should clue you as to what's what.

This is by no means complete!!
It merely works....
Call it a "works in progress", LOL.

In /editpost.php find this:
Code:
$checked['parseurl'] = 'checked="checked"';
Change to this:
Code:
$checked['parseurl'] = ($postinfo['parseurl']) ? 'checked="checked"' : '';

In /private.php find this:
Code:
if ($vbulletin->GPC['parseurl'])
Change to this:
Code:
if ($vbulletin->GPC['parseurl'] OR stristr($vbulletin->GPC['message'], $_SERVER['HTTP_HOST']))

ALSO In /private.php find this:
Code:
'parseurl' => true,
Change to this:
Code:
'parseurl' => false,

In /profile.php find this:
Code:
$signature = convert_url_to_bbcode($signature);
Change to this:
Code:
if (stristr($signature, $_SERVER['HTTP_HOST']))
	{
		$signature = convert_url_to_bbcode($signature);
	}

In /usernote.php find this:
Code:
if ($vbulletin->GPC['parseurl'])
Change to this:
Code:
if ($vbulletin->GPC['parseurl'] OR stristr($vbulletin->GPC['message'], $_SERVER['HTTP_HOST']))

In /includes/class_dm.php find this:
Code:
if ($this->info['parseurl'])
Change to this:
Code:
if ($this->info['parseurl'] OR stristr($pagetext, $_SERVER['HTTP_HOST']))

Download

This modification is archived and cannot be downloaded.

Similar Mods

[pre-release Auto IP/OS/IE Parse Hack] vBulletin 2.x Full Releases

vblts.ru supports vBulletin®, 2022-2024