Stop AutoLinking Patch (NO MORE SUPPORTED)

Stop AutoLinking Patch (NO MORE SUPPORTED) 0.91

No permission to download

cclaerhout

Well-known member
cclaerhout submitted a new resource:

Stop AutoLinking Patch (version 0.1) - This addon will allow you to avoid bbcodes url auto-linking inside forums and conversations

Stop AutoLinking Patch
by Cédric CLAERHOUT
Addon Presentation
This addon will allow you to avoid bbcodes url auto-linking inside forums and conversations

Version History
2012/03/23 version 0.1 released

Installation
1) Upload the files on your forum directory
2) Import xml file...

Read more about this resource...
 
Information for users of the "Custom BB Code Manager" (v1.2.1)

If you create a custom bbcode using the regex (10/05/2012: not if you use regex sorry, but if you use 'Requires Advanced Options') OR if you use callback functionality, then you should update the following file:
"/library/KingK/BbCodeManager/BbCode/Formatter/Base.php".
Why ?
Because it's using 1 database request for each of thoses bbcode (not only once, but every time a bbcode is used inside a message). King Kovifor has been informed about the problem, but he is really busy at the moment. So here is the "Base.php" file i'm using on my own forum. It only fixes the problem for bbcode with customized callbacks (not those using regex functions).


UPDATE 10/05/2012
File updated => this patch fixes 'Callback' & 'Requires Advanced Options'
 

Attachments

fantastic, thank you.

out of curiosity sake, it says in the forum & conversations. what happens in addons that use bbcode like XenPorta or XenMedio?
 
I found the problem that was breaking the page. it was a tag called "<table> TABLE". removing the "<table>" part fixed it. evidently the tag names need an unhtml deal. in the mean time I'll simply remove the html from the bbcode names
 
have not been able to get this to do anything. I've tried both the lazy & the unlazy setup.

I made a new BBCode called BBURL. the option is the url.
in your options I tired both "enable, lazy activate, check bburl" and "enable, unactivate, and list bburl in the custom field" but neither worked. in both cases xen still wrapped the url w/ [ url ] tags.

Code:
should have been this
[bburl="http://xenforo.com"]text[/bburl]
 
but got this
[bburl="[url]http://xenforo.com[/url]"]text[/bburl]

am I doing it wrong?

PS - I replaced base.php as per your directions
 
fantastic, thank you.

out of curiosity sake, it says in the forum & conversations. what happens in addons that use bbcode like XenPorta or XenMedio?
I'm outside now. So just a quick answer to this question : it shouldn't work. But I can't test it, I don't use these addons and don't plan to.


I found the problem that was breaking the page. it was a tag called "<table> TABLE". removing the "<table>" part fixed it. evidently the tag names need an unhtml deal. in the mean time I'll simply remove the html from the bbcode names
Thanks ! I will add the php function to remove HTML tags, it should avoid problems :)

would be nice if disabled BBCodes weren't listed on the options page
I can do that easily I think, I remember the bbcode manager has this function in its model. I will try at home.
 
have not been able to get this to do anything. I've tried both the lazy & the unlazy setup.

I made a new BBCode called BBURL. the option is the url.
in your options I tired both "enable, lazy activate, check bburl" and "enable, unactivate, and list bburl in the custom field" but neither worked. in both cases xen still wrapped the url w/ [ url ] tags.

Code:
should have been this
[bburl="http://xenforo.com"]text[/bburl]
 
but got this
[bburl="[url]http://xenforo.com[/url]"]text[/bburl]

am I doing it wrong?

PS - I replaced base.php as per your directions


I told you in the other thread that it only works with the content of the bbcode and not the tags options. But if you just need 1 option, I can make it work too. But it won't work with several options or with formatted link.
 
I told you in the other thread that it only works with the content of the bbcode and not the tags options. But if you just need 1 option, I can make it work too. But it won't work with several options or with formatted link.

my mistake. I read that as you meaning the opposite asin auto link works this way & not this way but now I get you were saying your addon works the one way & not the other.

having the 1 option so you could do both kinds of url tags would be great but this will be more than enough for me to do my prank. THANKS!


doing it this way worked perfectly
Code:
[bburl]http://xenforo.com[/bburl]
it did not auto link the url & used my bburl tag instead

since I didn't check off the "don't precess bbcode inside this tag" option for bburl, I was able to get this to work
Code:
[bburl]http://www.sternfannetwork.com/xen/index.php?members/[you]url[/you].[you]id[/you]/[/bburl]
and have it still process my you tags
 
cclaerhout updated Stop AutoLinking Patch with a new update entry:

Version 0.2 released

