[pmwiki-users] Nested divs needed for blog styling...

Ryan R. Varick rvarick at gmail.com
Mon Dec 12 09:51:48 CST 2005


On 12/12/05, Mikael Nilsson <mini at nada.kth.se> wrote:
> Something like this....:
>
> Don't apply this, it's an ugly hack.

Heh, this is one of the problems with using a recipe three times
removed from the PmWiki source -- I don't know how PmWiki does certain
things, and the result is something inflexible.

Anyway, if you want to wait for a day or so, I'm going to be releasing
a 1.1 version.  Among other improvments, I've taken Pm's advice and
converted the blog entry format to directives.  A blog entry will look
like this:

(:blogentry:)
(:blogheading TITLE:)
(:blogtimestamp UNIX_TIME:)
(:blogpermalink GROUP.PAGE:)
WIKI MARKUP
(:blogentryend:)

This should allow a lot of flexibility in presentation.  Each of these
directives takes the capture (in upper case) and passes it to a
seperate function.  The function returns a formatted string.  These
functions are very simple, and just figure out what to do with the
parameter.

So, for instance, RSS will take the UNIX timestamp and generate a GMT
timestamp, while the author could, for example, make it say, "Yaaarrr
there, this entry be posted on Mon. December 12, 2005."  ISO, US, GMT,
it's all up to you!

Additionally, the code to handle (:blogentry:) replaces it with
alternating div classes.  Some people were requesting alternating
background colors, so this will generate blog entries classed
something like this:

<div class="blog1">...</div>
<div class="blog2">...</div>
<div class="blog1">...</div>

The new format is already done.

I have to update the RSS regexps to look for the new format, and
generally test and debug the whole thing.  This represents a major
format change, and I generally want to avoid doing that, so I hope
this will be the final format.

It should allow me to more easily do things like create a seperate
edit form for blog entries, which was requested earlier.

Any comments or suggestions?

Ryan




More information about the pmwiki-users mailing list