Revision history for SidenoteActions


Revision [19469]

Last edited on 2008-01-28 00:16:35 by JasonHuebel [Modified links pointing to docs server]

No Differences

Revision [17921]

Edited on 2008-01-24 20:27:40 by JasonHuebel [Modified links pointing to docs server]
Additions:
This set of actions allows the user to create sidenotes similar to post-it notes. You can also find a version that integrates into wikka.css and combines the actions into a single action in SidenoteActionsTormodHaugen. However, this version keeps the actions seperate so that the user can choose not to include some of them.
Deletions:
This set of actions allows the user to create sidenotes similar to post-it notes. You can also find a version that integrates into wikka.css and combines the actions into a single action in SidenoteActionsTormodHaugen.


Revision [17920]

Edited on 2008-01-24 20:27:16 by JasonHuebel [remove TormodHaugen version and moved it to its own page]
Additions:
This set of actions allows the user to create sidenotes similar to post-it notes. You can also find a version that integrates into wikka.css and combines the actions into a single action in SidenoteActionsTormodHaugen.
Deletions:
This set of actions allows the user to create sidenotes similar to post-it notes.
~& Sorry; I had a lunchbreak, and made modification to this action(s). One action, set type, title and text (and width). Type is note|tip|warning and specify colors (yellow, white, red) - set to title if note|tip|warning, title is title (set to NOTE, TIP or WARNING if not specified - uppercase), text is text, and width should be width with a unit (250px/25em/40pt). see/test at http://wiki.tormodh.net/SandBox --TormodHaugen.
%%(php)
<?php
note action
Displays a sidebar note (like a post-it)
Type defaults to title (if given) or note (if no, or bad, title).
Title defaults to type (in uppercase).
Width defaults to 200px.
Syntax: {{note type="note|tip|warning" title="title" text="text" width="width"}}
$type = htmlspecialchars($vars['type']);
$title = htmlspecialchars($vars['title']);
$text = htmlspecialchars($vars['text']);
$width = htmlspecialchars($vars['width']);
if (!$type) {
if ($title) $type = strtolower($title);
else $type = "note";
}
if (!$title) $title = strtoupper($type);
if ($type != "note" && $type != "tip" && $type != "warning") $type = "note";
<div class="sidenote <?php echo $type; ?>"<?php if ($width) echo " style=\"width: $width;\"" ?>>
<div class="title"><?php echo $title; ?></div>
<div class="text">
<?php echo $text; ?>
</div>
</div>
Put these style definitions in wikka.css or link to it in header.php, as noted above:
%%(css)
/* sidenote.css */
/* Contains css for sidenote action. */
div.sidenote {
div.sidenote hr {
div.sidenote div.title {
div.sidenote div.text {
/* Spesific for (yellow) notes. */
div.note {
background-color: #fff900;
div.note div.title {
background-color: #eee800;
/* Spesific for (white) tips. */
div.tip {
background-color: #ffffff;
div.tip div.title {
background-color: #efefef;
/* Spesific for (red) warnings. */
div.warning {
background-color: #ffaaaa;
div.warning div.title {
background-color: #ff0000;
color: #ffffff;


Revision [17917]

Edited on 2008-01-24 20:11:34 by JasonHuebel [added better checking that width is an integer]
Additions:
if (is_numeric($width) ? intval($width) == $width : false) {
if (is_numeric($width) ? intval($width) == $width : false) {
if (is_numeric($width) ? intval($width) == $width : false) {
Deletions:
if ($width == "") {
if ($width == "") {
if ($width == "") {


Revision [17916]

Edited on 2008-01-24 19:50:47 by JasonHuebel [added wikka formattng capability to original actions]
Additions:
<?php echo $this->Format($text); ?>
<?php echo $this->Format($text); ?>
<?php echo $this->Format($text); ?>
Deletions:
<?php echo $text; ?>
<?php echo $text; ?>
<?php echo $text; ?>


Revision [17005]

Edited on 2007-05-31 23:27:40 by TormodHaugen [Reverted]
Additions:
{{image url="http://wikka.jsnx.com/SidenoteActions/files.xml?action=download&file=sidenote.gif" alt="screen shot sidenote actions"}}
===Installation===
First, put the following code in a file called ##css/sidenote.css##:
%%(css)/* sidenote.css */
/* Contains css for tip, note and warn actions. */
/* postit note-style information box */
#note {
clear: both;
font-size: 10pt;
float: left;
width: 200px;
border: 1px solid #AAAAAA;
margin: 15px 10px 0px 0px;
padding: 0px;
background-color: #FFF900;
text-align: justify;
vertical-align: top;
}
#note hr {
height: 1px;
border: 1px solid #AAAAAA;
width: 100%;
}
#note .title {
text-align: center;
font-weight: bold;
background-color: #EEE800;
border-bottom: 1px solid #AAAAAA;
color: #000000;
}
#note #text {
padding: 4px;
color: #000000;
}
/* tip information box */
#tip {
clear: both;
font-size: 10pt;
float: left;
width: 200px;
border: 1px solid #AAAAAA;
margin: 15px 10px 0px 0px;
padding: 0px;
background-color: #FFFFFF;
text-align: justify;
vertical-align: top;
}
#tip hr {
height: 1px;
border: 1px solid #AAAAAA;
width: 100%;
}
#tip .title {
text-align: center;
font-weight: bold;
background-color: #EFEFEF;
border-bottom: 1px solid #AAAAAA;
color: #000000;
}
#tip #text {
padding: 4px;
color: #000000;
}
/* warning information box */
#warn {
clear: both;
font-size: 10pt;
float: left;
width: 200px;
border: 1px solid #AAAAAA;
margin: 15px 10px 0px 0px;
padding: 0px;
background-color: #FFAAAA;
text-align: justify;
vertical-align: top;
}
#warn hr {
height: 1px;
border: 1px solid #AAAAAA;
width: 100%;
}
#warn .title {
color: #FFFFFF;
text-align: center;
font-weight: bold;
background-color: #FF0000;
border-bottom: 1px solid #AAAAAA;
}
#warn #text {
padding: 4px;
color: #000000;
}
%%
This file should be saved in ##actions/note.php##:
%%(php)<?php
/*
note action
Displays a sidebar note (like a post-it)
Syntax: {{note text="text" width="width_in_pixels"}}
*/
$text = htmlspecialchars($vars['text']);
$width = htmlspecialchars($vars['width']);
if ($width == "") {
$width = "200";
}
?>
<DIV ID="note" STYLE="width: <?php echo $width; ?>px">
<DIV ID="text">
<?php echo $text; ?>
</DIV>
</DIV>
%%
This file should be saved in ##actions/tip.php##:
%%(php)<?php
/*
tip action
Displays a sidebar tip (like a post-it)
Syntax: {{tip text="text" width="width_in_pixels"}}
*/
$text = htmlspecialchars($vars['text']);
$width = htmlspecialchars($vars['width']);
if ($width == "") {
$width = "200";
}
?>
<DIV ID="tip" STYLE="width: <?php echo $width; ?>px">
<DIV CLASS="title">TIP</DIV>
<DIV ID="text">
<?php echo $text; ?>
</DIV>
</DIV>
%%
And this file should be saved in ##actions/warn.php##:
%%(php)<?php
/*
warn action
Displays a sidebar warning (like a post-it)
Syntax: {{warn text="text" width="width_in_pixels"}}
*/
$text = htmlspecialchars($vars['text']);
$width = htmlspecialchars($vars['width']);
if ($width == "") {
$width = "200";
}
?>
<DIV ID="warn" STYLE="width: <?php echo $width; ?>px">
<DIV CLASS="title">WARNING</DIV>
<DIV ID="text">
<?php echo $text; ?>
</DIV>
</DIV>
%%
Finally, you need to add the stylesheet to ##actions/header.php##. Find this line:
%% <link rel="stylesheet" type="text/css" href="css/print.css" media="print" />%%
add this line after it:
%% <link rel="stylesheet" type="text/css" href="css/sidenote.css" />%%
If you find this action useful, post a comment and let me know! Also, feel free to comment with requests for feature enhancements. --JasonHuebel
{{files}}
----
~& Sorry; I had a lunchbreak, and made modification to this action(s). One action, set type, title and text (and width). Type is note|tip|warning and specify colors (yellow, white, red) - set to title if note|tip|warning, title is title (set to NOTE, TIP or WARNING if not specified - uppercase), text is text, and width should be width with a unit (250px/25em/40pt). see/test at http://wiki.tormodh.net/SandBox --TormodHaugen.
%%(php)
<?php
/*
note action
Displays a sidebar note (like a post-it)
Type defaults to title (if given) or note (if no, or bad, title).
Title defaults to type (in uppercase).
Width defaults to 200px.
Syntax: {{note type="note|tip|warning" title="title" text="text" width="width"}}
*/
$type = htmlspecialchars($vars['type']);
$title = htmlspecialchars($vars['title']);
$text = htmlspecialchars($vars['text']);
$width = htmlspecialchars($vars['width']);
if (!$type) {
if ($title) $type = strtolower($title);
else $type = "note";
}
if (!$title) $title = strtoupper($type);
if ($type != "note" && $type != "tip" && $type != "warning") $type = "note";
?>
<div class="sidenote <?php echo $type; ?>"<?php if ($width) echo " style=\"width: $width;\"" ?>>
<div class="title"><?php echo $title; ?></div>
<div class="text">
<?php echo $text; ?>
</div>
</div>
%%
Put these style definitions in wikka.css or link to it in header.php, as noted above:
%%(css)
/* sidenote.css */
/* Contains css for sidenote action. */
/* postit note-style information box */
div.sidenote {
clear: both;
font-size: 10pt;
float: left;
width: 200px;
border: 1px solid #AAAAAA;
margin: 15px 10px 0px 0px;
padding: 0px;
background-color: #FFF900;
text-align: justify;
vertical-align: top;
}
div.sidenote hr {
height: 1px;
border: 1px solid #AAAAAA;
width: 100%;
}
div.sidenote div.title {
text-align: center;
font-weight: bold;
background-color: #EEE800;
border-bottom: 1px solid #AAAAAA;
color: #000000;
}
div.sidenote div.text {
padding: 4px;
color: #000000;
}
/* Spesific for (yellow) notes. */
div.note {
background-color: #fff900;
}
div.note div.title {
background-color: #eee800;
}
/* Spesific for (white) tips. */
div.tip {
background-color: #ffffff;
}
div.tip div.title {
background-color: #efefef;
}
/* Spesific for (red) warnings. */
div.warning {
background-color: #ffaaaa;
}
div.warning div.title {
background-color: #ff0000;
color: #ffffff;
}
%%
----
CategoryUserContributions
Deletions:
{{image url="http://wikka.jsnx.com/SidenoteActions/files.xml?action=download


Revision [16804]

Edited on 2007-05-31 10:49:36 by AtrAp9 [Reverted]
Additions:
{{image url="http://wikka.jsnx.com/SidenoteActions/files.xml?action=download
Deletions:
{{image url="http://wikka.jsnx.com/SidenoteActions/files.xml?action=download&file=sidenote.gif" alt="screen shot sidenote actions"}}
===Installation===
First, put the following code in a file called ##css/sidenote.css##:
%%(css)/* sidenote.css */
/* Contains css for tip, note and warn actions. */
/* postit note-style information box */
#note {
clear: both;
font-size: 10pt;
float: left;
width: 200px;
border: 1px solid #AAAAAA;
margin: 15px 10px 0px 0px;
padding: 0px;
background-color: #FFF900;
text-align: justify;
vertical-align: top;
}
#note hr {
height: 1px;
border: 1px solid #AAAAAA;
width: 100%;
}
#note .title {
text-align: center;
font-weight: bold;
background-color: #EEE800;
border-bottom: 1px solid #AAAAAA;
color: #000000;
}
#note #text {
padding: 4px;
color: #000000;
}
/* tip information box */
#tip {
clear: both;
font-size: 10pt;
float: left;
width: 200px;
border: 1px solid #AAAAAA;
margin: 15px 10px 0px 0px;
padding: 0px;
background-color: #FFFFFF;
text-align: justify;
vertical-align: top;
}
#tip hr {
height: 1px;
border: 1px solid #AAAAAA;
width: 100%;
}
#tip .title {
text-align: center;
font-weight: bold;
background-color: #EFEFEF;
border-bottom: 1px solid #AAAAAA;
color: #000000;
}
#tip #text {
padding: 4px;
color: #000000;
}
/* warning information box */
#warn {
clear: both;
font-size: 10pt;
float: left;
width: 200px;
border: 1px solid #AAAAAA;
margin: 15px 10px 0px 0px;
padding: 0px;
background-color: #FFAAAA;
text-align: justify;
vertical-align: top;
}
#warn hr {
height: 1px;
border: 1px solid #AAAAAA;
width: 100%;
}
#warn .title {
color: #FFFFFF;
text-align: center;
font-weight: bold;
background-color: #FF0000;
border-bottom: 1px solid #AAAAAA;
}
#warn #text {
padding: 4px;
color: #000000;
}
%%
This file should be saved in ##actions/note.php##:
%%(php)<?php
/*
note action
Displays a sidebar note (like a post-it)
Syntax: {{note text="text" width="width_in_pixels"}}
*/
$text = htmlspecialchars($vars['text']);
$width = htmlspecialchars($vars['width']);
if ($width == "") {
$width = "200";
}
?>
<DIV ID="note" STYLE="width: <?php echo $width; ?>px">
<DIV ID="text">
<?php echo $text; ?>
</DIV>
</DIV>
%%
This file should be saved in ##actions/tip.php##:
%%(php)<?php
/*
tip action
Displays a sidebar tip (like a post-it)
Syntax: {{tip text="text" width="width_in_pixels"}}
*/
$text = htmlspecialchars($vars['text']);
$width = htmlspecialchars($vars['width']);
if ($width == "") {
$width = "200";
}
?>
<DIV ID="tip" STYLE="width: <?php echo $width; ?>px">
<DIV CLASS="title">TIP</DIV>
<DIV ID="text">
<?php echo $text; ?>
</DIV>
</DIV>
%%
And this file should be saved in ##actions/warn.php##:
%%(php)<?php
/*
warn action
Displays a sidebar warning (like a post-it)
Syntax: {{warn text="text" width="width_in_pixels"}}
*/
$text = htmlspecialchars($vars['text']);
$width = htmlspecialchars($vars['width']);
if ($width == "") {
$width = "200";
}
?>
<DIV ID="warn" STYLE="width: <?php echo $width; ?>px">
<DIV CLASS="title">WARNING</DIV>
<DIV ID="text">
<?php echo $text; ?>
</DIV>
</DIV>
%%
Finally, you need to add the stylesheet to ##actions/header.php##. Find this line:
%% <link rel="stylesheet" type="text/css" href="css/print.css" media="print" />%%
add this line after it:
%% <link rel="stylesheet" type="text/css" href="css/sidenote.css" />%%
If you find this action useful, post a comment and let me know! Also, feel free to comment with requests for feature enhancements. --JasonHuebel
{{files}}
----
~& Sorry; I had a lunchbreak, and made modification to this action(s). One action, set type, title and text (and width). Type is note|tip|warning and specify colors (yellow, white, red) - set to title if note|tip|warning, title is title (set to NOTE, TIP or WARNING if not specified - uppercase), text is text, and width should be width with a unit (250px/25em/40pt). see/test at http://wiki.tormodh.net/SandBox --TormodHaugen.
%%(php)
<?php
/*
note action
Displays a sidebar note (like a post-it)
Type defaults to title (if given) or note (if no, or bad, title).
Title defaults to type (in uppercase).
Width defaults to 200px.
Syntax: {{note type="note|tip|warning" title="title" text="text" width="width"}}
*/
$type = htmlspecialchars($vars['type']);
$title = htmlspecialchars($vars['title']);
$text = htmlspecialchars($vars['text']);
$width = htmlspecialchars($vars['width']);
if (!$type) {
if ($title) $type = strtolower($title);
else $type = "note";
}
if (!$title) $title = strtoupper($type);
if ($type != "note" && $type != "tip" && $type != "warning") $type = "note";
?>
<div class="sidenote <?php echo $type; ?>"<?php if ($width) echo " style=\"width: $width;\"" ?>>
<div class="title"><?php echo $title; ?></div>
<div class="text">
<?php echo $text; ?>
</div>
</div>
%%
Put these style definitions in wikka.css or link to it in header.php, as noted above:
%%(css)
/* sidenote.css */
/* Contains css for sidenote action. */
/* postit note-style information box */
div.sidenote {
clear: both;
font-size: 10pt;
float: left;
width: 200px;
border: 1px solid #AAAAAA;
margin: 15px 10px 0px 0px;
padding: 0px;
background-color: #FFF900;
text-align: justify;
vertical-align: top;
}
div.sidenote hr {
height: 1px;
border: 1px solid #AAAAAA;
width: 100%;
}
div.sidenote div.title {
text-align: center;
font-weight: bold;
background-color: #EEE800;
border-bottom: 1px solid #AAAAAA;
color: #000000;
}
div.sidenote div.text {
padding: 4px;
color: #000000;
}
/* Spesific for (yellow) notes. */
div.note {
background-color: #fff900;
}
div.note div.title {
background-color: #eee800;
}
/* Spesific for (white) tips. */
div.tip {
background-color: #ffffff;
}
div.tip div.title {
background-color: #efefef;
}
/* Spesific for (red) warnings. */
div.warning {
background-color: #ffaaaa;
}
div.warning div.title {
background-color: #ff0000;
color: #ffffff;
}
%%
----
CategoryUserContributions


