The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
![]()
I made hack to suit me.
I'm sure it could be done better by someone better. But here's the jist of it. Don't hold me responsible for any problems, lol. I'm just a newbie. This allows onsite url's to always parse as links in wysiwyg editor. This places control back into the hand of the auto parse checkmark for all other url's. Note this hack doesn't kick in until the user clicks "submit reply". The wysiwyg editor message window will still highlight links. And in fact if you want it to parse, I think it has to be highlighted before "submit reply". Don't worry, the submit reply will then remove the offsite links highlighted if autoparse box is NOT checked. Find part of 'function parse_wysiwyg_anchor' in 'functions_wysiwyg.php': Code:
if (substr($href, 0, 7) == 'mailto:') { $tag = 'email'; $href = substr($href, 7); } else { $tag = 'url'; } Code:
if (substr($href, 0, 7) == 'mailto:') { $tag = 'email'; $href = substr($href, 7); } else if (substr($href, 0, 16) == 'www.mydomain.com') { $tag = 'url'; } else if (substr($href, 0, 23) == 'http://www.mydomain.com') { $tag = 'url'; } else { return $text; } href, 0, 16.... href, 0, 23.... The 16 and the 23 are the number of characters in the domain quotes So obviously you must edit these numbers AND the "mydomain". ************************************************** **** On the other hand, if someone wanted to remove 100% of links with the wysiwyg editor, I tested this and it appeared to do the job ok, but again, I'm just a newbie so don't blame me if it screws up your board. In the same file, same place, instead of the above stuff, just find this: Code:
$tag = 'url'; Code:
return $text; |
![]() |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|