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

Image module, simple question!

Hey all, just a simple question for all the developpers that i saw on a lot of Drupal websites.

How do you do to make the image module, so that when you click on "View original" that it displays the original image in a new window...? instead of putting the image in the whole frame... and even better could we be able to customize the new window, and instead of having a "view original" link could we just have the user click on the Preview image and that would open a new window with the wallpaper?

Thanks alot in advance for your help!

taxonomy_select_nodes() not working if 'administer nodes' not set

I've run into a very bizarre bit of improper functionality that I've not been able to track down. I am trying to get a list of all nodes in a given vocabulary, grouped by their taxonomy terms. Seems reasonable, and I've done it before. Here's the code:


function _resource_list() {

  $resources = array();

  $terms = taxonomy_get_tree(5, 0, -1, 1);

  if ($terms) {
    foreach ($terms as $term) {
      $nodes = taxonomy_select_nodes(array($term->tid), 'or', 0);
      $node_list = array();
      while ($resource_node = db_fetch_object($nodes)) {
            print "Found a node!";
	    $node_list[] = $resource_node;
      }
      print_r($node_list);
  }
}

(Plus various return stuff, but I'm trimming out everything not related to the problem.)

If the current user has 'administer nodes' permission, then the print_r() call spits out an array with the correct nodes in it. If the current user does not have 'administer nodes' permission, then $node_list is empty. taxonomy_select_nodes() and db_fetch_object() don't check user_access() anywhere, though.

All nodes in that category are of type "resource" (a custom node type). The hook_access() for that node type is trivially simple:


function resource_access($op, $node) {
  global $user;

 print "<pre>Op: $op</pre>\n";

 return true;
}

According to the print statement, though, it's never being called anyway (as it shouldn't be).

Python and Drupal?

Hi, I'm wondering if there is a way to develop Drupal modules in Python. Thanks.

Need to create nodes from my module (programatically)

I´m using i18 (drupal 4.6) traslations and I need to create page nodes from my module. I´m still getting in touch with drupal, so if anyone can give some API gidelines I might finish.

Best module for creating embedded image in a node? FckEditor?

What's the best module to create nodes with embedded images, not an image attachment? I've done a search but all the discussion seems to be dated back to March~May. In FckEditor there is a built-in image uploader/browser, but that doesn't seem to work. How do I get it to work, ideally with filemanager framer work, as I don't reuse images among posts, and uploaded images should be associated with _THAT_ post only.

Password On Registeration Module

I have written an password on registeration module. It lets users specify a password upon registeration and then lets them login via that password, also has options to allow role elavation upon verfication via the standard e-mail sent out by Drupal (you have to change the e-mail sent out by Drupal). I have applied for a CVS account for the module and that request has been rejected. If anyone is interested, please contact me... The code is in beta so I am not going to post a link until it's finished.

Pages

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