vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Hunt out Inactive Users (https://vborg.vbsupport.ru/showthread.php?t=38448)

Takara 05-08-2002 10:00 PM

Hunt out Inactive Users
 
I made this cause someone asked for it in the requests. I'm not even sure if it counts as a hack (just two lines of code to hack :p)!

Basically you plop the inactiveusers.php down in your admin dir. It will list all your users, show important info such as When they were last active, when they last posted, when they joined etc.
If they havent posted at all, and have been a user for more than 3 days (you can specify how many days) then it will say they are inactive! And if you click the "YES!" link (under the Inactive? column) it will let you delete the person (it prompts you first).

You can add a link to the admin CP. Here are the 'full' steps on how to install the 'hack':

Step One: open index.php in your admin folder

Find:
PHP Code:

makenavoption("Build Mailing List","email.php?action=genlist"); 

REPLACE WITH:
PHP Code:

makenavoption("Build Mailing List","email.php?action=genlist","<br>");
makenavoption("Find Inactive Users","inactiveusers.php?"); 

Step Two:
Copy inactiveusers.php (attached below) into your admin folder

And you're done! hard, eh ;p
I was going to add the option to specifiy how many users per page since this would be bad for larger forums. But I couldnt figure it out. If anyone wants to give me a hand with that I would appreciate it.

Have fun ^_^ :bunny:

[EDIT: This hack is really old, and currently nothing (other than stuff on the first page) is added in this hack. I'll update this soon with something new for you guys with mods form this thread. Aswell there was a small update on post #29, go here for the update: https://vborg.vbsupport.ru/showthrea...719#post249719 ]

Takara 05-09-2002 04:50 AM

Screen shot ^-^

scsa20 05-09-2002 04:55 AM

thanks :D

Admin 05-09-2002 04:58 AM

Nice, could be useful.

Takara 05-09-2002 05:03 AM

Could be, but there is that problem of it loading all 10 000 users on one page (for you Fire), lol. Do you think you could direct me in the right direction on how to add 'pages' for this hack? I took a look but got confused @_@;

Aswell I used your instructions on how to do alternating table columns ^_^ thanks

Admin 05-09-2002 05:10 AM

Check out icon.php there's some pagination code there.

Takara 05-09-2002 05:12 AM

Thanks :)

I'll take a look at it and see if I can manage to put something together, hehe.

dadymac 05-09-2002 05:14 AM

oh man, u just made my life a million times easier

SaintDog 05-09-2002 05:36 AM

Nice hack, no matter how small, it plays a pretty good role in forum management. Many forums could benifit from this hack, I know when I actually get around to finishing my community and releasing it, I will be using this as I can not stand having people take up database space if they have no actual intention of posting.

Nice Work, I knew someone would finally get around to doing it ;).

- SaintDog

Slynderdale 05-09-2002 05:39 AM

Quote:

Originally posted by SaintDog
Nice hack, no matter how small, it plays a pretty good role in forum management. Many forums could benifit from this hack, I know when I actually get around to finishing my community and releasing it, I will be using this as I can not stand having people take up database space if they have no actual intention of posting.

Nice Work, I knew someone would finally get around to doing it ;).

- SaintDog


Just do what i do, bug the heck out of them till they start posting, works for me lol

adtestvb 05-09-2002 06:11 AM

sweet, thanks

Takara 05-09-2002 06:19 AM

Quote:

Originally posted by Slynderdale
Just do what i do, bug the heck out of them till they start posting, works for me lol [/B]
I hate you >:|

lol, jk ;)

Boofo 05-09-2002 06:36 AM

Found a problem. It shows the exact same date and time for the last post of anyone who has ever posted.

Takara 05-09-2002 06:53 AM

eurgh, I cant make anything without it having atleast one bug ;p

Just re-download the php file attached above >.< I updated it.

Admin 05-09-2002 09:35 AM

Code looks the same to me...

KuraFire 05-09-2002 10:18 AM

What exactly does this hack do, except list all users and give an indication if they are inactive???

Does it allow you to delete all inactive ones with one click? Or send a mail to all of the inactive ones???

djr 05-09-2002 10:22 AM

@ Firefly: I was going to ask the exact same thing :-)
@ Takara: Also, can you make it where you have the option to e-mail all the inactive users so they know they will be deleted in say one week. Last warning note or something :-)

- djr

ceo_tfw 05-09-2002 11:26 AM

this is more like a visual addition to your adminCP that allows you to see members that NEVER post or inactive. there is also a quick delete user (YES) at the end of the query

I find this a brilliant addition

inetd 05-09-2002 12:40 PM

How make to Super Moderators can use this hack?

ceo_tfw 05-09-2002 12:52 PM

As far as I know the administrator of the forum & website have to give you administrative permissions to the forum you are querying about to access the control panel, however if this person knows you and trusts you then it will work with this additionÂ…Â…?

however there might be another way, not to sure

scsa20 05-09-2002 01:01 PM

you basicly do the same why as you installed it for the admin cp but in the mod cp ;)

Frank 05-09-2002 01:27 PM

Nice hack :)

inetd 05-09-2002 01:31 PM

