vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Mini Mods - Chosen Usergroups can hide Reputation Power & Points from Postbit (https://vborg.vbsupport.ru/showthread.php?t=319834)

akz645 08-10-2015 09:00 PM

Chosen Usergroups can hide Reputation Power & Points from Postbit
 
1 Attachment(s)
What is this?
This is a small Template edit that lets you choose from the Usergroup Manger (AdminCP) which Usergroups you want to allow permission from their UserCP to hide Reputation Power from their Postbit.
In green is the coding for Reputation Points, in case you want to add that into your Postbit.
I've only tested this on vbulletin 4.2.3- Although it should work on all vBulletin 4.X.X products.


This is how to globally enable/disable Rep Power/ Reputation for your postbit:
Admin CP -> Settingss -> Options -> Thread Display Options (showthread) -> Reputation Power (tick). => If disabled (not ticked), regardless of what users do, it will not appear in the Postibt.

This is how to enable/disable chosen Usergroups the option to hide their Reputation via UserCP:
AdminCP -> Usergroup -> Usergroup Manager -> [Select Usergroup] Go -> Can Hide Reputation from Others: Yes
=> If disabled (No), that usergroup will always have their Reputation shown (if Reputation isn't globally disabled from AdminCP).


Instructions

Postbit or Postbit_Legacy Template (whichever one you use):
AdminCP -> Styles & Templates -> Search Templates -> postbit_legacy [Pick your style too] -> postbit_legacy (edit)
Note: If postbit_legacy doesn't work, search "postbit" which is located below Postbit Templates.

Find:
Code:

<vb:if condition="$show['infraction']">
<dt>{vb:rawphrase infractions}</dt>
<dd>{vb:raw post.warnings}/{vb:raw post.infractions} ({vb:raw post.ipoints})</dd>
</vb:if>
<vb:if condition="$show['reputation']">
<vb:if condition="$show['reppower']">
<dt>{vb:rawphrase reppower}</dt>
<dd id="reppower_{vb:raw post.postid}_{vb:raw post.userid}">{vb:raw post.reppower}</dd>
                                                </vb:if>
                                        </vb:if>
                                </dl>
                                </vb:if>

Replace with:
Code:

<vb:if condition="$show['infraction']">
<dt>{vb:rawphrase infractions}</dt>
<dd>{vb:raw post.warnings}/{vb:raw post.infractions} ({vb:raw post.ipoints})</dd>
</vb:if>
<vb:if condition="$post['showreputation']">
<vb:if condition="$show['reputation']">
<vb:if condition="$show['reppower']">
<dt>{vb:rawphrase reppower}</dt>
<dd id="reppower_{vb:raw post.postid}_{vb:raw post.userid}">{vb:raw post.reppower}</dd>
<dt>{vb:rawphrase reputation}</dt>
<dd id="reppower_{vb:raw post.postid}_{vb:raw post.userid}">{vb:raw post.reputation}</dd>

                                                </vb:if>
                                        </vb:if>
</vb:if>
                                </dl>
                                </vb:if>

Green: That's the code for reputation points to appear in your postbit. Don't add that, if you don't want to display it.
Red: The essential code that I added in, for this to all work.
Note:
Nothing else has been changed. If you have done custom edits before, then feel free to only add in the red and/or green parts only, into the correct positions.

SAVE

That's pretty much it :)

Go to settings (UserCP), General Settings and go to 'Reputation Level:' - Users (if Usergroup has permission) can choose their preference.

Note 2:
If you want the same thing as my screenshot, then look at the post below- Step B.

akz645 08-11-2015 02:50 PM

Pick between:
  • Step A -> If you want to hide the reputation bar (green/empty)
  • Step B -> If you want to hide the reputation bar (green/empty) & relocate it's position below Rep Power & Reputation

Postbit or Postbit_Legacy Template (whichever one you use):
AdminCP -> Styles & Templates -> Search Templates -> postbit_legacy [Pick your style too] -> postbit_legacy (edit)
Note: If postbit_legacy doesn't work, search "postbit" which is located below Postbit Templates.

Step A:

Find:
Code:

                        <vb:if condition="$show['reputation']">
<span class="postbit_reputation" id="repdisplay_{vb:raw post.postid}_{vb:raw post.userid}" title="{vb:raw post.username} {vb:raw post.level}">
                                        <vb:each from="reputationdisplay" value="row">
<img class="{vb:raw row.class}" src="{vb:stylevar imgdir_reputation}/reputation_{vb:raw row.posneg}{vb:raw row.imgext}" alt="" />{vb:raw row.rowend}
                                        </vb:each>
                                </span>
                        </vb:if>

Replace with:
Code:

<vb:if condition="$post['showreputation']">
                        <vb:if condition="$show['reputation']">
<span class="postbit_reputation" id="repdisplay_{vb:raw post.postid}_{vb:raw post.userid}" title="{vb:raw post.username} {vb:raw post.level}">
                                        <vb:each from="reputationdisplay" value="row">
<img class="{vb:raw row.class}" src="{vb:stylevar imgdir_reputation}/reputation_{vb:raw row.posneg}{vb:raw row.imgext}" alt="" />{vb:raw row.rowend}
                                        </vb:each>
                                </span>
                        </vb:if></vb:if>

Red: The essential code that I added in, for this to all work.

That's it :)

Step B:

Find:
Code:

                        <vb:if condition="$show['reputation']">
<span class="postbit_reputation" id="repdisplay_{vb:raw post.postid}_{vb:raw post.userid}" title="{vb:raw post.username} {vb:raw post.level}">
                                        <vb:each from="reputationdisplay" value="row">
<img class="{vb:raw row.class}" src="{vb:stylevar imgdir_reputation}/reputation_{vb:raw row.posneg}{vb:raw row.imgext}" alt="" />{vb:raw row.rowend}
                                        </vb:each>
                                </span>
                        </vb:if>

^Delete all of that
+
Find:
Code:

                                        <dt>{vb:rawphrase reppower}</dt>
<dd id="reppower_{vb:raw post.postid}_{vb:raw post.userid}">{vb:raw post.reppower}</dd>
                                        <dt>{vb:rawphrase reputation}</dt>
<dd id="reppower_{vb:raw post.postid}_{vb:raw post.userid}">{vb:raw post.reputation}</dd>

                                                </vb:if>
                                        </vb:if>
</vb:if>
                                </dl>
                                </vb:if>

Replace with:
Code:

                                        <dt>{vb:rawphrase reppower}</dt>
<dd id="reppower_{vb:raw post.postid}_{vb:raw post.userid}">{vb:raw post.reppower}</dd>
                                        <dt>{vb:rawphrase reputation}</dt>
<dd id="reppower_{vb:raw post.postid}_{vb:raw post.userid}">{vb:raw post.reputation}</dd>
                       
<vb:if condition="$show['reputation']">
<span class="postbit_reputation" id="repdisplay_{vb:raw post.postid}_{vb:raw post.userid}" title="{vb:raw post.username} {vb:raw post.level}">
                                        <vb:each from="reputationdisplay" value="row">
<img class="{vb:raw row.class}" src="{vb:stylevar imgdir_reputation}/reputation_{vb:raw row.posneg}{vb:raw row.imgext}" alt="" />{vb:raw row.rowend}
                                        </vb:each>
                                </span>
                        </vb:if>

                                                </vb:if>
                                        </vb:if>
</vb:if>
                                </dl>
                                </vb:if>

Green: That's the code for reputation points to appear in your postbit. Don't add that, if you don't want to display it.
Blue: I just moved the deleted code over here.
Red: The end IF condition, for the change done in the first/original post.

That's it :)

------------------------------------------------------------------------------------------------------------------------------------------------------

If you want to force X Usergroups/Users Display Reputation On/Off from their profile, then check out my guide here:
https://vborg.vbsupport.ru/showthrea...58#post2555258

If you don't give them permission to Hide Reputation from Others, then whatever you want will stay permanently, until you/another admin decides otherwise.

akz645 09-02-2015 11:31 PM

"Mark as Installed" if you did this Template edit and/or just found this thread useful.
https://vborg.vbsupport.ru/external/2015/09/30.png

Note:
I don't know too much about html coding. However if you're unsure about postbit_legacy template edits, or require additional help regarding that, I think I should be able to help.

-------

Change Log:
v1.00 = Create a custom User Profile Field to add/remove reputation power/points from the postbit.
v2.00 = No longer need to create a custom User Profile Field. You can use vbulletin's built in Show/Hide Reputation from the UserCP.


All times are GMT. The time now is 07:07 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01045 seconds
  • Memory Usage 1,760KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (7)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete