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

How to restrict possible parent nodes in book page creation?

I am trying to develop personal books, where a user can add pages only to his or her own books.

How can I restrict which nodes can be the parent when creating or editing a book page? Specifically, I want to restrict possible parent nodes to nodes with a toplevel parent that matches certain criteria -- ownership, taxonomy terms, etc. I thought I could do this with the node_access API, but now I don't see how I could exclude nodes from being possible parents without also preventing the user from viewing them.

Thank you,
Evan

Custom design forms with option to automatically add field content to taxonomy

Hi,

Before I start delving in module development it might be smart to see if something simular already exists. I didn't find it on the modulepage. At least not with all the requirements below.

I use 4.5.2 and it seems this will be the version I have to use for a while because my hosting company uses an older version of php.

node_perm - integrate into content > configure > content types ?

I read this feature request here: http://drupal.org/node/15434 but i'm unsure of the upcoming implementation.

I'd like to see node permissions integrated into the configure content types settings in 4.6. For example, a story node could be given permissions to be viewed by only certain users while a page could be given access to anonymous and other users. Honestly, I'd set up flexinode content that could allow permissions that stories and pages would not share.

taxonomy block MOD, alphabetical listing instead of by last updated

This is a simple and quick mod I did myself to the taxonomy module in the block function. It changes your block display from an order of last updated content to alphabetical by term names.
Apply this mod by overwriting lines ranging from about 95-116 (V4.5 module) containing "Function taxonomy_block" code.
Original posting on this topic can be found http://drupal.org/node/20280

//Overwrite with this code around lines 95-116, the FUNCTION "taxonomy_block".
// Function edited by VideoJunky 4/14/05
/**
 * Implementation of hook_block().
 *
 * Generates a block with all categories listed in alphabetical order.
 */
function taxonomy_block($op = 'list', $delta = 0) {
  if ($op == 'list') {
    $blocks[0]['info'] = t('Categories');
    return $blocks;
  }
  else if (user_access('access content')) {
    $result = db_query("SELECT d.tid, d.name, MAX(n.created) AS updated, COUNT(*) AS count FROM {term_data} d INNER JOIN {term_node} USING (tid) INNER JOIN {node} n USING (nid) WHERE n.status = 1 GROUP BY d.tid, d.name ORDER BY d.name ASC, d.name");
    $items = array();
    while ($category = db_fetch_object($result)) {
      $items[] = l($category->name .' ('. $category->count .')', 'taxonomy/term/'. $category->tid);
    }
    $block['subject'] = t('Categories');
    $block['content'] = theme('item_list', $items);
    return $block;
  }
}

Node-example : How to install and use it ?

Hello,

I'm new here ( yes a newbie ) and I try to use the node-example module.
I found nothing about to use and see working in my Drupal site.

I made the file "node-example.module" with the file 1.11 found here:
http://drupaldocs.org/api/head/file/contributions/docs/developer/example...

but I don't know what to do after selecting it in the administration page.

custom forum, upload images help?

I'm writing an encyclopedia module, and am having a little difficulty... I'm trying to upload an image from the node/x/edit but seem to not be able to. I'm using Konqueror, so I can see the "Are you sure you want to upload these files" dialog come up-- verify it's working you see. But I can't seem to figure out the file_ hooks... can anyone help please?

Pages

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