[Commits] [svn:einsteintoolkit] www/ (Rev. 1152)

barry.wardell at gmail.com barry.wardell at gmail.com
Fri Mar 14 15:10:46 CDT 2014


User: barry.wardell
Date: 2014/03/14 03:10 PM

Added:
 /documentation/MaintGuide/
  .htaccess, index.php
 /documentation/ReferenceManual/
  .htaccess, index.php
 /documentation/UsersGuide/
  .htaccess, index.php

Modified:
 /global/
  navigation.php

Log:
 Integrate style of User's Guide, Reference Manual and Maintainer's Guide with the rest of the site

File Changes:

Directory: /documentation/MaintGuide/
=====================================

File [added]: .htaccess
Delta lines: +9 -0
===================================================================
--- documentation/MaintGuide/.htaccess	                        (rev 0)
+++ documentation/MaintGuide/.htaccess	2014-03-14 20:10:46 UTC (rev 1152)
@@ -0,0 +1,9 @@
+DirectoryIndex index.php
+
+<IfModule mod_rewrite.c>
+RewriteEngine On
+RewriteRule ^(.*)\.png$ - [L]
+RewriteRule ^(.*)\.css$ - [L]
+RewriteRule ^(.*\.html)$  index.php?page=$1 [L]
+
+</IfModule>

File [added]: index.php
Delta lines: +25 -0
===================================================================
--- documentation/MaintGuide/index.php	                        (rev 0)
+++ documentation/MaintGuide/index.php	2014-03-14 20:10:46 UTC (rev 1152)
@@ -0,0 +1,25 @@
+<?php
+
+$page = basename((isset($_GET['page']) ? $_GET['page'] : 'MaintGuide.html'));
+if($page == "..")
+  $page = 'MaintGuide.html';
+$page = $_SERVER['DOCUMENT_ROOT'].'/documentation/MaintGuide/'.$page;
+
+if (! file_exists($page)) {
+  header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found");
+  header("Status: 404 Not Found");
+  $_SERVER['REDIRECT_STATUS'] = 404;
+  include_once($_SERVER['DOCUMENT_ROOT'].'/global/header.php');
+  echo "Error 404: Documentation page for thorn ".basename($page)." does not exist.";
+  include_once($_SERVER['DOCUMENT_ROOT'].'/global/footer.php');
+  exit();
+} else {
+  include_once($_SERVER['DOCUMENT_ROOT'].'/global/header.php');
+  $contents = file_get_contents($page);
+  preg_match('/.*<body[^>]*>(.*)<\/body>.*/sm', $contents, $body);
+  echo '<link rel="stylesheet" type="text/css" href="/documentation/MaintGuide/MaintGuide.css">';
+  echo $body[1];
+  include_once($_SERVER['DOCUMENT_ROOT'].'/global/footer.php');
+}
+
+?>

Directory: /documentation/ReferenceManual/
==========================================

File [added]: .htaccess
Delta lines: +9 -0
===================================================================
--- documentation/ReferenceManual/.htaccess	                        (rev 0)
+++ documentation/ReferenceManual/.htaccess	2014-03-14 20:10:46 UTC (rev 1152)
@@ -0,0 +1,9 @@
+DirectoryIndex index.php
+
+<IfModule mod_rewrite.c>
+RewriteEngine On
+RewriteRule ^(.*)\.png$ - [L]
+RewriteRule ^(.*)\.css$ - [L]
+RewriteRule ^(.*\.html)$  index.php?page=$1 [L]
+
+</IfModule>

File [added]: index.php
Delta lines: +25 -0
===================================================================
--- documentation/ReferenceManual/index.php	                        (rev 0)
+++ documentation/ReferenceManual/index.php	2014-03-14 20:10:46 UTC (rev 1152)
@@ -0,0 +1,25 @@
+<?php
+
+$page = basename((isset($_GET['page']) ? $_GET['page'] : 'ReferenceManual.html'));
+if($page == "..")
+  $page = 'ReferenceManual.html';
+$page = $_SERVER['DOCUMENT_ROOT'].'/documentation/ReferenceManual/'.$page;
+
+if (! file_exists($page)) {
+  header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found");
+  header("Status: 404 Not Found");
+  $_SERVER['REDIRECT_STATUS'] = 404;
+  include_once($_SERVER['DOCUMENT_ROOT'].'/global/header.php');
+  echo "Error 404: Documentation page for thorn ".basename($page)." does not exist.";
+  include_once($_SERVER['DOCUMENT_ROOT'].'/global/footer.php');
+  exit();
+} else {
+  include_once($_SERVER['DOCUMENT_ROOT'].'/global/header.php');
+  $contents = file_get_contents($page);
+  preg_match('/.*<body[^>]*>(.*)<\/body>.*/sm', $contents, $body);
+  echo '<link rel="stylesheet" type="text/css" href="/documentation/ReferenceManual/ReferenceManual.css">';
+  echo $body[1];
+  include_once($_SERVER['DOCUMENT_ROOT'].'/global/footer.php');
+}
+
+?>

