The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Extended auto-linker (adds ed2k and sip link recognition) Details »» | |||||||||||||||||||||||||||
Extended auto-linker (adds ed2k and sip link recognition)
Developer Last Online: Nov 2023
Extended auto-linker 0.2
20051003 by mip This plugin extends the auto-parse url option to recognize ed2k and sip (VoIP) links correctly. ed2k file links are pretty-printed with the file name and a human-readable file size. INSTALLATION: Upload and activate plugin as usual. If you want to automatically include a tag in a parsed ed2k link, you should uncomment line 67 (// $filenametag = ...) and set your desired tag. NOTES: This plugin uses (among other things) a slightly modified regex which allows "|" characters inside all auto-recognized URLs as required for ed2k links. SCREENSHOTS: Writing a post containing some ed2k and sip URIs. Auto-parse URL option must be on. Preview of posting with recognized URLs. Note the formatting of ed2k file urls with the human readable size. Show Your Support
|
Comments |
#12
|
||||
|
||||
The main problem is before the parsing, actually !
If you post an ed2k link with brackets, it will not be parsed at all. If think the regex used is the cause of this, but as I said, I am lost when it comes to regular expressions. |
#13
|
|||
|
|||
Well I'm not sure if this helps or not.
But I do have ed2k links working on my site no matter if they contain "[]" or not using a simple vBCode command. Of course it will not display the file name, let you add your tag, or even show the file size like this hacks does which is what we want. But it does work and this is the vBCode I use if it can help this hack in anyway, plus all link using the vBCode way open in the same browser window. --------------------- Title ed2k Link Tag ed2k Replacement PHP Code:
[ed2k]ed2k link goes here[/ed2k] You have to also disable WORD WRAP length in the vB Options to "0". Otherwise spaces will be inserted into the links due to there long length when word wrap is enabled (which are most). Otherwise most links won't works because word wrap will insert spaces into the links. But that get fixed with it set to "0". --------------------- While this works with all links that use thr "[]" and opens them in the same browser window, it's only a very basic way to get them working. (maybe java code could be used also in vBCode to add more). But it's no were near what we want. This hack is good because it enables you to add your own TAG to the file names to advertise your site, as well as showing the file size and file name correctly. Plus there is no need to have to use a [ed2k] tag to post the links. |
#14
|
||||
|
||||
Thanks for sharing the bb code Gary, but I would prefer to kame this hack works (but I will make the ed2k tag available as an alternative, for sure !)
I just quit testing different things, and it appears that only the opening bracket poses problems. I tried to modify some things in the regexp, but it's just too complicated for me edit : The @ character is also a problem, as it sees a part of the link as an email adress |
#15
|
|||
|
|||
Quote:
Because if you had lets say 5 ed2k links in a thread which you clicked. It would mean you having to close 5 new browser windows after. Which is why they have to open in the same browser window just like the phpbb ed2k hacks do to avoid that. That can be done using a vBCode because of the "target="_self" command. I'm just looking at javascript now to see if that can be used to expand the ed2k vBcode hack further. As it does work when used in vBCode. But it would still be very limited and really it's this hack that needs to be improved upon as a real solution LOL |
#16
|
||||
|
||||
A quick edit to fix the @ charcater problem (doesn't fix the [ proble, though)...
Add : Code:
$link = str_replace('@', 'a', $link); Code:
if (strtolower($protocolprefix) == 'ed2k://') { I tried to do something for the [ problem, but as it doesn't even recognize the link as a link, I don't think I'll be able to do anything |
#17
|
|||
|
|||
Quote:
Come you advanced coders, were are you when your needed! |
#18
|
||||
|
||||
Seems I was a little drunk when I wrote my last post, it's full of typos..
Anyway, the bracket is more than a hack problem, it's vbulletin's "problem" If you post an url with a bracket in it, it will break the url parser too ! I don't think brackets are useable in url anyway http://www.vbulletin.org vs http://www.vbulle[tin.org |
#19
|
|||
|
|||
Quote:
|
#20
|
||||
|
||||
True, because when you use a bbcode, vbulletin does not try to auto-recognize something, it just makes everything inside it a link (or something elese, depending of your bbcode).
So : [*URL]http://www.vbu[lletin.org[/URL] becomes http://www.vbu[lletin.org But if you don't put the URL tags, it doesn't parse it correctly. You can reproduce this anytime you want |
#21
|
|||
|
|||
I'm betting there is no way around that and the same with the links opening in a new browser window problem. Without edits some php files like BBCode etc.
The plugin editing templates can only do so much as is limited by the vbcoding. So this would have to be a plugin with files edits as well. I don't see any other way around that. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|