height:200px;
}
+.entries.log li {
+height:auto;
+ }
+
.entries.projects ul.tags li {
height:1.5em;
.gallery {}
.single .gallery li {
display:inline-block;
- margin-bottom:40px;
+
margin:1em 1em 0 0;
}
.gallery.stacked {
if (!CLEAN_URLS)
$d['url'] = WEB_ROOT . '?p=' . clean_slashes($d['url'], true);
$d['name'] = str_replace($path, "", $info->getRealPath());
- $d['title'] = $d['name'];
+ $d['title'] = ltrim($d['name'],"/");
$dirs[] = (object) $d;
}
}
$file['config'] = parse_ini_string($config);
$file['path'] = $fileInfo->getPath();
- $file['basename'] = basename($fileInfo->getPath());
- $file['dirname'] = dirname($fileInfo->getPath());
+ $get_pathparts = explode('/', $file['path']);
+ $content_key = array_search(CONTENT_DIR, $get_pathparts);
+ $pathparts = array_slice($get_pathparts, $content_key);
+ $file['dirname'] = dirname(join($pathparts, DIRECTORY_SEPARATOR));
+ $file['basename'] = basename(join($pathparts, DIRECTORY_SEPARATOR));
+ //$file['dirname'] = dirname($fileInfo->getPath());
$file['filename'] = $fileInfo->getFilename();
$file['title'] = isset($file['config']['title']) ? $file['config']['title'] : ($page ? $file['filename'] : $file['basename']);
$file['fileInfo'] = $fileInfo;
$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 . join(DIRECTORY_SEPARATOR, array(CONTENT_DIR, $file['basename'])) . '/thumb.png';
- $file['url'] = WEB_ROOT . ($page ? $file['filename'] : $file['basename']);
+
+ $web_accessable_root = str_replace(CONTENT_DIR, "", $file['dirname']);
+
+
+ // echo "<br/>";
+
+ $file['thumb'] = isset($file['config']['thumb']) ? $file['config']['thumb'] : WEB_ROOT . join(DIRECTORY_SEPARATOR, array($file['dirname'], $file['basename'])) . '/thumb.png';
+ if ($page) {
+ $file['url'] = WEB_ROOT . ($page ? $file['filename'] : $file['basename']);
+ } else {
+ $file['url'] = $web_accessable_root . DIRECTORY_SEPARATOR . ($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['content_dir'] = WEB_ROOT . join(DIRECTORY_SEPARATOR, array(CONTENT_DIR, $file['basename']));
$file['media'] = is_dir($file['media_dir']) ? (array) get_media( $file['media_dir'] ) : null;
+
+ $gallery_type = isset($file['config']['gallery']) ? $file['config']['gallery'] : null;
+ $file['media_gallery'] = gallerize_media($file['media'], $gallery_type);
+
$file['cat'] = (object) $file['cat'];
$file['config'] = (object) $file['config'];
+
+
+
return (object) $file;
}
$info->getPath(),
$info->getFilename())),
'url' => WEB_ROOT . join(DIRECTORY_SEPARATOR, array(
- CONTENT_DIR,
- basename(dirname($info->getPath())),
- basename($info->getPath()),
+ $path,
$info->getFilename())),
'extension' => $info->getExtension()
);
$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->media, $gallery_type), $this->entry->content);
- } else {
- $this->entry->content = gallerize_media($this->entry->media, $gallery_type) . $this->entry->content;
+ $this->entry->inline_gallery = true;
}
+ // $this->entry->content = gallerize_media($this->entry->media, $gallery_type) . $this->entry->content;
+ // }
+
+ // $file['content'] = str_replace(GALLERY_DELIMITER, gallerize_media($file['media'], $gallery_type), $file['content']);
$this->template = isset($this->entry->config->template) ?
$this->entry->config->template . '.' . $this->response_format . '.tpl' :
--- /dev/null
+title = process
+--
<span class="date"><?=date('Y', $entry->timestamp)?></span>
+<?
+ if (!isset($entry->inline_gallery) && isset($entry->media_gallery)) {
+ echo $entry->media_gallery;
+ }
+?>
+
<div class="content">
<? eval('?>' . $entry->content); ?>
</div>
<ul class="related">
<? for($i = 0; $i < sizeof($entry->related); $i++) : $rel = $entry->related[$i]; ?>
<li class="rel">
- <a href="<?=WEB_ROOT.$rel?>">
+ <a href="<?=WEB_ROOT.'projects/'.$rel?>">
<!-- <img src="<?=MEDIA.$rel?>/thumb.png" class="thumb" /><br />-->
<?=$rel?>
</a>
--- /dev/null
+<html>
+<head>
+ <? $this->include_template('head-inc.html.tpl') ?>
+ <title><?=SITE_TITLE?><?=$this->page_title(TITLE_DELIMITER);?></title>
+</head>
+<body>
+
+<? $this->include_template('nav.html.tpl') ?>
+
+<? if (EDIT) $this->include_template('edit.html.tpl'); ?>
+
+<div id="content">
+
+ <? if (isset($entry->content)): ?>
+ <? eval('?>' . $entry->content); ?>
+ <? endif; ?>
+
+ <ul class="entries log <?=isset($tag)&&$tag!==""?'tagged':''; ?>">
+ <? $entry = 0; foreach($entries as $entry): ?>
+ <div class="entry">
+ <?
+ //if (isset($entry->content_short))
+ //$entry->content = $entry->content_short . '<br /><a class="more" href="' . $entry->url . '">more →</a><br /><br />';
+ $this->include_template('entry.html.tpl', array('entry' => $entry));
+ ?>
+ </div>
+ <? endforeach; ?>
+
+ </ul>
+</div>
+
+<? $this->include_template('footer.html.tpl') ?>
+
+</body>
+</html>
+
+
+
+
+
<li class="home"><a href="<?=WEB_ROOT?>"><?=SITE_TITLE?></a></li>
- <?
- /*
- <? $dirs = get_dirs(''); ?>
+
+
+ <? $dirs = get_dirs('', array('recursive'=>0)); ?>
<? foreach($dirs as $e) : ?>
<li><a href="<?=$e->url?>"><?=$e->title?></a></li>
<? endforeach; ?>
- */
-?>
+
+
<? if (!isset($entry->is_single)) {
$en = get_pages('', $args = array(
'recursive' => false,
<? eval('?>' . $entry->content); ?>
<? endif; ?>
- <br />
-
- <ul style="float:left;">
- <? foreach($entries as $entry): ?>
- <li>
- <a href="<?=$entry->url;?>">
- <strong><?=$entry->title;?></strong>
- </a>
- </li>
- <? endforeach; ?>
- </ul>
-
- <ul style="margin-left:200px;" class="entries projects <?=isset($tag)&&$tag!==""?'tagged':''; ?>">
+ <ul class="entries projects <?=isset($tag)&&$tag!==""?'tagged':''; ?>">
<? foreach($entries as $entry): ?>
<li class="entry <?=$entry->cat->name?>">
<a href="<?=$entry->url;?>">
<br />
<strong><?=$entry->title;?></strong>
</a>
- <br />
+<!-- <br />
—
<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>
<? endfor; ?>
- </ul>
+ </ul> -->
</li>
<? endforeach; ?>
</ul>