Tagged: drupal-planet

Implementing user-specific, role-based access control per node type, per group. (Part 3) 0

Implementing user-specific, role-based access control per node type, per group. (Part 3)

This entry is part 3 of 4 in the series Implementing Organic Groups RBAC per Node Type

This entry is part 3 of 4 in the series Implementing Organic Groups RBAC per Node TypePractical node access system with Organic Groups OG approached the node access system in a way which only requires the user to be a member of a community in order to see all of it’s nodes, whatever types they are. Therefore, og_access module defines an og_subscriber realm and sets the grant id to always...

Implementing user-specific, role-based access control per node type, per group. (Part 2) 1

Implementing user-specific, role-based access control per node type, per group. (Part 2)

This entry is part 2 of 4 in the series Implementing Organic Groups RBAC per Node Type

This entry is part 2 of 4 in the series Implementing Organic Groups RBAC per Node TypeMore in-depth node access system overview So what is that node access system? The involved components are a few hooks that modules define if they want to hook into the way the node access system work; Furthermore, there’s the node_access table in the database which maintains all of the grants for each node in...

Implementing user-specific, role-based access control per node type, per group. (Part 1) 0

Implementing user-specific, role-based access control per node type, per group. (Part 1)

This entry is part 1 of 4 in the series Implementing Organic Groups RBAC per Node Type

This entry is part 1 of 4 in the series Implementing Organic Groups RBAC per Node TypeWe’re going to review a fringe case of setting an access control system, such that, the view access to a node is dependant upon the role the user have. To further complicate it, users get different roles in different groups they are in. Basic node access system overview To understand first how Drupal’s node access system behaves...

Restricting Drupal’s upload module to N attachments 0

Restricting Drupal’s upload module to N attachments

If you’ve enabled the node attachments support in Drupal 6 and needed to limit it’s use for only allowing to attach one file per node and didn’t know how then this post is for you. You can also achieve the same thing with the CCK’s FileField module by attaching it and setting the field to appear once instead of ‘Unlimited’ though there may be cases where you just don’t want...

Maintaining states between form submit and node hooks in Drupal 6 0

Maintaining states between form submit and node hooks in Drupal 6

With Drupal, it is many times the case where you’d find yourself working with custom forms or alter existing forms through the Form API and end up modifying the submit handler so that you are essentially triggering node_save() yourself. If you find yourself in such scenario where you are also having conditional actions in an implementation of hook_nodeapi() then you’ll soon enough realize that there is complete isolation between the...

Alter WYSIWYG settings in Drupal 0

Alter WYSIWYG settings in Drupal

If you deliver content notifications over email and that content may have images attached to it, inline in the message, it will badly display an image source that it can’t find. This is because when the WYSIWYG adds the image to the page it sets the image source to be a relative URL such as /system/files/image_1.jpg It’s possible to create an alter hook that changes the init settings passed to the...

Drupal Commons menu items adjustments 0

Drupal Commons menu items adjustments

With commons you mostly feel like you’re always eating a mixed salad. You get a lot of Acuiqa’s custom features and contributed modules, which all of it builds up a specific distribution type. Salads lose their appeal when you need to dig in and seek for a specific item, which was the case in a recent fiddling with it. Commons provids a ‘bookmarks’ link in the user’s Profile area underneath the user’s...

Views MySQL OrderBy – Drupal module 0

Views MySQL OrderBy – Drupal module

If you’ve ever needed to customize a bit the SQLs in Drupal’s Views module (version 2 for the sake of this argument) you know how much of a pain or ugly-ness is involved. Probably, the first step would be to locate a contributed Views module that would provide the functionality required and then it’s ofcourse required to code review it, make sure it’s properly maintained and not another dead project on Drupal....

gearman_sqrd-600x450 0

Gearman – offloading Drupal tasks to a job server

At work, we’ve recently needed to offload some processing tasks to a background job server. I’ve worked with Gearman prior to my current position at HP as well as prior to my experience with Drupal and I’m happy to see there’s an extension for that available. About Gearman Gearman is an all-purpose job server that manages work between distributed workers for client which throw jobs at it. It has libraries implemented...