This website can use cookies to improve the user experience

This website can use cookies to improve the user experience and to provide certain services and functions to users. Cookies contain small amounts of information (such as login information and user preferences) and will be stored on your device.

Enable All Cookies Privacy Policy

URL not breaking


avatar
LRACMS 0
From: -
URL not breaking

Out of 60+ stories we have posted, one had a lengthy url that had no break point and caused the entire page to horizontally scroll. Is there a fix that would check url length and change discription to "Go to story" if too long or should I edit the code to do that for all stories to avoid the problem?

In either case, how and where do I make the changes?

- Louis Andrews

Notice

This topic is archived. New comments cannot be posted and votes cannot be cast.

Responses to this topic


1 Re: URL not breaking
avatar
OP 0
From: -
URL not breaking

Bravo! That solved the problem completely.

- Louis Andrews
1 Re: URL not breaking
avatar
Administrator
1340
From: Vienna, Austria
URL not breaking

I personal use this code for news:
[ url=  http://www.url-to-story ] Read more [ /url ] (without the spaces)

If you like to change the [ url ] [ /url ] code instead, find in core.php the following lines:
        $var = eregi_replace("\\[url\\]www.([^\\[]*)\\[/url\\]", "<a href=\"   http://www.\\1\" target=\"_blank\">\\1</a>", $var);

$var = eregi_replace("\\[url\\]([^\\[]*)\\[/url\\]", "<a href=\"\\1\" target=\"_blank\">\\1</a>", $var);


and replace it with:
        $var = eregi_replace("\\[url\\]www.([^\\[]*)\\[/url\\]", "<a href=\"   http://www.\\1\" target=\"_blank\">Go to story</a>", $var);

$var = eregi_replace("\\[url\\]([^\\[]*)\\[/url\\]", "<a href=\"\\1\" target=\"_blank\">Go to story</a>", $var);

Notice

This topic is archived. New comments cannot be posted and votes cannot be cast.