Revision [10702]
This is an old revision of InLineComments made by GmBowen on 2005-08-15 17:51:58.
In-Line Comments
It can be useful for multiple authors to be able to leave notes & comments for each other within the body of text (this happens in various word processors for example). This action is a simple commenting system that allows authors to leave notes within the body of the text. I've also modified the file (colours & indicator letter) to provide in-line "Help" information.
This action takes advantage of the wonderful little tooltip script written by Walter Zorn and available at http://www.walterzorn.com/tooltip/tooltip_e.htm
Place the tooltip script (with it's original name wz_tooltip.js) in the wiki root in a directory called scripts.
Place the following code, in a file called tag.php, in the actions directory...
<?php
// tag.php V1.0 copyright by G. M. Bowen & Andrew Somerville for use in wikka wiki as part of a SSHRC research project.
// Released under GPL.
// Useage: {{tag comment="This is a comment on this part of the paragraph!"}}
// REQUIRES Walter Zorn's wz_tooltip.js to be placed in a directory called "scripts" in the wikka root directory
// Note to users....there's LOTS of room for modifying this tooltip for your own uses. I've only used a few of the available features....see the original site.
echo '<span onmouseover="'.
'this.T_FONTCOLOR=\'#000066\';'.
'this.T_BORDERWIDTH=1;'.
'this.T_WIDTH=\'225\';'.
'this.T_BGCOLOR=\'#e6ecff\';'.
'this.T_FONTSIZE=\'12px\';'.
'this.T_PADDING=\'5\';'.
'this.T_TITLE=\'Comment...\';'.
'return escape(\'' . strip_tags($comment). '\')"><sup><strong><span class=\'exttail\'>T</span></strong></sup></span>';
echo "<script language=\"JavaScript\" type=\"text/javascript\" src=\"./scripts/wz_tooltip.js\"></script>";
?>
// tag.php V1.0 copyright by G. M. Bowen & Andrew Somerville for use in wikka wiki as part of a SSHRC research project.
// Released under GPL.
// Useage: {{tag comment="This is a comment on this part of the paragraph!"}}
// REQUIRES Walter Zorn's wz_tooltip.js to be placed in a directory called "scripts" in the wikka root directory
// Note to users....there's LOTS of room for modifying this tooltip for your own uses. I've only used a few of the available features....see the original site.
echo '<span onmouseover="'.
'this.T_FONTCOLOR=\'#000066\';'.
'this.T_BORDERWIDTH=1;'.
'this.T_WIDTH=\'225\';'.
'this.T_BGCOLOR=\'#e6ecff\';'.
'this.T_FONTSIZE=\'12px\';'.
'this.T_PADDING=\'5\';'.
'this.T_TITLE=\'Comment...\';'.
'return escape(\'' . strip_tags($comment). '\')"><sup><strong><span class=\'exttail\'>T</span></strong></sup></span>';
echo "<script language=\"JavaScript\" type=\"text/javascript\" src=\"./scripts/wz_tooltip.js\"></script>";
?>
CategoryUserContributions