[pmwiki-users] Editing CSS and JS files
Patrick R. Michaud
pmichaud at pobox.com
Thu Jan 26 10:02:22 CST 2006
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
More information about the pmwiki-users
mailing list