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

image.module tmp error

I'm having this error when creating new images

warning: opendir(/tmp//mc-alex): failed to open dir: Permission denied in /var/www/drupal/modules/image/image.module on line 1202.
warning: Cannot modify header information - headers already sent by (output started at /var/www/drupal/includes/common.inc:344) in /var/www/drupal/includes/common.inc on line 155.

The tmp folders are set up right, or at least they seem to be, because the images get uploaded correct.

Has anybody the same problem. I'm Using Drupal 4.5.

profile.module: browse users matching two name/value pairs?

I suck at SQL and especially at INNER JOIN, so maybe someone can que me on how to accomplish the following:

*** find all the users in database matching profile query *** :
q=profile/first_name/first_value/second_name/second_value

Current code inside profile_browse does the following (only for the first_name)
$query = "v.value = '". db_escape_string('first_name') ."'";

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;
  }
}

Pages

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