Jump to content
vBWarez - Rest In Peace

[DBTech] vBActivity & Awards [Elegant Postibt] [PRO ONLY


Recommended Posts

[B]What is this?
This is a little Mod & Template edit that adds a 'Repdisplay' option in the userCP for your members to chose whether or not they want to display reputation power & reputation points in the postbit.
Users can not see reputation points in the postbit, so I'm also going to show you how to add that too.
[I][B]I've only tested this on vbulletin 4.2.3[/B]

[B]Note: There are no files to download.
[B]Note 2: Make sure Reputation Power is globally enabled:
Admin CP -> Settingss -> Options -> [URL="http://i.imgur.com/7iAofm5.png"]Thread Display Options (showthread)[/URL] -> [URL="http://i.imgur.com/rsXMwPd.png"]Reputation Power (tick it)[/URL]. => If disabled (not ticked), regardless of what users do, it will not appear in the postibt.

[B][U]Complete this in 4 Steps:[/U]

[B][SIZE=3][U]Step 1[/U][/SIZE] [B]Create a New Profile Field
[B]AdminCP -> User Profile Fields -> Add New User Profile Field
And do the following:
Profile Field Type: [B]Multiple-Selection Checkerbox
Click [B]Continue

[I]Title: Repdisplay
[I]Description: Do you want your Reputation to display in the postbit?
If so, tick yes. If not, untick yes.
[I]Profile Field Category: (Uncategorized)
[I]Limit Selection: 0
[I]Options: Yes
[I]Display Order: [COLOR=red]7[/COLOR]
[SIZE=1][COLOR=red]7[/COLOR] is the example I'll be using. You can pick anything you want, just make sure the number isn't used for any other profile fields. [/SIZE]
[I]Field Required: No, but display at registration
[I]Field Editable by User: Yes
[I]Private Field: No
[I]Field Searchable on Members List: Yes
[I]Show on Members List: Yes

Display Page:
[I]Which page displays this option? Edit Profile

[B]Note: Remember the Display Order (my example being [COLOR=Red]7[/COLOR]), as you'll need to input this number in other steps.

[B]SAVE

[B][SIZE=3][U]Step 2[/U][/SIZE] [B]Add a Phrase:
[B]AdminCP -> Languages & Phrases -> Phrase Manager -> Add New Phrase

[I]Phrase Type: GLOBAL
[I]Product: vBulletin
[I]Varname: repdisplay
[I]Text: Repdisplay

[B]SAVE

[B][SIZE=3][U]Step 3[/U][/SIZE] [B]Modify UserCP
[B]AdminCP -> Styles & Templates -> Search in Templates -> Search in style: --Default Style [whatever style you want it to show] | Search for Text: modifyprofile | Search Titles Only: No | Find -> modifyprofile (edit)
[U]Find:[/U]

[CODE] {vb:rawphrase if_under_13_provide_parent}
</p>
</div>[/CODE]
[U]Add below:[/U]

[CODE]<div class="blockrow">
<ul class="checkradio group">
<li>
<label for="Reputation Power">{vb:rawphrase reppower}:</label>
<select class="primary" name="userfield[field[COLOR=Red]7[/COLOR]]" id="cfield_[COLOR=red]7[/COLOR]" tabindex="1">
<option value="0"></option>
<option value="1" selected="selected">Yes</option>
</select>
<input type="hidden" name="userfield[field[COLOR=red]7[/COLOR]_set]" value="1" />
</li>
</ul>
</div>[/CODE]
[B]Note 1: I added [COLOR=red]7[/COLOR] three times.
[B]Note 2: If you want to add more profile fields [SIZE=1](so another option in the userCP to show or not in the postbit, for instance gender)[/SIZE], just do it below </div>.
However, just make sure the </vb:if> is at the bottom of it all, to close the <vb:if condition> Otherwise you'll get an error.

[B]SAVE

[B][SIZE=3][U]Step 4[/U][/SIZE] [B]Postbit or Postbit_Legacy Template [SIZE=1](whichever one you use)[/SIZE][B]:
[B]AdminCP -> Styles & Templates -> Search in Templates -> Search in style: --Default Style [whatever style you want it to show] | Search for Text: postbit_legacy | Search Titles Only: No | Find -> postbit_legacy (edit)
Note: If postbit_legacy doesn't work, just find postbit and edit that template instead.

[B]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>[/CODE]
[B]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['field[COLOR=red]7[/COLOR]']">
<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>[/CODE]
[B]Note: Make sure to change the [COLOR=red]7[/COLOR] to whatever number you set your display order as.

[B]SAVE

That's pretty much it [IMG]http://www.vbulletin.org/forum/images/smilies/smile.gif[/IMG]

[URL="http://i.imgur.com/doGPL3d.png"]Go to settings (UserCP), Edit Profile and go to 'Repdisplay'[/URL] - tick the Yes box to show Reputation & Reputation Power OR Untick the box to make it disappear.
[U]Example:[/U]
[URL]http://i.imgur.com/Vp0mxR7.png[/URL]
[URL]http://i.imgur.com/ebV531x.png[/URL]
[B]Note: Refresh the page after you change the settings. Not sure if it's just me, but it displays the old settings, even though I changed it. Only after refreshing, does it display correctly.

[B]All the steps are also screenshotted in the attachments.

[B][SIZE=2][U]Optional step:[/U][/SIZE]
Now I personally also wanted to hide the reputation bar (green bars).
Hence this is what I did:
[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>
^[B]Delete all of that.

[B]Find:
Code:
<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>
[B]Replace with:
Code:
<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>
[SIZE=1]If you do this, then this option: [URL]http://i.imgur.com/B4NFciD.png[/URL] - is pretty much useless.
[SIZE=1][U]Hence you can avoid your users seeing that option by doing this:[/U]
AdminCP -> Usergroup -> [URL="http://i.imgur.com/CuUnh5s.png"]Usergroup Manager[/URL] -> [URL="http://i.imgur.com/HFu65xs.png"][Select Usergroup] Go [/URL]-> [URL="http://i.imgur.com/nRIybqK.png"]Can Hide Reputation from Others: No[/URL][/SIZE]
[B]Note:[/B] This does not restrict users from seeing the 'Repdisplay' we just created above.
If you want to know how to add 'Can Hide Repdisplay from others' into the Usergroup Manger as an option, make a comment below and if a coder knows how to, they may help you (since I don't know). [/SIZE]

[U]Example:[/U]
[URL]http://i.imgur.com/Vp0mxR7.png[/URL] -> [IMG]http://i.imgur.com/DnkN2pJ.png[/IMG]
[URL]http://i.imgur.com/ebV531x.png[/URL] -> [IMG]http://i.imgur.com/dudjTHj.png[/IMG][/B][/B][/B][/B][/B][/B][/B][/B][/B][/B][/B][/B][/B][/B][/B][/B][/B][/B][/B][/B][/B][/B][/I][/I][/I][/I][/B][/B][/B][/B][/B][/I][/I][/I][/I][/I][/I][/I][/I][/I][/I][/I][/I][/B][/B][/B][/B][/B][/B][/B][/B][/I][/B] Edited by Kutemanaal
decided that i wont release it blehhh
Link to post
Share on other sites
×
×
  • Create New...