I was looking for a module that would enable me to create a "help tip" that would appear on a particular page until the user dismissed it.
I found this module and thought, "If I put the help tip in a collapsible fieldset, this module would allow the user to collapse the tip and it would stay collapsed."
... except that in order for this to work, the cookie needs to be persistent instead of per-session.
Toward that end, the attached patch creates a "fieldset_helper_cookie_duration" setting which specifies the number of days that the cookie should persist. The default value of zero will result in the current (original) behavior where the cookie persists until the browser session is closed. Any other setting means that cookies persist for that many days.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | fieldset_helper-cookie_duration.patch | 3.8 KB | pillarsdotnet |
| fieldset_helper-cookie_duration.patch | 3.5 KB | pillarsdotnet |
Comments
Comment #1
pillarsdotnet commentedBAAH!!!
Original patch is b0rken; here's a replacement that I actually tested and verified.
Comment #2
jrockowitz commentedThis is a great idea. I will apply and test the patch in the next day or so.
Comment #3
jrockowitz commentedpillarsdotnet,
Your patch worked perfectly. I made some minor changes which include:
- fieldset_helper.js - Removed global expiration variable.
- fieldset_helper.admin.inc - Added integer validation to the cookie duration and added 'days' suffix to text field.
I commited the change to the dev version and I will create a new release node in the next week or so.
Thanks,
~jake
Comment #4
pillarsdotnet commentedComment #5
Branndon commentedDoes the dev have this? Have you made a new node yet just not uploaded it? Just checking. Thanks for this, one of the best modules yet!
Comment #6
jrockowitz commentedThe dev version has the change. I can roll out a new release if needed. I was hoping to resolve some outstanding issues first but I am really busy for the next few weeks.
Comment #7
jrockowitz commentedChange has been committed to the 6.x-2.x-dev release and will be included in the 6.x-2.x version.