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)

j_86 10-14-2004 04:38 PM

Hi Sv1 - could you reiterate for me the "warning maturity"? Is this the number of days before the warning points for the warn is removed from the user's count?

sv1cec 10-14-2004 06:28 PM

Quote:

Originally Posted by xtreme-mobile
yeh thats it mate i just want it to show up under there post count etca evertime they post

do i just need to edit the postbit files in the template?

could you or anyone else post up the code etc to change or edit etc?

many thanks

Dean

Dean,

The code is there a few posts ago. Go to this post and download the file called temlates.txt. The changes are in there, but I cannot guarantee that they will work with the original hack's code. You might need to use my files, located in this post. Try it and see if it works.

Rgds

sv1cec 10-14-2004 06:39 PM

Quote:

Originally Posted by JimpsEd
Hi Sv1 - could you reiterate for me the "warning maturity"? Is this the number of days before the warning points for the warn is removed from the user's count?

YEs, the warning maturity is how many days the points from a particular warning will remain in a member's account. After those days pass, these points will be removed from the member's account, by the cron script kill_warns.php.

Remember, there are two versions there, the first, where the warnings which mature are removed completely, and the second, where the warnings which mature are just marked "Inactive" but remain in the member's history.

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

xtreme-mobile 10-14-2004 06:47 PM

ive downloaded the file but what do i do with them? its just a load of text and no instructions :(

im a bit of a newbie so dont know what to edit etc any ideas

j_86 10-14-2004 06:56 PM

Yes - read them sloweley ;)

j_86 10-14-2004 10:38 PM

A suggestion sv1; to be able to clear warning history for a user/all users via the admin panel.

wcbryant 10-15-2004 01:13 AM

It would be nice if there were a way to set scaling bans. Meaning the first time the system bans a user, it's X days. The second time, Y days. The third time, permanent (or Z days). Sort of a couple warning shots across their bow before permanent removal.

Also, wouldn't hate to see the option for warnings to also come with reputation hits.

Just thinking out loud here, don't know how feasible something like that is.

xtreme-mobile 10-15-2004 05:41 PM

ive downloaded the templates file that you told me to downlaod and im following it all the way down

only problem is ive got as far as editing the POSTBIT templates and in postbit it asks you to find some text and replace it.

ive managed to find the first set of text and replaced that but i cant find the second half it says not found :(

im looking for:

Also in postbit, find the code below:

<if condition="$show['reputation']">$post[reputationdisplay]</if>


but this says not found

any ideas what i can do?

xtreme-mobile 10-15-2004 06:23 PM

hello SV1CEC

ive done above please disregard last post

BUT i do have one final question to complete this :)_

ive got 2 skins on my forum

lihghtning and pixel tech

ive managed to follow the instructions and have managed to get the Warning points to show ok in the lightning tempalte but the pixel tech template its showing fine but its a little high and is overlapping the username

please see here: http://www.extreme-mobile.com/forums...read.php?p=854

ive followed the text but i couldnt find the follwing etxt so theerfore could not change it :( maybe this is what is causing the problem? but how can i add it if i cant find it?

cheers mate and i promise this will be the last time i bother you lol

dean

sv1cec 10-15-2004 06:24 PM

Quote:

Originally Posted by xtreme-mobile
ive downloaded the templates file that you told me to downlaod and im following it all the way down

only problem is ive got as far as editing the POSTBIT templates and in postbit it asks you to find some text and replace it.

ive managed to find the first set of text and replaced that but i cant find the second half it says not found :(

im looking for:

Also in postbit, find the code below:

<if condition="$show['reputation']">$post[reputationdisplay]</if>


but this says not found

any ideas what i can do?

This is what I can see in my postbit template:

PHP Code:

$vbphrase[posts]: $post[posts]

                        <if 
condition="$show['reputation']">$post[reputationdisplay]</if> 

Right below that, add:

PHP Code:

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

I hope you can find it, I just checked it.

Rgds

xtreme-mobile 10-15-2004 06:24 PM

the text i could not find was this

15. Template postbit

In postbit, find the following 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;

sv1cec 10-15-2004 06:25 PM

Quote:

Originally Posted by JimpsEd
A suggestion sv1; to be able to clear warning history for a user/all users via the admin panel.

That's a good idea, I might get on with it, if I manage to solve my ADSL installation issues.

Rgds and tnx for the input.

xtreme-mobile 10-15-2004 06:43 PM

hi mate thanks for the code you posted but it says not found :(

ive done everything except found this code in postbit

15. Template postbit

In postbit, find the following 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

what do you have in yours? could i just copy and paste my postbit from my other template? or wouldnt that work?

dean

sv1cec 10-16-2004 06:50 AM

Quote:

Originally Posted by xtreme-mobile
hello SV1CEC

ive done above please disregard last post

BUT i do have one final question to complete this :)_

ive got 2 skins on my forum

lihghtning and pixel tech

ive managed to follow the instructions and have managed to get the Warning points to show ok in the lightning tempalte but the pixel tech template its showing fine but its a little high and is overlapping the username

please see here: http://www.extreme-mobile.com/forums...read.php?p=854

ive followed the text but i couldnt find the follwing etxt so theerfore could not change it :( maybe this is what is causing the problem? but how can i add it if i cant find it?

cheers mate and i promise this will be the last time i bother you lol

dean

I can't help dean, I do not have that skin so I just can't check it out. Go through the code, and see where you need to add a <br> or something.

Rgds

Takamine334 10-17-2004 12:48 AM

I don't see TABLE_PREFIX in mysql. Is that weird? I installed 1.0 but can't install 1.5

tHe Rk 10-17-2004 06:51 PM

This hack took some hacking and rehacking to get what I wanted, but in the end is quite nice:)

Rick Sample 10-18-2004 12:04 AM

Justing installed 1.0 and trying to upgrade but I have no clue to what this means in the instructions can someone lend me a hand :)

PHP Code:

Run this query: (change TABLE_PREFIX to your settingsthis is defined within includes/config.php, if it is blank then just simply remove TABLE_PREFIX from the query)

alter table TABLE_PREFIXwarning_options
add 
`banned_usergroup_idint(15not null default '0',
add `protected_usergroupsvarchar(255not null default ''

Especialy where it says change talbe_prefix to your settings, this is defined within....

Also, how do I add a query?

Takamine334 10-18-2004 02:07 AM

Quote:

Originally Posted by muscle-mustangs
Justing installed 1.0 and trying to upgrade but I have no clue to what this means in the instructions can someone lend me a hand :)

PHP Code:

Run this query: (change TABLE_PREFIX to your settingsthis is defined within includes/config.php, if it is blank then just simply remove TABLE_PREFIX from the query)

alter table TABLE_PREFIXwarning_options
add 
`banned_usergroup_idint(15not null default '0',
add `protected_usergroupsvarchar(255not null default ''

Especialy where it says change talbe_prefix to your settings, this is defined within....

Also, how do I add a query?

Looks like you and I will never get our questions answered. I have the same problem. The owner of the hack should really browse this thread more often.

Remi 10-18-2004 02:43 AM

Hi

Can some one kindly tell me how to disable sending the PM when warning a member.

All what I need realy is changing the usergroup ID.

Thanks

sv1cec 10-18-2004 05:59 AM

TABLE_PREFIX is a variable you define when you installed the vB software. It can be found in includes/config.php

As for running a query, go into your AdminCP and scroll the left column all the way to the end. You should see something like "Execute SQL Query". Click on it and a window will open in the right side, where you type the query the author suggests.

Rgds

sv1cec 10-18-2004 06:29 AM

Quote:

Originally Posted by Remi
Hi

Can some one kindly tell me how to disable sending the PM when warning a member.

All what I need realy is changing the usergroup ID.

Thanks

Comment out the following code:

PHP Code:

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

in your warn.php file.

I've also made some changes to make this an option in the "Control Warnings" part of AdminCP, so if some one wants to use that, please download the two files supplied here (they contain the version which supports the historical listing of warnings).

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

Rick Sample 10-18-2004 07:14 AM

Quote:

Originally Posted by sv1cec
TABLE_PREFIX is a variable you define when you installed the vB software. It can be found in includes/config.php

As for running a query, go into your AdminCP and scroll the left column all the way to the end. You should see something like "Execute SQL Query". Click on it and a window will open in the right side, where you type the query the author suggests.

Rgds

cool, but do I type in all those lines seperatly or all at once?

SamirDarji 10-18-2004 07:29 AM

Cut and paste. That's what I did.

sv1cec 10-18-2004 05:20 PM

Quote:

Originally Posted by muscle-mustangs
cool, but do I type in all those lines seperatly or all at once?

It's a single SQL statement (command), so you just copy the whole thing and paste it in the big box in your AdminCP "Execute SQL Query".

Rgds
---------
John

sv1cec 10-18-2004 05:26 PM

Quote:

Originally Posted by JimpsEd
A suggestion sv1; to be able to clear warning history for a user/all users via the admin panel.

Sorry I didn't answer sooner on this one.

What do you mean to "clear warning history"? You can always remove a warning from a member, either from the admincp or if you are an admin/mod, from the normal "Show XYZ's warnings". Just erasing all history? I do not see a point in this. I mean why do you want to clear the whole warnings history for some members?

The fact that now the tables register the past warnings, for ever, may necessitate a "hard erase" function, to completely delete erroneous or warnings issued during testing. But I can hardly see that as a need for more code, you can do that with an SQL Query, no need to add it to the hack (at least in my opinion).

If you could elaborate, maybe I could look into it.

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

msimplay 10-18-2004 05:37 PM

i just gotta say thank you for everything @ sv1cec
you may not be the author of the hack but you certainly have contributed a lot of code which helped me so i'd like to thank you :D

j_86 10-18-2004 05:49 PM

It is just as you described :) For forums who ant to "Clean Out" etc. maybe once a year or something like that.

SamirDarji 10-18-2004 05:53 PM

Quote:

Originally Posted by msimplay
i just gotta say thank you for everything @ sv1cec
you may not be the author of the hack but you certainly have contributed a lot of code...

Ditto.

Rick Sample 10-18-2004 06:26 PM

cool, I'm still having troubles. I looked in my config.php file for Table_prefex and it is blank so I took it out like the instructions suggested.

I just put this in their:
add `banned_usergroup_id` int(15) not null default '0',
add `protected_usergroups` varchar(255) not null default '';

And I get this error message:
An error occurred while attempting to execute your query. The following information was returned.
error number: 1064
error desc: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'add `banned_usergroup_id` int(15) not null default '0',
add `p

Any thoughts?

sv1cec 10-18-2004 06:29 PM

For those who thanked me, gentlemen, it's been a pleasure contributing to this community. And my mods just made use of an initially great hack, so I claim no lawrels.

As for the deleting feature, I still am not sure. What we'll have? A list of all the warnings, like in the "Warnings Log", with check boxes next to each warning, so that the admin can check which ones he wants to delete? OK, then do we do any maths with the warning points accumulated by the members? This can get messy and I do not see a reason for it.

What I could easily come up with, is a function which would allow the admin to prune old, inactive warnings. Say that a questions is asked like "How many days do you want to leave in the warnings table?" (or whatever, meaning "before which date, shall I delete inactive warnings?") and then delete those warnings which were rendered inactive (i.e. either matured or were removed) before that date.

Would that cover you? That doesn't need any points mathematics, or anything.

Let me know.

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

sv1cec 10-18-2004 06:32 PM

Quote:

Originally Posted by muscle-mustangs
cool, I'm still having troubles. I looked in my config.php file for Table_prefex and it is blank so I took it out like the instructions suggested.

I just put this in their:
add `banned_usergroup_id` int(15) not null default '0',
add `protected_usergroups` varchar(255) not null default '';


And I get this error message:
An error occurred while attempting to execute your query. The following information was returned.
error number: 1064
error desc: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'add `banned_usergroup_id` int(15) not null default '0',
add `p

Any thoughts?

Yeap, just enter the two lines one at a time, they are two separate commands (where was I looking before??).

One at a time partner, one at a time. Oh and mind you of the reverse quotes and the normal ones, you can just mix and match.

Rgds and apologies.

SamirDarji 10-18-2004 06:33 PM

I'm not sure if it will make any difference, but try to make sure there are no hard carriage returns before the ending semi-colon. It seems as if the whole query never got pasted in there because the resulting db error stops at "add 'p"

Remi 10-18-2004 06:34 PM

Quote:

Originally Posted by msimplay
i just gotta say thank you for everything @ sv1cec
you may not be the author of the hack but you certainly have contributed a lot of code which helped me so i'd like to thank you :D


Thanks @ sv1cec :)

