Changing how links are displayed

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Locked
Govnor
Registered User
Posts: 259
Joined: Mon Jan 16, 2006 12:42 am
Contact:

Changing how links are displayed

Post by Govnor »

I noticed on a forum on a website (not a phpBB) that when users paste a url in a post, the script just displays >>LINK<<

I was told I need to edit bbcode.tpl to make this happen on my board, but I can't figure out what to change it to.
This is the line that needs altering..

Code: Select all

<!-- BEGIN url --><a href="{URL}" target="_blank" class="postlink">{DESCRIPTION}</a><!-- END url -->
The reason I want to do this is because when people paste a very long url, it breaks the site layout. My board in particular is 800px wide.

Thanks.
Image
User avatar
jwunderly
Registered User
Posts: 5740
Joined: Sun Mar 30, 2003 2:18 pm
Location: Easton, PA (in the groove)

Post by jwunderly »

If they utilize the URL BBCode, then it should work

BBCode FAQ.
John (A cranky old man. "Looking for an echo ...")
using any control-panel install/update is like shooting yourself in the foot. It won't kill you, but you're really going to hobble around until it heals.
Using the wrong tools (Front Page, DreamWeaver) gives the same results
Do not PM me for Support!
Govnor
Registered User
Posts: 259
Joined: Mon Jan 16, 2006 12:42 am
Contact:

Post by Govnor »

Yes they can, but asking everyone to use BB code every time they post a link won't work because not many people can be bothered to learn how to use it, and besides, many people on my forum are not very internet savvy anyway.

I'd rather have the script just display links in this way if I can.

Thanks.
Image
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53411
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Post by Brf »

You can change the make_clickable function in includes/bbcode.php

There are some lines like this:

Code: Select all

$ret = preg_replace(goobltygook<a href=\"\\2\" target=\"_blank\">\\2</a>", $ret);
which you could change to:

Code: Select all

$ret = preg_replace(goobltygook<a href=\"\\2\" target=\"_blank\">\>\>LINK\<\<</a>", $ret);
Govnor
Registered User
Posts: 259
Joined: Mon Jan 16, 2006 12:42 am
Contact:

Post by Govnor »

Thanks, I'll try playing with that. :)
Image
User avatar
Dogs and things
Registered User
Posts: 2114
Joined: Fri Sep 01, 2006 9:04 am
Location: Spain
Contact:

Post by Dogs and things »

For phpBB2 support visit phpBB2refugees.
Govnor
Registered User
Posts: 259
Joined: Mon Jan 16, 2006 12:42 am
Contact:

Post by Govnor »

Estupendo! Gracias! woof! :D
Image
Locked

Return to “2.0.x Support Forum”