View Full Version : How can I show full links insted of short?
Fenriz
06-16-2007, 05:39 AM
Hi! Vbulletin automaticaly make all the links as short.
For example,
http://rapidshare.com/files/36897753/Tyr_-_Ragnarok_-_2006_-__ulver.com_.part1.rar
became shown as
http://rapidshare.com/files/36897753...com_.part1.rar
How can I make it full-shown or get smaller characters in url? Where can I regulate it?
Karmian
10-07-2007, 05:38 PM
I've been searching the interweb for almost 2 days now and have not been able to find anything related to this issue.
Could anyone be so kind and tell me this too, as im also looking for a solution.
Best regards,
Karmian
Lynne
10-07-2007, 05:52 PM
Are you talking about how it shows up in a post? It is only shortening what you see, it isn't actually shorting the link when you click it.
Karmian
10-07-2007, 05:55 PM
Yes, i want the complete URL to show up inside the post, not shortened, since people with download managers should be able to copy / paste the links instead of having to "right click" -> "copy shortcut" for every single link if there's 20 of them ;)
Fenriz
10-07-2007, 07:48 PM
Karmian, I have exactly the same problem. Thank you for make this thread up :)
Xplorer4x4
10-08-2007, 02:35 AM
Well I havent figured it out but I can tell you this much, it has something to do with lines 1770-1811 in includes/class_bbcode.php
Karmian
10-08-2007, 04:42 AM
Thanks alot Xplorer4x4, i have increased the links to allow up to 400 chars in this "patch" before getting wrapped.
Its actually just a number changed from 55 to 400 instead.
Since im far from being a coder, i tried to use common sense, and it says:
// under the 55 chars length, don't wordwrap this
So i thought, why not search for the variable "55" and replace it with something else :) and IT WORKS..
Find
$tmp = unhtmlspecialchars($rightlink);
if (vbstrlen($tmp) > 55 AND $this->is_wysiwyg() == false)
And replace with
$tmp = unhtmlspecialchars($rightlink);
if (vbstrlen($tmp) > 400 AND $this->is_wysiwyg() == false)
This "patch" or example allows you to parse links, show it fully on the board while being under 400 chars it wont get shortened.
I hope this thread is somewhat usefull for some.
At least it fixed the issue for me.
Thanks again :up: your the best!
titntin
09-24-2008, 01:27 PM
I know this is old now - but does anyone know of a way to do this?
I don't appear to find any template with the above code in it (though I'm noob and I guess I might be looking wrong.
I'm assuming this advice was for an earlier version, and I'll need to look elsewhere to make the adjustment for v3.72
Any comments pointers or help you can give would be very gratefuly recieved!
Lynne
09-24-2008, 03:39 PM
I know this is old now - but does anyone know of a way to do this?
I don't appear to find any template with the above code in it (though I'm noob and I guess I might be looking wrong.
I'm assuming this advice was for an earlier version, and I'll need to look elsewhere to make the adjustment for v3.72
Any comments pointers or help you can give would be very gratefuly recieved!
It's not in a template. I believe the person a couple of posts above yours says it's in includes/class_bbcode.php
titntin
10-09-2008, 02:19 PM
Thank you Lynne for pointing it out! I didn't have access to the server at the time, but now I have I've found and editted the file and can confirm this works 100% fine.
Thank you all!
postcd
04-05-2013, 11:35 AM
It DO NOT works!!!!
In includes/class_bbcode.php
i have:
if (vbstrlen($tmp) == 1 AND $this->is_wysiwyg() == false)
{
$text = htmlspecialchars_uni(vbchop($tmp, 36) . '...' . substr($tmp, -14));
}
a) I even commented + deleted out whole if{}
b) Changed only value of maximal chars.
Deleted cache.
Newly added long links are still shortened! WHY?!
Lynne
04-05-2013, 03:22 PM
You didn't do what post 7 said to do. It said nothing about ==1, it said > *a big number*
postcd
04-06-2013, 08:35 AM
You didn't do what post 7 said to do. It said nothing about ==1, it said > *a big number*
Thank you, man i did it
b) Changed only value of maximal chars.
but it still did not worked.
Im pasting what i have:
if (!trim($link) OR $text == $rightlink)
{
$tmp = unhtmlspecialchars($text);
if (vbstrlen($tmp) > 500 AND $this->is_wysiwyg() == false)
{
$text = htmlspecialchars_uni(vbchop($tmp, 36) . '...' . substr($tmp, -14));
}
}
When i post new post with long link ~200 chars, its still shortened.
PS: i have vbseo, but did not found any setting for this
Lynne
04-06-2013, 03:39 PM
Disable all modifications on your site and then see if it works.
Also, did you change that code *every place* where it is in that file (at least 3 places)?
postcd
04-07-2013, 09:49 AM
Im sorry for my ignorance Lyne, i did not thought there could be more locations in file. Now fixed :eek:
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.