The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Show icons for specific usergroup (threadstarter) in threadbit?
On the thread listing page (threadbit), in vB3 and vB4, I find the icons to the left of the thread title to be useless. To make that space useful, I'd like to show icons only for threads started by members of certain "priority" usergroups. Their threads get icons, normal members will not.
The easiest way is to wrap this code (which shows one of the icons) Code:
<img src="$stylevar[imgdir_statusicon]/thread$thread[statusicon].gif" id="thread_statusicon_$thread[realthreadid]" alt="<if condition="$show['threadcount']"><phrase 1="$thread[dot_count]" 2="$thread[dot_lastpost]">$vbphrase[have_x_posts_in_thread_last_y]</phrase></if>" border="" /> I've tried writing several statements, but none have worked, or even come close. All those did was blank out the icon column, and showed nothing. Example of NOT working: Code:
<vb:if condition="is_member_of($vbulletin->thread[postuserid], 6, 33)"> </vb:if> Quote:
Code:
<vb:if condition="is_member_of($memberinfo, 6)"> </vb:if> .. |
#2
|
||||
|
||||
You want to use the $thread array instead of the $memberinfo array in the "threadbit" template.
|
#3
|
||||
|
||||
What would the correct conditional/syntax be?
I just tried this, with no success: Code:
<vb:if condition="is_member_of($vbulletin->thread[postuserid], 6, 33)"> </vb:if> Code:
<vb:if condition="is_member_of($thread, 6, 33)"> </vb:if> |
#4
|
||||
|
||||
Try this:
PHP Code:
The is_member_of() function expects an array for its second parameter. |
#5
|
||||
|
||||
That doesn't seem to work. The icon column is still blank.
EDIT: This is working (showing something), but also not: Code:
<vb:if condition="is_member_of($thread[postuserid], array(6,33))"> - all stickies - started by moderators - random normal members At a glance, it appears to be adding the icon for any thread where the priority members have participated -- not just threads that they've started. Plus stickies. But I've found threads started by, and later replied to, by the priority group, which are not receiving icons. Same for threads not replied to by priority, mods or admins -- just normal thread starter + normal repliers -- yet are receiving icons. I don't get what's going on here. EDIT2: If I removed 6 (leaving only 33 in the array), it shows nothing at all again. .. |
#6
|
||||
|
||||
Do you have the HTML for displaying the image inside the if-then construct?
|
#7
|
||||
|
||||
I edited my above post several times. You may want to re-read it, if I added anything pertient.
Code:
<td id="td_threadstatusicon_7670" class="alt1" style="cursor: pointer;"> <a rel="vB::AJAX"></a> <img id="thread_statusicon_7670" border="" alt="" src="http://www.x.com/forum/styles/hr/statusicon/thread.gif"></img> </td> I'm not sure what the HTML is supposed to reveal. EDIT: This is from vBulletin admin side: Code:
<img src="$stylevar[imgdir_statusicon]/thread$thread[statusicon].gif" id="thread_statusicon_$thread[realthreadid]" alt="<if condition="$show['threadcount']"> <phrase 1="$thread[dot_count]" 2="$thread[dot_lastpost]">$vbphrase[have_x_posts_in_thread_last_y] </phrase></if>" border="" /> |
#8
|
||||
|
||||
The second block of code you posted is using vB 3.x syntax. Which version of vB are you using?
|
#9
|
||||
|
||||
I need to do this on both vB3 and vB4 forums. I can change live code on a vB3 install, while the vB4 has the be done on a development server. The conditional statements barely change between 3 and 4.
The vB4 is essentially using the default plain theme. .. |
#10
|
||||
|
||||
Quote:
vB 3.x: HTML Code:
$thread[title] HTML Code:
{vb:raw thread.title} |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|