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)

SamirDarji 12-14-2004 03:42 PM

As always, thank you for the unreal amount of assistance you have given us with this hack. I feel I can't say it enough times. :D

Quote:

Originally Posted by sv1cec
- postbit template. Mine (3.0.3) doesn't have any div there, so I can't be sure. I suggest you experiment.

Interesting. I'm also running 3.0.3. In your template, is your new code inside a div tag? If so, where does the tag start?

Quote:

Originally Posted by sv1cec
- banned user group not appearing, you are right, I haven't seen that, I'll look it up and post a correction here.

Let me know where to look and I'll also see if isn't just that I messed up somewhere.

Quote:

Originally Posted by sv1cec
- your last error is a result of not saving the warning options properly. One of the parameters defined there, is the records per page, so if that is not set, the program tries to divide by nothing.

Makes sense :)

Quote:

Originally Posted by sv1cec
First of all, try to see if you have the proper tables. Check the following tables by comparing the results of the "describe tablename" command with the columns described in the installation instructions. Second, check to see if the required templates have been added.

Where are these listed? I looked through every .txt file.

I just started parsing through the upgrade_warn.php and looking in phpmyadmin to see about the database tables. That's where the problem seems to be. Looks like it never updated the warning_options table, although it did all the other ones. I'm assuming that everything up to this point probably worked. So now how do I fix it?

SamirDarji 12-14-2004 03:49 PM

Quote:

Originally Posted by sv1cec
What was I thinking?????

OK, to fix the issue with the banned users group not appearing in the drop-down menus of the other options, please open your admin_warn.php file and find:

PHP Code:

    if($usergroup['usergroupid']!=$warn_opts['banned_usergroup_id'] AND $usergroup['usergroupid']!=$warn_opts['troll_usergroup_id'] AND $usergroup['usergroupid']!=$warn_opts['restore_groupid'])
{
    
$uoption.="<option value='{$usergroup['usergroupid']}'>{$usergroup['title']} (ID: {$usergroup['usergroupid']})</option>";
    
$tuoption.="<option value='{$usergroup['usergroupid']}'>{$usergroup['title']} (ID: {$usergroup['usergroupid']})</option>";
    
$restoreoption.="<option value='{$usergroup['usergroupid']}'>{$usergroup['title']} (ID: {$usergroup['usergroupid']})</option>";
    } 

Replace that part of code with:

PHP Code:

if($usergroup['usergroupid']!=$warn_opts['banned_usergroup_id'])
    {
        
$uoption.="<option value='{$usergroup['usergroupid']}'>{$usergroup['title']} (ID: {$usergroup['usergroupid']})</option>";
    }
    if(
$usergroup['usergroupid']!=$warn_opts['troll_usergroup_id'])
    {
        
$tuoption.="<option value='{$usergroup['usergroupid']}'>{$usergroup['title']} (ID: {$usergroup['usergroupid']})</option>";
    }
    if(
$usergroup['usergroupid']!=$warn_opts['restore_groupid'])
    {
        
$restoreoption.="<option value='{$usergroup['usergroupid']}'>{$usergroup['title']} (ID: {$usergroup['usergroupid']})</option>";
    } 

I'll post a new version in the zip file, in a minute.

Yep, that fixed it. :D

sv1cec 12-14-2004 04:06 PM

Quote:

Originally Posted by beano33
Protected Usergroups isn't working on my installation. I have Use Hierarchical Schema set to no and added 13|18 as protected usergroups, but it's having no effect. Any suggestions? Everything else seems to be working as intended.

When you are saying it does not work, do you mean that the members which have groups 13 and 18 as PRIMARY user group, can still be warned? The hack checks only if someone's primary group is in the protected groups, so if someone is a registered user (group 2) and he also belongs in another group (additional user group), this is not checked.

Let me know, because everything seems to be OK here.

Rgds

beano33 12-14-2004 04:16 PM

Quote:

Originally Posted by sv1cec
When you are saying it does not work, do you mean that the members which have groups 13 and 18 as PRIMARY user group, can still be warned?
Rgds

Yes, that's the case. They're only used as primary groups.

sv1cec 12-14-2004 04:33 PM

Quote:

Originally Posted by beano33
Yes, that's the case. They're only used as primary groups.

I found the problem. When I moved some routines in the functions_warning.php file, I didn't pass along the proper parameters. Have it fixed, but give me a moment to update the zip file.

Then download the zip and upload Warn.php and includes/functions_warning.php files to your server.

Sorry for the inconvenience and thanks for cathing this.

Revan 12-14-2004 05:25 PM

Btw that "saving options properly" issue... Wouldnt it make more sense to put an if() around the page calculation page, saying summit liek if ($options['warn_perpage'] == 0) { $options['warn_perpage'] = 15; }, to avoid these bugs?

beano33 12-14-2004 05:32 PM

Quote:

Originally Posted by sv1cec
I found the problem. When I moved some routines in the functions_warning.php file, I didn't pass along the proper parameters. Have it fixed, but give me a moment to update the zip file.

Then download the zip and upload Warn.php and includes/functions_warning.php files to your server.

Sorry for the inconvenience and thanks for cathing this.

Thanks! Working fine now. :)

sv1cec 12-14-2004 05:33 PM

Quote:

Originally Posted by SamirDarji
As always, thank you for the unreal amount of assistance you have given us with this hack. I feel I can't say it enough times. :D

Interesting. I'm also running 3.0.3. In your template, is your new code inside a div tag? If so, where does the tag start?

Let me know where to look and I'll also see if isn't just that I messed up somewhere.

Makes sense :)

Where are these listed? I looked through every .txt file.

I just started parsing through the upgrade_warn.php and looking in phpmyadmin to see about the database tables. That's where the problem seems to be. Looks like it never updated the warning_options table, although it did all the other ones. I'm assuming that everything up to this point probably worked. So now how do I fix it?


OK, the description of each table is (more or less) shown inside the install_warn.php file, found inside the admincp directory in the upload directory of the zip.

Check them out and let me know where you stand.

Or you may try the uninstaller and start from scratch. It will remove the additional template, tables and phrases, and then you can run install_warn.php from scratch.


Rgds

SamirDarji 12-14-2004 05:41 PM

Quote:

Originally Posted by Revan
Btw that "saving options properly" issue... Wouldnt it make more sense to put an if() around the page calculation page, saying summit liek if ($options['warn_perpage'] == 0) { $options['warn_perpage'] = 15; }, to avoid these bugs?

It probably won't happen like it did in my case because I didn't even have the tables. If he would've had the check in there, I might not even have discovered the missing tables, lol.

sv1cec 12-14-2004 05:43 PM

Quote:

Originally Posted by Revan
Btw that "saving options properly" issue... Wouldnt it make more sense to put an if() around the page calculation page, saying summit liek if ($options['warn_perpage'] == 0) { $options['warn_perpage'] = 15; }, to avoid these bugs?

Added that in the latest zip. If I start trapping all those stupid errors, the code will get enormous, after all these are in the admins section, an admin should know better, but you can never count on that, can you?


All times are GMT. The time now is 12:51 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.01608 seconds
  • Memory Usage 1,774KB
  • 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_php_printable
  • (12)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