Linkbox problem

Support for PhpBB3 BBCodes. Post here to get help with any BBCode related issue here
There is no support here! Only Read Access!
Forum rules
In order the get any support, you will have to do following:
1. Use a describing title!
2. Describe exactly what it is you want.
3. Tell us what version of phpBB3 you are currently using.
Else your topic may be ignored or locked!
Locked
mini2mini
BBCoder II
BBCoder II
Posts: 9
Joined: 29 Mar 2010, 20:53

Linkbox problem

Post by mini2mini »

I have a little problem on my forum where the first link in a bbcode box doesn't get hyperlinked. The ones after that work.
Every box that contains links (Quote, Spoiler and others) have this problem.

Basically it's this:
Image

But when the first line of the box contains something else and then the urls come, it works more or less. (since there's no link in the first line)

Example:
Image
(i used a "." here for example)

[DownloadBox]something here that's not a link
hxxp://dl.dropbox.com/u/604847/something.png
hxxp://dl.dropbox.com/u/604847/something.png
hxxp://dl.dropbox.com/u/604847/something.png
hxxp://dl.dropbox.com/u/604847/something.png
hxxp://dl.dropbox.com/u/604847/something.png
hxxp://dl.dropbox.com/u/604847/something.png
hxxp://dl.dropbox.com/u/604847/something.png
[/DownloadBox]

code would be this:

Code: Select all

<table><tr><td><img src="/images/download.png"></a></td><td width=100%><div class="codetitle"><b>Download Link:</b></div><div class="codecontent">{TEXT}</div></td></tr></table>
I realize this is somehow a bug in phpBB and perhaps there is something that i can use automatically in the first line in the codeboxes that mask this problem.

Any thoughts, or am i cursed to do this by hand?
Last edited by mini2mini on 30 Mar 2010, 22:57, edited 2 times in total.
mini2mini
BBCoder II
BBCoder II
Posts: 9
Joined: 29 Mar 2010, 20:53

Re: Linkbox problem

Post by mini2mini »

hmm, tried to add a new line via br, but it's not helping.

Code: Select all

<table><tr><td><img src="/images/download.png"></a></td><td width=100%><div class="codetitle"><b>Download Link:</b></div><div class="codecontent">.<br> {TEXT}</div></td></tr></table>
It creates a new line at the beginning in the box, but the first link of the lot is still not recognized as a hyperlink.
gah, php...
Last edited by mini2mini on 30 Mar 2010, 23:15, edited 1 time in total.
User avatar
Fire-Fox
BBCoder IV
BBCoder IV
Posts: 275
Joined: 22 Mar 2010, 13:24
Location: Denmark

Re: Linkbox problem

Post by Fire-Fox »

Last edited by Fire-Fox on 30 Mar 2010, 23:28, edited 1 time in total.
mini2mini
BBCoder II
BBCoder II
Posts: 9
Joined: 29 Mar 2010, 20:53

Re: Linkbox problem

Post by mini2mini »

this bbcode only works for one link.
And the link not turning into hyperlink problem is there, too.
Last edited by mini2mini on 30 Mar 2010, 23:35, edited 1 time in total.
User avatar
Fire-Fox
BBCoder IV
BBCoder IV
Posts: 275
Joined: 22 Mar 2010, 13:24
Location: Denmark

Re: Linkbox problem

Post by Fire-Fox »

Trye this :

BBCode usage

Code: Select all

[Download]{URL2}, {URL}, {TEXT}[/Download]
HTML replacement

Code: Select all

<table><tr><td><a href="{URL2}"><img src="/images/download.png"></a></td><td width=100%><dl class="codebox"><dt>Download Link: </dt><dd><code><a href="{URL}">{TEXT}</a></code></dd></dl></td></tr></table> 
Help line

Code: Select all

Download Button: [Download]{URL2}, {URL}, {TEXT}[/Download]
and your message should look like

Code: Select all

[download]http://www.phpbb3bbcodes.com, http://www.phpbb3bbcodes.com, http://www.phpbb3bbcodes.com 
http://www.phpbb3bbcodes.com
http://www.phpbb3bbcodes.com[/download]

If dosn't work, shot Stoker in the food. Just for kicks :lol:
Last edited by Fire-Fox on 31 Mar 2010, 01:00, edited 6 times in total.
mini2mini
BBCoder II
BBCoder II
Posts: 9
Joined: 29 Mar 2010, 20:53

Re: Linkbox problem

Post by mini2mini »

Hey, that looks nice.

Since the first link gets forced via the URL tag, no more broken first link *yay*

I modified the code a little to allow for 2 links, the one before needed 3 links or the code would break.

Code: Select all

[Downloads]{URL} {TEXT}[/Downloads]

Code: Select all

<table><tr><td><img src="/images/download.png"></td><td width=100%><dl class="codebox"><dt>Download Links: </dt><dd><code><a href="http://anonym.to/?{URL}">{URL} {TEXT}</a></code></dd></dl></td></tr></table>

Code: Select all

Multiple Link Button: [Downloads]{URL} {TEXT}[/Downloads]
looks like this then:
Image

is it possible to make a break (new line) after each link?
Although the links after the first one (URL) would fall in the TEXT tag, so probably not...
Last edited by mini2mini on 31 Mar 2010, 01:08, edited 1 time in total.
User avatar
Fire-Fox
BBCoder IV
BBCoder IV
Posts: 275
Joined: 22 Mar 2010, 13:24
Location: Denmark

Re: Linkbox problem

Post by Fire-Fox »

After each line of url hit enter ;)

Try and change this only :

HTML replacement

Code: Select all

<table><tr><td><img src="/images/download.png"></td><td width=100%><dl class="codebox"><dt>Download Links: </dt><dd><code><a href="http://anonym.to/?{URL}">{URL} <br>{TEXT}</a></code></dd></dl></td></tr></table>
Last edited by Fire-Fox on 31 Mar 2010, 09:03, edited 2 times in total.
mini2mini
BBCoder II
BBCoder II
Posts: 9
Joined: 29 Mar 2010, 20:53

Re: Linkbox problem

Post by mini2mini »

well, that works to some aspect.

however, if you make a break after the first URL line and add the text then, it looks like this:

Code: Select all

[Download]http://www.phpbb3bbcodes.com/file1
http://www.phpbb3bbcodes.com/file2
http://www.phpbb3bbcodes.com/file3
http://www.phpbb3bbcodes.com/file4
http://www.phpbb3bbcodes.com/file5
http://www.phpbb3bbcodes.com/file6
[/Downloads]
no bbcode, just text.
However, if you make a space between the first URL tag and the second TEXT tag, it works.
Unfortunately you would add links like this:

Code: Select all

[Downloads]http://www.phpbb3bbcodes.com/file1 http://www.phpbb3bbcodes.com/file2
http://www.phpbb3bbcodes.com/file3
http://www.phpbb3bbcodes.com/file4
http://www.phpbb3bbcodes.com/file5
http://www.phpbb3bbcodes.com/file6
[/Downloads]
Then the bbcode works.
(because of the space here: [Downloads]{URL} {TEXT}[/Downloads])
it's a shame there can't be any enter(return) keys in a bbcode, or else this would work.
aah, so close :shock:
Locked