PDA

View Full Version : Miscellaneous Hacks - Visible Infractions & Warnings


UltimateOreo!
20 Jul 2009, 20:35
Support will only be given in this thread to those who clicked install!

Inspired by a popular 4chan feature, this is a great way to show what is and what is not acceptable on your forums. If the entire community can see what what they can get an infraction for, there are less likely to do it.

It's a very simple modification. If a user is given an infraction, it will display the respective text underneath the post, but above the signature. Same if the user is only given a warning. It will not edit or alter any other part of the postbit.

If you don't like the colors, they can be easily changed with either simple HTML knowledge or "googling" hex codes.

Thank you Dismounted, couldn't have created it without your help.
http://www.vbulletin.org/forum/showthread.php?t=218966

If you need help installing this modification, please read my tutorial on installing hacks.
http://www.vbulletin.org/forum/showthread.php?t=149588

erel34
20 Jul 2009, 21:52
Thanks

H22A
21 Jul 2009, 00:22
thanks buddy

Sweeks
21 Jul 2009, 00:34
Excellent, thanks!

ITDarasgah
21 Jul 2009, 02:53
Install ...thanks

Hornstar
21 Jul 2009, 08:20
Could you get it to display the infraction they got to?

Eg. User received an infraction for spaming in this post.


A suggestion would be to make it look more official. Have the infraction symbol show before the words, maybe have a nice border around it. etc.

Frondy
25 Jul 2009, 15:11
I have made a little modification: (Postbit Legacy)

<if condition="$post['infraction'] == 2">
<a href="infraction.php?$session[sessionurl]do=view&amp;p=$post[postid]"><font color="red"><b>$vbphrase[received_infraction] - </b></font><img src="$stylevar[imgdir_button]/redcard.gif" alt="$vbphrase[received_infraction]" border="0" /></a>
</if>
<if condition="$post['infraction'] == 1">
<a href="infraction.php?$session[sessionurl]do=view&amp;p=$post[postid]"><font color="#FFCC11"><b>$vbphrase[received_warning] - </b></font><img src="$stylevar[imgdir_button]/yellowcard.gif" alt="$vbphrase[received_warning]" border="0" /></a>
</if>


The result is that warning is language phrase, and visible symbol added (red or yellow card)
Allso, warning is clickable, so you can see why and by whom is warnig given....
Hope you like it

Prewiev:

102459

102460

_

UltimateOreo!
26 Jul 2009, 02:03
It's the same for postbit and postbig legacy, so you don't really have to worry about that.

.Tim
26 Jul 2009, 22:04
Awesome.

TAIFUN_T
30 Jul 2009, 18:02
Modification

1. Upload images
2. Open template postbit or postbit_legacy

Search:
<!-- message -->
<div id="post_message_$post[postid]">
$ad_location[ad_showthread_firstpost_start]
$post[message]
</div>
<!-- / message -->

Add below:
(Can view according to Usergroup Permissions)
<if condition="$show['redcard']">
<if condition="$post['infraction'] == 2">
<div class="moder-warning"><b>(USER RECEIVED AN WARNING FOR THIS POST)</b></div>
</if>
</if>
<if condition="$show['yellowcard']">
<if condition="$post['infraction'] == 1">
<div class="moder-infraction"><b>(USER RECEIVED A INFRACTION FOR THIS POST)</b></div>
</if>
</if>

OR
(Can View all users)
<if condition="$post['infraction'] == 2">
<div class="moder-warning"><b>(USER RECEIVED AN WARNING FOR THIS POST)</b></div>
</if>
<if condition="$post['infraction'] == 1">
<div class="moder-infraction"><b>(USER RECEIVED A INFRACTION FOR THIS POST)</b></div>
</if>

Save.

