ColorNotes
(redirected from Cookbook.PostItNotes)
Documentation
See Attach:colornotes-readme.txtΔ
See also
GUI Button
You can use this code in your config.php and image (in the pub/guiedit) to get it to show in your gui:
$GUIButtons['stickyNote'] = array(700, '(:note Comment: |', ':)\\n', '$[Text]',
'$GUIButtonDirUrlFmt/sticky.gif"$[Yellow Sticky Note]"');
Markup Extensions
This script encouraged jr to add colours to the {=sticky notes=}
inline markup to the Markup Extensions, via the {=sticky notes|colour=}
variant, where colour = yellow | blue | pink | green | purple | grey. These are the Mac OS X sticky note colours. The sticky note text can contain any inline wiki markups. That script also includes
(:inote PageName:)
markup, which creates a yellow sticky note using the contents of PageName. Just write (:inote SomePage:) on a line by itself and click the edit link in the note's title bar. This is an alternative to (but not a replacement for) the noteblock tag. It uses the PmWiki include function, so all the line selection include options also work. jr
Wikistyles
Since PmWiki has div support in the core you can also simply define stickies with wikistyles. See this mailinglist post and Test.Sidenotes.
History
- 20200330 : update for PHP 7.2 by Petko. Note, the recipe is entirely unsupported, something similar may be achieved with core PmWiki:WikiStyles and PmWiki:BlockMarkup#details.
- Version 2.0.4 (2009-07-20) - compatibility with Table Edit recipe
- See in php file for more.
Comments
The markup in line 116 leads to a PHP7-Error. In addition line 29 with "missing valid constant name as string value". Maybe somebody can support me to modify the markup. :-| Holger March 28, 2020, at 07:16 PM
Updated, unless I missed something. I don't recommend using this recipe without a maintainer. --Petko March 30, 2020, at 10:47 AM
THX a lot Petko. :-) I am still using the recipe for a more than 10 years old wiki with a handful visitors per month. ;-) For all other websites the recipe was already deactivated after PHP5.5. Holger March 30, 2020, at 11:57 AM
ColorNotes becomes much more useful if some new attributes are added:
- width=... such as (:noteblock color=yellow width=250px:) or (:noteblock color=yellow width=100%:) — note the per-cent sign.
Added attribute width= in 2.0.3 - Schlaefer February 12, 2006, at 04:39 AM
- border=.... such as (:noteblock color=yellow border=0px:) or (:noteblock color=yellow border='1px solid':) — note the quotes to enclose multi parts arguments''.
New attributes are very easy to add in the code:
/* ----------------------------------------------- */ if (!isset ($opt['width'])) $JD_width = "250px"; else $JD_width = $opt['width']; if (!isset ($opt['border'])) $JD_border = "1px solid #74664E"; else $JD_border = $opt['border']; /* ----------------------------------------------- */ ...... /* ----------------------------------------------- */ $style[$color]['table']['width'] = $JD_width; $style[$color]['table']['border'] = $JD_border; /* ----------------------------------------------- */
These new attributes extend greatly the usage of ColorNotes. For instance, using hidden ColorNotes, it is possible to create page of questions with hidden answers.
JDem — January 05, 2006, at 10:02 AM (WET)
New release 2.0. Code changed a lot, behavior shouldn't. Please report bugs. Additional parameters like width should be fairly simple to add in v2. I also cleaned up this page and deleted a lot of old comments. Restore if I gone to far.- Schlaefer February 09, 2006, at 08:45 AM
User notes +1: If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.