OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /v/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-meta Date: 14-Mar-2006 18:00:53
Branch: HEAD Handle: 2006031417005200
Added files:
openpkg-meta global-template.php
Log:
many cleanups and more documentation
Summary:
Revision Changes Path
1.1 +98 -0 openpkg-meta/global-template.php
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-meta/global-template.php
============================================================================
$ cvs diff -u -r0 -r1.1 global-template.php
--- /dev/null 2006-03-14 18:00:52 +0100
+++ global-template.php 2006-03-14 18:00:52 +0100
@@ -0,0 +1,98 @@
+<script language="php">
+ include("meta.php");
+ meta_start("path=meta.template&pane=2");
+</script>
+
+<h1>Meta: Websites Template</h1>
+
+OpenPKG Meta provides the uniform page canvas template for the websites.
+
+<h2>Canvas Template Requesting</h2>
+
+The uniform page canvas template is available under the URL
+<a
href="http://meta.openpkg.org/canvas.php"><tt>http://meta.openpkg.org/canvas.php</tt></a>.
+It provides the following major URL <tt>QUERY_STRING</tt> options:
+
+<ul>
+ <li><tt>path=</tt><element1><tt>.</tt><element2>...</i><br/>
+ This is the path of dot-separated path elements to the active
+ page in the websites <a href="global-sitemap.php">navigation
+ tree</a>. The path has to match the "<tt>id</tt>"
+ attribute of the "<tt>li</tt>" element of a page in the <a
+ href="global-sitemap.php">navigation tree</a> source text.
+ For instance "<tt>project.registry.help</tt>" is the path
+ for the help page of the OpenPKG Registry.
+ </li>
+ <li><tt>pane=</tt>{<tt>1</tt>,<tt>2</tt>}<br/>
+ This selects whether the canvas uses a 1-pane or 2-pane (default)
layout.
+ The 2-pane layout provides a collapsed navigation tree in a side-bar
on the right hand side.
+ The 1-pane layout provides a full-width body and just a navigation
path at the top.
+ </li>
+ <li><tt>stretch=</tt>{<tt>body</tt>,<tt>margin</tt>}<br/>
+ This selects whether the canvas body or the margin (default) stretches
to
+ fill the browser viewport. Stretching the margin is preferred as it
+ doesn't destroy the canvas visual layouting. Stretching the body is
+ useful (especially in combination with "<tt>pane=1</tt>") for content
+ having a very large width.
+ </li>
+</ul>
+
+<h2>Canvas Template Content</h2>
+
+The resulting content is a HTML page containing three markers:
+
+<ul>
+ <li><tt><!-- CANVAS: HEAD --></tt><br/>
+ This is where content intended for the HTML <head>
+ element has to be inserted by the consumer.
+ </li>
+ <li><tt><!-- CANVAS: BODY --></tt><br/>
+ This is where primary content (rendered in the main content area)
+ intended for the BODY <head> element has to be inserted by
+ the consumer.
+ </li>
+ <li><tt><!-- CANVAS: SIDE --></tt><br/>
+ This is where secondary content (rendered in the side-bar content
+ area) intended for the BODY <head> element has to be
+ inserted by the consumer.
+ </li>
+</ul>
+
+<h2>Canvas Template External References</h2>
+
+The generated HTML page references various additional
+data (JavaScript, CSS, graphics, etc) from <tt>meta.openpkg.org</tt>
+via the <u>local</u> URL prefix <tt>/meta/</tt>..
+This is important as some browsers do not allow referenced content to
+be loaded externally (e.g. Internet Explorer doesn't allow to load
+JavaScript from an external URL).
+
+<p/>
+Hence to use <tt>meta.openpkg.org</tt>
+content on a website <tt>http://www.example.com/</tt> the URL
+<tt>http://www.example.com/meta/</tt> has to be transparently <u>proxied</u>
to
+<tt>http://meta.openpkg.org/</tt>.
+This is usually achieved by using Apache/mod_proxy and the
+following two configuration directives in <tt>apache.conf</tt>:
+
+<pre>
+ProxyPass /meta/ http://meta.openpkg.org/
+ProxyPassReverse /meta/ http://meta.openpkg.org/
+</pre>
+
+<h2>Canvas Template Consumer Frontend</h2>
+
+For convenience reasons, there exists a consumer PHP frontend script
+<a href="global-download.php?file=meta.php"><tt>meta.php</tt></a>
+which can be used on the consumer website via PHP to easily use the
+central canvas template transparently. For this, download and save
+the script into the consumer's website document root.
+Then configure the Apache 1.3 webserver to process <tt>*.php</tt> files
+with PHP 4.1.
+Then you can create consumer pages which use <tt>meta.php</tt>. See
+<a href="global-download.php?file=sample.php"><tt>sample.php</tt></a>
+for a <a href="sample.php">sample consumer page</a>.
+
+<script language="php">
+ meta_end();
+</script>
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [email protected]