The "Split Summary At Cursor" button is a new feature in Drupal 6. It allows you to split your content creation into a summary and the main content. This summary is displayed as the teaser and can be different than the main content. When I first learned of this feature, I thought it was great. From a web-development perspective, it is. However, from a usability perspective, this button very confusing. The average site visitor or user will have absolutely no idea what this button is or can do. Would anyone know of a simple way that I can "theme" this button off of the create content form page for everyone except the administrator role? Is there a way to deactivate or hide the button for certain roles? I would really appreciate the help. Thanks!
By dripalong on
Comments
No use to my users
This is indeed a confusing and redundant feature for ordinary users on the community site I am building. Even more so because I am using the FCKeditor module, which seems to prevent the button doing anything at all!
I would really like to know how to hide this, but being new to the complexities of Drupal I have not yet managed to trace whatever it is that generates it.
Thanks in anticipation from me too!
[EDIT 23/03/08]
Found how to fix this.
(1) Edit misc/teaser.js to disable it:
(2) Hide the checkbox that is now visible by editing modules/system/system.css:
Not elegant, but it works.
Disable button?
Is it possible to completely disable the button?
I too use FCKEditor.
myTechDaily - The One Stop Tech Blog! - http://www.mytechdaily.com
You can disable it
Basically, just make misc/teaser.js impotent by reducing it to a
returnstatement (don't delete it altogether because that would throw up errors). This gets rid of the button.For some reason, removing the button reveals a checkbox, but you can remove this by editing modules/system/system.css, adding
display: none;to the .teaser-checkbox style.This solved the problem for me.
thanks
ariite thanks for the advice.
myTechDaily - The One Stop Tech Blog! - http://www.mytechdaily.com
You don't need to hack the
You don't need to hack the core css or anything else for that matter, in your themes style.css file or equivalent you can just write:
.teaser-checkbox {
display:none;
}
Granted this just hides it, but at least there are no core hacks involved.
+1 for this being a configurable option in the node types settings and/or permission controlled.
note: when I installed TinyMCE the button goes away, interesting...
Pimp your Drupal 8 Toolbar - make it badass.
Adaptivetheme - theming system for people who don't code.
Thanks.
Thanks.
thanks rrabbit for this
thanks rrabbit for this solution
FormDefaults Module. This
FormDefaults Module. This module allows you to hide it per content type. The nice thing about this is it is per content type and you can re-enable it at anytime. No php code necessary.
I have installed this module
I have installed this module and I am able to disable the "description" of a content type but not the "split summary at cursor" button.
Where exactly could I disable the button?
so have i
but where is it?
I agree, not for everyone.
I agree, not for everyone. In fact it really begs to be a feature of 'site editors'. It should be controlled by permission and roles.
"Split Summary At Cursor" button - optional through permissions?
I was checking back here to see if there has been any development to somehow make this feature optional - by way of permissions. I see that you can tweak your theme to hide it - but I was hoping to find a more elegant way (like so many other things in Drupal ;) to make this feature optional. That way, we could still have this feature (obviously it was considered important enought to include in D6) available for certain roles. Dont' know where to put this as a 'feature request' - so I guess I'll add to this thread.
+1 for optional by role
This is a great feature for me, but confusing for site visitors.
+1 for any easy, non-hack
+1 for any easy, non-hack way to hide this button. It's very counter-productive for regular web-site development.
+1. Stumble on this problem
+1.
Stumble on this problem as I use TinyMCE and I thought this can be easily done in hook_form_alter() but couldn't find it there.
Google and find this useful thread. Thanks.
Delete button/checkbox with form_alter hook
Using hook form_later is possible to override (or unset) form element that create "Split Summary At Cursor" on MYTYPE node type:
Add in your custom.module:
This should solve the problem.
Confirmed
This works, just tested it on pages using
if ($form_id =='page_node_form')A even better solution
Great work! This is better as I prefer to keep the all changes in one place.
Setting as a value can cause
Setting as a value can cause errors.
It'd be better to use
['#access']=FALSE;, like this:thanks.
thanks.
Or, for ALL content
Or, for ALL content types...
best option in my opinion
best option in my opinion (display:none is not a good idea as we still have to render unwanted control)
? Where do I put this?
Thanks in advance ;)
CCK box
A simple solution for me was to just use a custom text box added with CCK rather than the default "body" box.
It is an alternative
It is an alternative solution but definitely not simple as you need to install CCK and add a field and maintain the field list...etc
Simple sollution for page.tpl.php
This code hides teaser-checkbox block in special content type.
Replace "ideja" with right content type.
___________________________________________________________________
In page.tpl.php add the following code.
This works on FF3 and Google
This works on FF3 and Google Chrome which I tested, but not IE7. Any other way to keep the core untouched?
easiest way to do this!
use http://drupal.org/project/resizable_body - it allows you to disable the "split summary at cursor" button by content type within the edit page for the content type, under submission form settings.
'resizable_body' module or CSS
Thanks adamfeldman. If you don't know how to use CSS then 'resizable_body' module is the easiest way to hide the "split summary at cursor" button. http://drupal.org/project/resizable_body
If you know how to use CSS another option is to hide it by adding one of the two below style to your stylesheet file.
This CSS will hide "split summary at cursor" button on all pages.
This CSS will hide "split summary at cursor" button only on one specific page. The Zen theme is required for this to work.
For example is your node type is 'job_posting' then the following line
.page-node-add-YOUR-NODE-TYPE-HERE
should read
.page-node-add-job-posting
To find the node type navigate to Administer > Content management > Content types. Click on EDIT link beside your content type. Find section TYPE. Note that in your style underscores _ must be replace with dashes -. For example 'job_posting' should be replace by 'job-posting'
using css to hide the inputs
using css to hide the inputs is like parking a car in a field and painting it green. the best way is to remove it either with a custom module, or as onopoc and adamfeldman pointed out, with resizable_body :)
This works great
This works for me. No problems whatsoever. This is probably the easiest way to hide the button. Thanks!
Thanks for the
Thanks for the recommendation.
Code to hide Split button and other stuff
Here's some code I use to hide the Split button and the grippie, and replace the input format selection w/ some help. The code is specific to my needs, of course. Note that the BetterFormats module breaks this code.
The CSS file
suppress_grippie.csshas one line in it:.grippie { display: none; }Must be a better way to do this, but it works.
The changes are only made for users with the "editor" role, and for user 1.
If you want, you can grab a zip file with the code in module form.
Suggestions for improvements?
Kieran Mathieson
http://coredogs.com
Warning when removing teaser checkbox/button
I used a few of the mentioned methods to try to hide the "split" button (all within a module, removing the teaser_include, or restricting access or adding a .css to hide the text).
The button is gone but I get the following warning after the post:
You specified that the summary should not be shown when this post is displayed in full view. This setting has been ignored since you have not defined a summary for the post. (To define a summary, insert the delimiter "
" (without the quotes) in the Body of the post to indicate the end of the summary and the start of the main content.)
(Adding the
before/after the body did not fix it).
Anyone hit this / know what code snippet is missing?
Thanks.
More than just a button
This 'feature' of D6 (which I didn't even know about six months into developing a site using D6 - given I went from D5 to D6 and installed all contrib modules without actually seeing the default D6 node edit forms) has caused me no small amount of stress.
If I had my project all over again, I would have done what was suggested above - use a separate CCK field for the body. This seems a bit much, given Body is a default feature across all Drupal nodes, but that's the easiest way to provide a real WYSIWYG experience for professional news editors, who really want to use an MS Word-like app to edit their stories, and avoid conflict with all this client-side javascript split-window, break-tag, teaser-body-re-concatenation business.
You need to hide the checkbox, but keep it checked. My guess is to use a form_alter hook in a custom module, OR create a javascript file with a jquery function that makes sure the checkbox is checked, even when hidden.
The message is triggered in this code, from node.module - the teaser_include checkbox is hidden, but not marked as 'checked':
Also, in node.module, is this thing:
and this line from the node_body_field function in node.pages.inc:
Which causes all kinds of mayhem when you have TinyMCE installed, given the break tag won't work with TinyMCE (type it in and the comment tag will be converted to visible entities - Drupal won't see the break tag, etc.) So, instead when you open the node edit form, you get the teaser + body (the body already containing the teaser text) and it results in the body having repeating text.
I'd love to hear how to turn this all off, without hacking core, upgrading to D7, having to migrate all my body fields to a new CCK field (and subsequently change all my template code that points to the default body field).
subscribing
subscribing
My solutions from "Resizable
My solutions from "Resizable Body module"
The solution nested as a
The solution nested as a reply above is probably the best, cleanest solution:
http://drupal.org/node/225955#comment-2065386
resizable_body works to hide split summary box
http://drupal.org/project/resizable_body works and is a great module with other functions
Yes it works perfectly !
Yes it works perfectly !
Node Form Settings Module
This module works quite well and also lets you control other settings:
http://drupal.org/project/nodeformsettings
+1 For having it optional .. somewhere
I don't care where, maybe permissions, maybe in the post settings, but I agree. It is too confusing for users and I would like to opt it out ;)
Julie
I use the Jammer module on
I use the Jammer module on all of my builds - http://drupal.org/project/jammer