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)
-   -   Advanced Warning System (AWS) (https://vborg.vbsupport.ru/showthread.php?t=71992)

Revan 12-05-2004 08:49 AM

Quote:

Originally Posted by sv1cec
Raven,

Its Revan damit :p

Quote:

Originally Posted by sv1cec
Your idea of using $vboptions is a solid one, I didn't think of that, as I used ZT's original structure and I just used that table for my hack as well. The query for the options is indeed a pain. I wish I had thought about it, because now, I have to go back and edit all the files (not too ddifficult) and all the templates (gosh I hate that)! Darn!!!

I have already done this, the hack is now working 100 % using $vboptions :)

Quote:

Originally Posted by sv1cec
And indeed, the code needs some cleaning work. Now that I've finished installing the other hack I mentioned above (the Inline Moderation Hack, great one), I think I'll spend some time cleaning up the mess.

I just need to clean the 800 lines in Warn.php, and then make the templates XHTML compliant, and this will be done too :)

Quote:

Originally Posted by sv1cec
Of course, your help is welcome, don't forget I started this from ZT's code, so a lot of the code is not mine either. An installer which will take into consideration the styles thing would be a great help, as I do not have any additional styles and I can't even help users with this issue. I just do not know how to handle them.

I offered to write a datastore installer, not template installer. And the installer as-is did take my substyles into consideration, it installed in the default style (parent style), and this auto added templates to the child styles :)

Quote:

Originally Posted by sv1cec
As for the Yes/No/Yes thing on the drop down menus, I am not sure I can do something about it, I am using vB's standard method, and that's how they show up after you set the value once.

Is that so... Weird, seeing as I already fixed it ;)
Its not vB standard at all mate :p
PHP Code:

    $permoption "
        <option value=\"No\" " 
iif($warn['warn_permban'] == 'No''selected="selected"') . ">No</option>
        <option value=\"Yes\" " 
iif($warn['warn_permban'] == 'Yes''selected="selected"') . ">Yes</option>
    "
;
    
$typoption "
        <option value=\"No\" " 
iif($warn['warn_type'] == 'No''selected="selected"') . ">No</option>
        <option value=\"Yes\" " 
iif($warn['warn_type'] == 'Yes''selected="selected"') . ">Yes</option>
    "


This works like a charm :)


I'll get back to you about this once Im done with the cleanup :)


//peace

sv1cec 12-05-2004 09:25 AM

Quote:

Originally Posted by Revan
Its Revan damit :p

I have already done this, the hack is now working 100 % using $vboptions :)

I just need to clean the 800 lines in Warn.php, and then make the templates XHTML compliant, and this will be done too :)

I offered to write a datastore installer, not template installer. And the installer as-is did take my substyles into consideration, it installed in the default style (parent style), and this auto added templates to the child styles :)

Is that so... Weird, seeing as I already fixed it ;)
Its not vB standard at all mate :p
PHP Code:

    $permoption "
        <option value=\"No\" " 
iif($warn['warn_permban'] == 'No''selected="selected"') . ">No</option>
        <option value=\"Yes\" " 
iif($warn['warn_permban'] == 'Yes''selected="selected"') . ">Yes</option>
    "
;
    
$typoption "
        <option value=\"No\" " 
iif($warn['warn_type'] == 'No''selected="selected"') . ">No</option>
        <option value=\"Yes\" " 
iif($warn['warn_type'] == 'Yes''selected="selected"') . ">Yes</option>
    "


This works like a charm :)


I'll get back to you about this once Im done with the cleanup :)


//peace

Revan,

Sorry for the name mixup! I know I shouldn't type, before I have a full glass of coffee in my system.

Re. vboptions, good work, let's see it. I did some maintenance work on my site, and moved the warn_options query to the global.php file, in that way it is executed only once, that should help reduce the queries counter.

Re. Yes/No/Yes issue, what can I say, you are a much better coder than I am. Going to change this now.

Rgds

Revan 12-05-2004 10:24 AM

Quote:

Originally Posted by sv1cec
Sorry for the name mixup! I know I shouldn't type, before I have a full glass of coffee in my system.

Hehe no worries mate :)

Quote:

Originally Posted by sv1cec
Re. vboptions, good work, let's see it.

I'll get to work on the Warn.php right now then :)
Quote:

Originally Posted by sv1cec
I did some maintenance work on my site, and moved the warn_options query to the global.php file, in that way it is executed only once, that should help reduce the queries counter.

Cool, Im all for query optimisations :D

Quote:

Originally Posted by sv1cec
Re. Yes/No/Yes issue, what can I say, you are a much better coder than I am. Going to change this now.

Meh, I just entered debug mode, stole the code vB uses to create the "Date Format" (Yesterday/Today etc) and modded it to fit this ;)


//peace

mcyates 12-05-2004 07:01 PM

FAO sv1cec
================
Quality hack,

I installed it perfectly a couple of weeks ago, but i restarted my forum but kept the same database but i can't install the latest version. What i need is some SQL code which i can put in phpmyadmin which will remove them all and let me install it properly.

