Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > Premium Archives > Advanced Warning System (AWS)
FAQ Community Calendar Today's Posts Search

Closed Thread
 
Thread Tools
Upgrade script Details »»
Upgrade script
Version: , by TosaInu TosaInu is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 02-09-2005 Last Update: Never Installs: 0
 
No support by the author.

Hello,

I'm running the upgrade script (already have Zero Tolerances hack). There's an SQL error right away

Invalid SQL: delete from template where (title>='warn' AND title<'warn_z')
mysql error: Table 'test.template' doesn't exist

test is the database name. It doesn't mention the used prefix vb_ . The table vb_template is definately there. The script works on a copy of vb_template called template.

A typo in the upgrade script?

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 02-09-2005, 12:40 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Add the prefix to the SQL in the script.
  #3  
Old 02-09-2005, 12:52 PM
TosaInu's Avatar
TosaInu TosaInu is offline
 
Join Date: Jul 2004
Posts: 256
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarcoH64
Add the prefix to the SQL in the script.
Hello MarcoH64,

Yes, that's my thought. Problem is that I know near to nothing about PHP. I can see how the prefix is called in plain queries, but this deletion thing got me confused.
  #4  
Old 02-09-2005, 02:14 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

in the upgrade script, change the [sql]delete from template where [/sql] into [sql]delete from vb_template where [/sql]
  #5  
Old 02-09-2005, 02:27 PM
TosaInu's Avatar
TosaInu TosaInu is offline
 
Join Date: Jul 2004
Posts: 256
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarcoH64
in the upgrade script, change the [sql]delete from template where [/sql] into [sql]delete from vb_template where [/sql]
Thanks MarcoH64

lol stupid me.

A field is missing:

Invalid SQL: update vb_warning_options set
hierarchical='Yes',
automatic='No',
automaticpm='No',
autocomments='No',
warner='0',
automatic_warner='',
collector='',
banned_limit='2',
points_before_banned='5',
warnings_before_banned='0',
banned_usergroup_id='4',
troll_usergroup_id='8',
protected_usergroups='6',
aprotected_usergroups='',
restore_groupid='0',
incr_ban_days='Yes',
max_no_bans='2',
bans_mature='300',
viewoption='Mgm',
multiple_per_post='No',
send_pm_warning='Yes',
send_em_warning='Yes',
email_on_ban='No',
historical='Yes',
allowoffpost='Yes',
warnings_per_page='20',
textbutoption='Text'
where oid='1'
mysql error: Unknown column 'textbutoption' in 'field list'

Also Invalid SQL: insert into vb_warnings (wid, warned_user, warned_by, warned_time, warned_reason, warned_post, warned_warning_id, caused_ban, warned_status, removed_by, removed_date) values('','4','1','1107975903','test','44','4','N' ,'A','','')
mysql error: Unknown column 'caused_ban' in 'field list'

and

Database error in vBulletin 3.0.3:

Invalid SQL: update vb_post set warn_flag=warn_flag+1 where postid='44'
mysql error: Unknown column 'warn_flag' in 'field list'


When a moderator issues a warning which hits Warning Points Limit, reason:
Invalid SQL:
INSERT INTO vb_userban
(userid, usergroupid, displaygroupid, customtitle, usertitle, adminid, bandate, liftdate, reason)
VALUES
(4, 4, 0, 0, 'test', 1, 1107979673, 1108152473, 'User exceeded the Warning Limit and was banned.')
mysql error: Unknown column 'reason' in 'field list'

It's possible to warn again for the same post even when this is set to no.
  #6  
Old 02-11-2005, 09:51 AM
sv1cec sv1cec is offline
 
Join Date: May 2004
Location: Athens, Greece
Posts: 2,091
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TosaInu
Thanks MarcoH64

lol stupid me.

A field is missing:

Invalid SQL: update vb_warning_options set
hierarchical='Yes',
automatic='No',
automaticpm='No',
autocomments='No',
warner='0',
automatic_warner='',
collector='',
banned_limit='2',
points_before_banned='5',
warnings_before_banned='0',
banned_usergroup_id='4',
troll_usergroup_id='8',
protected_usergroups='6',
aprotected_usergroups='',
restore_groupid='0',
incr_ban_days='Yes',
max_no_bans='2',
bans_mature='300',
viewoption='Mgm',
multiple_per_post='No',
send_pm_warning='Yes',
send_em_warning='Yes',
email_on_ban='No',
historical='Yes',
allowoffpost='Yes',
warnings_per_page='20',
textbutoption='Text'
where oid='1'
mysql error: Unknown column 'textbutoption' in 'field list'

