[pmwiki-users] Using inote markup as a systemwide LatestNews flag/sticky

K.A.Bouton k.a.bouton at reading.ac.uk
Fri Aug 12 04:20:33 CDT 2005


I think I need something between the two - where I can define a wikistyle
and the file to include within it all at one place

I do like Radu's suggestion on the test page of (:includepostit
Test.LatestNews:)

Meanwhile I'll test out your suggestions. Rather than a per page %define% I
want to do a FarmWide WikiStyle

Within WIkiStyle where does rframe fit?

$WikiStyle['LatestNews']['width'] = '150px';
$WikiStyle['LatestNews']['bgcolor'] = 'pink';
$WikiStyle['LatestNews']['font'] = 'smaller';
$WikiStyle['LatestNews']['???'] = 'rframe';

Thanks

> 
> I'm currently pushing for a new version of 
> postit/stickynotes, based on wikistyles.  I've put some examples at 
> http://www.pmwiki.org/wiki/Test/Sidenotes .
> 
> First, note that one can easily define a %sidenote% wikistyle with:
> 
>     %define=sidenote rframe width=150px font-size=smaller%
> 
> Then, to create a sidenote, one can write
> 
>     %sidenote%  Here is my sidenote.
> 
> Or, to include things like paragraphs or lists, one can use
> 
>     >>sidenote<<
>     Here is my sidenote.
>     >><<
> 
> If you really want something that looks like a "Post-It"(TM) 
> note, then set the background color:
> 
>     %define=postitnote sidenote bgcolor=yellow%
> 
>     >>postitnote<<
>     Here's a Post-It note
>     >><<
> 
>     %postitnote bgcolor=#e0e0ff% And here's a blue post-it!
> 
> So, to get back to your goal...
> 
> > With markup extension inote its nice to use the include 
> page to create 
> > a stickynote on all farm field homepages when there is something I 
> > need to let everyone know eg Main.LatestNews
> 
> With wikistyles you can do:
> 
>     >>rframe width=200px font-size=smaller<<
>     (:include Main.LatestNews:)
>     >><<
> 
> > 1) I want the header in the sticky note to read the the 
> (:title:) of 
> > the page I am calling in
> 
>     >>rframe width=200px font-size=smaller<<
>     {$Title}
>     (:include Main.LatestNews:)
>     >><<
> 
> or you can put the {$Title} itself into the LatestNews page.
> 
> > 2) I don't want the edit link (I have hand edited the extendmarkup 
> > file to remove this but thhere should be another way so I don't 
> > overwrite this with
> > updates)
> 
> The edit link isn't there by default.  It's easily added by 
> placing [[Main.LatestNews?action=edit | edit news]] somewhere 
> in either the frame or in the LatestNews page itself.
> 
> > 3) I want to be able to set the color of the sticky note as is done 
> > with the postitnote extension.
> 
>     >>rframe width=200px font-size=smaller bgcolor=yellow<<
> 
> > 4) And - getting fancier - Would be nice if I could use it 
> > conditionally by date - if date of LatestNews is older that 30 days 
> > don't show it
> 
> Ooooh, that one is trickier.  We'd probably need a custom 
> condition for that --
> 
>     (:if lastmodified Main.LatestNews 30:)
>     >>postitnote<<
>     (:include Main.LatestNews:)
>     >><<
>     (:ifend:)
> 
> although I'd have to figure out the exact syntax I want to use here.
> 
> Hope this helps...?
> 
> Pm
> 





More information about the pmwiki-users mailing list