2012/03/24 version 0.2 released
  • disable url auto-linking inside the bbcode options too
  • convert tags used in the bbcode options from [a]...[/a] to {a}...{/a} to avoid display problems and to allow to manipulate them later
  • strip the html tags from the name of BB Codes to avoid errors
  • only display active bbcodes

=>to upgrade just upload files

Read the rest of this update entry...
 
my mistake. I read that as you meaning the opposite asin auto link works this way & not this way but now I get you were saying your addon works the one way & not the other.

having the 1 option so you could do both kinds of url tags would be great but this will be more than enough for me to do my prank. THANKS!

It should work now with options too... and all options ;) I've updated my regex
 
It should work now with options too... and all options ;) I've updated my regex

i'm having option issues still. sorry

the first link works. the URL is not processed by auto link & my tag is processed
the second link does not. Once again the URL is not processed by auto link BUT my tag is also not process.
Code:
[bburl]http://www.sternfannetwork.com/xen/search/member?user_id=[you]id[/you][/bburl]
[bburl="http://www.sternfannetwork.com/xen/search/member?user_id=[you]id[/you]"]link text[/bburl]

here are the results
http://www.sternfannetwork.com/xen/search/member?user_id=1 - good
link text - bad

if you have any suggestions, I'd love to hear them. if i'm just bothering the hell out of you by now, sorry.
 
So my addon is working :D The autolink is not processed ^^

When I look the way you build you bbcode, i don't really understand why you don't use the option for the "link text" and the content for the URL with... your bbcode [you] in it... it would be so much easier.

Example:
Code:
[bburl=Link Title]http://www.mylink[you]id[/you][/bburl]
 
Ok, i understand your problem:

It's not possible to use some bbcodes inside an URL. So my above example will not work.

Example:

This code:
Code:
[xurl]http://www.xenforo.com/forums/[B]members[/B]/?user_id=[/xurl]
[xurl]http://www.xenforo.com/forums/[B]members[/B]/?user_id=[i]3[/i][/xurl]
Will be changed to* (in 0.3 version ^^; I have to correct something):
Code:
[xurl][URL]http://www.xenforo.com/forums/[/URL][B]members[/B]/?user_id=[i]3[/i][/xurl]

And this behaviour is logical: Xenforo detects an URL then a new bbcode [ b ] so the script ends the URL just before the [ b ] bbcode.

Now if you put your code in the bbcode option:
This code
Code:
[xurl=http://www.xenforo.com/forums/[B]members[/B]/?user_id=]Text[/xurl]
[xurl=http://www.xenforo.com/forums/[B]members[/B]/?user_id=[i]3[/i]]Text[/xurl]
Will be changed to* (in 0.3 version ^^; I have to correct something):
Code:
[xurl=http://www.xenforo.com/forums/{B}members{/B}/?user_id={I}3{/I}]Text[/xurl]
[xurl=60|http://www.xenforo.com/forums/{B}members{/B}/?user_id={I}3{/I}]Text[/xurl]
 
Yes ! (<= "Yes" of satisfaction) I've finally found the correct regex to only match the tag options and replace [] with {}.

Here is the final regex which works with php:
Code:
\[bbcode=(\[([\w\d]+)(?:=.+?)?\].+?\[/\2\]|.+?)+?\]

I've found another regex but it only works with my regex editor (editpad). If someone can explain me why, I would be great:
Code:
\[bbcode=((?:.+?)?(?(?!\])\[([\w\d]+)(=.+?)?\].+?\[/\2\]))+\]


Anyway, the 0.3 version will be out in a few minutes or hours.
 
There will be others options :D Not because of bugs this time, but I want to add bbcodes functionalities. I need them for my hacks, so I'm going to make this hack a toolbox.
 
i'm having option issues still. sorry

the first link works. the URL is not processed by auto link & my tag is processed
the second link does not. Once again the URL is not processed by auto link BUT my tag is also not process.
Code:
[bburl]http://www.sternfannetwork.com/xen/search/member?user_id=[you]id[/you][/bburl]
[bburl="http://www.sternfannetwork.com/xen/search/member?user_id=[you]id[/you]"]link text[/bburl]

here are the results
http://www.sternfannetwork.com/xen/search/member?user_id=1 - good
link text - bad

if you have any suggestions, I'd love to hear them. if i'm just bothering the hell out of you by now, sorry.

I don't forget you Mutt, I'm looking if I can make what you want.
 
I don't forget you Mutt, I'm looking if I can make what you want.
i'm very please w/ what you've done. installed the update today & when I get home I'm going to play around with it and see if I can redo my stuff to work the way ur doing it. looks like I have plenty enough to work with.
 
Back
Top Bottom