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

Is it possible to add something to the $node object?

Is it possible to add something to the $node object?

E.g. something like $node->vip = true / false that would persistent?

So that you could use something like

      if (!$node->vip || user_access('access vip content')) {
        return;    
      }

instead of querying database manually with db_result as I use at the moment

I'm making an upload program, and I want to know if somebody knows how the tables depent

Hey everybody,
I want to develop a program to upload for example an excel document or access database with events into the database. I work with xamp as server. Can somebody tell me which tables I have to change to add an event?

MAQUM Module Help

I've posted twice regarding the creation of my module and found a developer. However, upon upgrading to Drupal 5, the part of the module that gets the date and overrides it no longer seems to work. The developer shot me a few emails to point me in the right direction, but it was all stuff I had tried in one way or another. First, here's the MAQUM.module:

Problem with nodeapi hook

Hello,

within my module 'node_controll' I have the following function:

<?php
function node_controll_nodeapi(&$node, $op, $teaser) {
  switch ($op) {
    case 'view':
      $node->body = theme('vip_body', $node);
  }
  return;
} 

function theme_vip_body($node) {
  return $node->teaser;
}

?>

Shouldn`t this change all nodes 'bodys' from their original to only the teaser? If i visit ?q=node/1 I allways see the full (normal) body.

Any hints?

Sincerally, l8a

GMap will not display in Module Enable/Config 5x

I did a CVS update to GMap this evening, uploaded it to my test site, still doesn't appear in my Module administration.

I attempted to follow the comments in the "More Info" link and see where various patches were proposed.

I AM NOT a programmer and am working from a Windows work machine and transferring the files to an Apache host.

GMap, Location and KML were among the primary reasons I selected Drupal to re-develop my site.

Would someone please assist or advise if/when/how I can enable GMap?

Thank you in advance for your assistance.

Joel

Setting the value of a select

I've create a module that uses nodeapi to add a select dropdown to the story edit form. I can select "yes" to have the node saved as a template. I have a database table that stores nid / template value pairs, so that if I choose "yes" to save as a template, then a record is created in the database table as so: nid/1. Then I use the node clone module to clone the template node, and create a new editable node. The problem is, this new node now has it's "save as template" select dropdown set to "yes". How can I cause the select dropdown to be reset to "no" when the node is cloned?

Pages

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