Recent Changes - Search:

Cookbook

PmWiki

pmwiki.org

ColorNotes

Summary: Display yellow (or other color) "sticky" notes.
Version: 2014-05-25
Prerequisites: pmwiki-2.0.0
Status: stable
Maintainer:
Categories:
Votes:

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

  • Version 2.0.4 (2009-07-20) - compatibility with Table Edit recipe
  • See in php file for more.

Comments


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, behaviour 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.

Edit - History - Print - Recent Changes - Search
Page last modified on May 25, 2014, at 07:37 PM