| 1 |
<?php |
<?php |
| 2 |
// $Id: bbcode_wysiwyg.module,v 1.4.4.5 2008/04/14 17:13:36 jrbeeman Exp $ |
// $Id: bbcode_wysiwyg.module,v 1.4.4.6 2008/04/14 18:40:02 jrbeeman Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* Implementation of hook_perm(). |
* Implementation of hook_perm(). |
| 160 |
|
|
| 161 |
|
|
| 162 |
/** |
/** |
| 163 |
|
* Implementation of hook_nodeapi(). |
| 164 |
|
*/ |
| 165 |
|
function bbcode_wysiwyg_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) { |
| 166 |
|
switch ($op) { |
| 167 |
|
case 'view': |
| 168 |
|
$node->content['bbcode-username'] = array( |
| 169 |
|
'#value' => theme('bbcode_wysiwyg_username', $node->name), |
| 170 |
|
'#weight' => 1, |
| 171 |
|
); |
| 172 |
|
break; |
| 173 |
|
} |
| 174 |
|
} |
| 175 |
|
|
| 176 |
|
|
| 177 |
|
|
| 178 |
|
/** |
| 179 |
* Implementation of hook_comment(). |
* Implementation of hook_comment(). |
| 180 |
*/ |
*/ |
| 181 |
function bbcode_comment(&$a1, $op) { |
function bbcode_wysiwyg_comment(&$a1, $op) { |
| 182 |
if ($op == 'view') { |
if ($op == 'view') { |
| 183 |
$a1->comment .= '<div class="bbcode-username" style="display:none;">'. $a1->name .'</div>'; |
$a1->comment .= theme('bbcode_wysiwyg_username', $a1->name); |
| 184 |
} |
} |
| 185 |
} |
} |
| 186 |
|
|
| 187 |
|
|
| 188 |
|
function theme_bbcode_wysiwyg_username($name) { |
| 189 |
|
return '<div class="bbcode-username" style="display:none;">'. $name .'</div>'; |
| 190 |
|
} |
| 191 |
|
|