The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
Hello there,
How can I show warning level in posts in vB3.8.6 |
|
#2
|
|||
|
|||
|
AdminCP -> vBulletin Options -> vBulletin Options -> Thread Display Options (showthread) -> Post Elements has a checkbox for "Display Infractions". Is this what you're looking for?
|
|
#3
|
|||
|
|||
|
Yes that but not exactly.
Is there any mod/addon by which following bars can be shown such that a green bar shown if there is no/zero warning and decreases as warnings increases.. ![]() ![]() ![]() ![]()
|
|
#4
|
|||
|
|||
|
I don't see a mod that does what you ask.
There's support within default vB for red and yellow cards to be displayed, but I think they only display on the infringing post. I'm reading your request to display what their infraction level is on each of their posts. Is this correct? |
|
#5
|
|||
|
|||
|
Quote:
|
|
#6
|
|||
|
|||
|
[deleted - JamesC70 has a better one]
|
|
#7
|
|||
|
|||
|
OK, it took a little work, but I think I've figured this out.
For the purpose of illustration, I'll use these infraction point levels: <3 being green 3 - 5 being yellow 6 - 9 being orange 10 - 12 being red 13+ would display your "banned" icon. First, edit your postbit (or postbit_legacy) template to add the line in red: Code:
<if condition="$show['infraction']"><div>$vbphrase[infractions]: $post[warnings]/$post[infractions] ($post[ipoints])</div></if> <if condition="$infraction"><img src=$infraction /></if> <p> <if condition="$show['reputation']"><div> Now, move to Plugins and Products, and Add New Plug-In: Code:
Product: vBulletin
Hook Location: Postbit_Display_Start
Title: Infractions Icon Display
PHP Code:
if ($post[ipoints] >= 13) { $infraction = "http://mysite.com/infraction-banned.png"; }
elseif ($post[ipoints] >= 10) { $infraction = "http://mysite.com/infraction-red.png"; }
elseif ($post[ipoints] >= 6) { $infraction = "http://mysite.com/infraction-orange.png"; }
elseif ($post[ipoints] >= 3) { $infraction = "http://mysite.com/infraction-yellow.png"; }
elseif ($post[ipoints] < 3) { $infraction = "http://mysite.com/infraction-green.png";}
Plug-In Is Active: Yes
Save the plug-in. ![]() Tested on 3.8.6 PL1. The above code works even if the "Display infractions" setting in post #2 is turned off. :up: |
|
#8
|
|||
|
|||
|
Looks familiar...
![]() iPoints - that's probably what you want to use instead of warnings. |
|
#9
|
|||
|
|||
|
Sorry... if I had known others were working on it, I'd have left it to them.
|
|
#10
|
|||
|
|||
|
Quote:
Anyway yours probably works right... |
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|