3. Go to Styles & Tempates->Style Manager->Main CSS->
Add in "Additional CSS Definitions" :
.moder-infraction,.moder-warning{margin:2em;margin-left:auto;margin-right:auto;width:70%!infraction;min-height:40px;clear:both;text-align:justify;vertical-align:middle;border-collapse:collapse;padding:15px 20px 15px 80px;background-position:20px 50%;background-repeat:no-repeat;-moz-border-radius:20px;-khtml-border-radius:20px;-webkit-border-radius:20px;border-radius:20px;}
.moder-infraction{background-color:#ffc;background-image:url(images/infractions/infraction.png);}
.moder-warning{background-color:#fdd;background-image:url(images/infractions/warning.png);}

UltimateOreo!
01 Aug 2009, 07:03
Modification

1. Upload images
2. Open template postbit or postbit_legacy

Search:
<!-- message -->
<div id="post_message_$post[postid]">
$ad_location[ad_showthread_firstpost_start]
$post[message]
</div>
<!-- / message -->

Add below:
<if condition="$post['infraction'] == 2">
<div class="moder-warning"><b>(USER RECEIVED AN WARNING FOR THIS POST)</b></div>
</if>
<if condition="$post['infraction'] == 1">
<div class="moder-infraction"><b>(USER RECEIVED A INFRACTION FOR THIS POST)</b></div>
</if>

Save.

3. Go to Styles & Tempates->Style Manager->Main CSS->
Add in "Additional CSS Definitions" :
.moder-infraction,.moder-warning{margin:2em;margin-left:auto;margin-right:auto;width:70%!infraction;min-height:40px;clear:both;text-align:justify;vertical-align:middle;border-collapse:collapse;padding:15px 20px 15px 80px;background-position:20px 50%;background-repeat:no-repeat;-moz-border-radius:20px;-khtml-border-radius:20px;-webkit-border-radius:20px;border-radius:20px;}
.moder-infraction{background-color:#ffc;background-image:url(images/infractions/infraction.png);}
.moder-warning{background-color:#fdd;background-image:url(images/infractions/warning.png);}

===
Download (http://rapidshare.com/files/261833345/Upload.rar)
===
http://i064.radikal.ru/0907/6e/09616d9d6d61t.jpg (http://radikal.ru/F/i064.radikal.ru/0907/6e/09616d9d6d61.png.html)

http://s47.radikal.ru/i115/0907/75/fce6542c9c9ct.jpg (http://radikal.ru/F/s47.radikal.ru/i115/0907/75/fce6542c9c9c.png.html)

Fantastic edit. Thank you for the contribution.

klaush
01 Aug 2009, 12:57
Thanks for that!

One issue, if a warning is taken back, the the visible line will stay under the post.

I think it would be better, if the line under the post could delete or something like this.

UltimateOreo!
01 Aug 2009, 22:04
Thanks for that!

One issue, if a warning is taken back, the the visible line will stay under the post.

I think it would be better, if the line under the post could delete or something like this.

That is probably the default line in vBulletin that seperates the Signature from the rest of the post.

TAIFUN_T
01 Aug 2009, 22:07
UltimateOreo!, thank you for idea (:

====
klaush, this is vB original specific for only "warning", because infraction is a small inaccuracy user.. notice.. only notice. If user reaches X points eg infraction for the warning, it will remain in post.

sisterhood
02 Aug 2009, 19:20
Really great idea

installed and work

TheLab
03 Oct 2009, 20:42
3. Go to Styles & Tempates->Style Manager->Main CSS->
Add in "Additional CSS Definitions" :
.moder-infraction,.moder-warning{margin:2em;margin-left:auto;margin-right:auto;width:70%!infraction;min-height:40px;clear:both;text-align:justify;vertical-align:middle;border-collapse:collapse;padding:15px 20px 15px 80px;background-position:20px 50%;background-repeat:no-repeat;-moz-border-radius:20px;-khtml-border-radius:20px;-webkit-border-radius:20px;border-radius:20px;}
.moder-infraction{background-color:#ffc;background-image:url(images/infractions/infraction.png);}
.moder-warning{background-color:#fdd;background-image:url(images/infractions/warning.png);}

Hello and thanks for the mod but this CCS addition is giving errors in the W3C validator:
Value Error : width Lexical error at line 410, column 91. Encountered: "n" (110), after : "!i" 70%nfraction;

Any idea how to solve this?

Cheers

Llandy
04 Oct 2009, 19:33
5 stars and marked as installed!

juanpablo
04 Dec 2009, 13:19
Excellent work.
as you can add the link of the warning or infractions so that users can view?

MrRem
01 Jan 2010, 20:55
One step closer to vbChan hahaha
Nice mod

Installed: http://swedishseat.com

DEGE
22 Jun 2010, 23:14
Could you get it to display the infraction they got to?

Eg. User received an infraction for spamming in this post.


A suggestion would be to make it look more official. Have the infraction symbol show before the words, maybe have a nice border around it. etc.


I agree. The infraction title should be shown to get this more effective on other user's behaviour

Did anybody find that variable to get it displayed?

As far as I found it's $infractioninfo[reason] in the template userinfraction_view...

Don't know how to find it in postbit....

DEGE

mavrick4283
29 Jun 2010, 03:29
Will this be updated for VB 4?

ricardoNJ
29 Jun 2010, 06:20
Testing....

TheInsaneManiac
23 Nov 2010, 22:00
4.0 Standards:

Find:
<div id="post_message_{vb:raw post.postid}">
<blockquote class="postcontent restore">
{vb:raw post.message}
</blockquote>
</div>

Below Add:
<vb:if condition="$post['infraction'] == 2">
<font color="red"><b>(USER RECEIVED AN INFRACTION FOR THIS POST)</b></font>
</vb:if>
<vb:if condition="$post['infraction'] == 1">
<font color="#FFCC11"><b>(USER RECEIVED A WARNING FOR THIS POST)</b></font>
</vb:if>

cowcowcow
11 Mar 2011, 01:08
I agree. The infraction title should be shown to get this more effective on other user's behaviour

Did anybody find that variable to get it displayed?

As far as I found it's $infractioninfo[reason] in the template userinfraction_view...

Don't know how to find it in postbit....

DEGE

I agree as well! there needs to be a reason so people know why they are warned.

ive tried using the following below the code in similar if statements but these variables dont seem to work

$infraction[infractionlevelid] == 1 doesnt work and neither does $post[infractionlevelid] == 1

neitehr does putting the phrase $vbphrase[infraction_reason] or $infraction[reason] after the code work.

Im so clueless so if anyone has any ideas pleaseeeeeeeeeeeeeee help out!

Zylantex
14 Mar 2011, 18:54
Very nice mod. I've installed a mix of a couple of the possibilities above and it's looking good.

GotWalked
25 Apr 2011, 08:30
thanks /b/ro! installing now; will report back.

GotWalked
25 Apr 2011, 08:36
Okay, installed; testing. Does it work for BANNING?

GotWalked
25 Apr 2011, 08:37
it does not. what would the additional code be and where would it go to add "USER WAS BANNED FOR THIS POST"

lycheepassion
07 Jun 2011, 06:45
Anything similar for 4?

merk_aus
03 Aug 2011, 09:26
Anything similar for 4?

Yes it was posted about four posts ago/

TAIFUN_T
12 Nov 2012, 13:55
I updated my post http://www.vbulletin.org/forum/showpost.php?p=1858596&postcount=10