--- /dev/null
+{"name":"","www":"","timestamp":"1320927226","comment":"this is a test comment"}
\ No newline at end of file
--- /dev/null
+{"name":"test","www":null,"timestamp":"1320927283","comment":"what a test"}
\ No newline at end of file
--- /dev/null
+{"name":"anonymous","www":null,"timestamp":"1320927295","comment":"test test test test test "}
\ No newline at end of file
+++ /dev/null
-date = Sept 22 2011, 22:50
-title = arrival
---
- Bkng Meals/ Seat/
- Day Date Flight Status Class City Time Other Cabin
- --- ----- --------------- ------ ----- ---------------- ------ ------ -------
- Thu 22SEP KLM ROYAL OK T LV SAN FRANCISCO 200P M **
- DUTCH AIRLINES 606 AR AMSTERDAM 915A#
-
- Fri 23SEP KLM ROYAL OK T LV AMSTERDAM 1120A M **
- DUTCH AIRLINES 871 AR DELHI 1050P
+++ /dev/null
-title = beg
-date = Oct 16 2011, 15:34:03; IST
---
-
-
-
-<img src="photos/P1010976.jpg">
-
-Tapping on the windows, the begger kids have perfected their methods. They move their mouths into a sad frown, they use their eyes, they tap on the windows.
\ No newline at end of file
+++ /dev/null
-title = habitat
-date = 2011-9-27
---
-
-
-<img src="photos/IMG_1003.jpg" />
-
-view from vishal's room onto the up and coming Guargon area, outside Delhi
+++ /dev/null
-date = 2011-09-28
-title = sri yantra
---
-
-<!--<img src="media/sriyantra/sri_light.png"> -->
-<img src="media/sriyantra/sri_bindu.png">
-<!--<img src="media/sriyantra/sri_dark.png"> -->
-Shri Yantra
-
-<img src="media/sriyantra/kali-yantra.jpg" />
-Kali → goddess of eternal energy. "She who destroys all". The goddess of time and change. The ultimate reality.
-
-
-> The Sri Chakra or Shri Yantra of Tripura Sundari is a yantra or mandala formed by nine interlocking triangles surrounding the bindu. Four of these triangles are orientated upright representing Shiva or the Masculine. Five of these triangles are inverted triangles represent Shakti or the Feminine. Because it is composed of nine triangles, it is also known as the Navayoni Chakra.[1]
-
-<img src="media/sriyantra/sri_guides.png" />
-<em>sri yantra guides</em>
-
-> Together the nine triangles are interlaced in such a way as to form 43 smaller triangles in a web symbolic of the entire cosmos or a womb symbolic of creation. Together they express Advaita or non-duality. This is surrounded by a lotus of eight petals, a lotus of sixteen petals, and an earth square resembling a temple with four doors.[1]
-
-> The Shri Chakra is also known as the nava chakra because it can also be seen as having nine levels. Each level corresponds to a mudra, a yogini, and a specific form of the deity Tripura Sundari along with her mantra. These levels starting from the outside or bottom layer are:[1]
-
-1. Trailokya Mohana or Bhupara, a square of three lines with four portals
-2. Sarvasa Paripuraka, a sixteen-petal lotus
-3. Sarva Sankshobahana, an eight-petal lotus
-4. Sarva Saubhagyadayaka, composed of fourteen small triangles
-5. Sarvarthasadhaka, composed of ten small triangles
-6. Sarva Rakshakara, composed of ten small triangles
-7. Sarva Rohahara, composed of eight small triangles
-8. Sarva siddhi prada, composed of 1 small triangle
-9. Sarvanandamaya, composed of a point or bindu
-
-> The Sri Chakra (called the Shri Yantra) is the symbol of Hindu tantra, which is based on the Hindu philosophy of Kashmir Shaivism.
-
-
-Vijnanamaya — spiritual body composed of prayer and fortified by meditation
-
-Anandamaya — body of the joy of union with god
-
-> —he who realizes the truth of the body can then come to tknow the truth of the universe
-
-Payodhi-jala — primordial waters, force of the manifested universe
-
-> A fourth dimension of aesthetic sense, where all is in ourselves, ourselves in all —Aurobindo
-
-Tantra: analogies between the individual and the cosmos, and the life forces which govern them
-
-> reflections of what is taking place in real life and reminding thought visions of our true nature
-
-
-
-
-
-<img src="media/sriyantra/datta5.jpg" />
-
+++ /dev/null
-date = 2011-10-06
-title = alphabet
---
-
-consanants
-
-<img src="media/lang/hindi_cons.gif">
-<br /><br /><br />
-
-vowels
-
-<img src="media/lang/hindi_vwl.gif">
-<br /><br /><br />
-
-numbers
-
-<img src="media/lang/hindi_num.gif">
-<br /><br /><br />
\ No newline at end of file
+++ /dev/null
-title = dreams
-date = Tue, Oct 4 2011, 12:46:34; IST
---
-My dreams have been incredibly vivid. probably due to the heat. sleeping at odd hours. been working in the studio most of the day at Vishal's house, so I haven't been going out as much as I would like. It's also incredibly hot outside, averaging about 36 degrees C, which is about 95 F.
\ No newline at end of file
+++ /dev/null
-title = dushera
-date = Sun, Oct 06 2011, 06:00:16 PM; IST
-draft = true
---
-<img src="photos/IMG_1256.jpg" />
-
-dushera
\ No newline at end of file
+++ /dev/null
-title = islands
-date = Wed, Oct 05 2011, 03:53:55 PM; IST
---
-
-> Imagine that every man's mind is an island, surrounded by ocean. Each seems isolated, yet in reality all are linked by the bedrock from which they spring. If the ocean were to vanish, that would be the end of the islands. They would all be part of one continent, but their individuality would be gone.
-
-> —"The Inspector" Overlord. <u>Childhoods End</u>, Arthur C. Clark. p.176
+++ /dev/null
-title = childhoods end
-date = Wed, Oct 05 2011, 03:17:57 PM; IST
---
-
-> The case of India is particularly instructive. The main difference between us and the British in India was that they had no real motives for going there—no conscious objectives, that is, except such trivial and temporary ones as trade or hostility to other European powers. They found themselves possessors of an empire before they knew what to do with it, and were never really happy until they had got rid of it again.
-
-> —"The Inspector" Overlord. <u>Childhoods End</u>, Arthur C. Clark. p.161
+++ /dev/null
-title = sun
-date = Sun, Oct 23 2011, 06:06:33 PM; IST
---
-
-<img src="photos/P1020004.jpg" />
+++ /dev/null
-title = water_is_life
-date = Sun, Oct 23 2011, 06:04:38 PM; IST
-draft = true
---
-
-<img src="photos/P1020037.jpg">
-
-delapitated truck left near the Quotar Minar in Dadabari. Painting on the front bumper reads "Water is Life" in Hindi.
\ No newline at end of file
--- /dev/null
+
+date = today
+comments = 1
+--
+
+Hello again. Leave some comments.
\ No newline at end of file
+++ /dev/null
-template = index
-title = delhi 2011
\ No newline at end of file
--- /dev/null
+title = hello world
+date = nov 10 2011
+--
+
+Hello world.
\ No newline at end of file
--- /dev/null
+/* comments.css */
+
+.comments {
+ margin-top:50px;
+}
+.comments textarea {
+ width:315px;
+ height:130px;
+}
+.comments .error {
+ color:#900;
+}
+.comments .comment {
+ margin:20px 0;
+ font-style:italic;
+}
+.comments .comment .name {
+ color:#aaa;
+}
+.comments .comment_form {
+ margin-top:40px;
+}
\ No newline at end of file
}
#content {
- padding:50px;
+ padding:50px 50px 0 50px;
background:#fff;
}
#nextprev {
.entry {
+ margin-bottom:80px;
}
.entry h2 {
margin-bottom:20px;
--- /dev/null
+<?php
+
+if (!is_dir($entry['comments_loc'])) {
+ if (!mkdir($entry['comments_loc'], 0775, true)) {
+ echo 'Error making comments directory';
+ }
+}
+
+global $captcha_publickey, $captcha_privatekey;
+
+# the response from reCAPTCHA
+$resp = null;
+# the error code from reCAPTCHA, if any
+$error = null;
+
+# was there a reCAPTCHA response?
+if (isset($_POST["recaptcha_response_field"])) {
+ $resp = recaptcha_check_answer ($captcha_privatekey,
+ $_SERVER["REMOTE_ADDR"],
+ $_POST["recaptcha_challenge_field"],
+ $_POST["recaptcha_response_field"]);
+ if ($resp->is_valid) {
+
+ $name = !empty($_POST['name']) ? $_POST['name'] : 'anon';
+ $www = !empty($_POST['www']) ? $_POST['www'] : null;
+ $comment = !empty($_POST['comment']) ? $_POST['comment'] : null;
+
+ if (!$comment) {
+
+ echo '<div class="error">You must enter a comment.</div>';
+
+ } else {
+
+ $comment = json_encode(array(
+ 'name' => $name,
+ 'www' => $www,
+ 'timestamp' => date('U'),
+ 'comment' => $comment));
+ file_put_contents($entry['comments_loc'] . date('U') . '.json', $comment);
+
+ }
+
+ } else {
+ # set the error code so that we can display it
+ $error = $resp->error;
+ }
+}
+
+echo recaptcha_get_html($captcha_publickey, $error);
$entries = array();
foreach ($dir_iterator as $file => $info) {
+ // mime type
// $finfo = finfo_open(FILEINFO_MIME_TYPE);
// $ftype = finfo_file($finfo, join(array($info->getPath(), $info->getFilename()), DIRECTORY_SEPARATOR));
// finfo_close($finfo);
}
$f = array();
+
+ $cat = clean_slashes(str_replace(LOCAL_ROOT . CONTENT_DIR, "", $fileInfo->getPath()));
+ $clean_path = str_replace(LOCAL_ROOT . CONTENT_DIR, "", clean_slashes($fileInfo->getPath()));
+
$f['config'] = parse_ini_string($config);
$f['title'] = isset($f['config']['title']) ? $f['config']['title'] : $fileInfo->getFilename() ;
$f['config']['date'] = isset($f['config']['date']) ? $f['config']['date'] : null;
$f['timestamp'] = $f['config']['date'] ? date('U', strtotime( $f['config']['date'])) : $fileInfo->getCTime();
$f['tags'] = isset($f['config']['tags']) ? explode(" ", $f['config']['tags']) : null;
$f['content'] = Markdown($content);
+
+ // get comments
+ $f['comments_enabled'] = isset($f['config']['comments']) && $f['config']['comments'];
+ $f['comments_loc'] = LOCAL_ROOT . COMMENTS_DIR . $clean_path . DIRECTORY_SEPARATOR . $fileInfo->getFilename() . DIRECTORY_SEPARATOR;
+ $comments = array();
+ if (is_dir($f['comments_loc'])) {
+ $dir_iterator = new DirectoryIterator($f['comments_loc']);
+ foreach ($dir_iterator as $file => $info) {
+ if (!$info->isDir() && $info->getFilename() != '.' && $info->getFilename() != '..') {
+ $contents = file_get_contents($info->getPath() . DIRECTORY_SEPARATOR . $info->getFilename());
+ $comments[] = json_decode($contents, true);
+ }
+ }
+ }
+ $f['comments'] = $comments;
if ($passed_more)
$f['content_short'] = Markdown($content_short);
- $cat = clean_slashes(str_replace(LOCAL_ROOT . CONTENT_DIR, "", $fileInfo->getPath()));
- $clean_path = str_replace(LOCAL_ROOT . CONTENT_DIR, "", clean_slashes($fileInfo->getPath()));
-
- $f['cat'] = $page ? null : array('name' => $clean_path, 'url' => $clean_path );
- $f['path'] = $fileInfo->getRealPath();
+ $f['cat'] = $page ? null : array('name' => $clean_path, 'url' => $clean_path );
$f['url'] = ($page ? '' : $f['cat']['url'] . '/') . $fileInfo->getFilename();
if (!CLEAN_URLS) {
# error reporting
error_reporting(E_ALL);
-ini_set("display_errors", 1);
+ini_set('display_errors', 1);
# timezone
-putenv('TZ=Asia/Calcutta');
+putenv('TZ=America/Los_Angeles');
# include path
ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . dirname(realpath(__FILE__)));
# settings
define ('CLEAN_URLS', false);
define ('SITE_TITLE', 'india 2011');
-define ('LOCAL_ROOT', '/Users/gdunne/Sites/india/');
-define ('WEB_ROOT', '/~gdunne/india/');
+define ('LOCAL_ROOT', '/Users/gdunne/Sites/quilime/');
+define ('WEB_ROOT', '/~gdunne/quilime/');
define ('CONTENT_DIR', 'content/');
define ('TEMPLATE_DIR', 'templates/');
+define ('COMMENTS_DIR', 'comments/');
define ('PAGE_DIR', 'pages/');
define ('CONFIG_DELIMITER', '--');
define ('CONFIG_FILE', 'config');
$_FILE_IGNORES = array(CONFIG_FILE, '.DS_Store');
+
+# recaptcha for comments
+require_once 'recaptchalib.php';
+// Get a key from https://www.google.com/recaptcha/admin/create
+$captcha_publickey = "6Lek-MkSAAAAAAZknQQGSx9DiCqm_wAiFGytc37d";
+$captcha_privatekey = "6Lek-MkSAAAAAK4FAaPKO0Cwp-iHa0OcUaqipee4";
+
+
# includes
require_once 'data.php';
require_once 'output.php';
require_once 'markdown.php';
require_once 'model.php';
-require_once 'view.php';
\ No newline at end of file
+require_once 'view.php';
+
--- /dev/null
+<?php
+/*
+ * This is a PHP library that handles calling reCAPTCHA.
+ * - Documentation and latest version
+ * http://recaptcha.net/plugins/php/
+ * - Get a reCAPTCHA API Key
+ * https://www.google.com/recaptcha/admin/create
+ * - Discussion group
+ * http://groups.google.com/group/recaptcha
+ *
+ * Copyright (c) 2007 reCAPTCHA -- http://recaptcha.net
+ * AUTHORS:
+ * Mike Crawford
+ * Ben Maurer
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+/**
+ * The reCAPTCHA server URL's
+ */
+define("RECAPTCHA_API_SERVER", "http://www.google.com/recaptcha/api");
+define("RECAPTCHA_API_SECURE_SERVER", "https://www.google.com/recaptcha/api");
+define("RECAPTCHA_VERIFY_SERVER", "www.google.com");
+
+/**
+ * Encodes the given data into a query string format
+ * @param $data - array of string elements to be encoded
+ * @return string - encoded request
+ */
+function _recaptcha_qsencode ($data) {
+ $req = "";
+ foreach ( $data as $key => $value )
+ $req .= $key . '=' . urlencode( stripslashes($value) ) . '&';
+
+ // Cut the last '&'
+ $req=substr($req,0,strlen($req)-1);
+ return $req;
+}
+
+
+
+/**
+ * Submits an HTTP POST to a reCAPTCHA server
+ * @param string $host
+ * @param string $path
+ * @param array $data
+ * @param int port
+ * @return array response
+ */
+function _recaptcha_http_post($host, $path, $data, $port = 80) {
+
+ $req = _recaptcha_qsencode ($data);
+
+ $http_request = "POST $path HTTP/1.0\r\n";
+ $http_request .= "Host: $host\r\n";
+ $http_request .= "Content-Type: application/x-www-form-urlencoded;\r\n";
+ $http_request .= "Content-Length: " . strlen($req) . "\r\n";
+ $http_request .= "User-Agent: reCAPTCHA/PHP\r\n";
+ $http_request .= "\r\n";
+ $http_request .= $req;
+
+ $response = '';
+ if( false == ( $fs = @fsockopen($host, $port, $errno, $errstr, 10) ) ) {
+ die ('Could not open socket');
+ }
+
+ fwrite($fs, $http_request);
+
+ while ( !feof($fs) )
+ $response .= fgets($fs, 1160); // One TCP-IP packet
+ fclose($fs);
+ $response = explode("\r\n\r\n", $response, 2);
+
+ return $response;
+}
+
+
+
+/**
+ * Gets the challenge HTML (javascript and non-javascript version).
+ * This is called from the browser, and the resulting reCAPTCHA HTML widget
+ * is embedded within the HTML form it was called from.
+ * @param string $pubkey A public key for reCAPTCHA
+ * @param string $error The error given by reCAPTCHA (optional, default is null)
+ * @param boolean $use_ssl Should the request be made over ssl? (optional, default is false)
+
+ * @return string - The HTML to be embedded in the user's form.
+ */
+function recaptcha_get_html ($pubkey, $error = null, $use_ssl = false)
+{
+ if ($pubkey == null || $pubkey == '') {
+ die ("To use reCAPTCHA you must get an API key from <a href='https://www.google.com/recaptcha/admin/create'>https://www.google.com/recaptcha/admin/create</a>");
+ }
+
+ if ($use_ssl) {
+ $server = RECAPTCHA_API_SECURE_SERVER;
+ } else {
+ $server = RECAPTCHA_API_SERVER;
+ }
+
+ $errorpart = "";
+ if ($error) {
+ $errorpart = "&error=" . $error;
+ }
+ return '<script type="text/javascript" src="'. $server . '/challenge?k=' . $pubkey . $errorpart . '"></script>
+
+ <noscript>
+ <iframe src="'. $server . '/noscript?k=' . $pubkey . $errorpart . '" height="300" width="500" frameborder="0"></iframe><br/>
+ <textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
+ <input type="hidden" name="recaptcha_response_field" value="manual_challenge"/>
+ </noscript>';
+}
+
+
+
+
+/**
+ * A ReCaptchaResponse is returned from recaptcha_check_answer()
+ */
+class ReCaptchaResponse {
+ var $is_valid;
+ var $error;
+}
+
+
+/**
+ * Calls an HTTP POST function to verify if the user's guess was correct
+ * @param string $privkey
+ * @param string $remoteip
+ * @param string $challenge
+ * @param string $response
+ * @param array $extra_params an array of extra variables to post to the server
+ * @return ReCaptchaResponse
+ */
+function recaptcha_check_answer ($privkey, $remoteip, $challenge, $response, $extra_params = array())
+{
+ if ($privkey == null || $privkey == '') {
+ die ("To use reCAPTCHA you must get an API key from <a href='https://www.google.com/recaptcha/admin/create'>https://www.google.com/recaptcha/admin/create</a>");
+ }
+
+ if ($remoteip == null || $remoteip == '') {
+ die ("For security reasons, you must pass the remote ip to reCAPTCHA");
+ }
+
+
+
+ //discard spam submissions
+ if ($challenge == null || strlen($challenge) == 0 || $response == null || strlen($response) == 0) {
+ $recaptcha_response = new ReCaptchaResponse();
+ $recaptcha_response->is_valid = false;
+ $recaptcha_response->error = 'incorrect-captcha-sol';
+ return $recaptcha_response;
+ }
+
+ $response = _recaptcha_http_post (RECAPTCHA_VERIFY_SERVER, "/recaptcha/api/verify",
+ array (
+ 'privatekey' => $privkey,
+ 'remoteip' => $remoteip,
+ 'challenge' => $challenge,
+ 'response' => $response
+ ) + $extra_params
+ );
+
+ $answers = explode ("\n", $response [1]);
+ $recaptcha_response = new ReCaptchaResponse();
+
+ if (trim ($answers [0]) == 'true') {
+ $recaptcha_response->is_valid = true;
+ }
+ else {
+ $recaptcha_response->is_valid = false;
+ $recaptcha_response->error = $answers [1];
+ }
+ return $recaptcha_response;
+
+}
+
+/**
+ * gets a URL where the user can sign up for reCAPTCHA. If your application
+ * has a configuration page where you enter a key, you should provide a link
+ * using this function.
+ * @param string $domain The domain where the page is hosted
+ * @param string $appname The name of your application
+ */
+function recaptcha_get_signup_url ($domain = null, $appname = null) {
+ return "https://www.google.com/recaptcha/admin/create?" . _recaptcha_qsencode (array ('domains' => $domain, 'app' => $appname));
+}
+
+function _recaptcha_aes_pad($val) {
+ $block_size = 16;
+ $numpad = $block_size - (strlen ($val) % $block_size);
+ return str_pad($val, strlen ($val) + $numpad, chr($numpad));
+}
+
+/* Mailhide related code */
+
+function _recaptcha_aes_encrypt($val,$ky) {
+ if (! function_exists ("mcrypt_encrypt")) {
+ die ("To use reCAPTCHA Mailhide, you need to have the mcrypt php module installed.");
+ }
+ $mode=MCRYPT_MODE_CBC;
+ $enc=MCRYPT_RIJNDAEL_128;
+ $val=_recaptcha_aes_pad($val);
+ return mcrypt_encrypt($enc, $ky, $val, $mode, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0");
+}
+
+
+function _recaptcha_mailhide_urlbase64 ($x) {
+ return strtr(base64_encode ($x), '+/', '-_');
+}
+
+/* gets the reCAPTCHA Mailhide url for a given email, public key and private key */
+function recaptcha_mailhide_url($pubkey, $privkey, $email) {
+ if ($pubkey == '' || $pubkey == null || $privkey == "" || $privkey == null) {
+ die ("To use reCAPTCHA Mailhide, you have to sign up for a public and private key, " .
+ "you can do so at <a href='http://www.google.com/recaptcha/mailhide/apikey'>http://www.google.com/recaptcha/mailhide/apikey</a>");
+ }
+
+
+ $ky = pack('H*', $privkey);
+ $cryptmail = _recaptcha_aes_encrypt ($email, $ky);
+
+ return "http://www.google.com/recaptcha/mailhide/d?k=" . $pubkey . "&c=" . _recaptcha_mailhide_urlbase64 ($cryptmail);
+}
+
+/**
+ * gets the parts of the email to expose to the user.
+ * eg, given johndoe@example,com return ["john", "example.com"].
+ * the email is then displayed as john...@example.com
+ */
+function _recaptcha_mailhide_email_parts ($email) {
+ $arr = preg_split("/@/", $email );
+
+ if (strlen ($arr[0]) <= 4) {
+ $arr[0] = substr ($arr[0], 0, 1);
+ } else if (strlen ($arr[0]) <= 6) {
+ $arr[0] = substr ($arr[0], 0, 3);
+ } else {
+ $arr[0] = substr ($arr[0], 0, 4);
+ }
+ return $arr;
+}
+
+/**
+ * Gets html to display an email address given a public an private key.
+ * to get a key, go to:
+ *
+ * http://www.google.com/recaptcha/mailhide/apikey
+ */
+function recaptcha_mailhide_html($pubkey, $privkey, $email) {
+ $emailparts = _recaptcha_mailhide_email_parts ($email);
+ $url = recaptcha_mailhide_url ($pubkey, $privkey, $email);
+
+ return htmlentities($emailparts[0]) . "<a href='" . htmlentities ($url) .
+ "' onclick=\"window.open('" . htmlentities ($url) . "', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300'); return false;\" title=\"Reveal this e-mail address\">...</a>@" . htmlentities ($emailparts [1]);
+
+}
+
+
+?>
--
-INDIA 2011 is a journal by Gabriel L Dunne, documenting a self-initiated 3mo residiency in Delhi, India with fellow artist Vishal K Dar.
-
-all content © 2011
\ No newline at end of file
+plog CMS by Gabriel L Dunne
\ No newline at end of file
+++ /dev/null
-title = links
-type = page
-markdown = true
---
-people
-------
-+ gabriel dunne [gabrieldunne.com](http://gabrieldunne.com)
-+ stephanie sherriff [ssherriff.com](http://ssherriff.com)
-+ ryan alexander [onecm.com](http://onecm.com)
-+ joshua nimoy [jtnimoy.net](http://jtnimoy.net)
-+ daniel massey [oddsympathy.com](http://oddsympathy.com)
-+ keith pasko [keithpasko.com](http://keithpasko.com)
-+ jeff lubow [dabkitsch.com/jml/](http://dabkitsch.com/jml/)
-+ michael chang [ghost-hack.com](http://ghost-hack.com)
-+ carbon workshop [carbonworkshop.com](http://carbonworkshop.com)
-+ sascha pohflep [pohflepp.com](http://pohflepp.com)
-+ mylinh trieu [mylinhtrieu.com](http://mylinhtrieu.com)
-+ aaron meyers [universaloscillation.com](http://universaloscillation.com)
-+ tom carden [tom-carden.co.uk](http://tom-carden.co.uk)
-+ michal migurski [mike.teczno.co](http://mike.teczno.com)
-+ adam roth [ripevessel.com](http://ripevessel.com)
-+ david rager [davidrager.org](http://davidrager.org)
-+ marc nimoy [digitanalog.net](http://digitanalog.net)
-+ matthew gale [makaga.com](http://makaga.com)
-+ frédéric eyl [fredericeyl.de](http://fredericeyl.de)
-+ the green eyl [thegreeneyl.com](http://thegreeneyl.com)
-
-<br />
-<br />
-
-places
-------
-+ gray area foundation for the arts [gaffta.org](http://gaffta.org)
-+ bay area video coalition [bavc.org](http://bavc.org)
\ No newline at end of file
--- /dev/null
+<div class="comments">
+
+ <div class="comment_list">
+
+ <? foreach($entry['comments'] as $comment) : ?>
+ <div class="comment">
+ <?=$comment['comment'];?>
+ <div class="name">posted by <?=$comment['name'];?> at <?=$comment['timestamp'];?></div>
+ </div>
+ <? endforeach; ?>
+
+ </div>
+
+ <div class="comment_form">
+
+ <form action="" method="post">
+ <input type="text" name="name" /> <label for="name">name</label> <br />
+ <input type="text" name="www" /> <label for="www">www (optional)</label> <br />
+ <textarea name="comment"></textarea>
+ <br />
+ markdown enabled
+
+ <?php include(LOCAL_ROOT . 'lib/' . 'comments.php'); ?>
+
+ <br/>
+ <input type="submit" value="submit" />
+
+ </form>
+ </div>
+</div>
<div class="entry">
+ <h2><a href="<?=$entry['url']?>"><?=$entry['title']?></a></h2>
+ <div class="metadata">
+
+ </div>
+
<div class="content">
<?=$entry['content']?>
</div>
<div class="metadata">
- <a href="<?=$entry['url']?>"><?=$entry['title']?></a>,
- <span title="<?=get_relative_time($entry['timestamp']);?>"><?=date(ENTRY_DATE_FORMAT, $entry['timestamp'])?></span>
+ <span title="<?=get_relative_time($entry['timestamp']);?>"><?=date(ENTRY_DATE_FORMAT, $entry['timestamp'])?>
+ <? if (count($entry['comments']) > 0 || $entry['comments_enabled']) : ?>
+ | <a href="<?=$entry['url'];?>#c"><? echo sizeof($entry['comments']) ?> comments</a>
+ <? endif; ?>
+ </span>
<? if (!empty($entry['cat']['name'])): ?>
in <a href="<?=$entry['cat']['url'];?>"><?=$entry['cat']['name'];?></a>
<br/>
- <? endif; ?>
+ <? endif; ?>
<ul class="tags">
<? if ($entry['tags']) foreach($entry['tags'] as $tag) : ?>
<li>#<?=$tag?></li>
</ul>
</div>
+ <?
+ if ($entry['comments_enabled'])
+ $this->include_template('comments.html.tpl', array('entry' => $entry));
+ ?>
+
</div>
<link rel="alternate" type="application/rss+xml" title="RSS" href="<?=get_base_dir();?>/.rss" />
<link rel="stylesheet" href="<?=get_base_dir();?>/css/style.css" type="text/css">
+<link rel="stylesheet" href="<?=get_base_dir();?>/css/comments.css" type="text/css">