ddrake
01-22-2010, 05:33 PM
Does anyone know how to create a custom bbcode that works just like the built-in [attach] but that has a {param} for the link text?
For example, {attach}56{/attach} appears to generate in my case the following html:
<a href="attachment.php?attachmentid=56?&d=1264185515>The File Name</a>
I think I would like my custom bbcode to work possibly something like this:
My link text
to generate this:
<a href="attachment.php?attachmentid=56?&d=1264185515>My link text</a>
--------------- Added 1264220800 at 1264220800 ---------------
Maybe it's not possible... I'm not sure what the 'd=1264185515' argument does, but it's probably different for each attachment, so we'd need a way to pass two arguments to the custom bbcode. But I gather that bbcodes can only handle one.
--------------- Added 1264266546 at 1264266546 ---------------
Well, I'm still not sure what the [purpose of the 'd=1264185515' argument is, but it doesn't seem to be a critical part of the url.
This custom bbcode seems to work: :)
<a href="attachment.php?attachmentid={option}">{param}</a>
The usage is the same as I showed above:
My link text
To find out what attachmentid to use, simply use attachment manager to insert inline to create an 'attach' bbcode, then edit it.
For example, {attach}56{/attach} appears to generate in my case the following html:
<a href="attachment.php?attachmentid=56?&d=1264185515>The File Name</a>
I think I would like my custom bbcode to work possibly something like this:
My link text
to generate this:
<a href="attachment.php?attachmentid=56?&d=1264185515>My link text</a>
--------------- Added 1264220800 at 1264220800 ---------------
Maybe it's not possible... I'm not sure what the 'd=1264185515' argument does, but it's probably different for each attachment, so we'd need a way to pass two arguments to the custom bbcode. But I gather that bbcodes can only handle one.
--------------- Added 1264266546 at 1264266546 ---------------
Well, I'm still not sure what the [purpose of the 'd=1264185515' argument is, but it doesn't seem to be a critical part of the url.
This custom bbcode seems to work: :)
<a href="attachment.php?attachmentid={option}">{param}</a>
The usage is the same as I showed above:
My link text
To find out what attachmentid to use, simply use attachment manager to insert inline to create an 'attach' bbcode, then edit it.