| 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(). |
| 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 |
|
|