/[drupal]/contributions/modules/cocomment/cocomment.module
ViewVC logotype

Diff of /contributions/modules/cocomment/cocomment.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.6, Thu Jan 17 10:13:23 2008 UTC revision 1.7, Thu Jan 17 10:29:45 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: cocomment.module,v 1.5 2008/01/16 22:12:35 sanduhrs Exp $  // $Id: cocomment.module,v 1.6 2008/01/17 10:13:23 sanduhrs Exp $
3    
4  /**  /**
5   * CoComment integration   * CoComment integration
# Line 30  function cocomment_menu($may_cache) { Line 30  function cocomment_menu($may_cache) {
30  function cocomment_comment($form, $op) {  function cocomment_comment($form, $op) {
31    global $base_url, $user;    global $base_url, $user;
32    
33    if ($op == 'form') {    if ($op == 'form' && $form['submit']) {
34      //load necessary information      //load necessary information
35      $node = node_load($form['nid']['#value']);      $node = node_load($form['nid']['#value']);
36    
# Line 51  function cocomment_comment($form, $op) { Line 51  function cocomment_comment($form, $op) {
51      drupal_add_js('coco = '. drupal_to_js($coco), 'inline');      drupal_add_js('coco = '. drupal_to_js($coco), 'inline');
52    
53      //add cocomment's enabler.js to the site      //add cocomment's enabler.js to the site
54      //when submission is possible      $item['cocomment'] = array(
55      if ($form['submit']) {        '#value' => '<script type="text/javascript" id="cocomment-fetchlet" src="http://www.cocomment.com/js/enabler.js"></script>',
56        $item['cocomment'] = array(      );
         '#value' => '<script type="text/javascript" id="cocomment-fetchlet" src="http://www.cocomment.com/js/enabler.js"></script>',  
       );  
     }  
57    
58      return $item;      return $item;
59    }    }

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.2