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

sirkitree - August 2, 2009 - 16:14
Title:Reset all messages already created (table)» Generate activity on an existing site
Category:support request» feature request

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.

AttachmentSize
mc-migration-part-3.php.txt 4.03 KB

#2

igorik - August 4, 2009 - 19:20

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

Junro - August 4, 2009 - 21:06

Thanks, I'm gong to check this! :)

#4

pribeh - August 7, 2009 - 14:06

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

Noddy - August 14, 2009 - 19:20

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

Junro - August 14, 2009 - 21:37
Title:Generate activity on an existing site» Generate activity on an existing site + reset activities option.

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

sirkitree - August 20, 2009 - 00:27

Junro, check the activity.install file which lists all tables that a module creates. These are the ones you want to truncate.

#8

Junro - August 25, 2009 - 22:09

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

pribeh - October 20, 2009 - 22:47

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

 
 

Drupal is a registered trademark of Dries Buytaert.