Page 1 of 1

Linkbox problem

Posted: 30 Mar 2010, 22:54
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?

Re: Linkbox problem

Posted: 30 Mar 2010, 23:14
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...

Re: Linkbox problem

Posted: 30 Mar 2010, 23:15
by Fire-Fox

Re: Linkbox problem

Posted: 30 Mar 2010, 23:34
by mini2mini
this bbcode only works for one link.
And the link not turning into hyperlink problem is there, too.

Re: Linkbox problem

Posted: 31 Mar 2010, 00:15
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:

Re: Linkbox problem

Posted: 31 Mar 2010, 01:06
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...

Re: Linkbox problem

Posted: 31 Mar 2010, 08:54
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>

Re: Linkbox problem

Posted: 31 Mar 2010, 19:03
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: