vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Warnings System Hack v2.1 (https://vborg.vbsupport.ru/showthread.php?t=43265)

Larz 09-08-2002 10:55 AM

Has anybody had this running on 2.2.6 with the Lesane Store Hack?

wooolF[RM] 09-08-2002 10:57 AM

]right now under table "setting" under settinggroup 40 I have Chan's hack called vbPad ( think so )

Code:

Edit  Delete  171 40 Maximum Characters per note maxpadsize 250 The maximum number of characters that you want to ...  1
Edit  Delete  172 40 Maximum Notes maxpadnum 10 Enter the maximum number of notes a user can keep....  2
Edit  Delete  173 40 Allow vB IMG code in notes? padimgcode 1  yesno 3
Edit  Delete  174 40 Allow vB code in notes? padvbcode 1  yesno 4
Edit  Delete  175 40 Allow smilies in notes? padsmilies 1  yesno 5
Edit  Delete  176 40 Allow HTML in notes? padhtml 0  yesno 6
Edit  Delete

removed it as I don't use it anyway... :) trying to import setting again...

wooolF[RM] 09-08-2002 11:03 AM

]same sh*t... :/

something wrong with query
PHP Code:

INSERT INTO setting VALUES (NULL,140'No Warning Usergroups''NOwarn''6''The usergroupids for the usergroups that cant be warned! (seperate each usergroupid by a comma)'''5,) 

cause all queries BEFORE this query works and they are imported in the database

weird...

TECK 09-08-2002 12:29 PM

the query should be like that:
Code:

$DB_site->query("INSERT INTO setting (settingid,settinggroupid,title,varname,value,description,optioncode,displayorder) VALUES (NULL,32,'No Warning Usergroups','NOwarn','6','The usergroupids for the usergroups that cannot be warned! (seperate each usergroupid by a comma)','','5')");
but.. dont use the group 40!!!!!!! but 32 or whatever is your next number up after the last groupid, as it suppose to follow one after the other...
to check what is ur last group, just go to admin/setting.php and look at the last groupid.

wooolF[RM] 09-08-2002 12:37 PM

]mmkay...

now everything is imported, all templates edited, all files edited, admin panel visited and settings saved and...

still nothing... empty place...

:( :( :( :( :( :( :( :( :(

TECK 09-08-2002 01:08 PM

i will look on your board when i wakeup.. as you see i'm still awake. :)

wooolF[RM] 09-08-2002 01:09 PM

]LOL, go to bed!!! NOOOOOOOOOOW! :p

TECK 09-08-2002 01:11 PM

Quote:

Originally posted by Erwin
One tip - for those with many hacks that uses the settingid's, you may want to use a higher settingid than 40 - otherwise you get a db error. You don't actually have to set a settingid - the variables are auto-incremental. If people are getting errors, replace all the 40 with 140 which shouldn't interfere with other hacks that uses settingids.

Otherwise, the hack is brilliant. I just had to tidy up the profile a bit, but it works great. Thanks!

Erwin, you must use it in order. just go to admin/setting.php and check what is your last group ID, then use the next value up. dont give some wierd values just like that. if you check is alot easier and better...
i installed on wooolf's board everything and it worked ok with my method of queries listed above...

Mephisteus 09-08-2002 01:29 PM

Using 2.2.6, had an db error when i viewed the logs but when I created the usergroup Banned by Warnings and set it in vb options to the right usergroup id no probs at all.

This will definetly get my vote for HoTM

wooolF[RM] 09-08-2002 02:16 PM

Thanx to TECK I got it fixed...

I think g-force2k should really think of how to put queries for execution in the installer...

And the file with installer is not so easy to read cause it's kinda big... Try to make another format next time or make it morevisible

The idea itself is great!

Thanx to g-force2k and TECK

g-force2k2 09-08-2002 03:26 PM

yeah thanks TECK for the support i will rewrite a better set of instructions as well as a better installer later when i get the free time... regards...

g-force2k2

Chris M 09-08-2002 03:36 PM

Perhaps you could use vBhackmaker:)

Satan

TECK 09-08-2002 04:07 PM

Quote:

Originally posted by hellsatan
Perhaps you could use vBhackmaker:)

Satan

yep is a great idea... however i still believe the old school way is better... no fancy stuff and u'll be ok always... like i did with wooolf's board.
imo, manual way is the best way. you are always in control and if you make a query code error then you know wich one is it and check the syntax rightaway...

i use chen's query hack, and i never had a prob... it does the job great...

wooolF[RM] 09-08-2002 05:27 PM

]it's wooolF , not wooolf :p

Erwin 09-08-2002 07:51 PM

Quote:

Originally posted by TECK
Erwin, you must use it in order. just go to admin/setting.php and check what is your last group ID, then use the next value up. dont give some wierd values just like that. if you check is alot easier and better...
i installed on wooolf's board everything and it worked ok with my method of queries listed above...

Well, you don't have to. That table has columns that auto-increment, so you don't have to even specify a number - just put NULL and the next number will be automatically used. And I've been adding settingid's in all sorts of places manually for a long time with no problem now. :)

Dado 09-08-2002 10:59 PM

awesome hack! Got it installed in just couple minutes. I used everything from the first post that G Force did and it worked. I ran the install_warning.php as last and then went to vbulletin options and made the changes to the usergroups for the warning stuff. When I submitted that it started working at once :)

One question though, where do you change the color of the view warning list. I am getting a black font and can't find where to change that. Thanks

http://www.dtmpower.net/forum/warn.php?s=

g-force2k2 09-08-2002 11:23 PM

thats great to hear Dado :) as for you request in the warn_list & warn_listing templates you can just change the:

PHP Code:

<smallfont color="{pagetextcolor}"

to:

PHP Code:

<smallfont

see if that helps ;) regards...

g-force2k2

Dado 09-08-2002 11:42 PM

thank you. I didn't even notice the templates were all the way at the bottom :) Sorry :D

DFX 09-08-2002 11:54 PM

Best hack i've seen in quite some time, *Clicks Install*

Capt PPRuNe 09-09-2002 12:22 AM

Well... I've read through this whole thread and i am still stumped. I had v1.0 installed and running with no problems, Went through the upgrade for v2.1 and ran the installer which set everything up but couldn't see the links in the threads and kept getting a DB error when trying to view the logs from the CP. I hadn't seen the bit about running the setup from the Vb Settings.

Decided to uninstall it and ran the uninstaller and removed all the add ons in the files and templates and then proceeded to do a complete install from scratch.

Now when I run the installer it hangs in step 2 at: Inserting Warning System Settings Into VBulletin Options


and I get this sql error:

Database error in vBulletin Control Panel 2.2.7:

Invalid SQL: INSERT INTO settinggroup VALUES (40, 'Warnings System', 40)
mysql error: Duplicate entry '40' for key 1

mysql error number: 1062

Date: Sunday 08th of September 2002 09:10:08 PM
Script: http://www.pprune.org/forums
Referer:

As I am not so au fait with sql I am stumped.

Anyone care to advise what to do next?

Capt PPRuNe 09-09-2002 12:33 AM

Ignore everything after "good morning!". I just ran the installer into step 3 and voila! All working hunkydory.

Pity it wiped my previous warned user list though. With 54,000 members I have to keep this list current and now all the mods will have to start again.

Nice hack. Could possibly be a little bit clearer with the instructions ref the vB settings in the CP and deletion of the warnings config file.

Erwin 09-09-2002 01:28 AM

Quote:

Originally posted by Capt PPRuNe
With 54,000 members I have to keep this list current and now all the mods will have to start again...
54,000 member... I'm impressed. How old are the forums?

Okiewan 09-09-2002 01:45 AM

Question... if there any way to limit the number of warnings a particular post can get? The mods know to look at the warnings before issuing one, but... I can see it happening, someone getting warned 5 times by 5 mods for the same post. Just a thought.

g-force2k2 09-09-2002 01:56 AM

Okiewan:

open warn.php (2)

find: (1)

PHP Code:

require('./global.php'); 

above it add:

PHP Code:

$temlatesused.= ",warn_error_postwarned"

find: (2)

PHP Code:

    if(empty($info[postid])) {
        eval(
"standarderror(\"".gettemplate('warn_error_postnoexist')."\");");
      exit;
      } 

Under it add:

PHP Code:

$getwarn $DB_site->query_first("
  SELECT postid, type
  FROM warnings_log 
  WHERE postid='
$info[postid]'");
if(
$getwarn[postid] != "") {
  eval(
"standarderror(\"".gettemplate('warn_error_postwarned')."\");");
  exit;


Create a new template called:

warn_error_postwarned
-------
Sorry $bbuserinfo[username], but $info[username] was already wanred on this post for $getwarn[type]. Please select a different post to warn.

And that should do the trick Okiewan... sorry i didn't test it yet... just made it up ;)

Capt Prrune sorry to hear ;\ i thought the instrucstions stated that... besides the systems aren't compatible at all... last system was based on pure warnings no matter what the reason.... this one has a warning points system... regards...

g-force2k2

Okiewan 09-09-2002 03:25 AM

g-force2k2,
Thanks for trying but she no work :(
Multiple warnings on the same post still works.

C.Birch 09-09-2002 07:25 AM

right i have installed the hack and it all works apart from in the admin cp for its settings look at the screen shot to see what i mean.

g-force2k2 09-09-2002 11:40 AM

C.Birch try uninstalling and then reinstalling... if that doesn't work then i will make you an installer to fit your needs... can you tell me what the last settinggroupid is that you've used? regards...
try opening the install_warning.php

find:

PHP Code:

$DB_site->query("INSERT INTO settinggroup VALUES (NULL, 'Warnings System', 40)");
$DB_site->query("INSERT INTO setting VALUES (NULL,40, 'Warning Logs Per Page', 'WLOGSpp', '20', 'The number of warning logs to show per page!', '', 1)");
$DB_site->query("INSERT INTO setting VALUES (NULL,40, 'Register Group', 'REGgroup', '2', 'The usergroupid for the registered usergroup!', '', 2)");
$DB_site->query("INSERT INTO setting VALUES (NULL,40, 'Maximum Ban Limit', 'BANtot', '25', 'The total amount of warning points before user is banned!', '', 3)");
$DB_site->query("INSERT INTO setting VALUES (NULL,40, 'Banned by Warnings Group', 'BANgroup', '8', 'The usergroupid for the banned by warnings usergroup', '', 4)");
$DB_site->query("INSERT INTO setting VALUES (NULL,40, 'No Warning Usergroups', 'NOwarn', '6', 'The usergroupids for the usergroups that can\'t be warned! (seperate each usergroupid by a comma)', '', 5)");
$DB_site->query("INSERT INTO setting VALUES (NULL,40, 'Can See Warnings Levels', 'CANseewarn', '2,5,6,7', 'The usergroupids for the usergroups that can see the warning levels! (seperate each usergroupid by a comma!', '', 6)");
$DB_site->query("INSERT INTO setting VALUES (NULL,40, 'Can View Warnings', 'CANview', '5,6,7', 'The usergroupids for the usergroups that can view user warnings! (seperate each usergroupid by a comma)', '', 7)");
$DB_site->query("INSERT INTO setting VALUES (NULL,40, 'Can Issue Warnings', 'CANwarn', '5,6,7', 'The usergroupids for the usergroups tat can warn users! (seperate each usergroupid by a comma)', '', 8)");
$DB_site->query("INSERT INTO setting VALUES (NULL,40, 'Email Ban User', 'BANemail', '1', 'Emails the user when they\'re banned by exceeding the ban limit!', 'yesno', 9)"); 

and all of the '40' change to the number of the next settinggroupid... you can check the last settinggroupid by going to admin/setting.php in your browser... regards...

g-force2k2

C.Birch 09-09-2002 01:22 PM

its working now before i tryed it how someone said before to do it turn 40 in to 140 and that never worked but i just turned them in to 42 and that worked because last one was 41. thanx and cool hack :)

lynda 09-09-2002 01:34 PM

I installed the hack with no problems at all - absolutely everything was working (I ended up uninstalling it because it doesn't look like we really need it yet)

The only two changes I made were I changed 40 to another number...

The other thing looks like it might be an error and might be what's causing the blank pages?

The install.txt file says this:

PHP Code:

open member.php (2)

find: (1)

  
$templatesused "getinfo_sendpm,aol,icq,yahoo,getinfo_birthday,getinfo_customfields,getinfo";

under it add:

// +++++++ Warning Hack 2.0 [ g-force2k2 ] +++++++
  
$templatesused ",warn_getinfo_warning,warn_userinfo";
// +++++++ Warning Hack 2.0 [ g-force2k2 ] +++++++ 

If that's done, if the new $templatesused is added UNDER the current one as the instructions suggest, won't that just overwrite the $templatesused variable nullifying the first one?

I just added warn_getinfo_warning,warn_userinfo to the end of my current templatesused variable, but I think this also would work if you placed it under the first $templatesused variable.. perhaps this is what it's supposed to say?:
PHP Code:

   $templatesused $templatesused ",warn_getinfo_warning,warn_userinfo"


g-force2k2 09-09-2002 01:57 PM

lynda: thanks for the bug exploit :p

it won't really effect the hack no... but just change:

PHP Code:

  $templatesused ",warn_getinfo_warning,warn_userinfo"

to this:

PHP Code:

  $templatesused.= ",warn_getinfo_warning,warn_userinfo"

regards...

g-force2k2

410 09-09-2002 02:31 PM

Mines not showing up in my Postbit...can you look at this??

PHP Code:

    <p align="right"><smallfont><a href="report.php?s=$session[sessionhash]&postid=$post[postid]">Report this post to a moderator</a> | $post[iplogged$post[warnlink] <br><a href='timeonline.php?s=$session[sessionhash]&action=view_leader'>Time Online:</a$post[onlinetime]   </smallfont></p


g-force2k2 09-09-2002 03:05 PM

410 did you submit the options in the vbulletin options in the admin cp? regards... make sure that the usergroupids are configured correctly according to your needs...

g-force2k2

410 09-09-2002 03:07 PM

Yep got it to work..gr8 hack thx!

g-force2k2 09-09-2002 03:12 PM

glad to hear 410 :)

Okiewan...

i just tested the code that i gave you and it worked fine? are you sure you tried a post that you had already warned? regards...

g-force2k2

Dado 09-09-2002 10:05 PM

Quote:

Originally posted by g-force2k2
Okiewan...

i just tested the code that i gave you and it worked fine? are you sure you tried a post that you had already warned? regards...

g-force2k2

It worked for me too :) Thanks!

Sc0rp 09-09-2002 11:20 PM

awesome hack m8! installed it right away:D

one question.. after how many warning points does a user get banned and can I customize this? thanx!!!!:)

sorry one other question.. I noticed the warning wasnt displaying in the postbit.. so I went looking in the install and I found this:

Code:

// +++++++ Warning Hack 2.0 [ g-force2k2 ] +++++++
                $post[warnlink] = "";
                $warntype = checkwarnlink($bbuserinfo[usergroupid], 0);
                if($warntype == 1) {
                  eval("\$post[warnlink].= \"".gettemplate('warn_seelink')."\";");
                } else {
                  $post[warnlink].= "";
                }
                $warntype2 = checkwarnlink($bbuserinfo[usergroupid], 1);
                if($warntype2 == 1) {
                eval("\$post[warnlink].= \"".gettemplate('warn_viewlink')."\";");
                } else {
                  $post[warnlink].= "";
                }
                $warntype3 = checkwarnlink($bbuserinfo[usergroupid], 2);
                if($warntype3 == 1) {
                  eval("\$post[warnlink].= \"".gettemplate('warn_warnlink')."\";");
            } else {
                  $post[warnlink].= "";
                }
// +++++++ Warning Hack 2.0 [ g-force2k2 ] +++++++

so my question is.. what would this warnlink have 2 be???

Erwin 09-09-2002 11:24 PM

Quote:

Originally posted by Sc0rp
awesome hack m8! installed it right away:D

one question.. after how many warning points does a user get banned and can I customize this? thanx!!!!:)

Look in your Admin CP under vBulletin Options, Warnings.

g-force2k2 09-09-2002 11:56 PM

yep like Erwin stated it is all customizeable in the vbulletin options in the admin cp... you can update the usergroupids there as well... hope that helps you... regards...

g-force2k2

Sc0rp 09-10-2002 09:29 AM

yeah I customized that but the $post[warnlink] is still not showing when I look in a post (postbit is filled in correct..!) should I have installed a older version first and updated from there?

Dean C 09-10-2002 03:48 PM

deleted all my templates and ran the installer....

this is what it showed:

PHP Code:

Creating Warning Logs Table.

Warning Logs Table Successfully Created!

Creating Warnings Table.

Warnings Table Successfully Created!

Inserting Defualt Warnings Into Warnings Table

Defualt Warning Values Successfully Inserted
!

Altering User TableAdding Warning Level.

User Table Successfully Altered!

Inserting Warning System Settings Into VBulletin Options 

then just below this it says:

PHP Code:

Database error in vBulletin Control Panel 2.2.6:

Invalid SQLINSERT INTO settinggroup VALUES (40'Warnings System'40)
mysql errorDuplicate entry '40' for key 1

mysql error number
1062

Date
Tuesday 10th of September 2002 09:49:11 AM
Script
: [url]http://www.battleboards.com/boards/boards/admin/install_warning.php?step=2[/url]
Referer

:( - any ideas???

- Mist


All times are GMT. The time now is 04:09 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.01948 seconds
  • Memory Usage 1,881KB
  • 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
  • (3)bbcode_code_printable
  • (15)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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