vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Warning Hack V1.5 (https://vborg.vbsupport.ru/showthread.php?t=65336)

lifesourcerec 08-10-2004 05:46 AM

Ok.. so how to I add it :) Mainly just wanting mods to have access only on their mod forums and to list it in postbits. I use the legacy post bit by the way. This would help me a lot.

sv1cec 08-10-2004 06:02 AM

OK, here is what I use in my postbit templates. I do not use the legacy one, but try it and let me know how it works for you.

In your postbit (or legacy) template, find:

HTML Code:

<if condition="$show['postcount']">#<a href="showpost.php?$session[sessionurl]p=$post[postid]&amp;postcount=$post[postcount]" target="new"><strong>$post[postcount]</strong></a> &nbsp;</if>
Right above it, add:

HTML Code:

<!-- checks for warning system -->
<if condition="$post[usergroupid]!=6 AND $post[usergroupid]!=7 AND can_moderate($forum[forumid], '', $bbuserinfo[userid])"><a href='Warn.php?do=WarnUser&id=$post[userid]&post=$post[postid]'>Warn $post[username]</a> ?
</if>
<if condition="$post[usergroupid]!=6 AND $post[usergroupid]!=7 AND ($bbuserinfo[usergroupid]==7 OR $bbuserinfo[usergroupid]==6)">
<a href='Warn.php?do=ViewWarnings&id=$post[userid]'>View $post[username]'s Warnings</a> ?</if>
<if condition="$post[userid]==$bbuserinfo[userid] AND $post[usergroupid]==2 AND $post[warning_level]>0">
<a href='Warn.php?do=ViewMyWarnings'>View your Warnings</a> ?</if>
<!-- end of warning system -->

This is the code that makes the "Warn XYZ" and "View XYZ's warnings" appear.

For the number of points each user has, to appear in the post:

Find:

HTML Code:

<if condition="$show['reputation']">$post[reputationdisplay]</if>
Right below this, add:

HTML Code:

<if condition="$post[usergroupid]==2"><BR>Warns Level: $post[warning_level]</if>
Let me know if these work for you, as I said it's hard for me to remember if anything else needs to be changed, but I'll help you out to make it work for you.

Rgds

Jag 08-10-2004 06:13 AM

Quote:

Originally Posted by sv1cec
After a lot of trial-and-error, I've managed to improve on Jag's script above.

The script below, will test every warning to see if it is more than a month old. If it is, it will erase the warning and reduce the points of the member by the number of points that warning had.

One question Jag, that number you used, $date = $today-240800, the 240800, where does it come from? I believe that it should be $date = $today-2592000 (for 30 days x 24 hours x 60 minutes x 60 seconds).

Rgds

Thanks for posting that, I guess I didn't look deep enough into the hack to see what all exactly was required to remove a warn :ninja:

As for the 240800, that's why you shouldn't do math at 4am :o

lifesourcerec 08-10-2004 06:22 AM

Works like a charm :) . Just through of something. How hard would it be to make it look like this:

Warns Level: 0

But when that user has a warning, it would be:

Warns Level: 1 (have the color to be red for the non-zero number). I think it would be a condition or something. Dunno.

sv1cec 08-10-2004 08:57 AM

Quote:

Originally Posted by lifesourcerec
Works like a charm :) . Just through of something. How hard would it be to make it look like this:

Warns Level: 0

But when that user has a warning, it would be:

Warns Level: 1 (have the color to be red for the non-zero number). I think it would be a condition or something. Dunno.

Change that last if, with the one below:

HTML Code:

<if condition="$post[usergroupid]==2">
<if condition="$post[warning_level]>0"><font color='#ff0000'></if>
<BR>Warns Level: $post[warning_level]
<font color='#ffffff'>
</if>

I think it should work.

lifesourcerec 08-10-2004 04:55 PM

Quote:

Originally Posted by sv1cec
Change that last if, with the one below:

HTML Code:

<if condition="$post[usergroupid]==2">
<if condition="$post[warning_level]>0"><font color='#ff0000'></if>
<BR>Warns Level: $post[warning_level]
<font color='#ffffff'>
</if>

I think it should work.

Close enough. It makes the entire warns level line red instead of just the number.

sv1cec 08-10-2004 09:11 PM

Quote:

Originally Posted by lifesourcerec
Close enough. It makes the entire warns level line red instead of just the number.

Oh, I didn't understand you wanted just the number, here you go:

HTML Code:

<if condition="$post[usergroupid]==2">
<BR>Warns Level:
<if condition="$post[warning_level]>0"><font color='#ff0000'></if>
$post[warning_level]
<font color='#000000'>
</if>

I also think the black color is #000000 instead of #ffffff I had in the first code. Sorry about that.

Rgds

rex_b 08-16-2004 11:42 PM

any easier way to set multiple usergroups:


Code:

<if condition="$bbuserinfo['usergroupid'] == '6' AND '7' ">

rex_b 08-17-2004 12:06 AM

Where do I change the banned usergroup ID from 8 to ?

sv1cec 08-17-2004 03:55 AM

Quote:

Originally Posted by rex_b
Where do I change the banned usergroup ID from 8 to ?

In the "Control Warnings" page of the AdminCP.

Rgds


All times are GMT. The time now is 11:38 AM.

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.01532 seconds
  • Memory Usage 1,754KB
  • 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
  • (1)bbcode_code_printable
  • (7)bbcode_html_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete