Revision [2652]
This is an old revision of Mod042fShowPageCodeHandler made by JsnX on 2004-11-30 01:21:46.
Wikka Mod 042
Type: Feature AdditionCredit
- The author of WakkaWiki handlers/page/raw.php (assuming Hendrik Mans)
- JsnX (added passing the output through nl2br and htmlspecialchars)
- GmBowen for the prompting the development
Description
This modification adds a page handler that shows the raw code of pages, formatted somewhat for viewing.
Usage:
Add /showpagecode to the end of any page URL.
For example:
http://wikka.jsnx.com/HomePage/showpagecode
handlers/page/showpagecode.php
<?php
if ($this->HasAccess("read") && $this->page) {
// display raw page, slightly formatted for viewing
print(nl2br(htmlspecialchars($this->page["body"], ENT_QUOTES)));
}
?>
if ($this->HasAccess("read") && $this->page) {
// display raw page, slightly formatted for viewing
print(nl2br(htmlspecialchars($this->page["body"], ENT_QUOTES)));
}
?>