|
Revision 67
(checked in by hspath, 3 years ago)
|
- added "view source" link to example page template
- changed time:countdown christmas example to year 2005 (example3.xml)
- changed require/include statements to fit new directory structure
- moved inclusions to the files where there are needed
(e.g. "require 'patTemplate.php' was in /index.php, but patTemplate is used
in pat/patXMLRenderer.php)
- added page-level DocBlocks? where missing
- reformatted most code to come near PEAR Coding Standards
- fixed several E_NOTICEs
- merged some features from patSite
- optimized referer filtering for logging
- added function for creating directories recursively
- created /pat/patXMLRenderer/Extension
|
- Property 0 set to
- Property 1 set to
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
require_once 'config/patXMLRenderer.php'; |
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
include_once $extDir.'/knownExtensions.php'; |
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
require_once 'pat/patXMLRenderer.php'; |
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
require_once 'pat/patXMLRenderer/TxtLogger.php'; |
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 |
$file = isset( $_GET['file'] ) |
|---|
| 26 |
? $_GET['file'] |
|---|
| 27 |
: false; |
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 |
$randy = new patXMLRenderer; |
|---|
| 31 |
|
|---|
| 32 |
|
|---|
| 33 |
$randy->setExtensionDir( $extDir ); |
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 |
$randy->setKnownExtensions( $knownExtensions ); |
|---|
| 37 |
|
|---|
| 38 |
|
|---|
| 39 |
$randy->setSkins( $skins ); |
|---|
| 40 |
|
|---|
| 41 |
$randy->selectSkin( 'pat' ); |
|---|
| 42 |
|
|---|
| 43 |
|
|---|
| 44 |
$randy->setDefaultFile( $defaultFile ); |
|---|
| 45 |
|
|---|
| 46 |
$randy->setErrorFile( $errorFile ); |
|---|
| 47 |
|
|---|
| 48 |
|
|---|
| 49 |
$randy->setOption( 'autoadd', 'on' ); |
|---|
| 50 |
|
|---|
| 51 |
|
|---|
| 52 |
$randy->setOption( 'cache', 'off' ); |
|---|
| 53 |
|
|---|
| 54 |
|
|---|
| 55 |
$randy->setOption( 'log', 'off' ); |
|---|
| 56 |
|
|---|
| 57 |
|
|---|
| 58 |
|
|---|
| 59 |
|
|---|
| 60 |
|
|---|
| 61 |
|
|---|
| 62 |
|
|---|
| 63 |
|
|---|
| 64 |
|
|---|
| 65 |
|
|---|
| 66 |
|
|---|
| 67 |
|
|---|
| 68 |
|
|---|
| 69 |
|
|---|
| 70 |
|
|---|
| 71 |
|
|---|
| 72 |
$randy->setXMLDir( $xmlDir ); |
|---|
| 73 |
|
|---|
| 74 |
|
|---|
| 75 |
$randy->setXMLFile( $file ); |
|---|
| 76 |
|
|---|
| 77 |
|
|---|
| 78 |
$template = new patTemplate(); |
|---|
| 79 |
|
|---|
| 80 |
$randy->setTemplate( $template ); |
|---|
| 81 |
|
|---|
| 82 |
|
|---|
| 83 |
$randy->useSessions(); |
|---|
| 84 |
|
|---|
| 85 |
|
|---|
| 86 |
$randy->initRenderer(); |
|---|
| 87 |
|
|---|
| 88 |
|
|---|
| 89 |
foreach( $baseTemplates as $tmplFile ) |
|---|
| 90 |
$randy->addTemplateFile( $tmplFile ); |
|---|
| 91 |
|
|---|
| 92 |
|
|---|
| 93 |
$randy->displayRenderedContent(); |
|---|
| 94 |
?> |
|---|
| 95 |
|
|---|