Per content-type settings

jbreton - October 2, 2008 - 08:43
Project:URL Access
Version:5.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:jbreton
Status:won't fix
Description

This patch adds a radio selector in content-types for the visibilty of the URL Access block when creating/editing a node.
It is looking like this :

Visibility :
( ) Always public for this kind of content-type
( ) Always private for this kind of content-type
(●) Let the author decide for each node

The third option is the default and doesn't change anything to the module, the two others hide the module and force the node to be public or private when saving it.

AttachmentSize
url_access.module.patch3.88 KB

#1

deviantintegral - October 2, 2008 - 15:18
Version:5.x-1.0» 5.x-1.x-dev
Status:needs review» needs work

Thanks for the patch. FYI, in most Drupal projects, new features are targetted towards the -dev release, so I've changed the version.

A few things which should be dealt with:

  1. The patch doesn't follow Drupal coding standards. For example, indentation should be done with two spaces, not tabs. K&R braces should be used, and multiple statements should not go on one line (in your switch statement). You might be able to fix it automatically with one of the scripts in the scripts directory in your Drupal installation.
  2. There's a line where the only change is TRUE becoming true; All caps should be used for constants such as TRUE.
  3. You're use of t() is incorrect. Instead of concatenating, use placeholders. It makes it easier for translators.
  4. Please use <strong> instead of <b>.

Thanks!
--Andrew

#2

deviantintegral - October 26, 2009 - 19:49
Status:needs work» won't fix

I'm marking as closed to clean up my queue as I'm not maintaining this module any more. Feel free to take over this project if you're still using.

 
 

Drupal is a registered trademark of Dries Buytaert.