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

Diff of /contributions/modules/bbcode_wysiwyg/bbcode_wysiwyg.module

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

revision 1.4.4.5, Mon Apr 14 17:13:36 2008 UTC revision 1.4.4.6, Mon Apr 14 18:40:02 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: bbcode_wysiwyg.module,v 1.4.4.4 2008/04/14 17:00:51 jrbeeman Exp $  // $Id: bbcode_wysiwyg.module,v 1.4.4.5 2008/04/14 17:13:36 jrbeeman Exp $
3    
4  /**  /**
5   * Implementation of hook_perm().   * Implementation of hook_perm().
# Line 151  function bbcode_wysiwyg_link($type, $nod Line 151  function bbcode_wysiwyg_link($type, $nod
151      $body = check_plain(str_replace("'", "\'", $body));      $body = check_plain(str_replace("'", "\'", $body));
152      $body = str_replace(array("\n", "\r"), array("\\n", "\\r"), $body);      $body = str_replace(array("\n", "\r"), array("\\n", "\\r"), $body);
153      $name = str_replace(array('[', ']'), array('', ''), $node->name);      $name = str_replace(array('[', ']'), array('', ''), $node->name);
154      $body = '<a href="javascript:void(null);" onclick="var txt=getTextarea();insertAtCursor(txt,\'[quote='. $name .']'. $body .'[/quote]\');txt.focus()">'. t('quote') .'</a>';      $body = '<a href="javascript:void(null);" onclick="Drupal.bbcodeQuoteLink(\''. $name .'\', \''. $body .'\')">'. t('quote') .'</a>';
155      // quote this post      // quote this post
156      $links['bbcode_wysiwyg_quote'] = array('title' => $body, 'html' => TRUE);      $links['bbcode_wysiwyg_quote'] = array('title' => $body, 'html' => TRUE);
157    }    }
158    return $links;    return $links;
159  }  }
160    
161    
162    /**
163     * Implementation of hook_comment().
164     */
165    function bbcode_comment(&$a1, $op) {
166      if ($op == 'view') {
167        $a1->comment .= '<div class="bbcode-username" style="display:none;">'. $a1->name .'</div>';
168      }
169    }
170    

Legend:
Removed from v.1.4.4.5  
changed lines
  Added in v.1.4.4.6

  ViewVC Help
Powered by ViewVC 1.1.2