[pmwiki-users] Editing CSS and JS files
Jon Haupt
jhaupt at gmail.com
Thu Jan 26 12:26:03 CST 2006
On 1/26/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
>
> On Thu, Jan 26, 2006 at 09:20:20AM -0600, Jon Haupt wrote:
> > I've been trying to get CSS to function in this way here:
> >
> > http://www.pmwiki.org/wiki/Cookbook/CSSInWikiPages
> >
> > But so far have had little success. The markup we came up with for
> > (:stylesheet:) doesn't seem to work, and I can't figure out how to
> make
> > the wiki use the source text of a wiki page without calling
> > ?action=source. I'm still fairly certain it has to work, but haven't
> had
> > the time to tinker with it any more.
>
> To grab the text of a wiki page, just do:
>
> $page = ReadPage($pagename, READPAGE_CURRENT);
> if (!$page) { "page doesn't exist"; }
> $text = $page['text'];
>
> To get the text only if the current visitor has read
> authorization, use:
>
> $page = RetrieveAuthPage($pagename, 'read', false, READPAGE_CURRENT);
> if (!$page) { "page doesn't exist or is read protected"; }
> $text = $page['text'];
>
> Pm
>
Alright, so how do I refer in markup directly to a particular page (e.g.
$SiteGroup.StyleSheet)? as in
$page = ReadPage('$SiteGroup.StyleSheet', READPAGE_CURRENT);
if (!$page) { "page doesn't exist"; }
$stylesheettext = $page['text'];
$HTMLStylesFmt['skincss'] = $stylesheettext;
When I put this into skin.php, nothing happens. What's not right here? Am
I not allowed to substitute for $pagename like that? or am I not allowed to
stick $stylesheettext in like I did?
Jon
--
Jon Haupt
Fine & Performing Arts Librarian
Iowa State University
152 Parks Library
Ames, IA 50011
515-294-0904
jhaupt at iastate.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users/attachments/20060126/16a4de17/attachment.html
More information about the pmwiki-users
mailing list