Auto Parse Onsite URL's
This modification is in the archives.
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"'; Code:
$checked['parseurl'] = ($postinfo['parseurl']) ? 'checked="checked"' : ''; In /private.php find this: Code:
if ($vbulletin->GPC['parseurl']) Code:
if ($vbulletin->GPC['parseurl'] OR stristr($vbulletin->GPC['message'], $_SERVER['HTTP_HOST'])) ALSO In /private.php find this: Code:
'parseurl' => true, Code:
'parseurl' => false, In /profile.php find this: Code:
$signature = convert_url_to_bbcode($signature); Code:
if (stristr($signature, $_SERVER['HTTP_HOST'])) { $signature = convert_url_to_bbcode($signature); } In /usernote.php find this: Code:
if ($vbulletin->GPC['parseurl']) 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']) 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 |