]> git.quilime.com - plog.git/commitdiff
Combined Media and Content
authorGabriel Dunne <gdunne@quilime.com>
Mon, 20 May 2013 01:15:03 +0000 (18:15 -0700)
committerGabriel Dunne <gdunne@quilime.com>
Mon, 20 May 2013 01:15:03 +0000 (18:15 -0700)
content/tester/_config [new file with mode: 0644]
data/content/data.json
data/content/tags.json
lib/config.ini
lib/data.php
lib/init.php
lib/model.php
lib/output.php
templates/index.html.tpl
templates/nav.html.tpl

diff --git a/content/tester/_config b/content/tester/_config
new file mode 100644 (file)
index 0000000..b66dfb6
--- /dev/null
@@ -0,0 +1,8 @@
+title = Tester
+date = 2012-05-19 
+tags = test project plog
+featured = true
+--
+A test entrie that uses a self-container folder for its media.
+<!--more-->
+Some more of this post.
\ No newline at end of file
index 1281bf9c618d43972a256f3c478cb70511c6c39d..07ef1afb55efaa1dd9e6c9278682f8d5995b3655 100644 (file)
@@ -1 +1 @@
-{"entries":[{"config":{"date":"sep 25 2012","tags":"structure process"},"title":"platform","filename":"platform","path":"\/Users\/gdunne\/_portfolio\/www\/content\/platform","fileInfo":{},"timestamp":"1348556400","tags":["structure","process"],"featured":null,"related":null,"content":"\n","comments_enabled":false,"comments":{"comments":[],"comments_loc":"\/Users\/gdunne\/_portfolio\/wwwcomments\/\/Users\/gdunne\/_portfolio\/www\/content\/platform\/","fileInfo":{},"_recaptcha_resp":null,"_recaptcha_error":null,"_comment_error":null},"cat":{"name":"","url":"\/\/"},"thumb":"\/media\/\/\/platform\/thumb.png","url":"\/platform","edit_url":"\/edit\/\/platform","media_dir":"media\/\/\/platform\/","media":[{"filename":"8025655087_27febc8f3c_z.jpg","local":"\/Users\/gdunne\/_portfolio\/www\/media\/\/\/platform\/8025655087_27febc8f3c_z.jpg","url":"\/media\/\/\/platform\/8025655087_27febc8f3c_z.jpg","extension":"jpg"},{"filename":"8025655295_cc1d0e9c0a_z.jpg","local":"\/Users\/gdunne\/_portfolio\/www\/media\/\/\/platform\/8025655295_cc1d0e9c0a_z.jpg","url":"\/media\/\/\/platform\/8025655295_cc1d0e9c0a_z.jpg","extension":"jpg"},{"filename":"thumb.png","local":"\/Users\/gdunne\/_portfolio\/www\/media\/\/\/platform\/thumb.png","url":"\/media\/\/\/platform\/thumb.png","extension":"png"}]},{"config":{"date":"july 05 2010","tags":"process","related":"icosi"},"title":"icosi_process","filename":"icosi_process","path":"\/Users\/gdunne\/_portfolio\/www\/content\/icosi_process","fileInfo":{},"timestamp":"1278313200","tags":["process"],"featured":null,"related":["icosi"],"content":"<p>Process blog about ICOSI Process\n<!--more-->\nAudio created with Ableton Live\/Max\/MSP, custom software (Processing \/ Java, OpenGL). Wood and fabric projection surface.<\/p>\n\n<p>The software and audio toolset was developed from scratch for this performance. The performance dramatically split my focus into two places (music and visuals), which was a juggle that I didn't fully anticipate as I was developing the visual software on one split-screen before the performance. Inspired to continue pursuing interfaces and controllers to overcome the separation of creating audio and visuals simultaneously.<\/p>\n\n<p>The multiple mediums (sculpture, sound, visual media) of this particular project was fascinating. Each iteration represents a process of my own curiosities in technology, consciousness, spirituality, design, and fabrication.<\/p>\n\n<p>The piece represents my practice and experiences in regards to my own spiritual growth and experience. Geometrically, the form is inspired by sacred polyhedra that represent forms of transition. The choice of an <a href=\"http:\/\/en.wikipedia.org\/wiki\/Icosidodecahedron\">icosidodecahedron<\/a> represents transition of two frequencies, represented by an <a href=\"http:\/\/en.wikipedia.org\/wiki\/Icosahedron\">icosahedron<\/a> and its dual polyhedron, a <a href=\"http:\/\/en.wikipedia.org\/wiki\/Dodecahedron\">dodecahedron<\/a>.<\/p>\n\n<p>The form is composed of 7 panels trimmed and scaled from a full icosidodecahedron. The visuals follow the structure of the form nearly explicitly, with the exception of textural elements.<\/p>\n\n<p>Debut at Biennial of the Americas, Denver CO, Jul 29 2010.<\/p>\n\n<p><a href=\"http:\/\/media.quilime.com\/files\/projects\/icosi\/gdunne_rider_diag.pdf\">technical rider<\/a><\/p>\n","content_short":"<p>Process blog about ICOSI Process<\/p>\n","comments_enabled":false,"comments":{"comments":[],"comments_loc":"\/Users\/gdunne\/_portfolio\/wwwcomments\/\/Users\/gdunne\/_portfolio\/www\/content\/icosi_process\/","fileInfo":{},"_recaptcha_resp":null,"_recaptcha_error":null,"_comment_error":null},"cat":{"name":"","url":"\/\/"},"thumb":"\/media\/\/\/icosi_process\/thumb.png","url":"\/icosi_process","edit_url":"\/edit\/\/icosi_process","media_dir":"media\/\/\/icosi_process\/","media":[{"filename":"5165246192_dfa231d7ef_z.jpg","local":"\/Users\/gdunne\/_portfolio\/www\/media\/\/\/icosi_process\/5165246192_dfa231d7ef_z.jpg","url":"\/media\/\/\/icosi_process\/5165246192_dfa231d7ef_z.jpg","extension":"jpg"},{"filename":"plane_layout.png","local":"\/Users\/gdunne\/_portfolio\/www\/media\/\/\/icosi_process\/plane_layout.png","url":"\/media\/\/\/icosi_process\/plane_layout.png","extension":"png"},{"filename":"thumb.png","local":"\/Users\/gdunne\/_portfolio\/www\/media\/\/\/icosi_process\/thumb.png","url":"\/media\/\/\/icosi_process\/thumb.png","extension":"png"}]},{"config":{"title":"ICOSI Fabrication","date":"2010-07-01","tags":"process","related":"icosi"},"title":"ICOSI Fabrication","filename":"icosi_fab","path":"\/Users\/gdunne\/_portfolio\/www\/content\/icosi_fab","fileInfo":{},"timestamp":"1277967600","tags":["process"],"featured":null,"related":["icosi"],"content":"<p>Projection surface fabrication<\/p>\n","comments_enabled":false,"comments":{"comments":[],"comments_loc":"\/Users\/gdunne\/_portfolio\/wwwcomments\/\/Users\/gdunne\/_portfolio\/www\/content\/icosi_fab\/","fileInfo":{},"_recaptcha_resp":null,"_recaptcha_error":null,"_comment_error":null},"cat":{"name":"","url":"\/\/"},"thumb":"\/media\/\/\/icosi_fab\/thumb.png","url":"\/icosi_fab","edit_url":"\/edit\/\/icosi_fab","media_dir":"media\/\/\/icosi_fab\/","media":[{"filename":"14-4769443639_728b077b3a.jpg","local":"\/Users\/gdunne\/_portfolio\/www\/media\/\/\/icosi_fab\/14-4769443639_728b077b3a.jpg","url":"\/media\/\/\/icosi_fab\/14-4769443639_728b077b3a.jpg","extension":"jpg"},{"filename":"3-4744981890_2a41c9f374.jpg","local":"\/Users\/gdunne\/_portfolio\/www\/media\/\/\/icosi_fab\/3-4744981890_2a41c9f374.jpg","url":"\/media\/\/\/icosi_fab\/3-4744981890_2a41c9f374.jpg","extension":"jpg"},{"filename":"thumb.png","local":"\/Users\/gdunne\/_portfolio\/www\/media\/\/\/icosi_fab\/thumb.png","url":"\/media\/\/\/icosi_fab\/thumb.png","extension":"png"},{"filename":"z01-4743498955_d8d524bd27.jpg","local":"\/Users\/gdunne\/_portfolio\/www\/media\/\/\/icosi_fab\/z01-4743498955_d8d524bd27.jpg","url":"\/media\/\/\/icosi_fab\/z01-4743498955_d8d524bd27.jpg","extension":"jpg"}]},{"config":{"date":"2010-01-28","tags":"process","related":"monad","gallery":"stacked"},"title":"monad_install","filename":"monad_install","path":"\/Users\/gdunne\/_portfolio\/www\/content\/monad_install","fileInfo":{},"timestamp":"1264665600","tags":["process"],"featured":null,"related":["monad"],"content":"\n","comments_enabled":false,"comments":{"comments":[],"comments_loc":"\/Users\/gdunne\/_portfolio\/wwwcomments\/\/Users\/gdunne\/_portfolio\/www\/content\/monad_install\/","fileInfo":{},"_recaptcha_resp":null,"_recaptcha_error":null,"_comment_error":null},"cat":{"name":"","url":"\/\/"},"thumb":"\/media\/\/\/monad_install\/thumb.png","url":"\/monad_install","edit_url":"\/edit\/\/monad_install","media_dir":"media\/\/\/monad_install\/","media":[{"filename":"monad_install_02.png","local":"\/Users\/gdunne\/_portfolio\/www\/media\/\/\/monad_install\/monad_install_02.png","url":"\/media\/\/\/monad_install\/monad_install_02.png","extension":"png"},{"filename":"monad_install_03.png","local":"\/Users\/gdunne\/_portfolio\/www\/media\/\/\/monad_install\/monad_install_03.png","url":"\/media\/\/\/monad_install\/monad_install_03.png","extension":"png"},{"filename":"thumb.png","local":"\/Users\/gdunne\/_portfolio\/www\/media\/\/\/monad_install\/thumb.png","url":"\/media\/\/\/monad_install\/thumb.png","extension":"png"},{"filename":"x4264434313_9c1abc891b_o.png","local":"\/Users\/gdunne\/_portfolio\/www\/media\/\/\/monad_install\/x4264434313_9c1abc891b_o.png","url":"\/media\/\/\/monad_install\/x4264434313_9c1abc891b_o.png","extension":"png"},{"filename":"z4254727883_5f7090db0f_o.png","local":"\/Users\/gdunne\/_portfolio\/www\/media\/\/\/monad_install\/z4254727883_5f7090db0f_o.png","url":"\/media\/\/\/monad_install\/z4254727883_5f7090db0f_o.png","extension":"png"}]},{"config":{"date":"2010-01-06","tags":"process","related":"monad"},"title":"monad_move","filename":"monad_move","path":"\/Users\/gdunne\/_portfolio\/www\/content\/monad_move","fileInfo":{},"timestamp":"1262764800","tags":["process"],"featured":null,"related":["monad"],"content":"\n","comments_enabled":false,"comments":{"comments":[],"comments_loc":"\/Users\/gdunne\/_portfolio\/wwwcomments\/\/Users\/gdunne\/_portfolio\/www\/content\/monad_move\/","fileInfo":{},"_recaptcha_resp":null,"_recaptcha_error":null,"_comment_error":null},"cat":{"name":"","url":"\/\/"},"thumb":"\/media\/\/\/monad_move\/thumb.png","url":"\/monad_move","edit_url":"\/edit\/\/monad_move","media_dir":"media\/\/\/monad_move\/","media":[{"filename":"1monad_jeep.png","local":"\/Users\/gdunne\/_portfolio\/www\/media\/\/\/monad_move\/1monad_jeep.png","url":"\/media\/\/\/monad_move\/1monad_jeep.png","extension":"png"},{"filename":"moan_move.png","local":"\/Users\/gdunne\/_portfolio\/www\/media\/\/\/monad_move\/moan_move.png","url":"\/media\/\/\/monad_move\/moan_move.png","extension":"png"},{"filename":"thumb.png","local":"\/Users\/gdunne\/_portfolio\/www\/media\/\/\/monad_move\/thumb.png","url":"\/media\/\/\/monad_move\/thumb.png","extension":"png"}]}]}
\ No newline at end of file
+{"entries":[{"config":{"title":"Tester","date":"2012-05-19","tags":"test project plog","featured":"1"},"title":"Tester","filename":"_config","path":"\/Users\/gdunne\/_portfolio\/www\/content\/tester\/_config","basename":"tester","dirname":"\/Users\/gdunne\/_portfolio\/www\/content","fileInfo":{},"timestamp":"1337410800","tags":["test","project","plog"],"featured":"1","related":null,"content":"<p>A test entrie that uses a self-container folder for its media.\n<!--more-->\nSome more of this post.<\/p>\n","content_short":"<p>A test entrie that uses a self-container folder for its media.<\/p>\n","comments_enabled":false,"comments":{"comments":[],"comments_loc":"\/Users\/gdunne\/_portfolio\/wwwcomments\/Users\/gdunne\/_portfolio\/www\/content\/tester\/_config\/","fileInfo":{},"_recaptcha_resp":null,"_recaptcha_error":null,"_comment_error":null},"cat":{"name":"tester","url":"\/tester\/"},"thumb":"\/content\/tester\/thumb.png","url":"\/tester","edit_url":"\/edit\/tester","media_dir":"\/Users\/gdunne\/_portfolio\/www\/content\/tester\/media","media":[{"filename":"egg.jpg","local":"\/Users\/gdunne\/_portfolio\/www\/content\/tester\/media\/egg.jpg","url":"\/content\/tester\/media\/egg.jpg","extension":"jpg"},{"filename":"Screen Shot 2012-10-08 at 6.08.07 PM.png","local":"\/Users\/gdunne\/_portfolio\/www\/content\/tester\/media\/Screen Shot 2012-10-08 at 6.08.07 PM.png","url":"\/content\/tester\/media\/Screen Shot 2012-10-08 at 6.08.07 PM.png","extension":"png"}]}]}
\ No newline at end of file
index 339d47996b20a3b67dcab5265eabdea699eea050..a64b30af4e839df578e990b2a7f55440d538e36a 100644 (file)
@@ -1 +1 @@
-{"tags":{"software":6,"installation":5,"structure":4,"process":5,"code":6,"performance":3,"studio":3,"audiovisual":6,"projection":5,"sculpture":8,"web":2,"design":9,"painting":5,"sketchbook":2,"commercial":1,"opengl":1,"processing":1,"photo":2,"video":1,"visualization":1,"typography":3,"drawing":2,"film":1,"animation":1,"print":3}}
\ No newline at end of file
+{"tags":{"test":1,"project":1,"plog":1}}
\ No newline at end of file
index 2a0ce0606ad635b702031a691583d317096e0ab9..7b52d9ff0970a01ae1144709c62a650c0e9ba483 100644 (file)
@@ -8,15 +8,16 @@ date_format = M d Y
 
 ; local locations
 web_root    = /
