[Pmwiki-users] Skins

Steven Leite steven_leite
Sat Feb 21 22:49:10 CST 2004


Sorry for yet another long post.  I'm summarizing comments from 3 or 4 other
posts here to try and keep the number of new messages in the the mailing
list to a minimum.

> Do we need the {{...}} around the substitutions, or would just $Title and
> $LastModified be sufficient?

I believe it's important to keep the {{...}} (or some alternative).  As a
designer, I expect things to stand out from the rest of the code if they
going to be replaced later on.

Escaping the $, or forcing the Admin to use $$ to mean $ is a perfect
example of  we should not be doing.  Image somebody putting some a table of
prices in $Dollars as part of a template.  As programmers, we need to cater
to the user, not the other way around.

I think PmWiki could process the template seperately so there would be no
confusion (at least not within pmwiki.php) as to the {{$Variables}} in the
template and the {{Free Links}} in the WikiPages.

asside:  I've never been a big fan of the current {{Free Link}} syntax, and
I've gone to great lengths to use [[Free Links]] and {{Directives}} instead
in my modifed versions of PmWiki.

> Pm Wrote:

> show me an example of how a layout designer would specify
> where/how the "Edit Page", "Page Revisions", etc. links would be
> coded in the above format.  Show enough to produce the entire
> resulting links, i.e.,

>> Steve wrote:
>> At a rudimentary level, I might expect to insert {{$WikiContent}} and
have
>> it replaced by the wiki page (plain vanilla version).  I might also
expect
>> to use existing layout scheme.  Perhaps both can co-exist.

I'd like to add to my original comments, that {{$WikiContent}} was a
generalization.  We can be more specifc, for example:

{{$WikiHeader}}
{{$WikiLeftMenu}}
{{$WikiRightMenu}}
{{$WikiContent}}
{{$WikiFooter}}

All these (and more) could be added (or not) to the template.htm file.  I
believe these components (and a few more) already exist (see:
PmWiki.PageLayout)

* Multiple Templates *
A note about templates though, I hated systems where I had to modify 15
templates for one skin to look right, and if I wanted to change skins, I had
to modify yet another 15 templates.  I think I could live with one template
per Group.  I really like the idea that's currently in place, where if the
TemplateName matches the PageName, the template is used, otherwise the
default one is used.  This is sheer genius :-)

Also, In another post, one user suggested one template for the edit page,
one for the search page, etc.  This is OK (for those that want it), but it
should be optional.

* Keeping All the files In One Place *
Many have suggested this, but without first understanding the inherent
security risks.  Then Pm politely points it out.  Then all is well.
However, at the risk of repeating .. I'm thinking it would be really nice if
the MyGroup.htm, MyGroup.css and MyGroup.php could all reside in the same
directory (pmwiki/skins/MyGroup/).

Now the problem of the MyGroup.php being public arises.

>From what I can see, the only thing that needs to be public is the .css
file.  The other two files, PmWiki reads in, interprets, and spits out as
HTML.  Couldn't we do something about that pesky .css file?  Either get
PmWiki to write a copy in the /pub/css so the Admin doesn't have to do it,
or read it in to memory, and/or do something with it (like embed it in
HTML).

Sorry if my suggestion is in left field.  I'm not an expert here, but I
think putting all those custom files in ONE place is the best approach (if
it can be done with security in mind).  It's that pesky .css file that is
causing havoc here :-)

* MyGroup.htm versus MyGroup.css *
Now the question is, can MyGroup.htm and the MyGroup.php play nice together?
Or do you have to choose one ore the other?  How can we integrate both, but
not require both?  This is more a question for the programmers.

Is this still valid comment Pm?
> PmWiki has no problem with multiple layout schemes, so yes they can
co-exist.

* HTML Comments for PmWiki *

<!--PmWikiFooterStart-->
       ... some html ...
<!--PmWikiFooterEnd-->

Question:  Since php can be embedded in html, wouldn't that almost
completely eliminate the need for the MyGroup.php file (assuming you had a
MyGroup.htm template)?  Sad, I kinda liked the idea of having a (simple)
html template, and a seperate (and optional) .php Group configuration file.

> Would it be okay to also allow comments such as
>
> <!--wiki:$Group.SideBar Main.SideBar-->
> <!--function:MyPhpFunction-->

I guess anything goes where php is concerned :-o  I think it's fine, since I
already know most everything is optional, it means I don't have to know
about it or care about it.  Eventually if I get to the point where I do want
to know about it, then that functionality will be available.

Another thing, in a later post Pm attached a sample .tmpl file.  The only
thing I would suggest changing there is that each section should have Start
and Stop markers.  This not only helps the html author when viewing the
source code, but it's easier for PmWiki to cut-out chunks of the template
completely.  It's just my logic .. I suppse you could just search up to the
next <!--Comment, but I like my source code to be clearly marked with a
start and end point.

I envision this being useful for the [[noheader]], [[nofooter]] directives,
allowing users to effectively modify your template by requesting parts of it
not be shown.

-- S

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://contra.vosn.net/pipermail/pmwiki-users_pmichaud.com/attachments/20040222/daee2a1e/attachment.htm


More information about the pmwiki-users mailing list