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

How to find out that you have been de-activated?

Is there any way for a module to find out that it has been de-activated by being deselected from the enabled modules on the system admin/modules page?

I have some clear up work on the database I would like to do at this point

Features module turns up empty

I have tried the features module on 4.5 and got an empty table with no admin controls. I tried a bug fix found under RC issues but still nothing. Was it updated since Oct 2?

I updated vocabulary_list.module, and have a few questions.

I updated, well entirely refactored, vocabulary_list.module to use the new 4.5 url scheme. The goal is to enter domain.tld/taxonomy/vocabulary/1, and get all nodes that are under that vocabulary. Just like taxonomy term urls, operators can be used, a depth can be added, and a syndication is available with 'feed'.

I took all inspiration, and most code, from taxonomy.module, and I've got it working pretty well.

But I've got two questions for the master coders here at Drupal.org... if you could take a look at the code, I'd appreciate it: new vocabulary_list.module

1. The only main problem I'm seeing is when I try to load up a vocabulary's feed. Actually, when I try to load a term's feed, and I have this new module enabled, the problem shows up as well. I have NO idea why that would be.

Anyway, if I try to access a feed like domain.tld/taxonomy/vocabulary/1/all/feed/, the rss pops out malformed, with a few extra characters at the beginning. I'm thinking it may have something to do with the breadcrumbs, but that's a wild guess. (you can see it in action here.

1a. I was never able to get the breadcrumbs to work here. Which is fine, as I don't think there is a need for a breadcrumb trail when browsing a vocabulary, but I'm not sure if commenting out that code is causing problems. I think it might be...

Affiliate Module

Does anyone have the Affiliate module working in 4.5? I installed it and set the permissions but no options show up in my admin menu like it is supposed to. The only sign of the Affiliate module that I can see is a drop down menu on the user profile page called Affiliate and the only option is "".

Any suggestions/advice?

email notification question in notify module???

Hi,

I am pretty new with Drupal.
I have a couple of questions.

1. In notify module, which function will call function notify_settings()?
notify_settings is a page we use (as I understand) to confirm and send out the email. How can we send out email without this page(means without approve daily clippings)
The situation is I want to send Alert email no matter admin approve or not. What should I do?

2. Where can I find a detailed doc about database field descriptions and module function(which call which)?

Thanks a lot!!!

Difficulties with hook_node_grants()

Hi all,
I'm trying to write a module to grant access to public or private nodes to users, based on their roles.
I'm starting with node_access_example.module in drupal-contributions, but it is not working as expected.
I'm trying to undestand the logic, but I did not undestand what the hook_node_grants() should return.
these are the infor I found on drupaldocs.org:

All node access modules are queried using hook_node_grants() to assemble a list of "grant IDs" for the user. This list is compared against the table. If any row contains the node ID in question (or 0, which stands for "all nodes"), one of the grant IDs returned, and a value of TRUE for the operation in question, then access is granted. Note that this table is a list of grants; any matching row is sufficient to grant access to the node.

So, what should I return as grant IDs ?? Could you help me in understanding what to specify in hook_node_grants ?
Actually, in the module, the code is, but I can't undestand the logic of $grants array():

[?php

function node_access_security_node_grants($account, $op) {
$grants = array();
//print user_access('access private content', $account); exit;
if (user_access('access private content', $account)) {
$grants[] = 1;
}
else if (user_access('access content', $account)) {
$grants[] = 0;
}
//print_r($account->roles); exit;
return array('security' => $grants);

Pages

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