Quote:
And is there a clean way to remove the 'delete all messages' option without affecting the other modding capabilities? That's located a bit too conveniently in the pulldown menu for a function that powerful
|
Posted this in the 3.7 thread, before I noticed a 3.8 one
Anyway, figured it out and also modified the chatbox to hide the archive from unregistered guests.
Reason for the latter being that people seem to be using it as if it were IRC, and occasionally say things they probably don't want to show up on google.
Remove moderator 'delete all posts' button
Removing the following code in the
cyb_chatbox template:
Code:
<tr>
<td class="vbmenu_option"><a href="javascript:Ccb_Confirm('delsel');"&t;$vbphrase[cybcb_delete_all]</a>
</td>
</tr>
Add conditional to block unregistered and other usergroups from chatbox archive
Find the following code in the
cyb_chatbox template:
Code:
<if condition="($_REQUEST['do']=='ccarc')">
<form id="cybcb_search" name="cybcb_search" action="misc.php?do=ccarc" method="post">
Code:
<td align="$stylevar[right]">$pagenav</td>
</tr>
</table>
</if>
</if>
Replace with:
Code:
<if condition="($_REQUEST['do']=='ccarc')"><if condition="is_member_of($bbuserinfo, 0, 1, 3, 4)">
You are not logged in or you do not have permission to access this page.<br />
<else />
<form id="cybcb_search" name="cybcb_search" action="misc.php?do=ccarc" method="post">
Code:
<td align="$stylevar[right]">$pagenav</td>
</tr>
</table>
</if>
</if></if>
Replace 1/10/100 with your preferred usergroup numbers (for example unregistered, coppa, awaiting email moderation and banned).
Quote:
One minor issue though: the chatbox doesn't register unread messages properly for some reason. I've posted my first message about 90 mins ago, posted about 50 more since and it still shows that first message as the 'first unread' one... I don't see any related cron jobs in the 'scheduled task manager' though so I'm wondering how this particular field is updated?
|
This issue's still there though. I reckon it has something to do with session length, but I'm not sure.
And I also found out that so called 'censored words' are properly processed on all cyb chatbox pages, but the 'replacement variables' are only applied at the chatbox archive. We use replacement variables on our board as a more creative way of censoring certain offensive words (replacing them with the exact opposite being my favourite), and for some reason these aren't processed on the 'forumhome' mini chatbox - showing them in full glory instead.