Closed (fixed)
Project:
Fasttoggle
Version:
master
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
17 Jan 2010 at 20:40 UTC
Updated:
17 Mar 2014 at 11:20 UTC
Jump to comment: Most recent
If my module provides its own toggles via the hook_fasttoggle_* hooks, the only thing that doesn't work is no one will see my toggle on the admin/settings/fasttoggle page and therefore, it will never get 'enabled'. The only way to do this is to have sub-module alter the fasttoggle settings form:
/**
* Implements hook_form_FORM_ID_alter().
*/
function disemvowel_form_fasttoggle_settings_form_alter(&$form, $form_state) {
$form['comments']['fasttoggle_comment_settings']['#options']['disemvowel'] = t('Disemvowel/Un-disemvowel');
}
It would make sense that somehow the options should be populated based on the data from hook_fasttoggle_options() or hook_fasttoggle_labels().
Comments
Comment #1
nigelcunningham commentedI'll look into this - I think I can see room to clean things up a little, and part of that might be making a better API for adding other toggles/flags.
Comment #2
ari-meetai commentedsettings.php should not be the place for this...
hook_fasttoggle_labels() doesn't really function as expected.
Comment #3
nigelcunningham commentedD7's dev branch has seen a major rework that should make this much more doable. Is there still interest?
Comment #4
nigelcunningham commentedIn fact, I think this should be entirely doable now, as the node, user and comment support has all been moved into submodules - disemvowel should be able to use the same api.
Closing as fixed; please reopen if you find issues.