Closed (fixed)
Project:
Subscriptions
Version:
6.x-1.3
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
29 Jun 2010 at 19:35 UTC
Updated:
16 Jul 2010 at 07:30 UTC
I don't want Digest mode used on the site I am working on. Is there a way to eliminate the option from appearing under Settings so the user can not enable it? Is there a way to turn it off completely?
As an alternative, is there a way to prevent the Settings option from appearing at all for the user?
Thanks!
Rachel
Comments
Comment #1
salvisYou can remove the Overview page completely, but not just the Digest checkbox. For that you'll need to do a tiny bit of custom programming: define hook_form_alter() and remove the checkbox.
You could do the same for the entire Settings fieldset, if that's what you want.
Comment #2
RachelNY commentedWhere would I do this? In template.php? Can you provide any additional guidance to remove the Digest mode? I've done some custom coding for Drupal before, but never anything like this.
Just as a little 'housekeeping' type feedback - we have an option to set the user's "Send Interval" to "Completely inaccessible to the user", but we can't remove the Digest mode checkbox which says: "Merges your notifications into a single email, sent at the interval you specify." Since I made the interval inaccessible (notification goes out asap) the message doesn't make a lot of sense to the user.
Thanks ... I've used Subscriptions before and much prefer the straightforward implementation over some of the other more complicated branches...
EDIT:
I found a sample online, and it seems as though this should work in template.php, but it doesn't:
EDIT 2:
Turns out this code works fine, the issue was with how I had my custom theme named.
Rachel
Comment #3
salvisI'd write a tiny module to do it, but maybe you can also do it at the theming level.
On the third line you need
'MYTHEME_subscriptions_user_settings_form'
I'm not sure this will work in template.php. I've seen it only in modules (with MYMODULE_...).
In a module you can define (untested!):
What wording would you suggest? Can we find something that works both ways or do we need two different strings?
Be sure to clear the cache after adding those functions!
Comment #4
RachelNY commentedIt does work at the theming level.
It turns out there was some issue with how I had my custom theme named. I changed the name of my theme and updated mytheme.info and the code works as is. The third line needs to stay 'subscriptions_user_settings_form' and not 'MYTHEME_subscriptions_user_settings_form'.
This works in template.php:
About the label: I think it should say "Merges your notifications into a single email." if user access to interval settings is turned off. Or if you are looking for generic copy that can be used for both, something like: "Merges your notifications into a single email, sent at the standard interval."
Also, since turning the Digest Mode on/off seems to be so simple, how about adding options to the "User defaults" page? We could add radio buttons for "Notify poster of own posts" and "Digest mode which give the option of making it "Visible" or "Hidden" on the user's preferences page. Seems like it would make more sense to add the option than to write a custom module to handle it.
Thanks!
Rachel
Comment #5
salvisGreat, glad you got it working.
Subscriptions already has too many settings as it is. Adding Visible/Hidden for every control just goes too far, especially since it's not so hard to remove them if really necessary.
Actually, there is some confusion about the interval, so I tend to provide more rather than less information. If the interval is hidden, then all users use the site default for all subscriptions, and we might actually show what it is. If the user can set different intervals for different subscriptions, then the digests are generated at different rhythms, i.e. they do NOT use the "standard interval".
Comment #6
RachelNY commentedI think we should make "Clarify "digest mode" description in the case where the "send interval" is inaccessible" a separate issue and change the title back to "Disable "Digest mode" option under user settings?" in the event anyone else is searching for how to do this -- that's why I made sure to post the full code.
How about:
"Merges your notifications into a single email, sent at the the specified interval." This would seem to apply to all cases...
"Merges your notifications into a single email, sent at the interval you specify." only makes sense if the user specifies the interval. It doesn't apply if "send interval" is inaccessible, but also doesn't really apply if interval is left as site default.
Rachel
Comment #7
salvisWell, that's what happens when a second topic is raised in the same issue...
We'll change the title back when the sub-issue is resolved (I do appreciate your effort to take it all the way to the solution!). Until then I need this title to keep track of the open task.
Leaving a setting at its default value is also a way to specify its value. The point is that it's up to the user to specify whatever s/he prefers. I think this string is ok if the control is accessible.
... but it would be taking advantage of a nit-picking ambiguity. Neither elegant nor helpful.
"Merges your notifications into a single email, sent at regular intervals (%interval)."
Comment #8
RachelNY commentedYou're right, this conversation has become a bit "nit-picky", and the issue is so minor that I would not even have brought it up if I wasn't contacting you for help on something else. So I will simply say that I appreciate the work you have done on this module - it remains my favorite of the various notification modules.
Since I use the String Overrides module on my sites (http://drupal.org/project/stringoverrides) issues such as this one don't really impact me directly.
Thanks again for the module and for your assistance.
Rachel
Comment #9
salvisThank you for your appreciation and feedback.
I've committed the conditional string change to the -dev version (give it up to 12h to be repackaged).
Thanks for the pointer to String Overrides. I use the Locale module, but I always have to keep a separate list of strings that I need to fix on every site. Using a live list should be an improvement — I'll try that one of these days.
Comment #10
salvis