Page Index Toggle Pages: 1
Topic Tools
Normal Topic user administration maintenance (Read 1,147 times)
dkruitz
YaBB Newcomer
*
Offline



Posts: 6
user administration maintenance
Sep 27th, 2010 at 5:44pm
Post Tools
Hi all, I've been using Yabb for about 2 years now with the public boards on my club's site.  Have noticed we have a bunch of users that may be spambots, and some users that posted once then never came back.  We have 2800 users registered on the board and I wondered if there were scripts or an easy way to ID, for example) folks who hadn't logged on in a year and/or maybe had zero posts?

I'm not a php scripter so that would be new ground for me.
  
Back to top
 
IP Logged
 
Captain John
Ex Member


Re: user administration maintenance
Reply #1 - Sep 27th, 2010 at 7:14pm
Post Tools
dkruitz wrote on Sep 27th, 2010 at 5:44pm:
I'm not a php scripter

  Neither are we ... YaBB is written in Perl.

  You don't state what version of YaBB your running on your forum.
In Y2.4 and Y2.5, simply go to the Admin Center - Members Control - View/Delete Members and use options available  (See attachment)
  

DeleteMembrs.jpg ( 12 KB | 36 Downloads )
DeleteMembrs.jpg
Back to top
 
IP Logged
 
dkruitz
YaBB Newcomer
*
Offline



Posts: 6
Re: user administration maintenance
Reply #2 - Sep 27th, 2010 at 7:26pm
Post Tools
Quote:
Neither are we ... YaBB is written in Perl.


Ha!  You got me there.  DOH, I'm getting my web apps mixed up now.  We're on 2.4 about to try 2.5.  I do some admin on the site, the webmaster is doing the back end of it.

I know about that Delete feature, just wondered if there was a handy-dandy way to remove based on rules/criteria.  No big deal if there isn't I just figured someone probably already ran into that before me.

Thanks!
  
Back to top
 
IP Logged
 
The Boy
Full Member
***
Offline



Posts: 365
Location: UK
Re: user administration maintenance
Reply #3 - Oct 3rd, 2010 at 8:17pm
Post Tools
Would be easy enough to write a shell script to look through each members .vars file, calculate from Last Online and Postcount settings, and produce a list for manual deletion (could be dangerous to autodelete from a shell script without fixing the members indexes).

I'd post one up, but Captain John would tell me off again for manipulating YaBB's files  Roll Eyes   Grin
  
Back to top
WWW  
IP Logged
 
JonB
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 4,036
Location: Land of the Blazing Sun!

YaBB 2.6.1
Re: user administration maintenance
Reply #4 - Oct 4th, 2010 at 12:49am
Post Tools
@ The Boy -

You could certainly post that script on BaordMod - that's what its for - there's prolly other admins that would like it as well.

Good Luck

Cool
« Last Edit: Oct 4th, 2010 at 12:50am by JonB »  

I find your lack of faith disturbing.
Back to top
IP Logged
 
The Boy
Full Member
***
Offline



Posts: 365
Location: UK
Re: user administration maintenance
Reply #5 - Oct 4th, 2010 at 11:18am
Post Tools
Well, if anyone can make use of it, here it is (bit rough and ready - I had it as a cgi, so have quickly modified to be a straight shell script)

Code
Select All
#/usr/bin/ksh -p
#set -x
# Check the 2 parameters are present
if [ "$1" == "" -o "$2" == "" ]
then
        echo Usage:
        echo inactiveusers.sh 365 50
        echo where 365=days and 50=posts
        exit 1
fi

FORUM_BASE=/var/www/www.omegaowners.com/html/forum
FORUM_MEMBERS=${FORUM_BASE}/Members
DAY=$1
POSTCOUNT=$2

DATE_COMPARE=`expr ${DAY} \* 60 \* 60 \* 24`
DATE_CURRENT=`date +%s`

for i in  `ls -1 ${FORUM_MEMBERS}/*.vars`
do

        DATE_ONLINE=`grep lastonline ${i} | awk -F\" {'print $2'}`
        if [ "$DATE_ONLINE" == "" ]
        then
                DATE_ONLINE=0
        fi
        DATE_CALC=`expr ${DATE_CURRENT} - ${DATE_ONLINE}`
        if [ "${DATE_CALC}" -gt "${DATE_COMPARE}" ];
        then
                CURRENT_POSTCOUNT=`grep postcount ${i} | awk -F\" {'print $2'}`
                if [ "${POSTCOUNT}" -gt "${CURRENT_POSTCOUNT}" ];
                then
                        echo `basename $i` `grep realname ${i} | awk -F\" {'print $2'}` `expr ${DATE_CALC} \/ 60 \/ 60 \/ 24` `grep postcount ${i} | awk -F\" {'print $2'}`
                fi
        fi
done



# END

exit 0
 

« Last Edit: Oct 4th, 2010 at 11:21am by The Boy »  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Topic Tools