Changeset 1183
- Timestamp:
- 07/02/07 14:10:55 (1 year ago)
- Files:
-
- devel/mod/generic_comments/comment (added)
- devel/mod/generic_comments/comments (added)
- devel/mod/generic_comments/lib.php (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
devel/mod/generic_comments/lib.php
r1182 r1183 2 2 3 3 function generic_comments_init() { 4 global $CFG, $db,$function, $metatags ;4 global $CFG, $db,$function, $metatags, $template; 5 5 6 6 $metatags .= "<script type=\"text/javascript\" src=\"{$CFG->wwwroot}mod/generic_comments/generic_comments.js\"><!-- generic_comments js --></script>"; … … 21 21 $function['permissions:check'][] = $CFG->dirroot . "mod/generic_comments/permissions_check.php"; 22 22 23 24 23 // Add annotation support 25 24 display_set_display_annotation_function("file::file", "generic_comments_displayobjectannotations"); … … 31 30 river_register_friendlyname_hook('file::file', 'generic_comments_get_friendly_name'); 32 31 } 32 $template['embeddedcomments'] .= file_get_contents($CFG->dirroot . "mod/generic_comments/comments"); 33 $template['embeddedcomment'] .= file_get_contents($CFG->dirroot . "mod/generic_comments/comment"); 33 34 34 35 } … … 121 122 END; 122 123 123 $field = display_input_field(array("new_comment","","longtext")); 124 // $field = display_input_field(array("new_comment","","longtext")); 125 $field = <<< END 126 127 <textarea name="new_comment" id="new_comment"></textarea> 128 129 END; 124 130 if (logged_on) { 125 131 $userid = $_SESSION['userid']; … … 244 250 245 251 $commentsbody .= templates_draw(array( 246 'context' => ' weblogcomment',252 'context' => 'embeddedcomment', 247 253 'postedname' => $comment->postedname, 248 254 'body' => '<a name="cmt' . $comment->ident . '" id="cmt' . $comment->ident . '"></a>' . $comment->body, … … 256 262 } 257 263 $commentsbody = templates_draw(array( 258 'context' => ' weblogcomments',264 'context' => 'embeddedcomments', 259 265 'paging' => $pagelinks, 260 266 'comments' => $commentsbody … … 299 305 } 300 306 301 $field = display_input_field(array("new_comment","","longtext")); 307 // $field = display_input_field(array("new_comment","","longtext")); 308 $field = <<< END 309 <textarea name="new_comment" id="new_comment"></textarea> 310 END; 302 311 if (logged_on) { 303 312 $userid = $_SESSION['userid']; … … 375 384 376 385 $commentsbody .= templates_draw(array( 377 'context' => ' weblogcomment',386 'context' => 'embeddedcomment', 378 387 'postedname' => $comment->postedname, 379 388 'body' => '<a name="cmt' . $comment->ident . '" id="cmt' . $comment->ident . '"></a>' . $comment->body, … … 387 396 } 388 397 $commentsbody = templates_draw(array( 389 'context' => ' weblogcomments',398 'context' => 'embeddedcomments', 390 399 'paging' => $pagelinks, 391 400 'comments' => $commentsbody … … 409 418 </form> 410 419 <div id="ajaxmessages_$object_id"></div> 411 < span style="cursor:hand; cursor:pointer" onclick="sendcomment('{$CFG->wwwroot}mod/generic_comments/action_redirection.php','comment_$object_id', $object_id)">$postcomment</span>420 <input type="button" style="cursor:hand; cursor:pointer" onclick="sendcomment('{$CFG->wwwroot}mod/generic_comments/action_redirection.php','comment_$object_id', $object_id)" value="$postcomment" /> 412 421 </div> 413 422 END;
