The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Anyone have this working....
...I run one of my vb licenses on a corporate network and people will post links to docs and tools on other machines within the network. So they will post in the message something to the affect of \\mycomputer\docs\mydoc.doc which vbulletin doesn't recognize as a hyperlink.
How can I set up the software to do this? It appears that this code in functions.php (around line 686) is what makes http:// turn into a hyperlink in the posts (could be wrong about this being the code that does it--I'm not a coder). How can I modify this to also recognize \\ as a link too? $replacearray = array( "<ol type=\"\\5\">\\7</ol>", "<ul>\\4</ul>", "<li>", "<a href=\"http://www.\\6\" target=\"_blank\">\\8</a>", "<a href=\"\\5\" target=\"_blank\">\\7</a>", "<a href=\"http://www.\\5\" target=\"_blank\">\\5</a>", "<a href=\"\\4\" target=\"_blank\">\\4</a>", "</normalfont><blockquote><pre><smallfont>code:</smallfont><hr>\\5<hr></pre></blockquote><normalfont>", "</normalfont><blockquote><pre><smallfont>code:</smallfont><hr>\\5<hr></pre></blockquote><normalfont>", "java script:", "about :", "vbscript :" ); } else { $searcharray = array( "/(\[)(list)(=)(['\"]?)([^\"']*)(\\4])(.*)(\[\/list)(((=)(\\4)([^\"']*)(\\4]))|(\]))/esiU", "/(\[)(list)(])(.*)(\[\/list\])/esiU", "/(\[)(url)(=)(['\"]?)([^\"']*)(\\4])(.*)(\[\/url\])/esiU", "/(\[)(url)(])([^\"]*)(\[\/url\])/esiU", "/(\[)(code)(])(\r\n)*(.*)(\[\/code\])/esiU", "/(\[)(php)(])(\r\n)*(.*)(\[\/php\])/esiU", "/javascript:/si", "/about:/si", "/vbscript:/si" ); $replacearray = array( "createlists('\\7', '\\5')", "createlists('\\4')", "checkurl('\\5', '\\7')", "checkurl('\\4')", "stripbrsfromcode('\\5')", "phphighlite('\\5')", "java script:", "about :", "vbscript :" ); } // end version check |
#2
|
|||
|
|||
Ok, so I added a custom vbcode "share"
[quote]<a href="file://{param}">{param}</a>[quote] So now I just need to make this a no hassel thing just like typing in your favorite url. vBulletin automatically parses the text and puts the "url" tags around it for the person who posted (no extra work or knowlege of the vbcodes necessary). I still think it has to do with the stuff in the functions.php, but correct me if I'm wrong. |
#3
|
||||
|
||||
The parseurl() function does that, IIRC.
|
#4
|
|||
|
|||
Thanks firefly! Here is probably a quick question for you then.
So I think I am supposed to add another function see code below (copy of parseurl just changed to reflect different bbcode).... Quote:
Any help is appreciated! |
#5
|
|||
|
|||
Actually I guess I wouldn't need to have a separate function.
Here's what I have so far, and there's no errors, but it's not adding the [ share] [ /share] brackets around \\blah\blah either. :cheeky: Quote:
|
#6
|
|||
|
|||
With a bit of help from a friend, here's what we came up with that seems to work fine...
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|