Fix for Code

  1. <?php
  2. if ((arg(0) == 'node') && is_numeric(arg(1))) {
  3.   $nid = arg(1);
  4.   $nd = node_load(array('nid' => $nid));
  5.   //print $nid; // show me your nid!
  6.  
  7.   print 'nid: '. $nd->nid;
  8.  
  9.   if (module_exists('og') && (node_access('update', $nd) == TRUE)) {
  10.     $group_node = og_get_group_context();
  11.     $gid02 = $group_node->nid;
  12.     $gid = (int)$gid02;
  13.     if ($gid02 === null) {
  14.       $gid = 0;
  15.     }
  16.     $output .= "irgendwas";
  17.     print $output;
  18.   }
  19. }
  20. ?>

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockcode>
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. Beside the tag style "<foo>" it is also possible to use "[foo]".
  • Lines and paragraphs break automatically.

More information about formatting options