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)

Latic 10-29-2004 10:34 PM

I've done like a little mod to this.

I didnt like the way it displayed the text on the forum, so i decided to place icons there instead.

<a href='Warn.php?do=WarnUser&id=$post[userid]&post=$post[postid]'><img src="http://www.iconrate.net/community/images/warn/warn.gif" alt="Warn User"></a> · <a href='Warn.php?do=ViewWarnings&id=$post[userid]'><img src="http://www.iconrate.net/community/images/warn/warn.gif" alt="View Warnings For User"></a>
<if condition="$show['postcount']">· #<a

Thats the text i used i know its very basic its my first ever tweek of the code.

Could anyone look through the code and then tide this up for me?

Its a great mod by the way.

Yuneek 10-29-2004 10:45 PM

Found a solution.

sv1cec 10-30-2004 11:06 AM

Well, it looks as if I have to apologize to SnowBot (and possibly others) who asked if there is a way to eliminate the "Warn XYZ" and "View XYZ'z Warnings" from the PMs and have them shown only in the posts. Today, I went through the whole thread, and indeed I found the post where it was mentioned that this happens, but I didn't manage to find the answer.

So, if you want to remove those links from the PMs, then in your postbit, or/and postbit_legacy templates, find the part which checks if it should show the links. It should look something like that:

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

All you have to do, is enclose this in another if statement, so that it looks like the one below:

HTML Code:

<!-- checks for warning system -->
<if condition="THIS_SCRIPT=='showthread'">
<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>
</if>
<!-- end of warning system -->

And now of course, we can have alternatives. As you may remember, I have released some mods, which allow you to have "non-post-related warnings". One of the reason I made that change, was because someone asked for warnings to be issued when an offensive PM was send to another member. So the big question is, shall those links be left there, but take you to the "non-post-related warnings" function?

Your ideas are welcome.

Rgds
-------------
John

beano33 10-30-2004 08:46 PM

I've installed Zero Tolerance's hack and it works as intended and will also be adding sv1cec expiration of warnings. I need help with a couple things to make it more effective for my board.

1) when members are unbanned they are sent to Coppa. How do I make it so it unbans them back to their original usergroup?

2) Can it be made to send the warning as both as PM and and Email? We don't give new users PM priveleges until they meet certain post count and length of membership criteria due to numerous incident of our PM system being used to spam.

Thanks!

Cryo 10-31-2004 02:23 AM

For whatever reason some old warnings are not expiring even thought hey have maturity dates. Any idea what could be causing this? I have warnings from August that are still active even though they only have maturity times of 30.

sv1cec 10-31-2004 04:04 AM

Quote:

Originally Posted by beano33
I've installed Zero Tolerance's hack and it works as intended and will also be adding sv1cec expiration of warnings. I need help with a couple things to make it more effective for my board.

1) when members are unbanned they are sent to Coppa. How do I make it so it unbans them back to their original usergroup?

2) Can it be made to send the warning as both as PM and and Email? We don't give new users PM priveleges until they meet certain post count and length of membership criteria due to numerous incident of our PM system being used to spam.

Thanks!

When a user is banned, his usergroup id is preserved (at least in my code) and when he is unbanned, he is restored to the original user group. I am not sure what the original code does here, sorry.

I'll have to check the e-mail thing, I've been thinking about it too.

Rgds
------------
John

sv1cec 10-31-2004 04:10 AM

Quote:

Originally Posted by Charlie O'Leary
For whatever reason some old warnings are not expiring even thought hey have maturity dates. Any idea what could be causing this? I have warnings from August that are still active even though they only have maturity times of 30.

First, make sure that your database tables have the structure below:

Field Type Null Key Default Extra
wid int(15) PRI auto_increment
warned_user int(15) 0
warned_by int(15) 0
warned_time int(15) 0
warned_reason text
warned_post int(15) 0
warned_warning_id int(15) 0
warned_status char(1) YES

warning_types

Field Type Null Key Default Extra
tid int(15) PRI auto_increment
warn_name varchar(255)
warn_points int(15) 0
warn_desc text
warn_maturity int(5) 0
warn_permban char(3)
warn_type char(3) YES

Make sure that those old warnings, do have a maturity period entered in the warning_types table. And finally make sure you have the cron script I've uploaded.

Rgds
-----------
John

sv1cec 10-31-2004 10:05 AM

Quote:

Originally Posted by beano33
2) Can it be made to send the warning as both as PM and and Email? We don't give new users PM priveleges until they meet certain post count and length of membership criteria due to numerous incident of our PM system being used to spam.

Thanks!

Per your request, the notification can now be send, either as a PM or as an e-mail or as both.

Check the attached file.

Rgds
------------
John

beano33 10-31-2004 02:11 PM

Thanks John!

sv1cec 10-31-2004 05:53 PM

Quote:

Originally Posted by beano33
Thanks John!

You are welcome Sir!

Rgds


All times are GMT. The time now is 04:21 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.02420 seconds
  • Memory Usage 1,757KB
  • 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
  • (2)bbcode_html_printable
  • (4)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