]> git.quilime.com - plog_bk.git/commitdiff
re-structure
authorGabriel Dunne <gdunne@quilime.com>
Mon, 17 May 2010 00:49:29 +0000 (17:49 -0700)
committerGabriel Dunne <gdunne@quilime.com>
Mon, 17 May 2010 00:49:29 +0000 (17:49 -0700)
index.php
plog/lib/config
plog/lib/data.php
plog/templates/header-src.html

index 9a64b05bac19db5a0340bf1618e931337fd15cef..c827ad908e23c79fb5312ee0625ed6d4efe7fb6c 100644 (file)
--- a/index.php
+++ b/index.php
@@ -1,29 +1,7 @@
 <?php
 
-    require_once 'lib/init.php';
-    
-    $url_string = get_url_string();
-    
-    if (is_string($url_string)) {
-       
-       if ( basename($url_string) == "aggregate") {
-               header ("Location: http://quilime.com/aggregate/index.php");
-               exit;
-       }
-        else if (is_file ( TEMPLATE_DIR . basename($url_string) . '.html' )) {
-            include ( TEMPLATE_DIR . basename($url_string) . '.html' );
-            exit;
-        }
-        else if (dirname($url_string) != '.' && is_dir(CONTENT_DIR . dirname($url_string))) {
-            include( TEMPLATE_DIR . dirname($url_string) . '.html' );
-            exit;
-        }
-        else  {
-            include( TEMPLATE_DIR . '404.html' );            
-            exit;
-        }
-    }
-    
-    include ( TEMPLATE_DIR . 'index.html' );
-                                                                                                                 
+    require_once "plog/lib/init.php";
+        
+    include ( get_template_dir() . 'index.' . get_format() );
+
 ?>
index ae634984119a56f562789983a7aa0a02610564ab..502caa60972ca5ac54c140df5f1eab552294216d 100644 (file)
@@ -1,4 +1,4 @@
 LOCAL_ROOT      = /home/quilime/quilime.com/
 CONTENT_DIR     = c/
-TEMPLATE_DIR    = templates/
+TEMPLATE_DIR    = plog/templates/
 SITE_TITLE      = quilime
index 6d0f23dfd4baff4a1d7e361ffb2eb01935c17004..dc4469511a09f44a0014dde25ef7282cb602fe8d 100644 (file)
         }        
     }    
     
-    
+
+function get_format() {
+  return 'html';
+}
+
+function get_template_dir() {
+  return "plog/templates/";
+}
 
 
 ?>
\ No newline at end of file
index 3d232c2ad22fae2a1c1dcb6a0002a971f51c439f..05d8973fc70a81aeb8fd245963a90a1759a6bdb3 100644 (file)
@@ -1,7 +1,7 @@
 
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">    
 
-<link rel="stylesheet" href="<?= get_base_dir(); ?>/css/style.css" type="text/css">
+<link rel="stylesheet" href="<?= get_template_dir(); ?>css/style.css" type="text/css">
 
 <script type="text/javascript" src="<?= get_base_dir(); ?>/js/jquery-1.3.2.min.js"></script>