Or you could just let me know where all the warning database tables / columns are so i can manually remove them. Also i had Zero Tolerance's Warning Hack installed before yours, so some of their tables / columns might need removing.

Thanks in advance, i just need this hack installed again as it was very usefull.

I sit waiting.....

rh2004 12-06-2004 01:40 AM

Hi when I run the install I always get this error?


Code:

Database error in vBulletin 3.0.3:

Invalid SQL: INSERT INTO `warning_options` values ('1','Yes', 'No', '','0','7','10','8','6','8','0','Yes','3','All','Yes','Yes','No','Yes','Yes','15')
mysql error: Column count doesn't match value count at row 1

mysql error number: 1136

Date: Sunday 05th of December 2004 10:40:05 PM
Script: /adminpanel/install_warn.php[/url]
Referer:
Username:
IP:

Can you help :(

Also what do I ned to do to my other templates, so it works?

+d-cipher 12-06-2004 03:27 AM

Quote:

Originally Posted by rh2004
Hi when I run the install I always get this error?


Code:

Database error in vBulletin 3.0.3:
 
 Invalid SQL: INSERT INTO `warning_options` values ('1','Yes', 'No', '','0','7','10','8','6','8','0','Yes','3','All','Yes','Yes','No','Yes','Yes','15')
 mysql error: Column count doesn't match value count at row 1
 
 mysql error number: 1136
 
 Date: Sunday 05th of December 2004 10:40:05 PM
 Script: /adminpanel/install_warn.php[/url]
 Referer:
 Username:
 IP:

Can you help :(

Also what do I ned to do to my other templates, so it works?

Same for me.

sv1cec 12-06-2004 03:43 AM

Quote:

Originally Posted by +d-cipher
Same for me.

Sorry folks, change that line in install_warn.php, with the one below:

PHP Code:

$install[]="INSERT INTO `".TABLE_PREFIX."warning_options` values ('1','Yes', 'Yes','No', '','0','7','10','8','6', '6','8','0','Yes','3','All','Yes','Yes','No','Yes','Yes','15')"

The difference is one more 'Yes' in the beginning.

Sorry for the inconvenience.

sv1cec 12-06-2004 03:50 AM

Quote:

Originally Posted by mcyates
FAO sv1cec
================
Quality hack,

I installed it perfectly a couple of weeks ago, but i restarted my forum but kept the same database but i can't install the latest version. What i need is some SQL code which i can put in phpmyadmin which will remove them all and let me install it properly.

Or you could just let me know where all the warning database tables / columns are so i can manually remove them. Also i had Zero Tolerance's Warning Hack installed before yours, so some of their tables / columns might need removing.

Thanks in advance, i just need this hack installed again as it was very usefull.

I sit waiting.....

The following tables are used by this hack (and Zero's):

warning_options
warning_types
warnings

If you had installed version 2.0 and above, you would also have a table named pmtext_warned.

Zero was using another table for banned users, called banned_members. All these should be in your database, and should be useable again.

If you want to delete them and start from scratch, just make sure you do not use a TABLE_PREFIX. If you do, add that in the installation script.

I would suggest that you do not start with Zero's hack, go directly to the installation of this one, the installation procedure is much easier.

Let me know if that helps.

Rgds

Delphy 12-06-2004 10:37 AM

Hiya,

Just found this hack and tried installing from scratch. I get an error:

Invalid SQL: INSERT INTO `warning_options` values ('1','Yes', 'Yes','No', '','0','7','10','8','6','8','0','Yes','3','All','Y es','Yes','No','Yes','Yes','15 ')
mysql error: Column count doesn't match value count at row 1

Looking at the script, the "`max_no_bans` int(5)," column is missing from the insert statement. Adding this back in (Line 208 of install_warn.php) makes it work.

I guessed at a value for max_no_bans - can you tell me what it *should* be?

Regards
Delphy

sv1cec 12-06-2004 11:42 AM

Quote:

Originally Posted by Delphy
Hiya,

Just found this hack and tried installing from scratch. I get an error:

Invalid SQL: INSERT INTO `warning_options` values ('1','Yes', 'Yes','No', '','0','7','10','8','6','8','0','Yes','3','All','Y es','Yes','No','Yes','Yes','15')
mysql error: Column count doesn't match value count at row 1

Looking at the script, the "`max_no_bans` int(5)," column is missing from the insert statement. Adding this back in (Line 208 of install_warn.php) makes it work.

I guessed at a value for max_no_bans - can you tell me what it *should* be?

Regards
Delphy

Delphy,

It was not the max number of bans which was missing, it is the aprotected_usergroups.

Try changing that line to:

PHP Code:

$install[]="INSERT INTO `".TABLE_PREFIX."warning_options` values ('1','Yes', 'Yes','No', '','0','7','10','8','6', '6','8','0','Yes','3','All','Yes','Yes','No','Yes','Yes','15')"

Mind you, I just uploaded a new version, so you may want to download the latest zip.

Rgds


All times are GMT. The time now is 11:35 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.01956 seconds
  • Memory Usage 1,801KB
  • 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_code_printable
  • (4)bbcode_php_printable
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)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