Also Invalid SQL: insert into vb_warnings (wid, warned_user, warned_by, warned_time, warned_reason, warned_post, warned_warning_id, caused_ban, warned_status, removed_by, removed_date) values('','4','1','1107975903','test','44','4','N' ,'A','','')
mysql error: Unknown column 'caused_ban' in 'field list'

and

Database error in vBulletin 3.0.3:

Invalid SQL: update vb_post set warn_flag=warn_flag+1 where postid='44'
mysql error: Unknown column 'warn_flag' in 'field list'


When a moderator issues a warning which hits Warning Points Limit, reason:
Invalid SQL:
INSERT INTO vb_userban
(userid, usergroupid, displaygroupid, customtitle, usertitle, adminid, bandate, liftdate, reason)
VALUES
(4, 4, 0, 0, 'test', 1, 1107979673, 1108152473, 'User exceeded the Warning Limit and was banned.')
mysql error: Unknown column 'reason' in 'field list'

It's possible to warn again for the same post even when this is set to no.
Run the following queries to add the missing fields in your table (remember to change them to use your prefix):

ALTER TABLE `warning_options` ADD COLUMN textbutoption char(10)

ALTER TABLE `warnings` ADD COLUMN caused_ban char(1)

ALTER TABLE `post` ADD COLUMN warn_flag int(5) default 0

ALTER TABLE `userban` ADD COLUMN reason mediumtext


Run these and see if everything goes OK. I'll be uploading a new upgrade_warn.php script in a while.

Rgds
  #7  
Old 02-11-2005, 12:55 PM
TosaInu's Avatar
TosaInu TosaInu is offline
 
Join Date: Jul 2004
Posts: 256
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sv1cec
Run the following queries to add the missing fields in your table (remember to change them to use your prefix):

ALTER TABLE `warning_options` ADD COLUMN textbutoption char(10)

ALTER TABLE `warnings` ADD COLUMN caused_ban char(1)

ALTER TABLE `post` ADD COLUMN warn_flag int(5) default 0

ALTER TABLE `userban` ADD COLUMN reason mediumtext


Run these and see if everything goes OK. I'll be uploading a new upgrade_warn.php script in a while.

Rgds
Thanks sv1cec,

I had already added the missing tables in the testboard (usually prefer to test hacks first), I've some different datatypes, but it seems to work though.

It's possible to warn again for the same post even when this is set to no. Is this related to wrong datatypes or is it another glitch?

My overall impression of this hack: great job!
  #8  
Old 02-11-2005, 02:10 PM
sv1cec sv1cec is offline
 
Join Date: May 2004
Location: Athens, Greece
Posts: 2,091
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TosaInu
Thanks sv1cec,

I had already added the missing tables in the testboard (usually prefer to test hacks first), I've some different datatypes, but it seems to work though.

It's possible to warn again for the same post even when this is set to no. Is this related to wrong datatypes or is it another glitch?

My overall impression of this hack: great job!
You are again right, another bug, darn!!!

OK, download the latest version of the zip and upload Warn.php and includes/functions_warning.php to your server.

Sorry for the inconvenience.
  #9  
Old 02-11-2005, 09:02 PM
TosaInu's Avatar
TosaInu TosaInu is offline
 
Join Date: Jul 2004
Posts: 256
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sv1cec
You are again right, another bug, darn!!!

OK, download the latest version of the zip and upload Warn.php and includes/functions_warning.php to your server.

Sorry for the inconvenience.
Hello sv1cec,

No inconvenience at all. I'm using this hack (any hack for that matter) on a testforum first. Often it's me making mistakes with installing hacks or I want tiny tweaks and try to code them.
  #10  
Old 02-15-2005, 11:33 AM
sv1cec sv1cec is offline
 
Join Date: May 2004
Location: Athens, Greece
Posts: 2,091
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TosaInu
Hello sv1cec,

No inconvenience at all. I'm using this hack (any hack for that matter) on a testforum first. Often it's me making mistakes with installing hacks or I want tiny tweaks and try to code them.
Good work man, glad you got it figured out.

Rgds
Closed Thread


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:10 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.04707 seconds
  • Memory Usage 2,297KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (7)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete