Generate activity on an existing site + reset activities option.
Junro - July 24, 2009 - 00:00
| Project: | Activity |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
Hello,
I would like to reset all activities already created in my site... You know, with lost of testing text....
So I go to activity_messages table and:
TRUNCATE TABLE `activity_messages`No messages are show anymore, so it's good.
But when I do an action who create an activity message, I've got many same messages created for the same action but with a differente date:
I've got the real date of my action but another date totally insignifient...
Maybe I should use TRUNCATE to another activity table, i really don't know...
Any idea?
Thanks :)

#1
Sure I have some ideas. I've actually created a script for a site that we're relaunching soon. The old version of the site does not have Activity2 installed, so the script looks at the current database records and creates Activity records based on specific criteria. Here is my Activity2 generation code for you to see how this is done. This could possibly be a feature if we can generalize it more. Please keep in mind this is very specific to our needs currently and also based upon the few activity templates that are created for our site. But hopefully you can take this and use it as a means to your end.
#2
This is *really* great idea to create activity based on old node and comment activity.
I like it.
Probably it could use batch api for bigger sites with a lot of comments and nodes.
I will be hope something like this in official activity 2 module release.
thanks
Igor
http://www.somvprahe.sk
#3
Thanks, I'm gong to check this! :)
#4
Hey, this sounds great but I wish I knew how to use it. I guess I'll wait until someone graciously works this into the module. Great work though sirkitree.
#5
Sorry for bumping in, but I think the original question is unanswered. So which tables I do have to truncate with phpmyadmin to delete all existing activities?
I guess it's activity_messages and activity_targets but what about activity_access? Seems to me that this table is also combined with existing activities but I'm not sure.
Thanks for any help!
#6
Yep the original question is unanswered.
I just would like to delete all activities messages, reset all activites.
It will be cool to have an option in the settings page of the module: "reset activites".
Because I deleted some tables but not all good ones, or I don't know... I've got some bugs now, I have to disable and reinstall the module to restart from nothing...
However, le script of sirkitree at #1 looks like very good, very interesting. I hope it will be son in a dev. version.
I've got so much works, I didn't have time to look at it closer.
#7
Junro, check the activity.install file which lists all tables that a module creates. These are the ones you want to truncate.
#8
Ok, I truncate the 4 activity tables, but the problem I'vez got is all activity message is displaying 4 times. But only on profile of the author (You ....), the display is good when you're watching others users activity ([author-name] ...).
I've got this problem since I truncate tables activity.
Any idea?
Thanks :)
#9
Any update on integrating this so that we can reset/re-record activities from an admin display? This is really the last step for me before I go ahead with using activity 2.0 for a couple sites ... I can't wait :)