-data        = data/
-content     = content/
-comments    = comments/
-templates   = templates/
-pages       = pages/
-media       = media/
+data        = data
+content     = content
+comments    = comments
+templates   = templates
+pages       = pages
+media       = media
 
 ; local filenames
 config_file = config
+content_config_file = _config
 data_file   = data.json
 tags_file   = tags.json
 
index 8ffb2aa80f6f5d31c2c1bd62539c9347034e245e..1dec526c09ea8ac608ef972acc907aa45456a43f 100644 (file)
@@ -33,14 +33,15 @@ function get_entries( $path = "", $args = array() )
         }
         
         $entries = array();
-        
+
+
         if (isset($dir_iterator)) {
             foreach ($dir_iterator as $file => $info) {
-
                 // skip dot files
                 if (substr($info->getFilename(), 0, 1) == '.') 
                     continue;                
-                if (!$info->isDir() && $info->getFilename() != CONFIG_FILE) {
+                // parse only specific files
+                if ($info->isFile() && $info->getFilename() == CONTENT_CONFIG_FILE) {
                     $entry = parse_entry($info);
                     if ($show_featured && empty($tag)) {
                         if (isset($entry->featured)) {
@@ -59,6 +60,8 @@ function get_entries( $path = "", $args = array() )
 
         $entries = sort_entries($entries, $order_by, $order);
 
+
+
         if ($create_datafile) {
             if (!is_dir($data_path)) {
                 if (!mkdir($data_path, 0777, true)) {
@@ -267,10 +270,13 @@ function parse_entry($fileInfo, $page = false)
         return $entry();
     }
 
-    $file['config'] = parse_ini_string($config);    
+
+    $file['config'] = parse_ini_string($config);
     $file['title'] = isset($file['config']['title']) ? $file['config']['title'] : $fileInfo->getFilename();
     $file['filename'] = $fileInfo->getFilename();
     $file['path'] = $fileInfo->getPath();
+    $file['basename'] = basename($fileInfo->getPath());
+    $file['dirname'] = dirname($fileInfo->getPath());
     $file['fileInfo'] = $fileInfo;
     $file['config']['date'] = isset($file['config']['date']) ? $file['config']['date'] : null;
     $file['timestamp'] = $file['config']['date'] ? date('U', strtotime( $file['config']['date'])) : $fileInfo->getCTime();
@@ -281,7 +287,7 @@ function parse_entry($fileInfo, $page = false)
     $file['content'] = Markdown($content);
 
     if ($passed_more)
-      $file['content_short'] = Markdown($content_short);
+        $file['content_short'] = Markdown($content_short);
 
     $file['comments_enabled'] = isset($f['config']['comments']) && $f['config']['comments'];
     $file['comments'] = new Comments($fileInfo);  
@@ -291,16 +297,11 @@ function parse_entry($fileInfo, $page = false)
     $file['cat'] = $page ? null : array('name' => trim($cat,'/'), 'url' => WEB_ROOT . trim($cat , '/') . '/' );
 
     $file['path'] = $fileInfo->getRealPath();
-    $file['thumb'] = isset($file['config']['thumb']) ? $file['config']['thumb'] : WEB_ROOT . MEDIA . '/' . substr($file['cat']['url'],1) . $fileInfo->getFilename() . '/thumb.png';
-    $file['url'] = clean_slashes( ($page ? '' : $file['cat']['url']) . $fileInfo->getFilename() );
-    $file['edit_url'] = WEB_ROOT . 'edit/' . $file['url'];
-
-    $file['media_dir'] = MEDIA . '/' . ($page ? '' : substr($file['cat']['url'],1)) . $fileInfo->getFilename() . '/';
-    if (!is_dir($file['media_dir'])) {
-        if (!mkdir('./' . $file['media_dir'], 0777, true)) {
-            die('Failed to create folders...');
-        }
-    }
+    $file['thumb'] = isset($file['config']['thumb']) ? $file['config']['thumb'] : WEB_ROOT . join(DIRECTORY_SEPARATOR, array(CONTENT_DIR, $file['basename'])) . '/thumb.png';
+    $file['url'] = WEB_ROOT .  ($page ? $file['filename'] : $file['basename']);
+    $file['edit_url'] = WEB_ROOT . 'edit' . $file['url'];
+
+    $file['media_dir'] = join(DIRECTORY_SEPARATOR, array($file['dirname'], $file['basename'], MEDIA));
     $file['media'] = (array) get_media( $file['media_dir'] );
     $file['cat'] = (object) $file['cat'];
     $file['config'] = (object) $file['config'];
@@ -309,7 +310,7 @@ function parse_entry($fileInfo, $page = false)
 }
 
 function get_media( $path ) {
-    $local_path = LOCAL_ROOT . '/' . $path;
+    $local_path = $path;
     $files = array();
     if (is_dir($local_path)) {
         $dir_iterator = new DirectoryIterator($local_path);
@@ -322,8 +323,14 @@ function get_media( $path ) {
                 if (!$info->isDir()) {
                     $files[] = (object) array(
                         'filename' => $info->getFilename(),
-                        'local' => $info->getPath() . '/' . $info->getFilename(),
-                        'url' => WEB_ROOT . $path . $info->getFilename(),
+                        'local' => join(DIRECTORY_SEPARATOR, array(
+                            $info->getPath(),
+                            $info->getFilename())),
+                        'url' => WEB_ROOT . join(DIRECTORY_SEPARATOR,  array(
+                            CONTENT_DIR,
+                            basename(dirname($info->getPath())),
+                            basename($info->getPath()), 
+                            $info->getFilename())),
                         'extension' => $info->getExtension()
                         );
                 }
@@ -351,7 +358,8 @@ function get_clean_path ( &$fileInfo, $page = false ) {
 
 function get_entry ( $relative_path )
 {
-       return parse_entry(new SplFileInfo(join(array(LOCAL_ROOT, CONTENT_DIR, $relative_path), DIRECTORY_SEPARATOR)));
+    $f = join(array(LOCAL_ROOT, CONTENT_DIR, $relative_path, CONTENT_CONFIG_FILE), DIRECTORY_SEPARATOR);
+       return parse_entry(new SplFileInfo($f));
 }
 
 function get_page ( $relative_path )
index d9dfc91ca8ccaded383846c26b1d10f70dc1fe04..9936719a083702e85919002a62d84541ac7241c1 100644 (file)
@@ -47,6 +47,7 @@ define ('PAGE_DIR', $_cfg['pages']);
 define ('CONFIG_DELIMITER', $_cfg['config_delim']);
 define ('GALLERY_DELIMITER', $_cfg['gallery_delim']);
 define ('CONFIG_FILE', $_cfg['config_file']);
+define ('CONTENT_CONFIG_FILE', $_cfg['content_config_file']);
 define ('MORE_DELIMITER', $_cfg['more_delim']);
 define ('TITLE_DELIMITER', $_cfg['title_delim']);
 define ('DATE_FORMAT', $_cfg['date_format']);
index cc4e3613dc407f62ffcfb4c306832f1b093a9534..2df40726ebf12f298f8c6d50e1b9f260cfeeee73 100644 (file)
@@ -69,6 +69,7 @@ class Model
                }
            # if multiple (multiple files in CONTENT dir)
            if ($this->is_multiple()) {
+
                    if ($this->has_config() && !$_cfg) {
                        $this->config = parse_config( $request['path'] );
                        if (isset($this->config->config->template)) {
@@ -78,9 +79,8 @@ class Model
 
                $this->entry = $this->config;
                $this->page_title = preg_replace('{^/|/$}', '', $this->request['path']);
-               $recursive = $this->tag ? true : false;
 
-               $entries_args = array('recursive' => $recursive, 'tag' => $this->tag);
+               $entries_args = array('tag' => $this->tag);
                if (isset($this->config->config->show_featured)) {
                        $entries_args['show_featured'] = true;
                }
@@ -124,11 +124,12 @@ class Model
 
 
                        $this->entry->is_single = true;
-
+                       
+                       $gallery_type = isset($this->entry->config->gallery) ? $this->entry->config->gallery : null;
                    if (strpos($this->entry->content, GALLERY_DELIMITER)) {
-                       $this->entry->content = str_replace(GALLERY_DELIMITER, gallerize_media($this->entry), $this->entry->content);
+                       $this->entry->content = str_replace(GALLERY_DELIMITER, gallerize_media($this->entry->media, $gallery_type), $this->entry->content);
                    } else {
-                       $this->entry->content = gallerize_media($this->entry) . $this->entry->content;
+                       $this->entry->content = gallerize_media($this->entry->media, $gallery_type) . $this->entry->content;
                    }
 
                $this->template = isset($this->entry->config->template) ?
@@ -176,24 +177,24 @@ class Model
 
        function has_config()
        {       
-               $conf = join(array( LOCAL_ROOT, CONTENT_DIR, $this->request['path'], CONFIG_FILE ), '/' );
-               return is_file($conf) ? 1 : 0;
+               return is_file(join(array( LOCAL_ROOT, CONTENT_DIR, $this->request['path'], CONFIG_FILE ), '/' )) ? 1 : 0;
        }
 
        function is_multiple()
        {
-               return is_dir(join(array( LOCAL_ROOT, CONTENT_DIR, $this->request['path'] ), '/' )) ? 1 : 0;
+               $f = join(DIRECTORY_SEPARATOR, array( LOCAL_ROOT, CONTENT_DIR, $this->request['path'] ));
+               return is_dir($f) && !is_file(join(DIRECTORY_SEPARATOR, array($f, CONTENT_CONFIG_FILE)));
        }
 
        function is_single()
        {
-               return is_file(join(array( LOCAL_ROOT, CONTENT_DIR, $this->request['path'] ), '/' )) ? 1 : 0;
+               $f = join(DIRECTORY_SEPARATOR, array( LOCAL_ROOT, CONTENT_DIR, $this->request['path'], CONTENT_CONFIG_FILE ));
+               return is_file($f);
        }
 
        function is_page()
        {
-               $path = rtrim(join(array( LOCAL_ROOT, PAGE_DIR, $this->request['path'] ), '/' ), '/');
-               return is_file($path) ? 1 : 0;
+               return is_file(rtrim(join(array( LOCAL_ROOT, PAGE_DIR, $this->request['path'] ), '/' ), '/'));
        }
 
        function get_filename()
index fe6f3ad479f5d4046a5591db3e6bc34657881c6e..c860db3abac5bef32fd47c45d0b203fff6681554 100644 (file)
@@ -120,17 +120,18 @@ function get_rss_feed( $url )
 }
 
 
-function gallerize_media( $entry ) {
+function gallerize_media( $media, $gallery_type = null ) {
+
     $g = array();
 
-    $type = isset($entry->config->gallery) ? $entry->config->gallery : null;
+    $type = $gallery_type;
 
     $g[] = $type != 'slides' && $type != 'stacked' ? '<nobr>' : '';
     $g[] = '<div class="gallery_container">';
     $g[] = $type == 'slides' ? '<ul id="slidenav"></div><ul id="slides">' : '<ul class="gallery '.$type.'">';
 
     $c = 0;
-    foreach($entry->media as $f) {
+    foreach($media as $f) {
         if (in_array(strtolower($f->extension), array('jpg', 'png', 'gif')) && $f->filename != 'thumb.png') {
             $g[] = '<li><img src="'.$f->url.'" /></li>';
             $c++;
index 021e732e4553aa5c3c60ed635ef92fb8dd272215..c20b2988b7a6044cd2b69c9ae6591edb45db4132 100644 (file)
@@ -23,7 +23,7 @@
                     &mdash;<br />
                     <ul class="tags">
                         <? for($i = 0; $i < sizeof($entry->tags); $i++) : $tag = $entry->tags[$i]; ?>
-                            <li class="tag"><a href="<?=WEB_ROOT.'?tag='.$tag?>"><?=$tag?></a></li>
+                            <li class="tag"><a href="<?=WEB_ROOT.'tag/'.$tag?>"><?=$tag?></a></li>
                         <? endfor; ?>
                         </ul>                    
                     <? endif; ?>
index 0b630d462ae36c7e8293273faf1ae2edeb6efc03..82a89379a806d9dc7d7424518243e9c7a004818f 100644 (file)
         'order_by' => 'alpha',
         'order' => SORT_ASC
         ) ); ?>
-    <? foreach($en as $e) : ?>
-    <li><a <?=$request['basename'] == $e->title ? 'class="selected"' : ''?> href="<?=WEB_ROOT?><?=$e->url?>"><?=$e->title?></a></li>
+    <? foreach($en as $e) : /*print_r($e);*/ ?>
+    
+        
+    <li><a <?=$request['basename'] == $e->title ? 'class="selected"' : ''?> href="<?=$e->url?>"><?=$e->title?></a></li>
     <? endforeach; ?>
     <? } ?>
     <!--