Imagelink with extra hostname

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

Imagelink with extra hostname

Post by mini2mini »

Hello, i'm new here, so hello guys :)

I've tried to make a custom bbcode for a few weeks now, but i can't get it finished because it's a little over my head.
Then i stumbled over your site here.

I want to make something like this:

[center]Image
Hoster: phpbb3bbcodes
[/center]

A clickable image that links to a page/file and a little description underneath it where the file is hosted.
(the name between www. and .com/.net)

Sadly i only came up with the linkable image bbcode:

Code: Select all

[Examplelink]{URL}[/Examplelink]

Code: Select all

<div align="center"><a href="{URL}" target="_blank"><img src="http://www.phpbb3bbcodes.com/images/smilies/icon_question.gif" /></a></div>
and i tried all sorts of things to get the hostername out of the link and write it beneath the icon.
i tried various combinations of

Code: Select all

{TEXT}, {SIMPLETEXT} and a few others that i came across instead of {URL}
is it possible to make the link in the image file work and display only the hostername as a readable text beneath it?
Or am i trying some things that can't work?

If anyone could help me in this case, thank you very much.
cisco007
BBCoder VI
BBCoder VI
Posts: 1015
Joined: 16 Mar 2010, 18:14
Location: Don't really know!

Re: Imagelink with extra hostname

Post by cisco007 »

will something like this work?

Code: Select all

[Examplelink]{URL},{TEXT}[/Examplelink]

Code: Select all

<div align="center"><a href="{URL}" target="_blank"><img src="http://www.phpbb3bbcodes.com/images/smilies/icon_question.gif" /></a><br />Hosted at: {TEXT}</div>

and the helpline would be:

Code: Select all

[Examplelink]file url,name of site[/Examplelink]
mini2mini
BBCoder II
BBCoder II
Posts: 9
Joined: 29 Mar 2010, 20:53

Re: Imagelink with extra hostname

Post by mini2mini »

thanks for the tip, somehow i didn't think of that.

But this would require people to write a ",hostername" after the address, i don't think they would get it all.
And if they forget the ",hostername" after the address, the bbcode refuses to work.

Is there a way to split the inputted address via the URL tag and use the domainname for this?
This would be as automatic as it could be and nobody could get it wrong.
I think this doesn't work with the URL tag, there must be a combination of some text tags that do this...
mini2mini
BBCoder II
BBCoder II
Posts: 9
Joined: 29 Mar 2010, 20:53

Re: Imagelink with extra hostname

Post by mini2mini »

hmm, perhaps the youtube tag can help with this (even if it does the reverse, it adds something to the link at the end)

{TEXT}watch?v={TEXT1}
and
{TEXT}v/{TEXT1}&rel=en&fs=1

could this be javascript based?
perhaps this could work in reverse somehow and delete the http://www. and .com at the end of it.
Last edited by mini2mini on 29 Mar 2010, 23:38, edited 1 time in total.
cisco007
BBCoder VI
BBCoder VI
Posts: 1015
Joined: 16 Mar 2010, 18:14
Location: Don't really know!

Re: Imagelink with extra hostname

Post by cisco007 »

well it can't be that hard to put in the bbcode tag

Code: Select all

[imagelink]http://www.phpbb3bbcodes.com/images/smilies/icon_question.gif,phpbb3bbodes[/imagelink]
since i am guessing this will be your board, you could add an announcement how to do this!

but, i can try to see what i can come up with!
mini2mini
BBCoder II
BBCoder II
Posts: 9
Joined: 29 Mar 2010, 20:53

Re: Imagelink with extra hostname

Post by mini2mini »

but, i can try to see what i can come up with!
thanks, that would be great :)
Locked