Project Beehive ForumVisitor Log Question

 

Press Ctrl+Enter to quickly submit your post
Quick Reply  
 
 
  
 From:  DeannaG (CYBATRON)  
 To:  All     
42698.1 
Hi Everyone!

My question is this...
Is it possible to get the forums' system to automatically clean the visitor log of each forum every so often? Such as cleaning out entries older than a set number of days.

I'd like to be able to set things so I don't have to do it manually every couple months. I just cleaned out the visitor's log for one of the subsites we host after finding their visitor log as over 6000 pages long. The other forum they have had a visitor log over 3000 entries. They had never cleaned them. So I shortened them to three months.

Going through forums and having to cut their visitor logs back to 60, 90, or whatever days can be a bit time consuming. Something to do this bit of housekeeping automatically would be great.

It would be nice if either in the Admin area, maybe somewhere in Forum Settings, there was a way to set the system so it would ditch any visitor entry older than a set number of days, or some kind of code in the visitor log pages to do it.

Is this possible and is anyone interested in doing it? Depending on price, this could be a contract job with pay.
0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  DeannaG (CYBATRON)     
42698.2 In reply to 42698.1 
I'm not sure what would be involved in handling this with Beehive itself - there is a forum_check_maintenance function which would appear to be a suitable place, but I haven't done PHP in yonks and it's not immediately clear what it's doing - I'm not sure whether it would be as simple as adding a couple of lines or if a more involved change would be needed.

However, if you have database access, you can avoid going into every forum admin area by doing it with a query:

DELETE QUICK FROM VISITOR_LOG WHERE LAST_LOGON < CAST('2010-01-01 00:00:00' AS DATETIME)

To first check how many rows would be removed from each forum before running that, you could use:

SELECT FORUM , COUNT(*) FROM VISITOR_LOG WHERE LAST_LOGON < CAST('2010-01-01 00:00:00' AS DATETIME) GROUP BY FORUM

You might be able to change the condition to a dynamic value like so:

SELECT FORUM , COUNT(*) FROM FROM VISITOR_LOG WHERE LAST_LOGON < CURRENT_DATE() - INTERVAL 9 MONTH GROUP BY FORUM

If that works, you could put the line in a .sql file, then schedule a command that runs it against the database using the server OS's scheduling facilities (i.e. cron/systemd/whatever).

+2/2
 Reply   Quote More 

 From:  milko  
 To:  Peter (BOUGHTONP)     
42698.3 In reply to 42698.2 
I haven't heard/read anyone say yonks in yonks.
milko
+1/1
 Reply   Quote More 

 From:  Matt  
 To:  DeannaG (CYBATRON)     
42698.4 In reply to 42698.1 
I just pushed a change to Github with a feature to do this. There will be no release for this (or anything else now) and you upgrade at your own risk. Let me know if it works for you.
+1/1
 Reply   Quote More 

 From:  CHYRON (DSMITHHFX)  
 To:  Matt     
42698.5 In reply to 42698.4 
Code: 
 There will be no release for this (or anything else now) and you upgrade at your own risk. 


I like the sound of that. Going forward, it will be my policy.

“Cleveland couple accused of stealing boots off man’s feet charged with shooting him weeks later”
0/0
 Reply   Quote More 

 From:  fixrman  
 To:  Matt     
42698.6 In reply to 42698.4 
Matt, do you currently have anything like the visitor log purge to purge members who have registered but never posted? At Technical Me, we had - I'm sure like you also did here - any number of gibberish-named members who were advertising black mould treatments, Burberry bags, Sneakers, etc.; I'd usually ban them manually, but could there also be a parameter that deletes a member and profile after, say, 0 posts in X number of years (I'd say 1.5)?
 
  Did you ever see such a messed up situation in your whole life, son?
0/0
 Reply   Quote More 

Reply to All    
 

1–6

Rate my interest:

Adjust text size : Smaller 10 Larger

Beehive Forum 1.5.2 |  FAQ |  Docs |  Support |  Donate! ©2002 - 2020 Project Beehive Forum

Forum Stats