vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=236)
-   -   Miscellaneous Hacks - Visible Infractions & Warnings (https://vborg.vbsupport.ru/showthread.php?t=219038)

UltimateOreo! 07-19-2009 10:00 PM

Visible Infractions & Warnings
 
1 Attachment(s)
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.
https://vborg.vbsupport.ru/showthread.php?t=218966

If you need help installing this modification, please read my tutorial on installing hacks.
https://vborg.vbsupport.ru/showthread.php?t=149588

erel34 07-20-2009 07:52 PM

Thanks

H22A 07-20-2009 10:22 PM

thanks buddy

Sweeks 07-20-2009 10:34 PM

Excellent, thanks!

ITDarasgah 07-21-2009 12:53 AM

Install ...thanks

Hornstar 07-21-2009 06:20 AM

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 07-25-2009 01:11 PM

1 Attachment(s)
I have made a little modification: (Postbit Legacy)

PHP Code:

<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:

Attachment 102459

Attachment 102460

_

UltimateOreo! 07-26-2009 12:03 AM

It's the same for postbit and postbig legacy, so you don't really have to worry about that.

.Tim 07-26-2009 08:04 PM

Awesome.

TAIFUN_T 07-30-2009 04:02 PM

1 Attachment(s)
Modification

1. Upload images
2. Open template postbit or postbit_legacy

Search:
Code:

<!-- 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)
Code:

<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)
Code:

<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" :
Code:

.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! 08-01-2009 05:03 AM

Quote:

Originally Posted by TAIFUN_T (Post 1858596)
Modification

1. Upload images
2. Open template postbit or postbit_legacy

Search:
Code:

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

Add below:
Code:

<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" :
Code:

.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://i064.radikal.ru/0907/6e/09616d9d6d61t.jpg

http://s47.radikal.ru/i115/0907/75/fce6542c9c9ct.jpg

Fantastic edit. Thank you for the contribution.

klaush 08-01-2009 10:57 AM

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! 08-01-2009 08:04 PM

Quote:

Originally Posted by klaush (Post 1859503)
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 08-01-2009 08:07 PM

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 08-02-2009 05:20 PM

Really great idea

installed and work

TheLab 10-03-2009 06:42 PM

Quote:

Originally Posted by TAIFUN_T (Post 1858596)
3. Go to Styles & Tempates->Style Manager->Main CSS->
Add in "Additional CSS Definitions" :
Code:

.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 10-04-2009 05:33 PM

5 stars and marked as installed!

juanpablo 12-04-2009 11:19 AM

Excellent work.
as you can add the link of the warning or infractions so that users can view?

MrRem 01-01-2010 06:55 PM

One step closer to vbChan hahaha
Nice mod

Installed: http://swedishseat.com

DEGE 06-22-2010 09:14 PM

Quote:

Originally Posted by hornstar1337 (Post 1852688)
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 06-29-2010 01:29 AM

Will this be updated for VB 4?

ricardoNJ 06-29-2010 04:20 AM

Testing....

TheInsaneManiac 11-23-2010 08:00 PM

4.0 Standards:

Find:
Code:

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

Below Add:
Code:

<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 03-10-2011 11:08 PM

Quote:

Originally Posted by DEGE (Post 2057699)
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 03-14-2011 04:54 PM

Very nice mod. I've installed a mix of a couple of the possibilities above and it's looking good.

GotWalked 04-25-2011 06:30 AM

thanks /b/ro! installing now; will report back.

GotWalked 04-25-2011 06:36 AM

Okay, installed; testing. Does it work for BANNING?

GotWalked 04-25-2011 06:37 AM

it does not. what would the additional code be and where would it go to add "USER WAS BANNED FOR THIS POST"

lycheepassion 06-07-2011 04:45 AM

Anything similar for 4?

merk_aus 08-03-2011 07:26 AM

Quote:

Originally Posted by lycheepassion (Post 2204502)
Anything similar for 4?

Yes it was posted about four posts ago/

TAIFUN_T 11-12-2012 12:55 PM

I updated my post https://vborg.vbsupport.ru/showpost....6&postcount=10


All times are GMT. The time now is 08:33 PM.

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.01528 seconds
  • Memory Usage 1,821KB
  • 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
  • (10)bbcode_code_printable
  • (1)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (31)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