j_86 10-18-2004 08:14 PM

Me too :) Thanks Sv1.

Rick Sample 10-18-2004 08:30 PM

Thanks for helping me out guys, but I have one a few last ?'s I hope you guys can be so kind and answer for myself.



1. Is their anyway to more organize the PM that is sent to the warned users?

I sent one to my test account and this is what it is defaulted to:

You have been warned for the post: Your Post. Your warning level is now: 5. This action was taken for the following reason: You have recieved this warning because you are bashing muslce-mustangs.com. Please reply back if you have a dispute. Rick Sample

It would be nice if it could bold stuff and orgainize it like this:

You have been warned for THIS POST
Your Warning level is now: 5
This action was taken for the following reason: You have recieved this warning because you are bashing muslce-mustangs.com.
Please reply back if you have a dispute. Rick Sample

Just to make it look more computer generated and not so much as a letter comming directly from that person.

2. One of my mods can't see the Warn XXXX or View XXX's warnings in the bar, but everyone else can, any thoughts?

Thanks to all and to all a good night. Hope someone can handle my tough questions :)

Remi 10-19-2004 02:22 AM

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

sv1cec 10-19-2004 03:51 AM

Quote:

Originally Posted by muscle-mustangs
Thanks for helping me out guys, but I have one a few last ?'s I hope you guys can be so kind and answer for myself.



