I use this version and confirm it works with xf1.2we only have one forum for moderators.. so the other two options at the top are just occupying our top space for no reason.. can you make them optional in the next release?
Is it possible u can edit the name like Admin Room Unread to Unread Ban appeals
$messageCountMod = XenForo_Model::create(StaffRoomUnread_Model_StaffRoomUnread)->getStaffRoomUnread(XenForo_Visitor::getUserId(),$options->StaffRoomUnread_ModForumID);
$modUnreadTemplate = $template->create('StaffRoomUnread_Mod');
$modUnreadTemplate-> setParam('messageCount', $messageCountMod);
$modUnreadTemplate-> setParam('forumID', $options->StaffRoomUnread_ModForumID);
$contents .= $modUnreadTemplate;
Are you trying to get the "{$messageCount}" and "{$forumID}" variables to be available in the moderator_bar template?
Assuming that the code above is from a template hook, it's unlikely you can make those params available to the entire moderator_bar template.
If the aim is to hide the message counts from other users because otherwise your style is exposing them then you should be using template conditionals inside the "StaffRoomUnread_Mod" and other templates.
<xen:if is="{$visitor.is_admin} OR {$visitor.is_moderator}">
<xen:hook name="moderator_bar" />
</xen:if>
That's a good plan.Any reason that's a stupid idea?Code:<xen:if is="{$visitor.is_admin} OR {$visitor.is_moderator}"> <xen:hook name="moderator_bar" /> </xen:if>
Comment out the data in these templates:Is there a way to remove a couple of the rooms if you only use 1 moderator forum and nothing else?
<xen:comment>
<a href="{xen:link 'forums/{$forumID}'}" class="modLink">
<span class="itemLabel">{xen:phrase StaffRoomUnread_AdminRoom}</span>
<span class="itemCount {xen:if {$messageCount}, 'alert'}"> {$messageCount}</span>
</a>
</xen:comment>
We use essential cookies to make this site work, and optional cookies to enhance your experience.