This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Flexinode view permission per flexinode type

I wanted to make some flexinodes not viewable to certain user groups, but did not want to use an additional module like node access. Therefore, i modified flexinode.module, and added in the perm function:

$perms[] = 'view '. $ctype->name .' content';

Then I added in the access function:

 if ($op == 'view') {
  	return user_access('view '. flexinode_node_name($node) .' content');
  } 

Then finally changed the menu hook user access calls like so:

 $items[] = array('path' => 'flexinode/list', 'title' => t('list view'),
      'callback' => 'flexinode_page_list', 'access' => user_access('view '. $ctype->name .' content'),
      'type' => MENU_CALLBACK);
    $items[] = array('path' => 'flexinode/table', 'title' => t('tabular view'),
      'callback' => 'flexinode_page_table', 'access' => user_access('view '. $ctype->name .' content'),
      'type' => MENU_CALLBACK);
    $items[] = array('path' => 'flexinode/search', 'title' => t('search'),
      'callback' => 'flexinode_page_search_form', 'access' => user_access('view '. $ctype->name .' content'),
      'type' => MENU_CALLBACK);
    $items[] = array('path' => 'flexinode/feed', 'title' => t('rss feed'),
      'callback' => 'flexinode_feed', 'access' => user_access('view '. $ctype->name .' content'),
      'type' => MENU_CALLBACK); 

where instead of user_access('access content')... it invokes the view permission.

gallery module for drupal

Hi,
I don't know if you all have the same Problems...
but my problem is:
after installing drupal - works fine
and installing gallery2 - works fine
i installed the gallery2 module

when i activate the module there is no error... but nothing is shown (navigation block is active - thats not the point)

User Points plugin for the eComm Module

Has anyone developed or thought about developing a payment module for the ecommerce store module that accepted the User Points from the userpoints module?

Negative User Points

Just wondering if assigning a negative value to the points for a given task in the user points module would have the result of subtracting points from a user? Could I effectively have some actions that allowed users to earn points, like posting to the forums, and some that cost them points like sending an email to the user base.

Thanks,

New node type, without standard node fields 'title' etc. but searchable

I am about to write a module which contains a new node type. My problem is that the node creation form always shows the 'title' field and the information about the 'author'. I would like to remove this information from the form but the node type should be searchable usind the core search.module. Can anybody help me in solving this issue?

Want a simple social network?

I've had to build a slightly customized version of the blog module (with an invitation system) as a social network.

It's my first module, but there's not really much new code, just a few strategic changes - and two new columns in the users table.

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions