HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

activity purging plugin - another way of solving the problem of activity table bloat.

peregrineperegrine MVP
edited November 2013 in Feedback

if you manually delete activity table or decide you want a plugin to purge old activity records that bloat your database.

if you liked the cleanlog plugin you may like this one.

when you look at the activity link - these are the entries that it purges.

e.g.

http://vanillaforums.org/activity

note: even if you disable viewing the activity link, your activity table is constantly growing.

I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

Comments

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    Thanks for this very handy plugin! Comes in handy specially if your activity has been spammed by trolls. I realized there is no mass select on there, probably why people never delete the old entires. But now they can simply Purge the Activity from unwanted spam, trolls and old entires. Brilliant as always !!

  • Options
    peregrineperegrine MVP
    edited November 2013

    thx. V. - the plugin essentially deletes "all" entries older than a specified date. it is not an editor, it just looks for when the record was created and if the date is older then the date specified (months ago), it just deletes.

    if you use the dashboard option - it provides options for 12 thru 72 months to prevent admins who don't know the impact of the result from deleting entries that are less than one year old.

    but you could modify that.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited November 2013

    Well since the entries are duplicates from users activity I don't think it would affect the activity posted on their page would it ? This just eliminates the global Activity broadcast no?

    I guess if it is in the same table it would just delete the entire entries even those in the person's page. Well if the Activity gets filled with useless stuff and people don't mind their posts be deleted in that case it is still handy plugin. It is a bit misleading to have an Activity page on the profile because it makes one think the content is controlled by the user.

  • Options
    peregrineperegrine MVP
    edited November 2013

    to elucidate further:

    e.g. if you shared a message on your own wall and it was over one year old and you purged entries over one year old it would be deleted from the wall (both on your activity) and the global activity. but that wouldn't affect the "story".

    when you click on share on your personal activity page

    it writes a record to the story field in the user table as well as a record in the activity table.
    the story field in the user table is unaffected by this plugin.

    the story is what appears just below your name in profile page that has the clear button next to it (assuming you added a story in the first place).

    however, you could easily modify the plugin to restrict deletion to certain types of activity records (I just didn;t know which records people might want to keep forever) and if I was to modify it for someone they could send me a donation and what activity types they want to restrict it to (or keep a certain users activity always), and i would be glad to post a mod.

    As far as spammers, when you delete a spammer applicant via cleanser plugin, or delete them via dashboard, their activity records will be deleted anyway during the delete all content process.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    Yes thanks for clearing that up for me. The plugin is great , my disconcert is with the fact profile activity is not personal . The content on user page should be controlled by user including ability to erase what others post on it.
    My comp crashed again ... Posting from phone sucks

  • Options
    peregrineperegrine MVP
    edited November 2013

    Posting from phone sucks

    I don't have a phone to post from so I don't have that problem. I just have an internet connection to my computer that is abysmal :).

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    Yes, crippled computer on high speed Internet is the same as crippled Internet on a working computer . Phone posting is a bit of both above but beats nothing. Must be mercury is in retrograde ....

  • Options

    rotflmao

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    What ? You don't believe that a planet can cause such catastrophes ? :0. Hahaha that's what my friend told me was causing technical difficulties . If my computer miraculously stops crashing after tomorrow (unlikely ). She may be onto something .

    As far as activity spammers go ,there have been cases of benign spammers , you know the kind , like benign tumors ,the content is not lethal but clogs the activity... If you have benign spammers. Then this plugin will be perfect!

  • Options
    x00x00 MVP
    edited November 2013

    This is the cron I use

       00 3 * * * mysql -u username -p pass forumdb -e "DELETE FROM GDN_Activity WHERE ActivityTypeID NOT IN ( SELECT ActivityTypeID FROM GDN_ActivityType WHERE Name = 'WallComment' ) AND TIMESTAMPDIFF(MONTH,DateInserted,NOW())>2" 
    

    it excludes wall comments.

    grep is your friend.

  • Options
    peregrineperegrine MVP
    edited November 2013

    @x00

    thx for info on what you do.

    I modified the program to "NOT delete wall comments".

    curious why you select for name instead of activitytype id of 17.

    if you can take a look at the plugin, that would be cool.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    hgtonighthgtonight ∞ · New MVP

    @peregrine said:
    curious why you select for name instead of activitytype id of 17.

    If you write applications that have their own activity types, the IDs are no longer guaranteed to be known unless the applications are initially enabled in the expected order.

    This is a wild guess though :D

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Options
    peregrineperegrine MVP
    edited November 2013

    @hgtonight said:
    This is a wild guess though :D

    I realize you provided a valid wonder why answer. but logically.

    but under standard vanilla - wall comments are activity type 17

    thats why there is a relational table.

    If you write applications that have their own activity types, , the IDs are no longer guaranteed to be known.

    shouldn't you use the proper schema

    unless the applications are initially enabled in the expected order.

    I'm baffled by this. it shouldn't impact the activity type table.

    maybe x00 will chime in.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    hgtonighthgtonight ∞ · New MVP

    @peregrine said:
    I'm baffled by this. it shouldn't impact the activity type table.

    The edge case is this: If any application is installed before the dashboard application AND this application has its own Activity types, the activity type ID for 'WallComment' isn't going to be 17 anymore.

    Heck, if Vanilla adds any activity types to new versions of Vanilla, those IDs are potentially going to be different for installs that upgrade versus a fresh install.

    This is a very specific edge case, I agree. Hence the wild guess part.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Options

    thx for explaining your thoughts @hgtonight.

    First off I said activity type 17 for wall comment I meant 7

    But in any event...

    You are correct, I should be looking for WallComment and then reading its id from ActitvityType Table

    and then excluding that Activity Type ID.

    version 1.3 should be up shortly to correct this for edge cases, etc.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options

    @zhaan

    I put a safeguard so people don't remove more than 1 years of activity data.

    However you could force the activity purge to purge the activity table of (all data OLDER than 2 months old) that is not a wallcomment

    change
    if ($delMonths < 12) $delMonths = 12;

    to

    $delMonths = 2;

    around line 53 in default.php

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

Sign In or Register to comment.