how to disable edit link of node view page of drupal? - drupal

I want to disable or hide edit link for specific role on node view page.

Make sure the role does NOT have administer nodes permission
Also make sure the role does not have edit any <content type> permission & edit own <content-type> where is the content type you want to disable editing for.
I would also suggest you pickup a decent book on Drupal -- it will teach you the fundamentals. I'm guessing you're reasonably new to Drupal.

Related

How to add 'edit','delete','revision' buttons at page level - Drupal 8?

I am working on a drupal 8 website and I would like to know how to enable 'View','Edit','Revision' buttons on a page level as below:
Can these buttons be added at 'node' level without editing module.node file? Can someone guide on this?
Simply add the Primary admin actions block in the region you want (/admin/structure/block) and manage the node permissions of your users roles.

Make content visible only to author in Drupal

I want to allow members of a Drupal website to upload their own content to the site (something like a blog post or questionnaire), but have it visible only to themselves (hidden from other members with the same role). The idea is to have them store some personal content that other members don't need to see, but that only the author member would need to see (or have access to) when using the site.
What modules would I need to use? Or how could I go about setting that up?
You can do this easily with http://drupal.org/project/content_access
I don't know if you've already solved this problem, but I recently did something similar with a shared blog in Drupal 7. I wanted users to have both private and public blog posts. I used the Save Draft module (http://drupal.org/project/save_draft) to add an extra button to the content editing screen, which I called Save (Unpublished) rather than "Save Draft" -- I used the String Overrides module to make that happen (http://drupal.org/project/stringoverrides). In the admin panel for permissions, Authenticated users were granted to right to view and edit their own unpublished items. Users could thus save their blog posts in a way that others could not see them. Then I used Views (http://drupal.org/project/views) to create a list view that used the criteria content type = blog, state = unpublished, and content author = current user. This gives users a list of their unpublished blog posts.
The https://drupal.org/project/view_own module handles this exactly the way you are looking for.

Wordpress or Drupal: Plugin for sub threads

I'm looking for a wordpress OR drupal plugin with which the users of my site can create a sub discussion to an article by themselves and invite other users to join. This subdiscussion should be invisible to not invited Users. Is there anything similar? Or could I do this some other way?
I didn't decide for wordpress or drupal by now, so which ever cms can do this will be it.
Thanks for your answers!
I don't know of such a module for Drupal but if you'll go for the custom module route here's some pointers to how it could be implemented:
Create a content type called Subarticle, enable comments and add a Node reference field to it. Allow your users to create nodes of that type.
For the widget of the node reference, use the Node Reference URL Widget module which will create a link on each Article, something like Create a Subarticle, automatically making the new subarticle point to the article.
For display, views could be used with a node argument on the node reference field.
For invites and visibility, check out Organic Groups. When a new subarticle is saved you'll have to programmatically create a new organic group, make the current user the owner and add the subarticle to that group. With an organic group he can then invite users.
You could use Vanilla, that can be easily integrated wtih Drupal or Wordpress (or anything). Check out this podcast to see how easy it is to plug into WP. There are plugins for Vanilla that provide the private thread functionality you are looking for.

How to create a 'blog settings' tab in drupal to move all blog related edit forms to one place

I dont know if im asking the impossible, but i want to have a tab in my user edit area that houses all blog related items (ie blog theme, blog info, user blogroll) as opposed to them being inside the user/%/edit and user/%/edit profile.
Im putting together a multi-user site and this is crucial for user-friendliness.
Thanks for any ideas!
Nothing is impossible with Drupal, but doing this would be a challenge.
With hook_form_alter you can alter any form you want. The code for this would have to go to a custom module. Then you would have to recreate the form, with a page callback, and handle the validation and submission. You can probably recreate the code from the modules that create the forms in the first place.
Alternative, you can just leave the settings at user/%/edit and other places, and just create a special form with all blog relevant info. That way the users choose where to edit their info. It will probably be a better choice, since the "blog settings" that's location at user/%/edit, will be more tied to the user, than to the blog. So when a user wants to edit some of his personal details, that's when he would want to edit those blog settings as well.
Your specific might be different, but the default setup is usually a very good default.

Drupal - hiding advanced post settings from users

I'm getting lost in the sea of allowable permissions in Drupal.
I have a content-type which has revision and workflow settings all nicely setup, but I do not want my users to be able to see these options (new revision each time automatically, etc).
From what I understand, this information goes away when you disable the 'administer node' field, however when I disable this my link for editing nodes disappears for these users.
My question is twofold then:
What is the proper way to hide this access from users
If disabling 'administer nodes' is the key, then how do I direct my
users to have access to edit their content-type once it is created?
(currently it points to admin/content/node)
I have seen solutions that involve overriding the template.php file, but I'd rather not do this.
Edit
Here is a clarification of the behavior:
Current permissions
special role
administer nodes [x]
create <custom> content [x]
delete any <custom>content [x]
delete own <custom>content [x]
edit any <custom> content [x]
So, with this snippet of settings, my users can see things like 'revision information,' 'publishing options,' etc.
I want these advanced features to NOT appear for them. What I have learned is that this can be controlled by disabling 'administer nodes.'
The problem is that when this is unchecked, my users lose the option in their menu which points to editing my content. Currently, this points to admin/content/node
Perhaps I'm misunderstanding your question as the solution I'm going to recommend is very straighforward: In the permissions page there is a permission, edit any story content, edit any page content... for all the users you want, you can assign them a role and mark the checkbox here. This will allow them to still edit the nodes and yet will avoid all the extra junk that you see in the node edit form that you get if you have the administer nodes permission checked.
Edit: As pointed out in my comment below (and by googletorp), to get something like admin/content/node you'll have to build it using VBO (Views Bulk Operations) (after disabling administer nodes)
You can create your own version of admin/content/node and tweak it, to fx only show nodes created by the user.
Doing this is quite easy with Views and Views bulk operations. I believe VBO comes with a prebuilt view that does this already, that you can tweak into your liking.

Resources