The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
customize bbcode attach
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} HTML Code:
<a href="attachment.php?attachmentid=56?&d=1264185515>The File Name</a> Code:
[attach_t=56]My link text[/attach_t] HTML Code:
<a href="attachment.php?attachmentid=56?&d=1264185515>My link text</a> 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> Code:
[attach_t=56]My link text[/attach_t] |
#2
|
|||
|
|||
There is one side effect of using this custom bbcode. Since the application doesn't see a regular 'attach' code for the item, it shows an 'Attached Files' box when viewing the full article in CMS. However, If you have 'Display Full Article in Section Page' = Yes and are viewing the page at the section level, you don't see the 'Attached Files' box. In the example below, the first attachment is using the standard 'attach' bbcode, while the second uses the custom one. For my purposes, this shouldn't be a problem.
Attachment 110858 Attachment 110859 |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|