Recent Changes - Search:

Cookbook

PmWiki

pmwiki.org

PostItNotes

Summary: Display yellow Post It Stickies.
Version: 2.0.3
Prerequisites: pmwiki-2.0.0
Status: stable
Maintainer:
Categories:
Votes:

Install

Download postitnotes.phpΔ and put it into cookbook/postitnotes.php

Add the following line into your config.php

 include_once("cookbook/postitnotes.php");

Usage

Simple

(:note here is a note title | here is the content of the note:)

(:note here is a note title | here is the content of the note:)

  • The simple markup is intended to hold small amounts of text. I.e. no other (:markups:) or includes.

Simple Hidden

(:notehidden Title | Content :)

(:notehidden Title | Content :)

Hides the content of the note and shows it only when the title is clicked. JavaScript has to be enabled in the browser.

Block

(:noteblock <color=argument> <float=right(default)|left>
<hidden=false(default)|true>:)
Title
(:notecontent:)
Content
(:noteblockend:)

(:noteblock <color=argument> <float=right(default)|left> <hidden=false(default)|true>:) Title (:notecontent:) Content (:noteblockend:)

The color argument can be:

  • yellow(default)|blue|gray|pink|purple|green - predefined colors in script
  • a hex color value like #cceecc
  • a websafe colorname in capitals like YELLOW

Simple Fancy

If you want to use fancy notes put these pictures into pub/cookbook/postitnotes

(:notefancy Title | Content:)

(:notefancy Title | Content:)

Block Fancy

(:noteblockfancy <float=right(default)|left>:)
Content
(:noteblockend:)

(:noteblockfancy <float=right(default)|left>:) Content (:noteblockend:)

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

See in php file.

Comments


PostitNotes becomes much more usefull 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 postitnotes.php 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 PostiNotes. For instance, using hidden postitNotes, 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. Aditional 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


The link to the fancynote.zip is broken! --Herby? April 07, 2006, at 11:52 AM

Oh, you're right. Fixed the link. - Schlaefer April 07, 2006, at 03:05 PM

Hi :)

Ok, I copied postitnotes.php to cookbook/, extracted fancynoteimages.zip to pub/cookbook/postitnotes/ and placed a few examples here: http://audi100.selbst-doku.de/Main/TurbaxelsWichtigsteLinks

However, once I edit and save one of the postits it's content is saved instaed of the original wiki page it's placed upon. You can try that using my url above.

What's wrong?

Thanks for your help and the great plugin, Axel Groll, Munich April 27, 2006, at 10:26 AM


Hello, it seems that the problem Axel told us is still existing. The notes are so good looking but the first thing I did with it was destroying the content of my page ;-)

It would be nice to get a corrected version. Uwe Stuttgart, June 7, 2006


I haven't tried this, but it looks nice. It would be very cool to combine this with the ShowHide recipe. Pico June 07, 2006, at 08:01 AM


I found a bug in the current version. The code ist not valid because of "$PostItNodesID = 0;". Id and name attributes must begin with a letter, not a digit. I just changed it to "$PostItNodesID = A;" and everything is fine. ;-) Holger Gomaringen June 12, 2006


I just did the replace, but to no avail. The plugin still kills the original page when the postit content is edited and saved. http://audi100.selbst-doku.de/Main/TurbaxelsWichtigsteLinks Axel Groll, Munich July 28th, 2006


Brilliant feature! Thanks

Edit - History - Print - Recent Changes - Search
Page last modified on July 24, 2008, at 02:28 PM