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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tnedator
    Senior Member
    • Aug 2007
    • 329

    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
    BroncosForums.com - Broncos Fan Forum
    Total Broncos - Denver Broncos Blog and News
  • Jake Bunce
    Senior Member
    • Dec 2000
    • 46598
    • 3.6.x

    #2
    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>

    Comment

    • tnedator
      Senior Member
      • Aug 2007
      • 329

      #3
      Originally posted by Jake Bunce
      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?
      BroncosForums.com - Broncos Fan Forum
      Total Broncos - Denver Broncos Blog and News

      Comment

      • Jake Bunce
        Senior Member
        • Dec 2000
        • 46598
        • 3.6.x

        #4
        Correct, and only when that specific template has required changes in the new version.

        Comment

        • tnedator
          Senior Member
          • Aug 2007
          • 329

          #5
          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>
          BroncosForums.com - Broncos Fan Forum
          Total Broncos - Denver Broncos Blog and News

          Comment

          • Jake Bunce
            Senior Member
            • Dec 2000
            • 46598
            • 3.6.x

            #6
            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'] [color=red]AND $bbuserinfo[userid] != $userinfo[userid][/color]">
            <!-- 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>

            Comment

            • tnedator
              Senior Member
              • Aug 2007
              • 329

              #7
              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.
              BroncosForums.com - Broncos Fan Forum
              Total Broncos - Denver Broncos Blog and News

              Comment

              • Jake Bunce
                Senior Member
                • Dec 2000
                • 46598
                • 3.6.x

                #8
                Correct.

                Comment

                • tnedator
                  Senior Member
                  • Aug 2007
                  • 329

                  #9
                  Originally posted by Jake Bunce
                  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.
                  BroncosForums.com - Broncos Fan Forum
                  Total Broncos - Denver Broncos Blog and News

                  Comment

                  • Jake Bunce
                    Senior Member
                    • Dec 2000
                    • 46598
                    • 3.6.x

                    #10
                    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.

                    Comment

                    • tnedator
                      Senior Member
                      • Aug 2007
                      • 329

                      #11
                      Originally posted by Jake Bunce
                      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 [COLOR=red]$bbuserinfo[userid] != $post[userid][/COLOR]">
                      BroncosForums.com - Broncos Fan Forum
                      Total Broncos - Denver Broncos Blog and News

                      Comment

                      • Jake Bunce
                        Senior Member
                        • Dec 2000
                        • 46598
                        • 3.6.x

                        #12
                        Yes.

                        Comment

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