Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Mod Requests => Topic started by: TarantinoArchives on January 03, 2005, 10:25:54 AM

Title: Membergroup based on STATUS
Post by: TarantinoArchives on January 03, 2005, 10:25:54 AM
I have seen a MOD that allowed admins to create membergroups based on GENDER.

I'd like to have a feature that would allow me to group members based upon the "last online" status. I want to drop all my "last online: NEVER" members into a group. i will call it "inactives" and that would allow me to easier determine how to reactivate those, contact those or clean out those accounts.

a usergroup based on "last active: more than 12 months" ago would also be cool. so admins with huge member forums can easier sort out old accounts.

thank you
Title: Re: Membergroup based on STATUS
Post by: TarantinoArchives on January 07, 2005, 10:33:45 AM
:-( nobody wanna help me?
Title: Re: Membergroup based on STATUS
Post by: Nidoking on January 07, 2005, 02:16:12 PM
I think this is a good idea. I wouldn't be able to make a mod, though.
Title: Re: Membergroup based on STATUS
Post by: Thantos on January 07, 2005, 02:23:43 PM
I don't see this being very difficult:
Create another table to store the information
- Some ID #
- Inactivity Time
- ID_GROUP to move them to

During the forum maintenance  have it query the table for those that exceed your shortest time in that table and start reassigning member groups based off of those rules.

If its a seperate function it wouldn't be hard to make an admin link/button to do cleanup at will also.

If no one else wants it I'll do this.  It might be monday before I can get it done and tested.  Have a few other projects I want to finish up.
Title: Re: Membergroup based on STATUS
Post by: Thantos on January 07, 2005, 03:58:47 PM
Thought about this some more and it can be done without another table.  Just have to add two more columns into membergroups.  I should have the mod done tonight but it'll probably be tomorrow before I can fully test it and write the package.
Title: Re: Membergroup based on STATUS
Post by: TarantinoArchives on January 08, 2005, 07:39:23 AM
you are my personal hero.
2 options would be cool: assign new member group based upon "last active: never", and/or assign member groups based upon "last active: x time ago" x being an option of 6, 12 or 18 months or more.....

a combination of activity AND post count would also be super. because i have users with more than 200 posts that haven't been online for almost a year, and i have people with 0 posts who havent been online. i dont wanna throw them into one pot
Title: Re: Membergroup based on STATUS
Post by: Thantos on January 08, 2005, 12:11:03 PM
Are you usingi post based groups?  If so it'll be easy to do both.

Currently the mod is setup as such:
On a per group bases set a max inactivity time and a group to move them to.  If they are both non zero look at the lastlogin field and see if (time() - maxinactive) > lastlogin.  If so reassign the member's primary group to the grouped you defined.

Note that admins and global moderators will not be looked at.
Title: Re: Membergroup based on STATUS
Post by: TarantinoArchives on January 08, 2005, 12:14:06 PM
how far are you? please tell me when you're done
Title: Re: Membergroup based on STATUS
Post by: Thantos on January 08, 2005, 12:33:01 PM
I'd say I'm about half way through the coding.  That still leaves debugging and writing the package.  I'll post a link to the mod when I'm done.
Title: Re: Membergroup based on STATUS
Post by: TLM on January 09, 2005, 01:27:56 PM
Why could you not use the lastlogin (in the members table) and compute from there to a date where you deal the fall off to inactive?
Title: Re: Membergroup based on STATUS
Post by: Peter Duggan on January 09, 2005, 03:16:23 PM
Because some very active members are logged in 'forever'?
Title: Re: Membergroup based on STATUS
Post by: [Unknown] on January 10, 2005, 05:09:00 AM
Quote from: Peter Duggan on January 09, 2005, 03:16:23 PM
Because some very active members are logged in 'forever'?

No, lastLogin is updated periodically and is where the "last active" notice in your profile comes from.

-[Unknown]
Title: Re: Membergroup based on STATUS
Post by: TarantinoArchives on January 10, 2005, 08:17:21 AM
i think that's what we're aiming at, the "last active: xxx ".
so if it sais "last active: NEVER" its an inactive user and if it sais "last active: october 10 2001" it's also an inactive user, at least its somebody who has been online at all, some time in the past.

"last active: never" users are most likely some, who never were online after you switched from YaBB to SMF
Title: Re: Membergroup based on STATUS
Post by: TarantinoArchives on January 12, 2005, 09:28:34 AM
Quote from: MikeMill on January 08, 2005, 12:33:01 PM
I'd say I'm about half way through the coding.  That still leaves debugging and writing the package.  I'll post a link to the mod when I'm done.

hi mike. what's the status?
Title: Re: Membergroup based on STATUS
Post by: Thantos on January 12, 2005, 10:34:20 PM
Everything is coded.  I just need to package it up and make sure the installtion works.  I should be done tomorrow.  Been busy.
Title: Re: Membergroup based on STATUS
Post by: TarantinoArchives on January 15, 2005, 07:58:35 AM
cant wait :-)
Title: Re: Membergroup based on STATUS
Post by: Peter Duggan on January 15, 2005, 03:27:23 PM
@TarantinoArchives

Please understand that, while you're understandably anxious to get hold of this, you'll simply have to wait till it's ready. Now, I'm sure MikeMill hasn't forgotten you and will be back in touch when it is, but this kind of repeated 'bumping' achieves nothing except putting the people who are trying to help you under unnecessary pressure and possibly even putting them off because of that.
Title: Re: Membergroup based on STATUS
Post by: TarantinoArchives on January 15, 2005, 04:02:00 PM
Quote from: Peter Duggan on January 15, 2005, 03:27:23 PM
@TarantinoArchives

Please understand that, while you're understandably anxious to get hold of this, you'll simply have to wait till it's ready. Now, I'm sure MikeMill hasn't forgotten you and will be back in touch when it is, but this kind of repeated 'bumping' achieves nothing except putting the people who are trying to help you under unnecessary pressure and possibly even putting them off because of that.

yeah you're right.  i'm just overexcited. be cool
Title: Re: Membergroup based on STATUS
Post by: TarantinoArchives on January 17, 2005, 10:20:06 AM
Mike sent me the language files today, which I translated to German.
He sais he is currently in the process of packaging this Mod.

Everyone please say "hooray for mike!". thank you
Title: Re: Membergroup based on STATUS
Post by: Nidoking on January 17, 2005, 01:58:56 PM
Cool! The package should be very nice. I'll be using it as soon as the public gets a hold of it.
Title: Re: Membergroup based on STATUS
Post by: TarantinoArchives on January 27, 2005, 10:54:09 AM
Quote from: MikeMill on January 08, 2005, 12:11:03 PM
Are you usingi post based groups?  If so it'll be easy to do both.

Currently the mod is setup as such:
On a per group bases set a max inactivity time and a group to move them to.  If they are both non zero look at the lastlogin field and see if (time() - maxinactive) > lastlogin.  If so reassign the member's primary group to the grouped you defined.

Note that admins and global moderators will not be looked at.

will this mod be a per-click function or will people automatically get assigned to groups as you defined the rule?
Title: Re: Membergroup based on STATUS
Post by: Thantos on January 27, 2005, 01:04:03 PM
Sorry for the delay.  Classes just started so I'm running around trying to get everything arranged (classes, club times, tutoring times, etc).  I'll have the installtion package done this weekend.

Way it works ATM which I hope to change in the future to a more user friendly setup:
You setup a rule to move a person from group A to group B based off of the number of posts and then how long they have been inactive.  You can not move to or from post based groups, admin, global moderator, or moderator groups.

Example:
You have a group called Regulars, Super Regulars, Inactive, Super Inactive

A rule could be setup as such:

From                To                    Min Posts   Max Posts     Inactive # days
Regulars          Inactive           0                 10                 20
Inactive           Super Inactive 0                  MAX             100

Substuite MAX for the max number of posts (I give the number on the rule creation page)

So if a regular member that has between 0 and 10 posts (inclusive) has been inactive for 20 days they'll be moved to the Inactive group.

If a member from inactive with any number of posts has been inactive for 100 days they get moved to the super inactive group.

I also have a checkbox to save their membergroups.  If its checked the primary group gets added to the secondary groups otherwise the primary group is overwritten and the secondary groups are removed.

Additionally for a given group the posts ranges can not overlap.

Currently you have to manually proccess the rules by clicking on a button.  At that time it'll look at the members to see who falls into what rule and then moves them.

Also the rule only looks at the primary group to determine if they fall into a particular rule or not.
Title: Re: Membergroup based on STATUS
Post by: TarantinoArchives on January 27, 2005, 04:35:42 PM
Quote from: MikeMill on January 27, 2005, 01:04:03 PM
You can not move to or from post based groups,....

from what then?
:-)

dont worry, take your time. i am in college also and in deep latin trouble :-)
Title: Re: Membergroup based on STATUS
Post by: Thantos on January 27, 2005, 06:55:47 PM
You can move to and from normal member groups.  Including the ungrouped members
Title: Re: Membergroup based on STATUS
Post by: Bushwaiter on February 06, 2005, 05:23:53 PM
Is the mod ready?

gr.

Bushwaiter
Title: Re: Membergroup based on STATUS
Post by: TarantinoArchives on February 07, 2005, 08:32:13 AM
i think mike will post the mod as soon as he has the time (from college or whatever) to finish packaging it. i also can't wait to use this mod
Title: Re: Membergroup based on STATUS
Post by: TarantinoArchives on March 01, 2005, 10:42:59 AM
mike sent me the finished mod. but he hasn't packaged it because he has problems with the package installer in SMF.
and its hard to contact mike.
seems like he is very busy with college stuff. maybe someone else could finish mike's job? :-)
Title: Re: Membergroup based on STATUS
Post by: Webby on March 10, 2005, 09:14:30 AM
Any updates on this ?

I would like to have something like this or at least a query to put members who haven't logged in for say 6 months, to another membergroup I made "Inactive members", so I could send them an e-mail or something.....
Title: Re: Membergroup based on STATUS
Post by: TarantinoArchives on March 10, 2005, 01:35:53 PM
like i said, MikeMill has sent me the finished mod but he sais there is no installer for it because he has not time working on the problems with the package manager.

and he wont answer my PMs....
Title: Re: Membergroup based on STATUS
Post by: LostProphecy on March 17, 2005, 07:11:43 AM
ooooh this sounds like a fantastic mod *waits patiently*

Title: Re: Membergroup based on STATUS
Post by: Thantos on March 28, 2005, 02:59:25 AM
First I'd like to tuely and deeply apoligize for the amount of time it took to get to this point.  I would go into details but honestly it doesn't matter.

Second I'd like to point out THIS MOD IS IN EVERY SENSE OF THE WORD BETA

I ended up rewriting it from what I had before because well it was crap and I've learned much since then.

This current version doesn't do a lot of hand holding on your part.

Please let me know of any bugs ASAP either here, at http://www.mikemill.org/board/index.php?topic=14.0, or at [email protected]

I don't consider this mod ready for release on the Mod's forum so I'll post a link to a download page
http://www.mikemill.org/board/index.php?topic=14.0

I hope it is of some use.

Note:  If anyone wants to translate I am fairly certain I made all displays use the $txt variable and all the indexes can be found in Modifications.english.php
Title: Re: Membergroup based on STATUS
Post by: TarantinoArchives on March 31, 2005, 07:48:52 AM
have you tested it? how stable is it? i have a fairly large board..... are there backup-procedures so that i could "undo" everything the mod made?

if someone has a testing board, i'd be glad to hear some "reviews" of this very much anticipated mod, before i use it on my main board
Title: Re: Membergroup based on STATUS
Post by: Thantos on March 31, 2005, 04:34:05 PM
Quotehave you tested it? how stable is it?
I have tested it on my test forum.  It was stable for me of course I wasn't really trying to break it.

