By socketwench on
I would like to disable the "Promoted to front page" publishing option for all roles except one, is there a way to do this?
I would like to disable the "Promoted to front page" publishing option for all roles except one, is there a way to do this?
Comments
You can change the default
I know you can change the default 'promote to front page' behavior for each content type under admin/settings/content-types. Sorry, I don't know if this can be changed on a role-basis.
That helps a bit, but it
That helps a bit, but it doesn't prevent users from posting to the front page -- other than denying the ability to post anything to the system other than comments.
tyr this
Oke i have a problem my site is in dutch.
go to administrate
then to instellingen I dont now how its in english
then to inhoudtypes I dont now how its in english
you can set the default and not a way to blok. But the standard is changed.
If you remove the administer
If you remove the administer nodes capability, they can still create and edit nodes, but they cannot change what this default is set to (that section of the edit page is not displayed).
possible solutions
1. You can add "#edit-promote { visibility: hidden; }" to the css of the theme. This will remove the checkbox for everyone.
2. You can apply this patch. This removes the checkbox for everyone but user nr. 1
I do not see another way for the moment.
Gahhh. I can make that
Gahhh. I can make that change, but I'd rather try to write a small module to do that instead. The problem is I don't have nearly enough drupal knowledge to attempt such a thing.
Is there a way grab a role
Is there a way grab a role association and use that in the if statement instead of a uid?
I suppose I could run a
I suppose I could run a query like:
SELECT 1 FROM `users_roles`, `users` WHERE users_roles.uid = users.uid AND users.uid='$user->uid' AND users_roles.rid='$RID'
With $RID being the role allowed to post to the front page, but that's only a slightly less hacked way of doing it. I suppose I could modify the Node module to add "Allow post to front page" as a security permission, but then I'd have to re-implement it in the next version upgrade.
Don't alter core. A custom
Don't alter core.
A custom module with hook_form_alter is what you need rather than hacking core modules.
However, I'm pretty sure there's a custom module that gives you more granular permissions than 'administer nodes' if denying your users that isn't good enough for you.
*EDIT* Oops. Ancient thread. didn't see the dates :/
Great Idea Tessmonsta.
A module that would allow/deny front page publishing based on roles would be great. And maybe even some features on how the front page content will be displayed based on roles (and category/taxonomy/node). ;)
Care to help me write the
Care to help me write the module? ^^;
So Sorry...
I didn't respond earlier. I don't know how I missed your post...
On your question:
If I knew php I would not only take you up on that offer but I'd be writing a few modules myself. :(
hook_form_alter
The ideal solution would be to add a permission "content_promote" and then assign that permission to a certain role. In your module you would check if that particular user has that permission (with one of the built-in functions).
Now I'm not 100% sure that that checkbox is actually available to modules to remove but it would be a good way to get acquainted with the API and building modules.
With the http://api.drupal.org/api/4.7/function/hook_form_alter hook you might be able to remove the checkbox from the form.
It would be something
It would be something like
I'll try to have a closer look tomorrow night (I'm at work for the moment and don't have time tonight). With the module builder module it should be a breeze to complete this.
promote.module
Stick this in a promote.module file:
The roles you give the permission 'promote content' will see the checkbox, others will not.
Posted at the bottom.
Posted at the bottom.
Hi Jax, I wouldnt do an
Hi Jax,
I wouldnt do an unset but rather use an #access parameter, to respect the setting when saving a node
Allow users to post immediately
I'd like to see a slightly different feature: allow trusted users to post immediately rather than waiting for approval. I normally queue new submissions until I can review and approve them, but for trusted users I'd like to bypass it and allow their posts to appear immediately.
--
Mike Cohen, http://www.mcdevzone.com/
Make your trusted users a
Make your trusted users a different role and give that role the right to choose whether they publish immediately or not (administer nodes permission).
This is a very old thread
This is a very old thread but this is what I require. As I'm new to drupal I don't know how can I use promote.module file created in this thread by user.
Though I copied this code and named it promote.module and transfered it to a new folder "promote" under modules but it just didn't showed up for installation. How can I make this work?
(!)
you must also create a .info file, see the help in the documentation on how to do that
A new module comming soon
For those interested, I've create a module for my own personal use, which lets you set each individual option under the Authoring information and Publishing options sections of the
node editpage.At the moment, the module only sets these permissions globally and they apply to all content types.
Once I get approved for a CVS account, I'll contribute my module, and see about adding more features to it, such as choosing which content types the settings apply to, or maybe even a 'per content type permissions' functionality.
Anyways, just wanted to let you guys know that something IS coming, so stay tuned.
P.S. The module was written for Drupal 5.x
Wow Great! SenseBOP
Wow Great! SenseBOP
When do we all expect it to be released. I'm in desperate need of this module. If you want, I'll be the first one to test this out.
Unknown release date
I'm still waiting for the Drupal guys to approve my CVS account. Till then I won't be able to submit the module to the CVS.
For those interested in grabbing it now, just follow the link to get it straight from my site.
Personally, though, I recommend holding on until my CVS application is approved so that everything is done properly and so that versioning, updates and whatnot work.
Download the Publishing Options module
(The link will remain active until I my CVS application is either approved or denied.)
subscribing
subscribing
CVS account
Did you get the CVS account? Is project now published on drupal.org?
--
https://fullfatthings.com/
I am also interested in this
I am also interested in this module, albeit for Drupal 6.x.
Any news about that?
Subscribing
Looking forward to this too.
Different front-page solution
I've come up with a different way to handle who can and can't post to the front page of my site. Instead of relying on "Promoted to Front Page", I use the following modules:
* Advanced Front Page options
* Groups
* OG Content Type Admin (optional)
* VIews
The neat part about this solution is that it circumvents the rather lackluster "promoted to front page" option, and gives you a lot more control over what ends up on the front page.
The same type of system can be created without Organic Groups using Taxonomy and views. Instead of having the view filter by "posted in group", filter by "terms for n", where 'n' is the post type you want on the front page. The Taxonomy Access Module can be used to secure who gets to use the term that posts to the front page or not.
Yes, and you could use CCK
Yes, and you could use CCK and Views to do that too, so gives people a few choices. (I used that to make a 'links' page that authorized people can add a new 'link' content type, and check a box to promote it to the global links page. And it works nicely. Drupal is pretty cool how you can just create something totally new like that, and have it working with almost no work at all.)
But it is annoying to have to go back and change all the old content over for a new front page option. :-)
Disabling "promoted to front page" without writing new modules
Disable the Edit Node permission for all users except admin - this will stop users from being able to publish to the front page.
Set up a new user group, with Edit Node enabled, and add users to this that you want to be able to publish on front page.
Best Solution: Custom Module
The simplest, and dare I say, best solution to this, if you just want to get rid of the field altogether, for everyone (in Drupal 6), is to write a custom module (I called mine custom.module, and added a .info file and put it into a 'custom' folder inside of sites/sitename.com/modules), and paste this function inside (without the ending ?> php line):
I stole the node type detection logic from path_form_alter (in the path.module). (Thanks to DaveReid for pointing that out!).
__________________
Personal site: www.jeffgeerling.com
Hi geerlingguy, Thanks for
Hi geerlingguy,
Thanks for this code. I made a small modification to it in order to also remove the "sticky" option from the form. The question I have is concerning this part of the code;
I'm just trying to understand the purpose of it. It looks like it is just saying "if the name of the form is the same as the form you are on...". Am I missing something?
Thanks,
Tim
"administer nodes" permission
Go to permissions, uncheck "administer nodes" permission for all roles apart from the one you want and this checkbox will be hidden.
For more granular control:
For more granular control: http://drupal.org/project/override_node_options