create new plugin
Hook Location: threadbit_display
Title: usergroup check for threadstarter in threadbit
Plugin PHP Code:
PHP Code:
$current_thread = $thread['threadid'];
$query = $vbulletin->db->query_first_slave("
SELECT user.usergroupid, user.membergroupids
FROM " . TABLE_PREFIX . "thread AS thread
LEFT JOIN " . TABLE_PREFIX . "user AS user ON (user.userid = thread.firstpostid)
WHERE thread.threadid = " . $current_thread . "
");
$primary_group = $query['usergroupid'];
$secondary_groups = $query['membergroupids'];
if(!empty($secondary_groups)) {
$groups = $primary_group . "," . $secondary_groups;
} else {
$groups = $primary_group;
}
$groups_all = explode(",", $groups);
vB_Template::preRegister('threadbit',array('group' => $groups_all));
then in template
threadbit
You could do
Code:
<vb:if condition="in_array(6, $group)">This thread starter is in admin group</vb:if>
The
6 being the group you want to check, and this example
6 is the Administrator group.
This checks the primary and additional groups of a thread starter.