Revision [14643]

Edited on 2006-06-20 14:18:38 by TormodHaugen [minor]
Additions:
Put these style definitions in wikka.css or link to it in header.php, as noted above:


Revision [14493]

Edited on 2006-06-06 07:01:28 by TormodHaugen [suggestion on changes.]
Additions:
~& Sorry; I had a lunchbreak, and made modification to this action(s). One action, set type, title and text (and width). Type is note|tip|warning and specify colors (yellow, white, red) - set to title if note|tip|warning, title is title (set to NOTE, TIP or WARNING if not specified - uppercase), text is text, and width should be width with a unit (250px/25em/40pt). see/test at http://wiki.tormodh.net/SandBox --TormodHaugen.
%%(php)
<?php
note action
Displays a sidebar note (like a post-it)
Type defaults to title (if given) or note (if no, or bad, title).
Title defaults to type (in uppercase).
Width defaults to 200px.
Syntax: {{note type="note|tip|warning" title="title" text="text" width="width"}}
$type = htmlspecialchars($vars['type']);
$title = htmlspecialchars($vars['title']);
$text = htmlspecialchars($vars['text']);
$width = htmlspecialchars($vars['width']);
if (!$type) {
if ($title) $type = strtolower($title);
else $type = "note";
}
if (!$title) $title = strtoupper($type);
if ($type != "note" && $type != "tip" && $type != "warning") $type = "note";
<div class="sidenote <?php echo $type; ?>"<?php if ($width) echo " style=\"width: $width;\"" ?>>
<div class="title"><?php echo $title; ?></div>
<div class="text">
<?php echo $text; ?>
</div>
</div>
%%(css)
/* sidenote.css */
/* Contains css for sidenote action. */
div.sidenote {
div.sidenote hr {
div.sidenote div.title {
div.sidenote div.text {
/* Spesific for (yellow) notes. */
div.note {
background-color: #fff900;
div.note div.title {
background-color: #eee800;
/* Spesific for (white) tips. */
div.tip {
background-color: #ffffff;
div.tip div.title {
background-color: #efefef;
/* Spesific for (red) warnings. */
div.warning {
background-color: #ffaaaa;
div.warning div.title {
background-color: #ff0000;
color: #ffffff;


Revision [14477]

Edited on 2006-06-05 15:50:15 by JasonHuebel [fixed filename typo]
Additions:
First, put the following code in a file called ##css/sidenote.css##:
Deletions:
First, put the following code in a file called ##css/sidenote.php##: (should be ##css/sidenote.''css''##)NickDamoulakis


Revision [14476]

Edited on 2006-06-05 15:48:49 by JasonHuebel [added width functionality to sidenote actions]
Additions:
%%{{note text="This is a note." width="250"}}
{{tip text="This is a tip." width="250"}}
{{warn text="This is a warning." width="250"}}%%
##text## is a required field. ##width## is optional and defaults to 200 pixels.
Syntax: {{note text="text" width="width_in_pixels"}}
$width = htmlspecialchars($vars['width']);
if ($width == "") {
$width = "200";
<DIV ID="note" STYLE="width: <?php echo $width; ?>px">
Syntax: {{tip text="text" width="width_in_pixels"}}
$width = htmlspecialchars($vars['width']);
if ($width == "") {
$width = "200";
<DIV ID="tip" STYLE="width: <?php echo $width; ?>px">
Syntax: {{warn text="text" width="width_in_pixels"}}
$width = htmlspecialchars($vars['width']);
if ($width == "") {
$width = "200";
<DIV ID="warn" STYLE="width: <?php echo $width; ?>px">
Deletions:
%%{{note text="This is a note.""}}
{{tip text="This is a tip."}}
{{warn text="This is a warning."}}%%
Syntax: {{note text="text"}}
<DIV ID="note">
<DIV CLASS="title">NOTE</DIV>
Syntax: {{tip text="text"}}
<DIV ID="tip">
Syntax: {{warn text="text"}}
<DIV ID="warn">


Revision [11647]

Edited on 2005-11-02 12:08:15 by NickDamoulakis [added width functionality to sidenote actions]
Additions:
First, put the following code in a file called ##css/sidenote.php##: (should be ##css/sidenote.''css''##)NickDamoulakis
Deletions:
First, put the following code in a file called ##css/sidenote.php##:


Revision [10741]

Edited on 2005-08-16 21:56:52 by JavaWoman [adding alt text]
Additions:
{{image url="http://wikka.jsnx.com/SidenoteActions/files.xml?action=download&file=sidenote.gif" alt="screen shot sidenote actions"}}
Deletions:
{{image url="http://wikka.jsnx.com/SidenoteActions/files.xml?action=download&file=sidenote.gif"}}


Revision [10740]

Edited on 2005-08-16 21:47:31 by JasonHuebel [added screenshot]
Additions:
===Screenshot===
{{image url="http://wikka.jsnx.com/SidenoteActions/files.xml?action=download&file=sidenote.gif"}}


Revision [10739]

Edited on 2005-08-16 21:35:40 by JavaWoman [uploading file]
Additions:
{{files}}


Revision [10694]

Edited on 2005-08-15 16:17:06 by JasonHuebel [added note about feature requests]
Additions:
If you find this action useful, post a comment and let me know! Also, feel free to comment with requests for feature enhancements. --JasonHuebel
Deletions:
--JasonHuebel


Revision [10676]

The oldest known version of this page was created on 2005-08-14 01:10:29 by JasonHuebel [added note about feature requests]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki