Membergroup based on STATUS

Started by TarantinoArchives, January 03, 2005, 10:25:54 AM

Previous topic - Next topic

TarantinoArchives

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

TarantinoArchives


Nidoking

I think this is a good idea. I wouldn't be able to make a mod, though.

Thantos

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.

Thantos

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.

TarantinoArchives

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

Thantos

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.

TarantinoArchives

how far are you? please tell me when you're done

Thantos

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.

TLM

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?

Peter Duggan

Because some very active members are logged in 'forever'?

[Unknown]

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]

TarantinoArchives

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

TarantinoArchives

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?

Thantos

Everything is coded.  I just need to package it up and make sure the installtion works.  I should be done tomorrow.  Been busy.

TarantinoArchives


Peter Duggan

@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.

TarantinoArchives

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

TarantinoArchives

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

Nidoking

Cool! The package should be very nice. I'll be using it as soon as the public gets a hold of it.

TarantinoArchives

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?

Thantos

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.

TarantinoArchives

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 :-)

Thantos

You can move to and from normal member groups.  Including the ungrouped members

Bushwaiter

International Vulcan Forum: http://vulcanriders.net

TarantinoArchives

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

TarantinoArchives

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? :-)

Webby

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.....

TarantinoArchives

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....

LostProphecy

ooooh this sounds like a fantastic mod *waits patiently*

Angelus Ex Quo Nox

Thantos

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

TarantinoArchives

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

Thantos

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.

TarantinoArchives

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?

Thantos


TarantinoArchives

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?

Thantos

Once I know this current part works I'll look into putting it into the normal maintenance that the forum currently does

TarantinoArchives

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 :-)

MaxD

Looks pretty cool so far, cant wait to see a full finished product. :)

TarantinoArchives

would backing up my mysql database be enough to "make sure" before i try this mod out?

Thantos

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.

TarantinoArchives

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

TarantinoArchives

#42
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?

Thantos

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

TarantinoArchives

will the members that i moved still appear under their post-based group?

Thantos

Yes, this mod does not touch the post-based groups in any way

TarantinoArchives

#46
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" :-)

Thantos

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 :)

TarantinoArchives

wow nice!
how do i update? uninstall the old, install the new? i havent moved any members yet

Thantos

In the package manager upload the file and then choose to upgrade.

TarantinoArchives

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.

Thantos

#51
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

Thantos


TarantinoArchives

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....

TarantinoArchives

installed 0_4 today, still sais 1970 in the table....

maybe it didnt correctly uninstall all files?

Thantos

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

Advertisement: