The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#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: |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|