Recently there was a bug in activity module where it would show activity entries that had no tokens supplied. While the fix was rather simple (Thank Robert) it would be nice to have these tokens in place when you install the module.

Each module should support it's own tokens, so that when I install the buddylistactivity.module, it should install the default message defined in buddylistactivity's hook_activity_info by find doing a variable set, which in essence would be like the user hitting the Save button on the activity admin settings form.

Now to generate the activity admin settings form, there is quite a large chunk of code to parse down through the activity_info array and give the forms fields it's ids to save into the settings table. This code should be duplicated, so I think the thing to do would be to functionalize this chunk of code so that it can be reused within the .install file.

Comments

jaydub’s picture

Title: Initial settings » Set default tokens on contrib install
Version: 5.x-3.x-dev » 5.x-4.x-dev
Component: Code » Activity Contrib
Assigned: sirkitree » jaydub
Category: feature » task

Shouldn't be terribly difficult to do.

jaydub’s picture

Ok got a basic method for this running. Will add hook_install invocations
to each contrib module to test out.

jaydub’s picture

Ok I committed an implementation of this on the 5.4 and 6.1
branches.

jaydub’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.