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,
Code:
{attach}56{/attach}
appears to generate in my case the following html:
HTML Code:
<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:
Code:
[attach_t=56]My link text[/attach_t]
to generate this:
HTML Code:
<a href="attachment.php?attachmentid=56?&d=1264185515>My link text</a>
--------------- Added [DATE]1264220800[/DATE] at [TIME]1264220800[/TIME] ---------------
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 [DATE]1264266546[/DATE] at [TIME]1264266546[/TIME] ---------------
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:
Code:
<a href="attachment.php?attachmentid={option}">{param}</a>
The usage is the same as I showed above:
Code:
[attach_t=56]My link text[/attach_t]
To find out what attachmentid to use, simply use attachment manager to insert inline to create an 'attach' bbcode, then edit it.