Quoteare there backup-procedures so that i could "undo" everything the mod made?
The mod is un-installable.  Their isn't an "undo" option for the changes to the member's groups after they have been changed.  I would recommend backing up {$db_prefix}members before trying it out

To process the rules (and move the member's group) there is a screen that will display all the inactive members, what group they are in, where they are going, etc.  It uses the exact same query as the processing page.  So you can see who's gonna move and you can use that page to determine if it's correctly getting the right members.

As long as you don't actually process the rules then it won't change any table except the one the mod installed.
Title: Re: Membergroup based on STATUS
Post by: TarantinoArchives on April 01, 2005, 02:22:21 AM
another question (I think i've asked you that already some weeks ago):

after i've applied the rule and moved the members, lets say some days later another member gets inactive and "falls" into one of the rules, is he automatically moved then? or is this mod a manual thing?
Title: Re: Membergroup based on STATUS
Post by: Thantos on April 01, 2005, 09:42:12 AM
This is a manual process.
Title: Re: Membergroup based on STATUS
Post by: TarantinoArchives on April 01, 2005, 09:44:51 AM
Quote from: MikeMill on April 01, 2005, 09:42:12 AM
This is a manual process.

:-[

can't it be done like a standard membergroup criteria (like post counts etc) where members are just in the group you set the rules for?
Title: Re: Membergroup based on STATUS
Post by: Thantos on April 01, 2005, 09:47:27 AM
Once I know this current part works I'll look into putting it into the normal maintenance that the forum currently does
Title: Re: Membergroup based on STATUS
Post by: TarantinoArchives on April 01, 2005, 09:49:38 AM
Quote from: MikeMill on April 01, 2005, 09:47:27 AM
Once I know this current part works I'll look into putting it into the normal maintenance that the forum currently does

..because that would be what could make this mod great, if you could set it up just like any other membergroup criteria that is standard in SMF.
so you dont have to run that mod of yours every week or so :-)
Title: Re: Membergroup based on STATUS
Post by: MaxD on April 01, 2005, 11:59:28 PM
Looks pretty cool so far, cant wait to see a full finished product. :)
Title: Re: Membergroup based on STATUS
Post by: TarantinoArchives on April 02, 2005, 08:08:13 AM
would backing up my mysql database be enough to "make sure" before i try this mod out?
Title: Re: Membergroup based on STATUS
Post by: Thantos on April 02, 2005, 09:38:54 AM
What I would do:
Find the low period in traffic for your board.  During this time put the board in maintenance mode, backup the database, install the mod, create your rules, see what happens.  If it goes well then just take it out of maintenance mode, if not then restore the database.  Take the board out of maintenance mode.  Make sure you let me know if there are any problems.

To process the rules you have to go to the view inactive members page so that will be a good way to see if its going to work or not.
Title: Re: Membergroup based on STATUS
Post by: TarantinoArchives on April 02, 2005, 11:30:49 AM
test #1
Installation
worked flawlessy. now testing rules.....

test #2
creating rule posts 0 max posts 0 days 400 remember group YES

result:
i get a large table with all the inactive members but

Member's Name     From Group               To Group                  Last On                                   Number of Posts     Rule's ID
johndoe         Ungrouped Members    Inactives (No posts)    January 01, 1970, 01:00:00 am    0                        1

but the problem is,
last on: 1970 jan 01, 1 am is shown with EVERY member
Title: Re: Membergroup based on STATUS
Post by: TarantinoArchives on April 02, 2005, 11:33:59 AM
i should add, that all the members that are sorted out by this rule, have in their profile "last online: NEVER"
so is that january 1 1970 the oldes possible SMF date :-)

so that's not really a bug. i turned the days down to 100 or so and now those "not so long inactive" ones turn out with correct dates shown.

what exactly does "save the member's groups" do?
Title: Re: Membergroup based on STATUS
Post by: Thantos on April 02, 2005, 12:40:09 PM
Ok the Jan 01 date is the epoch which means the unix timestamp is 0.  I'll change it so that it says never

