Hi,

I'm trying to build a flagactivity sub module to integrate with the flag module. Its mainly a replica of the views_bookmarkactivity sub module with some modifications here and there.

I've pretty much got it working except for one area. When I go to the activity settings to input the phrase I want the activity module to display when a user flags a content, I can't seem to save my own phrase. It keeps showing the default phrase instead everytime I hit the save button.

I can't seem to figure out what's wrong here and I'm hoping someone can help me with this...

I'm soooo close to completing it already..

CommentFileSizeAuthor
#2 flagactivity.zip2.19 KBBlueeeeie

Comments

sirkitree’s picture

Please attach your code and I'll be able to help a little easier ;)

Blueeeeie’s picture

StatusFileSize
new2.19 KB

Okies.. here it is..

Blueeeeie’s picture

Hi,

Any update on this issue?

sirkitree’s picture

I installed your module as well as the flag.module for testing and it seems to work just fine for me.

I used the default flag type that is provided and bookmarked a story node and saw the activity message. Upon changing the message's specification it changed the displayed activity.

Blueeeeie’s picture

Thats strange then, cos I can't seem to save the message on the settings page. Btw, do you know how and where those message formats are saved? Perhaps that way I can troubleshoot and find out where the error is on my side.

sirkitree’s picture

They're stored in the variable table as flagactivity_*

I, for example, have in that table: flagactivity_bookmarks_flag_all, flagactivity_bookmarks_flag_author, flagactivity_bookmarks_unflag_all, flagactivity_bookmarks_unflag_author

marie_t’s picture

We're having the same problem. Installed the sub-module and it appears in the activity settings, but we're having these issues:
1) Can't change message, doesn't save - the default always shows up
2) It looks like the flag activity is in fact adding an entry in the database, however no message displays, and looking at the database detail, no text was printed
3) Seems like some bug that's not letting flag activity save?

Anyone have any success with this, or have any ideas how to fix this problem? We'd love to have this feature working! Thx much.

Blueeeeie’s picture

As mentioned by sirkitree, the string "[author] [operation]ed blah blah blah" is being saved inside the table variable. The problem is that when we input a new string, its not being saved into the table and after scouring the activity.module code, I can't seem to find where the problem is. Especially since the strings for all the other activity types seem to be updating correctly.

The quick and dirty fix I used was to change the default value in the flagactivity.module directly. This works for me since I only have 1 flag type.

But that could serve a problem if you have different types of flags in your drupal site. So another way would be to make changes to the variable itself inside the database.

- Just go to the drupal database and select the 'variable' table.
- Search for all the flagactivity variables. (Just do a search in the 'name' column for 'flagactivity%' and it should return you all the variables related to flagactivity)
- Click on the pencil icon to make changes to the sentence. (Be careful not to change anything else)
- Save it

And I think it should work. I'll continue trying to search for the problem and hopefully I'll be able to get this contrib module to work properly.... Someday.....

jaydub’s picture

The new 5.4 branch and the new 6.x branch have contrib
modules for the Flag module.

Note that you should not test this out on a production site as
many token patterns have changed and no upgrade functions
have been written at this point.

#314433: Activity 6.1 & 5.4

sirkitree’s picture

Status: Active » Closed (fixed)