Directory: /documentation/UsersGuide/
=====================================

File [added]: .htaccess
Delta lines: +9 -0
===================================================================
--- documentation/UsersGuide/.htaccess	                        (rev 0)
+++ documentation/UsersGuide/.htaccess	2014-03-14 20:10:46 UTC (rev 1152)
@@ -0,0 +1,9 @@
+DirectoryIndex index.php
+
+<IfModule mod_rewrite.c>
+RewriteEngine On
+RewriteRule ^(.*)\.png$ - [L]
+RewriteRule ^(.*)\.css$ - [L]
+RewriteRule ^(.*\.html)$  index.php?page=$1 [L]
+
+</IfModule>

File [added]: index.php
Delta lines: +25 -0
===================================================================
--- documentation/UsersGuide/index.php	                        (rev 0)
+++ documentation/UsersGuide/index.php	2014-03-14 20:10:46 UTC (rev 1152)
@@ -0,0 +1,25 @@
+<?php
+
+$page = basename((isset($_GET['page']) ? $_GET['page'] : 'UsersGuide.html'));
+if($page == "..")
+  $page = 'UsersGuide.html';
+$page = $_SERVER['DOCUMENT_ROOT'].'/documentation/UsersGuide/'.$page;
+
+if (! file_exists($page)) {
+  header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found");
+  header("Status: 404 Not Found");
+  $_SERVER['REDIRECT_STATUS'] = 404;
+  include_once($_SERVER['DOCUMENT_ROOT'].'/global/header.php');
+  echo "Error 404: Documentation page for thorn ".basename($page)." does not exist.";
+  include_once($_SERVER['DOCUMENT_ROOT'].'/global/footer.php');
+  exit();
+} else {
+  include_once($_SERVER['DOCUMENT_ROOT'].'/global/header.php');
+  $contents = file_get_contents($page);
+  preg_match('/.*<body[^>]*>(.*)<\/body>.*/sm', $contents, $body);
+  echo '<link rel="stylesheet" type="text/css" href="/documentation/UsersGuide/UsersGuide.css">';
+  echo $body[1];
+  include_once($_SERVER['DOCUMENT_ROOT'].'/global/footer.php');
+}
+
+?>

Directory: /global/
===================

File [modified]: navigation.php
Delta lines: +3 -3
===================================================================
--- global/navigation.php	2014-03-14 18:07:44 UTC (rev 1151)
+++ global/navigation.php	2014-03-14 20:10:46 UTC (rev 1152)
@@ -30,10 +30,10 @@
 <li><a href="/documentation/">Documentation</a> <ul class="subnav">
         <li><a href="http://docs.einsteintoolkit.org/et-docs/Tutorial_for_New_Users">Tutorial for New Users</a></li>
         <li><a href="/documentation/licenses">Citing</a>
-        <li><a href="/documentation/UsersGuide/UsersGuide.html">User's Guide</a></li>
+        <li><a href="/documentation/UsersGuide/">User's Guide</a></li>
         <li><a href="/documentation/ThornDoc/">Thorn Guide</a></li>
-        <li><a href="/documentation/ReferenceManual/ReferenceManual.html">Reference Manual</a></li>
-        <li><a href="/documentation/MaintGuide/MaintGuide.html">Maintenance Guide</a></li>
+        <li><a href="/documentation/ReferenceManual/">Reference Manual</a></li>
+        <li><a href="/documentation/MaintGuide/">Maintainer's Guide</a></li>
         <li><a href="/documentation/contribute/">How to Contribute</a></li>
 </ul></li>
 



More information about the Commits mailing list