The save group option does this:
If set:  move the member's primary group to the additionalGroups field and also preserve the additionalGroups
If not set: Overwrites the member's primary group and clears the additionalGroups
Title: Re: Membergroup based on STATUS
Post by: TarantinoArchives on April 03, 2005, 07:51:53 AM
will the members that i moved still appear under their post-based group?
Title: Re: Membergroup based on STATUS
Post by: Thantos on April 03, 2005, 12:16:21 PM
Yes, this mod does not touch the post-based groups in any way
Title: Re: Membergroup based on STATUS
Post by: TarantinoArchives on April 03, 2005, 12:32:28 PM
Is there a tutorial or a readme to this mod?
I know I translated some stuff for you some months ago on that. For other users to check out, you know?

looking forward to the "next version" :-)
Title: Re: Membergroup based on STATUS
Post by: Thantos on April 03, 2005, 09:56:09 PM
Version 0.2 is up
http://www.mikemill.org/board/index.php?topic=14.0

Quote
Version: 0.2
  - This is a BETA version.  If you find any errors please let me know at the email above.
  - Removed the maxPost fields.  Now all that is required is the minium number of posts
  - If a user has never logged in it should no longer say they last logged in January 01, 1970, 01:00:00 am but should instead say Never
  - Changed it so that the from group and to group can not be the same
  - If you uninstall the mod is should correctly remove Inactive.php and Inactive.template.php
  - Actually Remembered to package this readme file :)
Title: Re: Membergroup based on STATUS
Post by: TarantinoArchives on April 04, 2005, 08:08:52 AM
wow nice!
how do i update? uninstall the old, install the new? i havent moved any members yet
Title: Re: Membergroup based on STATUS
Post by: Thantos on April 04, 2005, 09:48:03 AM
In the package manager upload the file and then choose to upgrade.
Title: Re: Membergroup based on STATUS
Post by: TarantinoArchives on April 05, 2005, 08:32:39 AM
why did you remove the MaxPosts?
what if i want to distinguis between a user 0 posts and online:Never and a users 1000 posts and online: never?

I get this error when "view and process":

Quote
Table 'usr_web2_1.smf_members' doesn't exist
File: /var/www/web2/html/forum/Sources/Inactive.php
Line: 259

Note: It appears that your database may require an upgrade. Your forum files are currently at version SMF 1.0.3, whereas your database is at version SMF 1.0. It is recommended that you execute the latest version of upgrade.php.
Title: Re: Membergroup based on STATUS
Post by: Thantos on April 05, 2005, 11:18:03 AM
I removed maxPosts because it was put in as a work around. 
Quotewhat if i want to distinguis between a user 0 posts and online:Never and a users 1000 posts and online: never?
Well first off how can someone with 1000 posts have a last on as never?  If you want to distinguish between a 0 post member and a 1000 post member create two rules, one with 0 min and one with 1000 min.

As for your error:  Grumble I figured it out.  New version coming out in an hour or so.

Also I'll be changing it so that you can have the fromgroup be the same as the togroup as a DO NOTHING action
Title: Re: Membergroup based on STATUS
Post by: Thantos on April 05, 2005, 12:33:46 PM
http://mods.simplemachines.org/index.php?mod=116
Title: Re: Membergroup based on STATUS
Post by: TarantinoArchives on April 06, 2005, 08:24:20 AM
Quote from: MikeMill on April 05, 2005, 11:18:03 AM
Well first off how can someone with 1000 posts have a last on as never? 

if you transfer from YaBBSE to SMF....
Title: Re: Membergroup based on STATUS
Post by: TarantinoArchives on April 06, 2005, 08:58:00 AM
installed 0_4 today, still sais 1970 in the table....

maybe it didnt correctly uninstall all files?
Title: Re: Membergroup based on STATUS
Post by: Thantos on April 06, 2005, 02:53:04 PM
Could one of the moderators do me a favor and lock this topic?  Since the mod is out of request stage and in the released / bug fix stage it would be easier if discussion was kept to the mod's topic.

Thanks