View Full Version : Show full url links instead of shortening it?
Hi, when users post a long link the forum automatically shortens it by adding "..." for example:
http://news.google.com/news/section?pz=1&cf=all&topic=po&ict=ln
something like this will come up:
http://news.google.com/news/se...c=po&ict=ln
Is there an option on how I can make it show the full url link instead of it being shorten? thanks
Lynne
12-07-2009, 06:59 PM
This has been posted about before. You need to actually edit the code. Try a search for it and it should come up. Or do a search in your files for "..." and it should come up (that's how I found it).
Thanks for the reply. But i've tried searching on Vbulletin.com and Vbulletin.org for hours and of course I did the basic phrase / template search for "..." before posting this thread. I came up with nothing.
can you please direct me to the post or what to type into the search field? I might just be retarded and missing the most simplest word for this.
Lynne
12-07-2009, 07:36 PM
Search your php files for '...', not the templates/phrases. I think it will show up in some bbcode function, if I recall correctly.
Valter
09-18-2010, 11:15 AM
Hi Lynne,
Are you able to do this in vB4?
I've tried to disable stripping in handle_bbcode_url function in class_bbcode.php but it does not work. postparsed table is truncated.
Any idea?
Thanks.
Lynne
09-18-2010, 02:27 PM
Yes, it works in vb4 also. I saved this blurb from another thread about it:
I believe you want to find these lines in includes/class_bbcode.php in the function handle_bbcode_url
PHP Code:
if (vbstrlen($tmp) > 55 AND $this->is_wysiwyg() == false)
{
$text = htmlspecialchars_uni(vbchop($tmp, 36) . '...' . substr($tmp, -14));
}
Line 2091-2095 in v4.0.3.
55 = number of characters before it's stripped
36 = number of characters before the (...)
14 = number of characters after the (...)
GONUMBER6
11-02-2010, 05:35 PM
This was very useful info, thank you as always Lynne!
dmm2020
01-19-2012, 05:08 AM
Yes, it works in vb4 also. I saved this blurb from another thread about it:
Glad I found this post.
I was having problems in latest version of vB 4.1.5 where I posted download links for alpha testers of my script on my forum and it initially worked for them, but when I went back to the page a day later, link would be corrupted. But when I edited the script, the full link showed in the edit mode. I commented the block of code you reference out and problem goes away for me.
Thanks.
postcd
11-30-2013, 02:18 PM
Yes, it works in vb4 also. I saved this blurb from another thread about it:
I changed that number to 512
so it is:
if (vbstrlen($tmp) > 512 AND $this->is_wysiwyg() == false)
{
$text = htmlspecialchars_uni(vbchop($tmp, 36) . '...' . substr($tmp, -14));
}
But its still shortened even i tried to post new reply with long links (less than 512 chars.)
tini_lam
08-20-2014, 03:02 AM
In FILE class_bbcode.php have 2 line need edit.
edit
$text = htmlspecialchars_uni(vbchop($tmp, 36) . '...' . substr($tmp, -14));
to
// $text = htmlspecialchars_uni(vbchop($tmp, 36) . '...' . substr($tmp, -14));
Paul M
08-20-2014, 11:46 AM
Do not comment that line out. You are opening an XSS security hole by removing the htmlspecialchars call.
MaXimus
08-20-2014, 04:48 PM
Even better, you can have the URL auto convert into the Title of the page:
https://vborg.vbsupport.ru/showthread.php?t=189658
postcd
01-16-2020, 07:43 AM
Do not comment that line out. You are opening an XSS security hole by removing the htmlspecialchars call.
In the file /includes/class_bbcode.php i found two lines:
$text = htmlspecialchars_uni(vbchop($tmp, 36) . '...' . substr($tmp, -14));
so i replaced both by:
$text = htmlspecialchars_uni($text);
and it seems to work (no link shortenings). Is that better regarding security?
https://www.w3schools.com/PHP/func_string_htmlspecialchars.asp
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.