1. Is their anyway to more organize the PM that is sent to the warned users?

2. One of my mods can't see the Warn XXXX or View XXX's warnings in the bar, but everyone else can, any thoughts?

Thanks to all and to all a good night. Hope someone can handle my tough questions :)

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

Ber|Art 10-19-2004 08:07 AM

Installed and Running thank you very much, very nice Hack :)

SnitchSeeker 10-19-2004 12:45 PM

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

sully02 10-19-2004 03:05 PM

Quote:

Originally Posted by sv1cec
For those who thanked me, gentlemen, it's been a pleasure contributing to this community. And my mods just made use of an initially great hack, so I claim no lawrels.

As for the deleting feature, I still am not sure. What we'll have? A list of all the warnings, like in the "Warnings Log", with check boxes next to each warning, so that the admin can check which ones he wants to delete? OK, then do we do any maths with the warning points accumulated by the members? This can get messy and I do not see a reason for it.

What I could easily come up with, is a function which would allow the admin to prune old, inactive warnings. Say that a questions is asked like "How many days do you want to leave in the warnings table?" (or whatever, meaning "before which date, shall I delete inactive warnings?") and then delete those warnings which were rendered inactive (i.e. either matured or were removed) before that date.

Would that cover you? That doesn't need any points mathematics, or anything.

Let me know.

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

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


All times are GMT. The time now is 03:10 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.01790 seconds
  • Memory Usage 1,876KB
  • 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
  • (5)bbcode_php_printable
  • (15)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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