Is There a List of Variables I Can Use to Link Dynamically to Nodes?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • karlm
    Senior Member
    • Jun 2006
    • 826
    • 5.3.x

    Is There a List of Variables I Can Use to Link Dynamically to Nodes?

    I'd like to have Images I choose to link to channel-ids, so for example when using the ACP channel manager to add HTML, I can include an image - it would be good if the image could be hyperlinked dynamically to the forum-node, something like;

    HTML Code:
    <a href="$channel-nodeid" target="_self">
    <img class="my-css"> src="../images/$channel-name.png">
    </a>
    <p class="my-text">lorum ipsum blah blah blah...</p>
    That way, I could simply name all images the same as the forum and be safe in the knowledge it would automatically pick up the correct image and dynamically link that image to appropriate forum. I'm fairly confident there's an easy way to manipulate such a change, but I'm at a loss for how to create such a code and where to look for variables I could use (such as channel-id, node-id, etc.)

    There seems to be a fair amount floating around, but they're typically not pertinent to the channel-id / channel-name..

    $userid, $username, $email, $activateid, and $activatelink.
    Last edited by karlm; Sun 27 May '18, 4:07am.
    VB 5.4.1 - PHP 7..2.4 - MySQL 5.5.56
    No Addons - none at all.
  • Wayne Luke
    vBulletin Technical Support Lead
    • Aug 2000
    • 74154

    #2
    To do what you want, you would have to edit the template directly. You cannot use variables within Channel Descriptions. This would require an image for every forum. The specific template to show an individual Forum Channel in a list of forums is display_Forums_item.

    Within that template you can use {vb:raw forum.nodeid} to point to your particular channel. You can use {vb:url {vb:raw forum.routeid}} to build a link to the channel. That is already done though, you just have to add your image tag.
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API

    Comment


    • karlm
      karlm commented
      Editing a comment
      Thanks, that's a good bit to get chewing through (for me, at least)... I'll have a potter around.
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...