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)

SnitchSeeker 10-19-2004 03:29 PM

After testing this extensively, I find the warn does not send a PM like it is supposed to. No error is given (that I know of).

Any idea why this isn't working? What should I check?

Everything else (including automatic ban after x warns) works perfectly! :)

Rick Sample 10-19-2004 06:20 PM

Quote:

Originally Posted by sv1cec
I have to assume you have installed only the original hack (and possibly version 1.5, as well). If you convert to my files, my mods use a template for the PM, so you can edit it to your heart's content.

As for your mod, again, if you install my version of the hack, mods can all see the "View XYZ's Warnings" link, but only those responsible for the particular forum can "Warn XYZ".

Rgds

Yeah, I have installed 1.5 and got everything working. Where in the template or file would I find the stuff to edit the warnings at for the PM's for 1.5?

sv1cec 10-19-2004 06:59 PM

Quote:

Originally Posted by muscle-mustangs
Yeah, I have installed 1.5 and got everything working. Where in the template or file would I find the stuff to edit the warnings at for the PM's for 1.5?

In Warn.php, find:

PHP Code:

// Send PM!! =D
$messageb="You have been warned for one of your posts: [url={$vboptions[bburl]}/showthread.php?p={$_POST['post']}]click here to see it[/url]. Your warning level is now: {$level}. Click on the [b]Quick Links[/b] menu above and select [b]View Your Warnings[/b], to see details about all the warnings you have received. The person who warned you, entered this comment: [i]{$_POST['comment']}[/i]. Please reply back if you have a dispute.";
$messageb=ParseInput($messageb); 

Replace that, with:

PHP Code:

eval('$messageb .= "' fetch_template('warn_pm') . '";');
$title="You have been warned";
$to=$user['userid'];
$from=$bbuserinfo['userid'];
SendPM($messageb,$title,$to,$from); 

You need a template called "warn_pm", which should have the followings:

HTML Code:

Dear $user[username],

You have been warned for one of your posts, which violated the Forums Rules.

The reason you have been warned is because [b][i] $warn_type[warn_desc] [/i][/b](Warning Type = $warn_type[warn_name]), for which you have been given [b] $warn_type[warn_points] [/b] point(s).

The post for which you are warned can be seen [URL="$vboptions[bburl]/showthread.php?p=$_POST[post]"]here[/URL].

The admin/moderator who warned you, entered this comment:

=======================================
[i]$_POST[comment][/i]
=======================================

Your total Warning Level at the moment is: [b] $level [/b] point(s).

If you reach the maximum of [b]$warn_options[points_before_banned][/b], you will be banned from the Forums, for [b]$warn_options[banned_limit][/b] days.

To see details about all the warnings you have received, until now, please click [URL="$vboptions[bburl]/Warn.php?do=ViewMyWarnings"]here[/URL].

Please reply back if you have a dispute.

It should work. Although, if you just upgrade to my version, you will have a lot more functionality (but also a lot of work to figure out for yourself).

Rgds
---------
John

sv1cec 10-19-2004 07:03 PM

Quote:

Originally Posted by sully02
Is there a way to make it so that when a warning is sent, the moderator who issued the warning remains anonymous?

If you use my mods of this hack, the PM is send on behalf of :

$from=$bbuserinfo['userid'];

You may change that to something like

$from=1

which will make the PM look as if it came from the admin. I haven't tried it, but it should work.

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

sv1cec 10-19-2004 07:10 PM

Quote:

Originally Posted by SnitchSeeker
This is a brilliant hack, great job and nice work!!

I have installed it over at Harry Potter friends.

The only "problem" with it, from my point of view, is that you can only warn people from a forum post. And it is always related to a post.

We have a great need to be able to warn people from their profile, or from the admin cp directly (by just entering a member id).

A lot of our warnings are for nasty PM's, for siggie rule violations, etc. (so nothing related to any forum posts).

Any chance of a tweek to this effect?

Excited for the v-2.0 release!! :)

I guess I could come up with something like that, if I get some time to work on it.

It shouldn't be too difficult, my only concern is if the warning types will be the same or not. If they are not, (if you cannot have them together with your normal, per-post warning types), then I do not see it possible, at least with my time restrictions.

Also, being a new admin, how to you get to know that someone send a nusty PM? Do members forward that to you?

Also, I need to think where that 'non-post-related' link will be, in other words, where will the "Warn XUZ" link will be, for this kind of warnings. Ideas?

Rgds

sv1cec 10-19-2004 07:13 PM

Quote:

Originally Posted by Remi
Hi

I don't know if this is posible or not, but here we go :D

Let us say, I have many wrning levels and I have a common one that I use most of the time.

Now, I want to creat a direct link on the "postbit" to that "common warningid" so I can click on that sort of "default" warning link without going into another page and having to chose from the "Warning pulldown menue".

If you think this is posible, PLEASE help :)

Thanks in advance


It can be done, all you have to do is pass the right parameters to the form, but I do not have the time to do it. Sorry Remi.

sv1cec 10-19-2004 07:17 PM

As someone suggested, a "Prune Old Warnings" functionality would be a nice addition. So I did it.

The file attached has step-by-step instructions, on how to do it. Basically, it asks you how many days warnings do you want to keep (the last 30 days for example), and then goes on and deletes all INACTIVE warnings, issued before the last 30 days. Please note that the function works with the version of my mods, which maintains all warnings as a historical file, making them inactive when they are removed or when they mature.

I hope you enjoy.

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

Remi 10-19-2004 09:59 PM

Quote:

Originally Posted by Remi
Hi

I don't know if this is posible or not, but here we go :D

Let us say, I have many wrning levels and I have a common one that I use most of the time.

Now, I want to creat a direct link on the "postbit" to that "common warningid" so I can click on that sort of "default" warning link without going into another page and having to chose from the "Warning pulldown menue".

If you think this is posible, PLEASE help :)

Thanks in advance

Quote:

Originally Posted by sv1cec
It can be done, all you have to do is pass the right parameters to the form, but I do not have the time to do it. Sorry Remi.

Thank you very much sv1cec for giving me the hope :D

I think I can do it if only someone can get me started on how to construct the link:

/Warn.php?&do=WarnUser&id=$VARID&post=$VARPOST&warn ingid=$VARID



Thanks

sully02 10-19-2004 11:05 PM

Quote:

Originally Posted by sv1cec
If you use my mods of this hack, the PM is send on behalf of :

$from=$bbuserinfo['userid'];

You may change that to something like

$from=1

which will make the PM look as if it came from the admin. I haven't tried it, but it should work.

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

My good sir, you and I are on the same page. My thinking was to set it as a static user, since the PM has to be sent from somebody. I think this might be good for some other boards because whenever my moderators issue a warning (Even if it is a 0 point "reminder") they get blasted in the reply PM. This way, nobody knows who warned who.

I'm thinking aloud here, but here is how I think this could be done, so at least the users don't know who warned them.

* Send the PM from a static username. Either the admin or some "WarnBot" will suffice
* Comment out/remove the portions of the row templates that display the moderator's username

I will look into how to achieve this, and if successful will report the results if nobody beats me to it.

sully02 10-20-2004 12:43 AM

OK, here is what I came up with. I have attached the file that has information on what to do to make the PM come from a static user and how to make the person issuing the warning disappear from "View my warnings"

This is my first real stab at modifying anything beyond what I've downloaded, so if I did something wrong, please let me know, as I wish to become more proficient in this area.


All times are GMT. The time now is 03:16 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.01746 seconds
  • Memory Usage 1,767KB
  • 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_html_printable
  • (2)bbcode_php_printable
  • (8)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