I need next:
If the user did not come on a forum of XX days, irrespective of quantity of his reports - he inactive
If at the user of 0 reports - he too inactive

Help me.

Siggi 05-09-2002 02:14 PM

:D :D :D :D Nice hack :D :D :D

:bandit: :bandit: THX :bandit: :bandit:

bonnmac 05-09-2002 02:59 PM

Very nice... thanks :)

NTLDR 05-09-2002 06:05 PM

Another usefull and good adition for my board Takara, many thanks :D

Takara 05-09-2002 06:49 PM

Just to clear it up for some people.

What it does is lists every user on your forums. If the user has NEVER posted, and the user has been a member of your forums for 3 days (you can change that specific amount of days) then it tells you they are inactive. If you click the 'YES!' link, indicating they are inactive, you can delete that person.

And Firefly, yea the code was the same, lol. <-- stupid :bunny:

Takara 05-09-2002 07:04 PM

Quote:

Originally posted by inetd
How make to Super Moderators can use this hack?
Well, it wasnt made for non admins.. It uses the cpheader(); and in there it requires you to be have access to the control panel. I'm not aware of any supermoderatorheader();

lol

Takara 05-09-2002 07:09 PM

Quote:

Originally posted by inetd
I need next:
If the user did not come on a forum of XX days, irrespective of quantity of his reports - he inactive
If at the user of 0 reports - he too inactive


Help me.

lol, what a very nice request ;p

Anyway, find this in the inactiveusers.php
PHP Code:

    $isinactive=$ddate-$row["joindate"];
    if ((
$row["lastpost"]==0)&&($isinactive>$timeactive)) {
        
$yninactive="<font color=\"#FF0000\"><a href=\"user.php?s=$session[sessionhash]&action=remove&userid=".$row["userid"]."\" target='_blank'>YES!</a></font>";
    } else {
        
$yninactive="No</font>";
    } 

if you just take out the $row["lastpost"]==0 part it will do what you want (thought I'm not sure what you mean by.. 'too inactive'.

So replace the code above with:
PHP Code:

    $isinactive=$ddate-$row["joindate"];
    if (
$isinactive>$timeactive) {
        
$yninactive="<font color=\"#FF0000\"><a href=\"user.php?s=$session[sessionhash]&action=remove&userid=".$row["userid"]."\" target='_blank'>YES!</a></font>";
    } else {
        
$yninactive="No</font>";
    } 

That auta do it. But I attached the updated file for you.

ZiRu$ 05-09-2002 07:47 PM

beautiful! I requested something like this

TECK 05-09-2002 07:48 PM

takara, good job :)
not sure, but does it email automatically the user if deleted?
i dont know if this is default in VB... :)

Takara 05-09-2002 07:55 PM

uuummm, I'm not really sure you know. It uses vB's built in deleting functions. I was going to add an option to be able to email the person, however it required some editing of some additional files. (adding value="$userid" etc to the email forum in the admin CP, so the hack can just easily refrence the page and have it complete its self. a simple thing).

If you still want it I'll go ahead and give you it :p

BrAinZ 05-09-2002 08:04 PM

Is there any way this can be adapted to show anyone who hasn't visited the board for a specified number of days?

I want to "cull" any users who MAY have posted in the past, but haven't logged into the board for a while.

Any ideas?

TECK 05-09-2002 08:07 PM

i personally think is really important to let the user know he(she) was deleted. :)

BrAinZ 05-09-2002 08:17 PM

Quote:

Originally posted by nakkid
i personally think is really important to let the user know he(she) was deleted. :)
Yeah I agree with that.. only curteous :)

Thanks for the hack by the way.. very useful!

Takara 05-09-2002 08:26 PM

Quote:

Originally posted by BrAinZ
Is there any way this can be adapted to show anyone who hasn't visited the board for a specified number of days?

I want to "cull" any users who MAY have posted in the past, but haven't logged into the board for a while.

Any ideas?

I alredy made a version like this :p
https://vborg.vbsupport.ru/showthrea...719#post249719

midad 05-09-2002 08:46 PM

Great hack Takara I've been looking for such hack for a while. Can we put an option to send inactive users for 30 days for example a default e-mail. Just to let them know that we still care about them.....!!! can anyone do that for me please :)
Installed of course....

BrAinZ 05-09-2002 08:51 PM

This is good.. but it makes it difficult to see exactly WHO you should delete.

Needs to ONLY say "YES" if they have not VISITED the site for the last XX days.

Is that possible ?

BrAinZ 05-09-2002 08:55 PM

Thanks Takara, still needs to be a little easier to use for lazy gits like me though :)

BrAinZ 05-09-2002 09:13 PM

I've ALMOST done it myself... but whats the difference between "Last Visit" and "Last Activity" ?

This is what I have so far:

Find this...

PHP Code:

if (($row["lastpost"]==0)&&($isinactive>$timeactive)) 

and replace with:

PHP Code:

$inactivedays=$ddate-$row["lastvisit"];
    if ((
$inactivedays>$timeactive)&&($isinactive>$timeactive)) { 



All times are GMT. The time now is 02:35 AM.

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.01373 seconds
  • Memory Usage 1,824KB
  • 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
  • (6)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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