Active
Project:
Node registration
Version:
7.x-1.16
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
9 Jul 2015 at 10:55 UTC
Updated:
9 Jul 2015 at 21:08 UTC
Jump to comment: Most recent
Greetings! I'm kinda new to tearing apart modules - I've done a bit of minor modifications but I'm trying to turn off the token browser for everyone except folks with Administrator and I'm not sure where to start. I know this isn't truly a "Node Registration" issue but since it's the Node Registration interface I want to modify I figured I'd start here.
What line(s) of code would I need to disable/modify to disable the token browser on the various settings pages? I have a fairly complex site and the token browser introduces some serious wait time that I don't want my "authors" to have to deal with.
Comments
Comment #1
rudiedirkx commentedWhich page(s) are we talking about?
'Tearing apart' modules usually isn't a good idea. If you want updates, you can't change the code, or you'll have to change it every time. Most things can be altered by a hook or form alter or setting. Try it that way. If you tell me which pages you want to token browser changed, I can tell you which forms to alter, hooks to implement, secrets to whisper etc.
Comment #2
rudiedirkx commentedForms to alter:
node_registration_registrations_broadcast_form()-- tokens at$form['token_tree']node_registration_type_settings()-- tokens at$form['token_tree']node_registration_registrations_settings_form()-- tokens at$form['token_tree']Comment #3
Sizzly1 commentedk. How would I make the changes? a patch that comments out those bits? What file are they in?
You're right, tearing apart a module is a bad idea but... What's the best way to disable them? A custom module? A patch? Suggestions? I know Drupal pretty well but other than editing the source code I'm not terribly adept at modifying this kinda thing.
Comment #4
rudiedirkx commentedCustom module with form alter. 90% of Drupal is alterable that way. 5% is other hooks. Only 5% can't be changed =)
See api for form alter.