The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Changing Avatar Icon to Rank icon in the forum last post by
I want to be able to change the avatar icon in the forum list to the rank icon.
However for the life of me I can't figure out the template properly to make this work. I've tracked it down to 'display_Forums_item' template on these lines. Code:
<vb:if condition="$user['showavatars']"> <vb:if condition="$forum['lastcontent']['userid'] > 0"> <vb:comment>avatar info must be fetched in batches in the parent template</vb:comment> <a href="{vb:url 'profile', {vb:raw forum.lastcontent}}" class="avatar h-left"> <img src="{vb:raw baseurl_corecdn}/{vb:raw avatar[$forum['lastcontent']['userid']]['avatarpath']}" width="32" height="32" alt="{vb:raw forum.lastcontent.authorname}" /> </a> <vb:else /> <span class="avatar h-left"> <img src="{vb:raw baseurl_corecdn}/images/default/default_avatar_thumb.png" width="32" height="32" alt="{vb:phrase guest_avatar}" /> </span> </vb:if> </vb:if> </vb:if> --------------- Added [DATE]1471379667[/DATE] at [TIME]1471379667[/TIME] --------------- Ok, figured this out. There is the template variables https://www.vbulletin.com/docs/html/...emplate_syntax Also learned that if you want you can debug the variables inside templates as well. Can give you the entire list of them, or just what you need. After writing my own api function I was able to pull the data I needed using the vb:data function in the templates. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|