Hi folks,
When I create a node, there is a collapsed fieldset titled "Placeholder tokens", it lists all the token word available. How can I keep this from appearing in my node submission form, but still keep the TOKEN module enabled?
Hi folks,
When I create a node, there is a collapsed fieldset titled "Placeholder tokens", it lists all the token word available. How can I keep this from appearing in my node submission form, but still keep the TOKEN module enabled?
Comments
Comment #1
tj2653 commentedI'm interested in this as well.
Comment #2
gregglesWhat other modules do you use? This fieldset doesn't come from the token module. My guess is that it's from pagetitle but I'm not sure.
Comment #3
tj2653 commentedHi,
I actually found out in my case that there was a setting in one of my modules (Links I believe) to not display the Tokens.
Thanks.
Comment #4
gregglesgreat.
Comment #5
Zoologico commentedI do not use page titles so it isn't from that.
Is there a way to do a text listing of all the modules installed?
Comment #6
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #7
doublejosh commentedThis is definitely a problem!
I have the same issue with profiles.
Comment #8
doublejosh commentedRemove: "Allow user entered tokens"
Comment #9
gregglesIt is a problem with some _other_ module on your site, not with the token module. I suggest you look at your admin/build/modules page for modules which depend on token and then try disabling them one-by-one until this fieldset goes away. Then you will find which module is adding this information.
Comment #10
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #11
oash commentedThis is because of the link module.
To fix the problem, open the link.module and comment the following code
// Add token module replacements if available
// if (module_exists('token') && $field['enable_tokens']) {
// $tokens_form = array(
// '#type' => 'fieldset',
// '#collapsible' => TRUE,
// '#collapsed' => TRUE,
// '#title' => t('Placeholder tokens'),
// '#description' => t("The following placeholder tokens can be used in both titles and URLs. When used in a URL or title, they will be replaced with the appropriate values."),
// '#weight' => 2,
// );
// $tokens_form['help'] = array(
// '#value' => theme('token_help', 'node'),
// );
// }
Comment #12
gregglesAha - thanks for the research!
Comment #13
chadchandler commentedComment #11 works great. Thanks!
Comment #14
quicksketchSigh. DON'T HACK MODULES!
Instead, create a custom module that contains a hook_form_alter() like this:
This code doesn't work as-is. It needs to be updated with the form name and field name. This is the Drupal 6 syntax, which has changed since Drupal 5.
Comment #15
doublejosh commentedJust use the feature giving you a checkbox to disallow token input from users for that field. Tokens are great. Don't strip them out, just check the not here box for each field you make... case by case.
Comment #16
gábor hojtsyFrom #15, sounds like this is a token module feature already. Marking fixed then.
Comment #17
gregglesFor the record - it's not a token module feature. It's up to link module whether or not to show this help text.