Announcement

Collapse
No announcement yet.

Remove/Hide "Latest Infractions Received" in the User CP

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Jake Bunce
    replied
    Yes.

    Leave a comment:


  • tnedator
    replied
    Originally posted by Jake Bunce View Post
    It's the same exact code, but in the postbit you need to use $post[userid] instead of $userinfo[userid] at the end of the condition.
    Ok, so I would make this change:

    Code:
     
    <if condition="$show['redcard'] AND $bbuserinfo[userid] != $post[userid]">

    Leave a comment:


  • Jake Bunce
    replied
    It's the same exact code, but in the postbit you need to use $post[userid] instead of $userinfo[userid] at the end of the condition.

    Leave a comment:


  • tnedator
    replied
    Originally posted by Jake Bunce View Post
    Correct.
    Ok, great.

    Back for one more. When a post has been given an Infraction, either a or will show up.

    Once again, I would like the mods and admin to be able to see these, but nobody else (includng the person that received the infraction).

    I tried using the same code adjustment as in memborinfo by adding the same "AND $bbuserinfo[userid] != $userinfo[userid]" to the correct section in postbit, changing this:

    <if condition="$show['redcard'] ">

    to

    <if condition="$show['redcard'] AND $bbuserinfo[userid] != $userinfo[userid]">

    However, that didn't do remove it the red and yellow flags in postbit.

    Can you tell me how to have only the mods/admin see these red and yellow card icons.

    Thanks for all the help on this.

    Leave a comment:


  • Jake Bunce
    replied
    Correct.

    Leave a comment:


  • tnedator
    replied
    Ok, the addition you made in red, if I add that, it will hide the infractions from the user who has received the infractions, so it will be completely invisible to them?

    With that change, only Admin and Mods will be able to see the infractions in the user profiles?

    Thanks for the help on this.

    Leave a comment:


  • Jake Bunce
    replied
    The user can always see their own infractions. You would need to modify this template:

    Admin CP -> Styles & Templates -> Style Manager -> « » -> Member Info Templates -> MEMBERINFO

    Add the red code:

    Code:
    </tr>
    </table>
    </if>
    <!-- / button row -->
    
    <br />
    
    $template_hook[memberinfo_pos2]
    
    <if condition="$show['infractions'] AND $bbuserinfo[userid] != $userinfo[userid]">
    <!-- infractions row -->
    <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
    <tr>
    	<td class="tcat" colspan="$colspan"><span style="float:$stylevar[right]" class="smallfont"><phrase 1="$userinfo[ipoints]">$vbphrase[x_points_total]</phrase>&nbsp; &nbsp;</span>$vbphrase[infractions]</td>
    </tr>
    <tr>

    Leave a comment:


  • tnedator
    replied
    Ok, now how do I set it up where only admins/mods will be able to see the infractions in "View Public Profile" and the user who received the infractions won't?

    Basically, I am trying to completely hide the system from the users.

    I think the following in the memberinfo template is what displays it. If this is correct, is there an if statement that could be included to only show it for mods/admin?

    Code:
     
     <if condition="$show['giveinfraction']">
        <td class="vbmenu_control"><a href="infraction.php?$session[sessionurl]do=report&amp;u=$userinfo[userid]">$vbphrase[give_infraction]</a></td>
     </if>
    </tr>
    </table>
    </if>
    <!-- / button row -->
    <br />
    $template_hook[memberinfo_pos2]
    <if condition="$show['infractions']">
    <!-- infractions row -->
    <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
    <tr>
     <td class="tcat" colspan="$colspan"><span style="float:$stylevar[right]" class="smallfont"><phrase 1="$userinfo[ipoints]">$vbphrase[x_points_total]</phrase>&nbsp; &nbsp;</span>$vbphrase[infractions]</td>
    </tr>
    <tr>
     <td class="thead">&nbsp;</td>
     <td class="thead">$vbphrase[post]</td>
     <td class="thead">$vbphrase[date]</td>
     <td class="thead">$vbphrase[expires]</td>
     <td class="thead">$vbphrase[points]</td>
     <td class="thead">$vbphrase[reason]</td>
     <td class="thead" nowrap="nowrap">$vbphrase[posted_by]</td>
     <if condition="$show['reverse']"><td class="thead">$vbphrase[details]</td></if>
    </tr>
    $infractionbits
    </table>
    <if condition="$pagenav">
    <table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-top:3px">
    <tr valign="bottom">
     <td align="$stylevar[right]">$pagenav</td>
    </tr>
    </table>
    </if>
    <!-- / infractions row -->
    <br />
    </if>

    Leave a comment:


  • Jake Bunce
    replied
    Correct, and only when that specific template has required changes in the new version.

    Leave a comment:


  • tnedator
    replied
    Originally posted by Jake Bunce View Post
    I have looked into this. I don't see any option to disable that list. You would have to remove it from the templates:

    Admin CP -> Styles & Templates -> Style Manager -> « » -> User Control Panel Templates -> USERCP_SHELL

    Find and remove this block of code:
    Ok, great. Thank you very much. One more question.

    When I make code changes like this, what do I need to by aware of? I am assuming themes (is that the correct vB terminology) sit on top of this with CSS, so would the only time I have to redo code changes like this be after an upgrade, such as when the 3.7 upgrade comes out?

    Leave a comment:


  • Jake Bunce
    replied
    I have looked into this. I don't see any option to disable that list. You would have to remove it from the templates:

    Admin CP -> Styles & Templates -> Style Manager -> « » -> User Control Panel Templates -> USERCP_SHELL

    Find and remove this block of code:

    Code:
    <if condition="$show['infractions']">
    <!-- ############## NEW INFRACTIONS ##############  -->
    <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
    <thead>
    	<tr>
    		<td class="tcat" colspan="7">
    			<span class="smallfont" style="float:$stylevar[right]">
    				<phrase 1="$bbuserinfo[ipoints]">$vbphrase[x_points_total]</phrase>
    				&nbsp; &nbsp;
    				<a href="#top" onclick="return toggle_collapse('usercp_infraction')"><img id="collapseimg_usercp_infraction" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_usercp_infraction].gif" alt="" border="0" /></a>
    			</span>
    			$vbphrase[latest_infractions_received]
    		</td>
    	</tr>
    </thead>
    <tbody id="collapseobj_usercp_infraction" style="$vbcollapse[collapseobj_usercp_infraction]">
    	<tr>
    		<td class="thead">&nbsp;</td>
    		<td class="thead">$vbphrase[post]</td>
    		<td class="thead">$vbphrase[date]</td>
    		<td class="thead">$vbphrase[expires]</td>
    		<td class="thead" nowrap="nowrap">$vbphrase[points]</td>
    		<td class="thead">$vbphrase[reason]</td>
    		<td class="thead" nowrap="nowrap">$vbphrase[posted_by]</td>
    	</tr>
    	$infractionbits
    </tbody>
    </table>
    <br />
    <!-- ############## END NEW INFRACTIONS ##############  -->
    </if>

    Leave a comment:


  • Remove/Hide "Latest Infractions Received" in the User CP

    We want to be able to use the User Infractions system to allow the mods to ban members, and possibly to track warnings that members have receieved, but we don't want the the "Latest Infractions Received" to show up in the User CP.

    Most of the members on my forum had a very bad experience with an infraction points system on another forum, so the fear is that if they see us using an IP system, that will upset a great many members. Therefore, we want moderators to be able to view infractions in members user profile and we want to setup some 'auto ban' thresholds, but we don't want users to have any indication the system is being used.

    I have not seen anyplace where this is a setting, so does this mean I have to edit the User CP template? If so, can anyone tell me where and what code has to be modified?

    Thanks
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X