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)

Rhoads 01-23-2005 02:18 PM

No, I am no coder hehe.
I wondered myself it was possible to do.
Thnx anyway

sv1cec 01-25-2005 08:11 AM

Quote:

Originally Posted by drl2005
No, I am no coder hehe.
I wondered myself it was possible to do.
Thnx anyway

If you do not mind the fact that the button will not say "Warn John" but "Warn User" (without the user name), I can do it for you

Rgds

sv1cec 01-25-2005 08:15 AM

Can someone send me that part of the private.php file, I asked for, a couple of posts back?

Rgds

Rhoads 01-25-2005 08:50 AM

Quote:

Originally Posted by sv1cec
If you do not mind the fact that the button will not say "Warn John" but "Warn User" (without the user name), I can do it for you

Rgds

Yes why not, when you press on the button you can see the user who you warned , ;)

GoranTornqvist 01-25-2005 11:50 AM

Hello, I've just installed AWS "by the book", version 3.1.2
I get the following errors in admincp:
When clicking Statistics - Bans per User:

/admincp/admin_warn.php

Database error in vBulletin 3.0.6:

Invalid SQL: select b.*, u.*, a.username AS warner, w.*, wt.* from ban_dates as b
LEFT JOIN user AS u ON(u.userid = b.banned_user)
LEFT JOIN user AS a ON(a.userid = b.banned_by)
LEFT JOIN warnings AS w ON(w.wid = b.banned_warning)
LEFT JOIN warning_types AS wt ON(wt.tid = w.warned_warning_id)
ORDER BY b.banned_user, b.banned_ban LIMIT 0,
mysql error: You have an error in your SQL syntax.

When clicking Statistics - Warnings per User

/admincp/admin_warn.php

Invalid SQL: select * from
user u where warnings>0 ORDER BY userid ASC LIMIT 0,
mysql error: You have an error in your SQL syntax.

Looks like the $perpage variable isn't set for some reason, see LIMIT 0,
A bug?
What should I check for?
Thanks for any info :)

Delphiprogrammi 01-25-2005 12:05 PM

no that can't be a bug why ? because it works in here probably you have a typo somewhere also if you have bans already already you must run the included update_bandates.php script

PHP Code:

$get_bans=$DB_site->query("select b.*, u.*, a.username AS warner, w.*, wt.*  from ".TABLE_PREFIX."ban_dates as b
    LEFT JOIN " 
TABLE_PREFIX "user AS u ON(u.userid = b.banned_user) 
    LEFT JOIN " 
TABLE_PREFIX "user AS a ON(a.userid = b.banned_by) 
    LEFT JOIN " 
TABLE_PREFIX "warnings AS w ON(w.wid = b.banned_warning)
    LEFT JOIN " 
TABLE_PREFIX "warning_types AS wt ON(wt.tid = w.warned_warning_id)
    ORDER BY 
$orderby LIMIT $startat$perpage"); 


GoranTornqvist 01-25-2005 01:17 PM

Already run /admincp/update_ban_dates.php before.

This is weird, if I add this row, just before the code you specified above:
$perpage = 10;

it works!!!

so the $perpage does indeed loose its value somewhere...maybe a typo, I don't know.

$perpage=$warn_opts['warnings_per_page'];
echo "warnings_per_page=".$warn_opts['warnings_per_page']."<br>";

Told me that $warn_opts['warnings_per_page'] is empty. Where is this variable declared, assigned?

Any other ideas?

sv1cec 01-25-2005 01:24 PM

Quote:

Originally Posted by Delphiprogrammi
no that can't be a bug why ? because it works in here probably you have a typo somewhere also if you have bans already already you must run the included update_bandates.php script

PHP Code:

$get_bans=$DB_site->query("select b.*, u.*, a.username AS warner, w.*, wt.*  from ".TABLE_PREFIX."ban_dates as b
    LEFT JOIN " 
TABLE_PREFIX "user AS u ON(u.userid = b.banned_user) 
    LEFT JOIN " 
TABLE_PREFIX "user AS a ON(a.userid = b.banned_by) 
    LEFT JOIN " 
TABLE_PREFIX "warnings AS w ON(w.wid = b.banned_warning)
    LEFT JOIN " 
TABLE_PREFIX "warning_types AS wt ON(wt.tid = w.warned_warning_id)
    ORDER BY 
$orderby LIMIT $startat$perpage"); 


I do not think it is a bug, and I do not think it is a typo, the reason is that admin_warn.php is not a file the user edits, it is in the zip file. And it can't by a bug, because, as Delphi says, it works elsewhere.

Check your warning_options table in your database to see what value it has in that column. If it has nothing, set it from the AWS Options and check again.

BUT: I would strongly advise that you download and install the latest version. Use the uninstaller to uninstall the previous one, and then run the install_warn.php file again, from the newest version (I'll be uploading version 3.1.3 in a few minutes).

GoranTornqvist 01-25-2005 01:30 PM

Hmm...wtf?!? :)
My warning_options table is empty...how could that be...gaaaah!!!

I'll try reinstalling it.

EDIT: thanks for the help :)

GoranTornqvist 01-25-2005 01:35 PM

Allrighty...now it works...must have missed some part in the installation.
But the installationprocedure was no picknick, a lot of messing around in the code :) , and I'm no newbie...it would be great to have a more simple installation. Anyway, thanks for the help.


All times are GMT. The time now is 01:08 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.02009 seconds
  • Memory Usage 1,758KB
  • 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
  • (3)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