vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Administrative and Maintenance Tools - Users Cleanup (https://vborg.vbsupport.ru/showthread.php?t=244707)

phr4nk13 03-21-2011 06:30 PM

I didn't remove the table prefix, i added it. That ist the errormessage onli with this option "User has never posted (also count in social groups and blogs)" selectet and clicked on "test":


Quote:

Datenbankfehler in vBulletin 4.1.2:

Invalid SQL:
SELECT
`user`.*
FROM
vb_user AS user
LEFT JOIN vb_groupmessage ON `groupmessage`.postuserid = `user`.userid
LEFT JOIN vb_blog_text ON `blog_text`.bloguserid = `user`.userid
WHERE
`user`.`posts` = 0 AND `groupmessage`.gmid IS NULL AND `blog_text`.blogtextid IS NULL AND `user`.`userid` NOT IN (0);

MySQL-Fehler : Unknown column 'groupmessage.gmid' in 'where clause'
Fehler-Nr. : 1054
Fehler-Zeit : Monday, 21.03.2011 @ 20:23:28
Datum : Monday, 21.03.2011 @ 20:23:28
Skript : vbroot/admincp/users_cleanup.php?do=test
Referrer : vbroot/admincp/users_cleanup.php?do=add
IP-Adresse : xXx
Benutzername : xXx
Klassenname : vB_Database
MySQL-Version : 5.1.43-nmm4-log
I was first trying to hardcode the prefix. Than i got the variable to work.

That are the only lines i changed:

Code:

// social groups
                $join[] = 'LEFT JOIN ' . TABLE_PREFIX . 'groupmessage ON ' . TABLE_PREFIX .'groupmessage.postuserid = `user`.userid';
                $where[] = TABLE_PREFIX .'groupmessage.gmid IS NULL';

                // blog
                if ($vbulletin->products['vbblog'])
                {
                    $join[] = 'LEFT JOIN ' . TABLE_PREFIX . 'blog_text ON ' . TABLE_PREFIX .'blog_text.bloguserid = `user`.userid';
                    $where[] = TABLE_PREFIX .'blog_text.blogtextid IS NULL';
                }
                break;


BadgerDog 03-21-2011 06:36 PM

Does the last few posts mean there's a problem with the mod and we should put it's use on hold for now? :confused:

Thanks ... :)

Regards,
Doug

phr4nk13 03-21-2011 06:44 PM

Thats only a problem at my installation (atm) and the last option selected. If you push "test" you can try it yourself. All other options working fine for me.

Vitaly 03-21-2011 07:05 PM

Thanks again for your efforts. Try 0.4 updated version.

phr4nk13 03-21-2011 07:14 PM

Yay it works. Thanks :)

And now my question from above: Is there a chance to include custom profilefields in the options?

Vitaly 03-21-2011 07:23 PM

Chances are a bit less than zero :) . But if you could explain, why this required for my progect, or at least to hundreds of vborg visitors - somerthing can change.

combs 03-23-2011 02:22 PM

OK...this is a lifesaver...great plugin! I had about 100K in posts and pruning would just cause time out. so I used this and was able to prune users by certain post counts. If the list of users list was too large it wouldn't work but it's an enormous list of users...so I just had to shorten the distance in posts.

After doing that I ran SQL Query of DELETE FROM post WHERE userid = 0 to get rid of all the posts from users who were turned into guests. Updated all counters and I accomplished what I have been trying to do for about a month.

I'm nominating for MOTM!

Merriweather 04-04-2011 03:10 AM

Installed on 4.1.2 but getting the same issue as a previous user - db error when I choose "User has never posted (also count in social groups and blogs)."

The error is:

Quote:

Database error in vBulletin 4.1.2:

Invalid SQL:
SELECT
`user`.*
FROM
user AS user
LEFT JOIN groupmessage AS groupmessage ON `groupmessage`.postuserid = `user`.userid
LEFT JOIN blog_text AS blog_text ON `blog_text`.bloguserid = `user`.userid
WHERE
`user`.`lastactivity` < 1270354181 AND `user`.`usergroupid` = 2 AND `user`.`posts` = 0 AND `groupmessage`.gmid IS NULL AND `blog_text`.blogtextid IS NULL AND `user`.`userid` NOT IN (0);

MySQL Error : The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
Error Number : 1104
Request Date : Sunday, April 3rd 2011 @ 09:09:41 PM
Error Date : Sunday, April 3rd 2011 @ 09:09:41 PM
Script : http://www.mysite.com/admincp/users_cleanup.php?do=test
Referrer : http://www.mysite.com/admincp/users_cleanup.php?do=add
IP Address : 76.28.215.148
Username : MyUserName
Classname : vB_Database
MySQL Version : 5.0.51a-24+lenny5-log

Vitaly 04-05-2011 05:48 PM

Seems to be mysql 5.0 bug http://www.zen-cart.com/forum/showpo...14&postcount=4

Try to insert
PHP Code:

$db->query_write("SET OPTION SQL_BIG_SELECTS=1"); 

BEFORE that line

https://github.com/rcdesign/vb-users...eanup.php#L151

and tell me result + how many visitors registered on your forum.

Kraxell 04-09-2011 04:37 PM

Hello,

i have installed this plugin but if a run the task, its nothing happen. any idea?


All times are GMT. The time now is 12:48 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.01929 seconds
  • Memory Usage 1,745KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (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