Quote:
Originally Posted by SamirDarji
Mind sharing the code for the changes? I was thinking to do the same.
|
Yep, no probs. It is not neat or the most efficient code, but it works for me (not a coder myself but have started to experiment). Only tested on v3.0.3. These changes will have to be made in every style you use.
The only thing viewable by a member is the Warn Level (all members are displayed for everyone to see) and their warning page (only viewable by them and staff). My staff love this as originally everyone saw all links.
You will have to reference with ZT's original instructions to see what is different for the 'postbit' template (additional navbar and MEMBERINFO template alterations by me):
1. In the 'postbit' template (you will have to find the equivalent place in the 'postbit_legacy' template yourself as I do not use it), Warn and View Warning only seen by staff. Warn Level are displayed for members (when level is above zero it changes colour). You can change the font colours to whatever you want.
Postbit Templates ->
postbit:-
Find:
PHP Code:
<if condition="$show['postcount']">#<a
Replace with:
PHP Code:
<if condition="$post['usergroupid'] == 5 OR $post['usergroupid'] == 6 OR $post['usergroupid'] == 7"><else /><if condition="$bbuserinfo['usergroupid'] == 5 OR $bbuserinfo['usergroupid'] == 6 OR $bbuserinfo['usergroupid'] == 7"><a href='Warn.php?do=WarnUser&id=$post[userid]&post=$post[postid]'><font color=orange>Warn $post[musername]</font></a> <a href='Warn.php?do=ViewWarnings&id=$post[userid]'><font color=yellow>View $post[musername]'s Warnings</font></a> </if></if><if condition="$show['postcount']">#<a
Find:
PHP Code:
<if condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if>
<div>
$vbphrase[posts]: $post[posts]
</div>
Under it Add:
PHP Code:
<if condition="$post['usergroupid'] == 5 OR $post['usergroupid'] == 6 OR $post['usergroupid'] == 7"><else /><if condition="$post['warning_level'] == 0"><div class="smallfont">Warning Level: $post[warning_level]</div></if></if>
<if condition="$post['usergroupid'] == 5 OR $post['usergroupid'] == 6 OR $post['usergroupid'] == 7"><else /><if condition="$post['warning_level']>0"><div class="smallfont"><font color=yellow>Warning Level: $post[warning_level]</font></div></if></if>
2. I put a 'View My Warnings' link in 'Quick Links' on the navbar (as staff can't get warned they will not see this).
Navigation / Breadcrumb Templates ->
navbar:-
Find:
PHP Code:
<tr><td class="thead">$vbphrase[miscellaneous]</td></tr>
Above it add:
PHP Code:
<if condition="$bbuserinfo['usergroupid'] == 5 OR $bbuserinfo['usergroupid'] == 6 OR $bbuserinfo['usergroupid'] == 7"><else /><tr><td class="thead">Warnings</td></tr><tr><td class="vbmenu_option"><a href="Warn.php?$session[sessionurl]do=ViewMyWarnings">View My Warnings</a></td></tr></if>
3. For members public profiles I have added a view warnings (viewable by staff only) and Warning Level (everyone can see)
Member Info Templates ->
MEMBERINFO:-
Find:
PHP Code:
<td class="tcat">$vbphrase[view_profile]<span class="normal">: $userinfo[username]</span></td>
Replace with:
PHP Code:
<td class="tcat">$vbphrase[view_profile]<span class="normal">: $userinfo[username]<if condition="$post['usergroupid'] == 5 OR $post['usergroupid'] == 6 OR $post['usergroupid'] == 7"><else /><if condition="$bbuserinfo['usergroupid'] == 5 OR $bbuserinfo['usergroupid'] == 6 OR $bbuserinfo['usergroupid'] == 7"> <a href='Warn.php?do=ViewWarnings&id=$post[userid]'><font color=yellow>View $post[musername]'s Warnings</font></a> </if></if></span></td>
Find:
PHP Code:
<if condition="$show['lastactivity']">
<div>$vbphrase[last_activity]: $userinfo[lastactivitydate] <span class="time">$userinfo[lastactivitytime]</span> </div>
</if>
Above it Add:
PHP Code:
<if condition="$post['usergroupid'] == 5 OR $post['usergroupid'] == 6 OR $post['usergroupid'] == 7"><else /><if condition="$post['warning_level'] == 0"><div class="smallfont">Warning Level: $post[warning_level] </div></if></if>
<if condition="$post['usergroupid'] == 5 OR $post['usergroupid'] == 6 OR $post['usergroupid'] == 7"><else /><if condition="$post['warning_level']>0"><div class="smallfont"><font color=yellow>Warning Level: $post[warning_level]</font> </div></if></if>
That is all I really did, so if you find use for it go right ahead and use it
JD.