DIsable AutoLinking


Well-known member
I'm working to figure out how to disable auto-linking (or add an option for it at least). I have tried quite literally EVERYTHING I can think of. I've extended the class, attempted to add to the array (via $this->_disableAutoLink[] = 'aTag'), modified the core class to add my tag... None of it worked. Adding my
tag to the core class and posting the following:
gave me:
with dontlinkme.com being linked. and the end spoiler code being added, because the look is correct.

I've also tried stringifying the children tree, setting a rendererState of 'stopAutoLink' to true before parsing the children string... I'm honestly at a loss. Thoughts?


Well-known member
Though doing it in code... hmm...
Yeah, I'm attempting to allow certain BBCodes to disallow auto-linking. Hence the attempt to extend and add, but that didn't work. Core modification seemed to output weird results, and adding something as simple as 'i' in the array didn't even work. I am banging my head off the desk... lol.


Active member
The autolinking is done before the *real* bb code parsing, from what I've seen. When creating a post, it runs through a special autolink formatter that wraps URLs with url tags before saving it to the database.


Well-known member
I haven't had the time to sit down and try working on this again (I have a major program due tuesday, 4 papers due tomorrow, and I'm heading out of town tomorrow), but plan to ASAP. Anybody think they may know why adding a code to the _disableAutoLink array would force out put to mess up, in the mean time?
This thread is really old, but still deserves this little bump. The auto-linker is pretty greedy when it comes to its regex matching, and thus it tends to eat into other things - such as the [/spoiler] tag in this thread's example. My solution was to change library/XenForo/BbCode/Formatter/BbCode/AutoLink.php line 70 from

This halts any autolinking the moment it hits an open square bracket, which prevents it from ever eating a tag. This has the unintended side-effect of not properly autolinking links with [ in them, but that's a risk I'm willing to take ;)


Well-known member
I managed to get the url not to auto parse in a bbcode the problem is I can only make it remove one instance of it per post. wtf. seriously...I may lose my mind tonight.

I have to ask this just because I do not even know how I would go about searching for it. Is there any mention of having a global on off switch in the acp for autoLink disabling?
I just added the media tag to this line at: XenForo_BbCode_Formatter_BbCode_AutoLink

This is working, no more autolinks inside media bbcode :)

protected $_disableAutoLink = array('url', 'email', 'img', 'code', 'php', 'html', 'plain', 'media');


Well-known member
But that requires modification of the core code right?

Is there a way to add tags to this list from an addon?
Yes, his way is modification to the core. My add-on attempts were failing. 1.1 may have fixed the errors I was having, and will look into it soon.


Well-known member
Any news of this tricky stopAutoLink option ? I've tried during hours, but I've failed to do anything with it :( Even with hardcoding.