Facebook Twitter Pinterest Share

vBulletin 3.X Help and Support Need help with vBulletin 3.X? Then ask your questions here.

New Thread  Post Reply
JohnnyBoy's Avatar
JohnnyBoy : Rick Mills FTW?
JohnnyBoy is on a distinguished road
offline Joined: May 2016 Location: GYSN Posts: 332 Thanked: 287
Thread Starter Unread 04-05-20
Controlling the length of URL BBcode

If you ever wanted to control the length of the [URL] BBcode before it's stripped, this is how to do that.

This is for both vBulletin 3 and vBulletin 4.

There is not an option in the admincp regarding this. It is hard-coded.

Find these lines in includes/class_bbcode.php in the function handle_bbcode_url:
if (vbstrlen($tmp) > 55 AND $this->is_wysiwyg() == false)
$text htmlspecialchars_uni(vbchop($tmp36) . '...' substr($tmp, -14));

Line 2442 in vBulletin v4.2.3.
Line 1825 in vBulletin v3.8.7.

55 = number of characters before it's stripped
36 = number of characters before the (...)
14 = number of characters after the (...)

There is a similar function for emails in this file (do not change this unless you need it), so make sure to edit the correct function.

You will need to make this change each time you upgrade because this file gets always overwritten.
Attached Images You must register or login to view attachments.
The Following User Says Thank You to JohnnyBoy For This Useful Post:
Excellent vBulletin support @ GYSN Underground.
New Thread  Post Reply

Thread Tools

  • Submit Thread to Facebook
  • Submit Thread to Twitter
  • Submit Thread to Pinterest
  • Submit Thread to LinkedIn
  • Submit Thread to Reddit
$text, $this-is_wysiwyg, 14;, 2091-2095, controlling, htmlspecialchars_univbchop$tmp, substr$tmp, url, bbcode, length
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Powered by GYSN Underground 2022