Revision history for HTMLHandler


Revision [20963]

Last edited on 2009-12-15 06:57:32 by BrianKoontz [Reverted]
Additions:
This handler generates "standalone" HTML, without the header/footer/menu items.
Deletions:
This handler [[http://www.poker-rooms-review.org online holdem poker]] generates "standalone" HTML, without the header/footer/menu items.


Revision [20962]

Edited on 2009-12-15 06:38:44 by RonnyGrom [Reverted]
Additions:
This handler [[http://www.poker-rooms-review.org online holdem poker]] generates "standalone" HTML, without the header/footer/menu items.
Deletions:
This handler generates "standalone" HTML, without the header/footer/menu items.


Revision [20959]

Edited on 2009-11-29 21:44:54 by BrianKoontz [Updated (thanks Nielsio)]
Additions:
Add the following after about line 1109 (//version < 1.1.6.2//) or line 1030 (//version 1.1.6.2/1.1.6.3//) in ##wikka.php## (just before the final else statement):
Add the code above after about line 2183 (//version 1.2//) in ##libs/Wakka.class.php## (just before the final else statement).
Deletions:
Add the following after about line 1109 (//version < 1.1.6.2//) or line 1030 (//version 1.1.6.2/1.1.6.3//) or line 2183 (//version 1.2//) in ##wikka.php## (just before the final else statement):


Revision [20958]

Edited on 2009-11-29 21:42:55 by BrianKoontz [Updated (thanks Nielsio)]
Additions:
<div id="content">
</div>
</body>
</html>
Add the following after about line 1109 (//version < 1.1.6.2//) or line 1030 (//version 1.1.6.2/1.1.6.3//) or line 2183 (//version 1.2//) in ##wikka.php## (just before the final else statement):
Add the following after about line 2879 (//version = 1.1.7//) in ##libs/Wakka.class.php## :
Deletions:
Add the following after about line 1109 (//version < 1.1.6.2//) or line 1030 (//version 1.1.6.2/1.1.6.3//) in ##wikka.php## (just before the final else statement):
Add the following after about line 2879 (//version >= 1.1.7//) in ##libs/Wakka.class.php## :


Revision [20957]

Edited on 2009-11-29 20:36:55 by BrianKoontz [Removed deprecation notice]
Additions:
=====HTML Handler=====
>>
Deletions:
=====HTML Handler ({{color c="red" text="deprecated"}})=====
>>{{color c="red" text="This page has been deprecated. "}}This handler will be included with the 1.2 release; no further code updates will be made to this page. Please visit the [[http://wush.net/trac/wikka/browser/trunk SVN repository]] for the latest code changes.


Revision [20690]

Edited on 2009-06-08 15:26:39 by BrianKoontz [Page deprecated]
Additions:
=====HTML Handler ({{color c="red" text="deprecated"}})=====
>>{{color c="red" text="This page has been deprecated. "}}This handler will be included with the 1.2 release; no further code updates will be made to this page. Please visit the [[http://wush.net/trac/wikka/browser/trunk SVN repository]] for the latest code changes.
==See also:==
1.1.7 patch: [[http://wush.net/trac/wikka/ticket/218]]>>This is the development page for the HTML handler.::c::
Deletions:
=====HTML Handler=====
>>==See also:==
1.1.7 patch: [[http://wush.net/trac/wikka/ticket/218]]
**Note:** This handler will be included with the 1.2 release; no further code updates will be made to this page. Please visit the [[http://wush.net/trac/wikka/browser/trunk SVN repository]] for the latest code changes.>>This is the development page for the HTML handler.::c::


Revision [20689]

Edited on 2009-06-08 15:23:36 by BrianKoontz [Deprecated]
Additions:
1.1.7 patch: [[http://wush.net/trac/wikka/ticket/218]]
**Note:** This handler will be included with the 1.2 release; no further code updates will be made to this page. Please visit the [[http://wush.net/trac/wikka/browser/trunk SVN repository]] for the latest code changes.>>This is the development page for the HTML handler.::c::
Deletions:
1.1.7 patch: [[http://wush.net/trac/wikka/ticket/218]]>>This is the development page for the HTML handler.::c::


Revision [20508]

Edited on 2009-03-05 20:37:15 by BrianKoontz [Added hack to dump all wiki pages to html (html_dump)]
Additions:
// Get list of all wiki pages on site
Deletions:
// Get list of all wiki pages that are readable by the user who
// invoked the handler


Revision [20507]

Edited on 2009-03-05 20:36:08 by BrianKoontz [Added a wiki-wide dump hack (html_dump)]
Additions:
===Dumping an entire wiki===
This is some proof-of-concept code I hacked together rather quickly for a Wikka user in need of a way to dump **all** of his Wikka pages to a directory. I've only tested this on version ##1.1.6.0##, so your results may vary. By default, html files are dumped in ##/tmp/wikka_test/##.
<?php
// Get list of all wiki pages that are readable by the user who
// invoked the handler
$pages = $this->LoadAllPages();

foreach($pages as $page)
{
if ($this->HasAccess("read") && $page) {
// dump pages
ob_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title><?php echo $page['tag'] ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
<?php include("css/html.css") ?>
</style>
</head>
<body>
<?php
$this->config['external_link_tail'] = '';
print($this->Format($page['body'], "html"));
}
$buffer = ob_get_flush();
$filename = $page['tag'].".html";
file_put_contents("/tmp/wikka_test/".$filename, $buffer);
$this->Redirect();


Revision [19116]

Edited on 2008-01-28 00:14:03 by BrianKoontz [Modified links pointing to docs server]

No Differences

Revision [16843]

Edited on 2007-05-31 13:05:13 by BrianKoontz [Updated for 1.1.7]
Additions:
Copy ##css/wikka.css## to ##css/html.css##, then add the following line to the top of html.css:
Create ##handlers/page/html.php## (//version <=1.1.6.3//) or ##handlers/html/html.php## (//version >=1.1.7//):
Add the following after about line 1109 (//version < 1.1.6.2//) or line 1030 (//version 1.1.6.2/1.1.6.3//) in ##wikka.php## (just before the final else statement):
Add the following after about line 2879 (//version >= 1.1.7//) in ##libs/Wakka.class.php## :
// Handler to generate html
elseif ($this->handler == 'html')
print($this->Handler($this->handler));
The Wikka parsing engine doesn't differentiate between relative URIs and absolute URIs (the default is to prepend any "unidentified" URIs with http://). To enable relative URIs, copy formatters/wakka.php to formatters/html.php, then make the following changes starting at around line 240 (//version < 1.1.6.2//), line 284 (//version 1.1.6.2/1.1.6.3//), or line 527 (//version >= 1.1.7//):
Deletions:
Copy css/wikka.css to css/html.css, then add the following line to the top of html.css:
Create handlers/page/html.php:
Add the following after about line 1109 (version < 1.1.6.2) or line 1030 (version 1.1.6.2) in ##wikka.php## (just before the final else statement):
The Wikka parsing engine doesn't differentiate between relative URIs and absolute URIs (the default is to prepend any "unidentified" URIs with http://). To enable relative URIs, copy formatters/wakka.php to formatters/html.php, then make the following changes starting at around line 240 (//version < 1.1.6.2//) or line 284 (//version 1.1.6.2//):


Revision [16842]

Edited on 2007-05-31 12:46:28 by BrianKoontz [Reversion]
Additions:
if ($this->HasAccess("read") && $this->page) {
// display page
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title><?php echo $this->GetPageTag(); ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
<?php include("css/html.css") ?>
</style>
</head>
<body>
$this->config['external_link_tail'] = '';
print($this->Format($this->page["body"], "html"));
}
?>
Add the following after about line 1109 (version < 1.1.6.2) or line 1030 (version 1.1.6.2) in ##wikka.php## (just before the final else statement):
elseif ($this->method == "html")
{
print($this->Method($this->method));
}
The Wikka parsing engine doesn't differentiate between relative URIs and absolute URIs (the default is to prepend any "unidentified" URIs with http://). To enable relative URIs, copy formatters/wakka.php to formatters/html.php, then make the following changes starting at around line 240 (//version < 1.1.6.2//) or line 284 (//version 1.1.6.2//):
// forced links
// \S : any character that is not a whitespace character
// \s : any whitespace character
--->change start<---
// Hack to pick up leading . and / characters in URI
else if (preg_match("/^\[\[([\S|\.|\/]*)(\s+(.+))?\]\]$/s", $thing, $matches)) # recognize forced links across lines
{
--->change end<---
list (, $url, , $text) = $matches;
if ($url)
{
//if ($url!=($url=(preg_replace("/@@|££||\[\[/","",$url))))$result="</span>";
if (!$text) $text = $url;
//$text=preg_replace("/@@|££|\[\[/","",$text);
--->change start<---
$link = $wakka->Link($url, "", $text);
// Hack to handle relative URIs (i.e., links to files
// in the same directory)
if(strstr($link, "http://.") || strstr($link, "http:///"))
$link = preg_replace("/^(.*)http:\/\/(.*)$/",
"\${1}\${2}",
$link);
return $result.$link;
--->change end<---
}
To disable the display of ""CamelWords"" and ""InterWiki"" as clickable links, also delete the following lines from formatters/html.php:
"\b[A-Z???][A-Za-z???????]+[:](?![=_])\S*\b|".
# InterWiki link
"\b([A-Z???]+[a-z????]+[A-Z0-9???][A-Za-z0-9???????]*)\b|".
# CamelWords
===To Do===
- Provide option to exclude inline CSS (with option to display listing of CSS to save in separate file)
- Provide "raw" html (no html, head, body tags)
- Clean up kludge in wikka.php (there should be no need to modify this file to accomodate a new handler type)
- Convince DarTar to include this formatter in the next release so we can show ##""Exports HTML == yes""## in the ""WikkaWiki"" entry on [[http://www.wikimatrix.org WikiMatrix]]!
----
==Categories==
CategoryDevelopmentHandlers
CategoryUserContributions
Deletions:
if ($this->HasAccess("read")


Revision [16709]

Edited on 2007-05-31 10:38:52 by Kd0Ktv [Reversion]
Additions:
if ($this->HasAccess("read")
Deletions:
if ($this->HasAccess("read") && $this->page) {
// display page
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title><?php echo $this->GetPageTag(); ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
<?php include("css/html.css") ?>
</style>
</head>
<body>
$this->config['external_link_tail'] = '';
print($this->Format($this->page["body"], "html"));
}
?>
Add the following after about line 1109 (version < 1.1.6.2) or line 1030 (version 1.1.6.2) in ##wikka.php## (just before the final else statement):
elseif ($this->method == "html")
{
print($this->Method($this->method));
}
The Wikka parsing engine doesn't differentiate between relative URIs and absolute URIs (the default is to prepend any "unidentified" URIs with http://). To enable relative URIs, copy formatters/wakka.php to formatters/html.php, then make the following changes starting at around line 240 (//version < 1.1.6.2//) or line 284 (//version 1.1.6.2//):
// forced links
// \S : any character that is not a whitespace character
// \s : any whitespace character
--->change start<---
// Hack to pick up leading . and / characters in URI
else if (preg_match("/^\[\[([\S|\.|\/]*)(\s+(.+))?\]\]$/s", $thing, $matches)) # recognize forced links across lines
{
--->change end<---
list (, $url, , $text) = $matches;
if ($url)
{
//if ($url!=($url=(preg_replace("/@@|££||\[\[/","",$url))))$result="</span>";
if (!$text) $text = $url;
//$text=preg_replace("/@@|££|\[\[/","",$text);
--->change start<---
$link = $wakka->Link($url, "", $text);
// Hack to handle relative URIs (i.e., links to files
// in the same directory)
if(strstr($link, "http://.") || strstr($link, "http:///"))
$link = preg_replace("/^(.*)http:\/\/(.*)$/",
"\${1}\${2}",
$link);
return $result.$link;
--->change end<---
}
To disable the display of ""CamelWords"" and ""InterWiki"" as clickable links, also delete the following lines from formatters/html.php:
"\b[A-Z???][A-Za-z???????]+[:](?![=_])\S*\b|".
# InterWiki link
"\b([A-Z???]+[a-z????]+[A-Z0-9???][A-Za-z0-9???????]*)\b|".
# CamelWords
===To Do===
- Provide option to exclude inline CSS (with option to display listing of CSS to save in separate file)
- Provide "raw" html (no html, head, body tags)
- Clean up kludge in wikka.php (there should be no need to modify this file to accomodate a new handler type)
- Convince DarTar to include this formatter in the next release so we can show ##""Exports HTML == yes""## in the ""WikkaWiki"" entry on [[http://www.wikimatrix.org WikiMatrix]]!
----
==Categories==
CategoryDevelopmentHandlers
CategoryUserContributions


Revision [16264]

Edited on 2007-03-06 23:56:16 by BrianKoontz [Minor edit; remove exttail]
Additions:
$this->config['external_link_tail'] = '';
Add the following after about line 1109 (version < 1.1.6.2) or line 1030 (version 1.1.6.2) in ##wikka.php## (just before the final else statement):
Deletions:
//For versions < 1.1.6.2://
Add the following after about line 1109 in ##wikka.php## (just before the final else statement):
//For version 1.1.6.2://
Add the following after about line 1030 in ##libs/Wakka.class.php## (just before the final else statement):


Revision [15548]

Edited on 2006-10-25 00:25:02 by BrianKoontz [Linked to #218]
Additions:
Documentation: HTMLHandlerInfo.
1.1.7 patch: [[http://wush.net/trac/wikka/ticket/218]]>>This is the development page for the HTML handler.::c::
Deletions:
Documentation: HTMLHandlerInfo.>>This is the development page for the HTML handler.::c::
//For version 1.1.7://
dd the following after about line 1193 in ##libs/Wakka.class.php## (just before the final else statement):


Revision [15547]

Edited on 2006-10-24 21:42:09 by BrianKoontz [Linked to #218]
Additions:
//For version 1.1.7://
dd the following after about line 1193 in ##libs/Wakka.class.php## (just before the final else statement):


Revision [14734]

Edited on 2006-06-28 22:39:35 by BrianKoontz [Updates for 1.1.6.2]
Additions:
<title><?php echo $this->GetPageTag(); ?></title>
Deletions:
<title><?php echo $this->PageTitle(); ?></title>


Revision [14733]

Edited on 2006-06-28 22:23:03 by BrianKoontz [Updates for 1.1.6.2]
Additions:
//For versions < 1.1.6.2://
Add the following after about line 1109 in ##wikka.php## (just before the final else statement):
//For version 1.1.6.2://
Add the following after about line 1030 in ##libs/Wakka.class.php## (just before the final else statement):
The Wikka parsing engine doesn't differentiate between relative URIs and absolute URIs (the default is to prepend any "unidentified" URIs with http://). To enable relative URIs, copy formatters/wakka.php to formatters/html.php, then make the following changes starting at around line 240 (//version < 1.1.6.2//) or line 284 (//version 1.1.6.2//):
Deletions:
Add the following after about line 1109 in wikka.php (just before the final else statement):
The Wikka parsing engine doesn't differentiate between relative URIs and absolute URIs (the default is to prepend any "unidentified" URIs with http://). To enable relative URIs, copy formatters/wakka.php to formatters/html.php, then make the following changes starting at around line 240:


Revision [14503]

Edited on 2006-06-07 22:02:10 by BrianKoontz [Fixed link]
Additions:
- Convince DarTar to include this formatter in the next release so we can show ##""Exports HTML == yes""## in the ""WikkaWiki"" entry on [[http://www.wikimatrix.org WikiMatrix]]!
Deletions:
- Convince DarTar to include this formatter in the next release so we can show ##""Exports HTML == yes""## in the ""WikkaWiki"" entry on [[http://c2.com/cgi/wiki?WikiPhilosophyFaq WikiMatrix]]!


Revision [14206]

Edited on 2006-05-12 17:39:39 by BrianKoontz [Cleaned up HTML]
Deletions:
<base href="" />


Revision [14200]

Edited on 2006-05-10 09:17:01 by BrianKoontz [Cleaned up HTML]
Additions:
- Convince DarTar to include this formatter in the next release so we can show ##""Exports HTML == yes""## in the ""WikkaWiki"" entry on [[http://c2.com/cgi/wiki?WikiPhilosophyFaq WikiMatrix]]!
Deletions:
- Convince DarTar to include this formatter in the next release so we can show ##""Exports HTML == yes""## in the ""WikkaWiki''" entry on [[http://c2.com/cgi/wiki?WikiPhilosophyFaq WikiMatrix]]!


Revision [14199]

Edited on 2006-05-10 09:16:22 by BrianKoontz [Cleaned up HTML]
Additions:
- Convince DarTar to include this formatter in the next release so we can show ##""Exports HTML == yes""## in the ""WikkaWiki''" entry on [[http://c2.com/cgi/wiki?WikiPhilosophyFaq WikiMatrix]]!
Deletions:
- Convince DarTar to include this formatter in the next release so we can show "Exports HTML == yes" in the ""WikkaWiki''" entry on [[http://c2.com/cgi/wiki?WikiPhilosophyFaq WikiMatrix]]!


Revision [14198]

Edited on 2006-05-10 09:15:48 by BrianKoontz [Cleaned up HTML]
Additions:
- Convince DarTar to include this formatter in the next release so we can show "Exports HTML == yes" in the ""WikkaWiki''" entry on [[http://c2.com/cgi/wiki?WikiPhilosophyFaq WikiMatrix]]!
Deletions:
- Convince DarTar to include this formatter in the next release so we can show "Exports HTML == yes" in the ""WikkaWiki'' entry on [[http://c2.com/cgi/wiki?WikiPhilosophyFaq WikiMatrix]]!


Revision [14197]

Edited on 2006-05-10 09:15:22 by BrianKoontz [Cleaned up HTML]
Additions:
- Convince DarTar to include this formatter in the next release so we can show "Exports HTML == yes" in the ""WikkaWiki'' entry on [[http://c2.com/cgi/wiki?WikiPhilosophyFaq WikiMatrix]]!


Revision [14189]

Edited on 2006-05-10 00:15:46 by BrianKoontz [Bug fix]
Additions:
.header, .footer, .commentsheader, .copyright, .smallprint { display:none; }
<title><?php echo $this->PageTitle(); ?></title>
<base href="" />
To disable the display of ""CamelWords"" and ""InterWiki"" as clickable links, also delete the following lines from formatters/html.php:
"\b[A-Z???][A-Za-z???????]+[:](?![=_])\S*\b|".
# InterWiki link
"\b([A-Z???]+[a-z????]+[A-Z0-9???][A-Za-z0-9???????]*)\b|".
# CamelWords
Deletions:
.header, .footer, .commentsheader, .copyright, .smallprint, .missingpage { display:none; }
<title><?php echo $this->GetWakkaName().": ".$this->PageTitle(); ?></title>
<base href="<?php echo $site_base ?>" />
<?php if ($this->GetMethod() != 'show' || $this->page["latest"] == 'N' || $this->page["tag"] == 'SandBox') echo "<meta name=\"robots\" content=\"noindex, nofollow, noarchive\" />\n"; ?>
<meta name="keywords" content="<?php echo $this->GetConfigValue("meta_keywords") ?>" />
<meta name="description" content="<?php echo $this->GetConfigValue("meta_description") ?>" />


Revision [14138]

Edited on 2006-05-07 16:48:26 by BrianKoontz [Modified CSS exclusions]
Additions:
.header, .footer, .commentsheader, .copyright, .smallprint, .missingpage { display:none; }
Deletions:
.header, .footer, .commentsheader, .copyright, .smallprint { display:none; }


Revision [14128]

Edited on 2006-05-06 22:58:42 by BrianKoontz [Enable relative URIs]
Additions:
print($this->Format($this->page["body"], "html"));
The Wikka parsing engine doesn't differentiate between relative URIs and absolute URIs (the default is to prepend any "unidentified" URIs with http://). To enable relative URIs, copy formatters/wakka.php to formatters/html.php, then make the following changes starting at around line 240:
// forced links
// \S : any character that is not a whitespace character
// \s : any whitespace character
--->change start<---
// Hack to pick up leading . and / characters in URI
else if (preg_match("/^\[\[([\S|\.|\/]*)(\s+(.+))?\]\]$/s", $thing, $matches)) # recognize forced links across lines
--->change end<---
list (, $url, , $text) = $matches;
if ($url)
{
//if ($url!=($url=(preg_replace("/@@|££||\[\[/","",$url))))$result="</span>";
if (!$text) $text = $url;
//$text=preg_replace("/@@|££|\[\[/","",$text);
--->change start<---
$link = $wakka->Link($url, "", $text);
// Hack to handle relative URIs (i.e., links to files
// in the same directory)
if(strstr($link, "http://.") || strstr($link, "http:///"))
$link = preg_replace("/^(.*)http:\/\/(.*)$/",
"\${1}\${2}",
$link);
return $result.$link;
--->change end<---
}
Deletions:
print($this->Format($this->page["body"], "wakka"));


Revision [14105]

Edited on 2006-05-05 23:34:10 by BrianKoontz [Enable relative URIs]
Additions:
Documentation: HTMLHandlerInfo.>>This is the development page for the HTML handler.::c::
==Categories==
CategoryUserContributions
Deletions:
Documentation: HTMHandlerInfo.>>This is the development page for the HTML handler.::c::


Revision [14104]

The oldest known version of this page was created on 2006-05-05 23:33:03 by BrianKoontz [Enable relative URIs]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki