PDA

View Full Version : BB question


aardel
Wed 28th May '08, 4:31pm
Hi i am a newbie and trying to add a bb code but i am missing something, i am trying to make a bb code to input the url and it will add the image autoamtically i am using
http://www.cccamforum.com/dl.gif ({param})

but the output is not what i am expecting, i am getting the link and the button separate.

Any suggestion how to make it?

Lynne
Wed 28th May '08, 5:12pm
This is from the help button next to Replacement - you have to use html:

BB Code Replacement

This is the HTML code that replaces the user-entered BB Code. Make sure that you include '{param}' (without the quotes) to insert the text between the opening and closing BB code tags, and '{option}' for the parameter within the BB code tag. You can only use {option} if 'Use Option' is set to yes below.
eg. [ B]My Text[/B ] turns into My Text. To create that tag, enter
<b>{param}</b>
If you were to create a tag like the URL tag, you would use {option}. The URL tag can be used like this:
[ URL]http://www.example.com[/URL ]
which turns into
http://www.example.com/
It can alternatively be used like this:
[ URL="http://www.example.com/"]My Site[/URL ]
which would turn into this:
My Site (http://www.example.com/)
This is actually two different tags with the same code to make it easy on the end-user.
To create the first tag, you would enter
<a href="{param}">{param}</a>
To create the second, you would enter
<a href="{option}">{param}</a>
If you are using options, option is what is entered within the tag, e.g. [ URL="http://www.example.com"]www.example.com[/URL ] in the following:
[url=www.example.com]
{param} is what is entered between tags, e.g. My Site in the following:
[ URL="http://www.example.com"]My Site[/URL ]
You will always use '{param}', but you will only use '{option}' when "Use Option?" is "yes" and you need a second bit of input from the user as in the above example.

aardel
Wed 28th May '08, 5:47pm
Thanks Lynne, for the answer i tried to follow that already but got me more confused !!

can you give me an example of what i need to accomplish?

Many Thanks

Lynne
Wed 28th May '08, 6:08pm
Well, to take a example of wanting to input a url to link to that shows up as a button, like this (hover over it to see it's a link to www.yourlink.com):
http://www.vbulletin.com/forum/images/buttons/report.gif (http://%22http://www.yourlink.com)

I think you would input this for the Replacement:
<a href="{param}"><img src="http://www.vbulletin.com/forum/images/buttons/report.gif></a>And you would use it like:
http://www.yourlink.com

(Not tested!!!)

aardel
Wed 28th May '08, 7:10pm
Nope m8 id did not work, as i guess i have html off on my forum as suggested for security reasons

Lynne
Wed 28th May '08, 8:54pm
Works on my site (although I did notice I forgot the end quote for the image tag), so:
<a href="{param}"><img src="http://www.cccamforum.com/dl.gif"></a>

(Well, the end result is as shown in the attachment.)

And I do not allow html on my site.

aardel
Thu 29th May '08, 4:39am
Thanks Lynne that was the mistake !! missing quotes i did not even realize myself, the button appears and the link works there is only one small thing left altoghu it is not highly important, when i use this there is frame around the button !! is there any way to remove this?

When i use the built in bb codes to acomplish this i do not have this frame!

Lynne
Thu 29th May '08, 12:13pm
Thanks Lynne that was the mistake !! missing quotes i did not even realize myself, the button appears and the link works there is only one small thing left altoghu it is not highly important, when i use this there is frame around the button !! is there any way to remove this?

When i use the built in bb codes to acomplish this i do not have this frame!
Like this:
<a href="{param}"><img src="http://www.cccamforum.com/dl.gif" border="0"></a>
Also, some will say it is better to give the height and width of the image also. ie.
<a href="{param}"><img src="http://www.cccamforum.com/dl.gif" border="0" height="xx" width="yy"></a>

aardel
Fri 30th May '08, 10:15am
Great Lynne this time i got it right as i wanted thanks to you!! I appreciate your help!!:)