]> git.quilime.com - plog.git/commitdiff
new aggregate and photo pages
authorGabriel Dunne <gdunne@quilime.com>
Mon, 27 Dec 2010 07:21:32 +0000 (23:21 -0800)
committerGabriel Dunne <gdunne@quilime.com>
Mon, 27 Dec 2010 07:21:32 +0000 (23:21 -0800)
31 files changed:
.htaccess [moved from public/.htaccess with 100% similarity]
content/code/mel/sphere_intersect
content/code/scripts/rename_multiple_files [new file with mode: 0644]
content/code/scripts/resize_multiple_images [new file with mode: 0644]
content/code/scripts/rewrite_multiple_slashes [new file with mode: 0644]
content/log/2010-12-01_icosi [new file with mode: 0644]
css/style.css [moved from public/css/style.css with 80% similarity]
feed.php [new file with mode: 0644]
index.php [moved from public/index.php with 97% similarity]
js/aggregate.js [new file with mode: 0644]
js/jquery-1.3.2.min.js [moved from public/js/jquery-1.3.2.min.js with 100% similarity]
js/js.js [moved from public/js/js.js with 100% similarity]
js/prettify/lang-apollo.js [moved from public/js/prettify/lang-apollo.js with 100% similarity]
js/prettify/lang-css.js [moved from public/js/prettify/lang-css.js with 100% similarity]
js/prettify/lang-hs.js [moved from public/js/prettify/lang-hs.js with 100% similarity]
js/prettify/lang-lisp.js [moved from public/js/prettify/lang-lisp.js with 100% similarity]
js/prettify/lang-lua.js [moved from public/js/prettify/lang-lua.js with 100% similarity]
js/prettify/lang-ml.js [moved from public/js/prettify/lang-ml.js with 100% similarity]
js/prettify/lang-proto.js [moved from public/js/prettify/lang-proto.js with 100% similarity]
js/prettify/lang-sql.js [moved from public/js/prettify/lang-sql.js with 100% similarity]
js/prettify/lang-vb.js [moved from public/js/prettify/lang-vb.js with 100% similarity]
js/prettify/lang-wiki.js [moved from public/js/prettify/lang-wiki.js with 100% similarity]
js/prettify/prettify.css [moved from public/js/prettify/prettify.css with 65% similarity]
js/prettify/prettify.js [moved from public/js/prettify/prettify.js with 100% similarity]
lib/init.php
pages/about
pages/links
pages/photo [new file with mode: 0644]
templates/agg.html.tpl
templates/nav.html.tpl
templates/photo.html.tpl [new file with mode: 0644]

similarity index 100%
rename from public/.htaccess
rename to .htaccess
index 3377c9f5a08a2ec0374b55e8644077a61af589b8..229977e19bdacbfac0dfd6b0814a70f92450d731 100644 (file)
@@ -32,20 +32,20 @@ mel source
                $shape = `listRelatives -shapes $mesh`;
 
                createNode -n $tmpCN closestPointOnMesh;
-               connectAttr -f ($shape[0] + ".outMesh") ($tmpCN + ".inMesh");
-               setAttr ($tmpCN + ".inPosition") $curPos[0] $curPos[1] $curPos[2];
+               connectAttr -f ($shape[0] + ".outMesh") ($tmpCN + ".inMesh");
+               setAttr ($tmpCN + ".inPosition") $curPos[0] $curPos[1] $curPos[2];
                
                $cpom = `getAttr ($tmpCN + ".position")`;
                
-               if ( pointDist($curPos, $cpom) <= $radius ) {
-                       return ". . bonk\n";
-               }
+        if ( pointDist($curPos, $cpom) <= $radius ) {
+                       return ". . bonk\n";
+        }
 
-               $curPos[1] = ($limit.y) / $iter * $i;
-               setAttr ($obj + ".translateY") $curPos[1];
+               $curPos[1] = ($limit.y) / $iter * $i;
+               setAttr ($obj + ".translateY") $curPos[1];
 
-               delete $tmpCN;
-       }
+               delete $tmpCN;
+       }
        return ". nope\n";
 }
 
diff --git a/content/code/scripts/rename_multiple_files b/content/code/scripts/rename_multiple_files
new file mode 100644 (file)
index 0000000..3d7099c
--- /dev/null
@@ -0,0 +1,7 @@
+title = Rename Multiple Files via Shell
+tags = bash terminal rename
+date = 2010-01-11
+--
+<pre class="prettyprint">
+ls | nl -nrz -w2 | while read a b; do mv "$b" filename.$a.png; done;
+</pre>
diff --git a/content/code/scripts/resize_multiple_images b/content/code/scripts/resize_multiple_images
new file mode 100644 (file)
index 0000000..1b19e18
--- /dev/null
@@ -0,0 +1,5 @@
+title = resize multiple images
+date = 2010-07-11
+--
+<pre class="prettyprint lang-bash">for k in $(ls *.JPG); do convert $k -resize 50% -quality 80 r_$k; done</pre>
+
diff --git a/content/code/scripts/rewrite_multiple_slashes b/content/code/scripts/rewrite_multiple_slashes
new file mode 100644 (file)
index 0000000..40456d2
--- /dev/null
@@ -0,0 +1,9 @@
+date = 2010-05-15
+title = Rewrite URL: Replace Double Slashes With Single Slash
+tags = htaccess apache
+--
+
+<pre class="prettyprint">
+RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
+RewriteRule . %1/%2 [R=301,L]
+</pre>
\ No newline at end of file
diff --git a/content/log/2010-12-01_icosi b/content/log/2010-12-01_icosi
new file mode 100644 (file)
index 0000000..5bbd8d2
--- /dev/null
@@ -0,0 +1,6 @@
+title = icosi performance
+date = 2010-12-01
+tags = installation audiovisual projection mapping
+--
+
+<iframe src="http://player.vimeo.com/video/17456221?title=0&amp;byline=0&amp;portrait=0&amp;color=01AAEA" width="601" height="338" frameborder="0"></iframe><p><a href="http://vimeo.com/17456221">icosi</a> by <a href="http://vimeo.com/quilime">gabriel dunne</a></p><p>Installation, live performance<br />Design, Projection, Fabrication: Gabriel Dunne<br />Audio: Jeff Lubow </p>
\ No newline at end of file
similarity index 80%
rename from public/css/style.css
rename to css/style.css
index 12669d34484b4ce88a0aa477f09be351781fb1ac..a23f34064130b8db9334cb090532eed29b46dc4f 100644 (file)
@@ -1,5 +1,5 @@
-body { margin:80px 100px 50px 40px; }
-html, body, table { font-family: sans-serif; font-size:12px; line-height:1.4em; color:#44d ; }
+body { margin:20px 100px 50px 30px; }
+html, body, table { font-family: sans-serif; font-size:14px; line-height:1.4em; color:#44d ; }
 
 ::-moz-selection {background: #08f !important; color:#fff;} 
 ::selection {background: #08f !important; color:#fff;} 
@@ -22,16 +22,19 @@ ol li { list-style-type:decimal; }
 blockquote { font-family:times; background:#000; color:#aaa;
 margin:0; font-size:15px; line-height:1.4em; padding:2em 4em; font-style:italic; line-height:1.45em; max-width:600px;}
 
-#content { margin-left:160px; min-width:500px; position:absolute; top:20px; padding-bottom:200px; z-index:10;}
+#content { padding-right:160px; min-width:500px; padding-bottom:200px; z-index:10; }
 #content p:first-child { margin-top:0; }
 p { max-width:720px; }
 
-.nav { position:absolute; z-index:1; top:20px; left:30px;  }
-.nav a { text-decoration:none; font-weight:bold;}
-.nav a.mute { font-weight:normal;}
-.nav ul { margin-left:1em; }
+
+.nav { position:absolute; width:200px; z-index:1; top:20px; right:20px; margin:0; }
+.nav a { text-decoration:none; font-weight:bold; } 
+.nav a.mute { font-weight:normal; }
 .nav h1 { }
-    
+.index { padding:0; margin:0;  }
+.index li {line-height:1.1em; margin-bottom:0.4em; }
+.index li a { text-decoration:underline; font-weight:normal; }    
+
 .entry { margin-bottom:100px; }
 .entry h2 { padding-bottom:4px; font-size:1.3em;}
 .entry .metadata { font-style:italic; color:#bbb; }
diff --git a/feed.php b/feed.php
new file mode 100644 (file)
index 0000000..3c0be28
--- /dev/null
+++ b/feed.php
@@ -0,0 +1,63 @@
+<?php
+       header("content-type: text/xml");
+?>
+<?php echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>
+<rss version="2.00">
+<channel>
+<title>Aggregated Feed Demo</title>
+<link>http://www.webmaster-source.com</link>
+<description>
+A demo of SimplePie’s feed-merging capabilities.
+</description>
+<language>en-us</language>
+
+<?php
+
+require_once '../lib/init.php';
+include_once('simplepie.inc'); // Include SimplePie
+
+$feed = new SimplePie(); // Create a new instance of SimplePie
+
+
+// Load the feeds
+$feed->set_feed_url(array(
+'http://quilime.com/.rss',
+'http://media.quilime.com/aggregate/?return=rss',
+'http://feeds.delicious.com/v2/rss/quilime?count=15'
+));
+
+$feed->set_cache_duration (600); // Set the cache time
+
+$feed->enable_xml_dump(isset($_GET['xmldump']) ? true : false);
+
+$success = $feed->init(); // Initialize SimplePie
+
+$feed->handle_content_type(); // Take care of the character encoding
+
+?>
+
+<?php if ($success) {
+$itemlimit=0;
+foreach($feed->get_items() as $item) {
+
+print_r($item->get_title());
+
+if ($itemlimit==100) { break; }
+?>
+
+<item>
+<title><?php echo $item->get_title(); ?></title>
+<link><?php echo $item->get_permalink(); ?></link>
+<description>
+<?php echo $item->get_description(); ?>
+</description>
+</item>
+
+<?
+$itemlimit = $itemlimit + 1;
+}
+}
+?>
+
+</channel>
+</rss>
\ No newline at end of file
similarity index 97%
rename from public/index.php
rename to index.php
index 76e89fbbd6d8bea38e32c08428f0a19e98415d05..45e5e256efde81e0a74f9cd5e4c934909fa7f0fb 100644 (file)
+++ b/index.php
@@ -1,8 +1,6 @@
 <?php
 
-
-
-    require_once '../lib/init.php';
+    require_once 'lib/init.php';
 
     $url = get_url();
 
diff --git a/js/aggregate.js b/js/aggregate.js
new file mode 100644 (file)
index 0000000..2e58cce
--- /dev/null
@@ -0,0 +1,248 @@
+(function () {
+
+    var token = 'IeFqDeIAsZp8yMdxWXSbcfaH8ep/uLuA3Mkmf62IqGBnHt2LgW6edQXxpRpwLfEQqrhnXWsLCYNPyHYM/XUqMrOzK9t8jSB7wJyUGbSeRgw=';
+    var regex_found = /^https?:\/\/.*?\.?ffffound\.com\//;
+
+    if (location.href.match(regex_found)) {
+        window.alert('This bookmarklet cannot use in ffffound.com domain.');
+        return;
+    }
+
+    var res_endpoint = 'http://ffffound.com/add_asset';
+
+    var res_popupimg_src = 'http://ffffound.com/assets/bookmarklet_01.r2509.gif';
+    var res_popupimg_w = 149;
+    var res_popupimg_h = 44;
+
+    var res_popupimg2_src = 'http://ffffound.com/assets/bookmarklet_02.r2509.gif';
+    var res_popupimg2_w = 149;
+    var res_popupimg2_h = 44;
+
+    var min_size = 200;
+
+    var style_em_size = 10;
+    var style_em_color = '#0000ff';
+    var style_om_color = '#0000ff';
+    var style_om_color_ff = 'rgb(0, 0, 255)';
+
+    var isie = 0 <= navigator.appName.indexOf('Internet Explorer');
+    var isff = 0 <= navigator.userAgent.indexOf('Firefox');
+    var iswk = 0 <= navigator.userAgent.indexOf('Safari');
+
+    var frames = document.getElementsByTagName('frame');
+    var d; 
+    if (0 < frames.length) {
+        d = window[0].document;
+    }
+    else {
+        d = document;
+    }
+
+    var selectedimg = null;
+
+    var ele_popup = d.createElement('div');
+    ele_popup.id = '__found-popup';
+    ele_popup.style.display = 'none';
+    ele_popup.style.zIndex = 10000;
+    ele_popup.style.position = 'absolute';
+    ele_popup.style.margin = '0px';
+    ele_popup.style.padding = '0px';
+    ele_popup.style.borderWidth = '0px';
+    ele_popup.onmouseout = function () {
+        selectedimg = null;
+        setTimeout(function () {
+            resetAll();
+        }, 50);
+    };
+    d.body.appendChild(ele_popup);
+
+    var imgs = d.getElementsByTagName('img');
+    var found = false;
+    for (var i = 0; i < imgs.length; i++) {
+        var img = imgs[i];
+        if (img.src.match(regex_found)) {
+            continue;
+        }
+        // else if (img.src.match(/\.(jpg|gif|png)/i)) {
+        else {
+            if (img.width < min_size && img.height < min_size) {
+                continue;
+            }
+
+            if (img.src.match(/\.(tif|tiff|bmp)$/i)) {
+                continue;
+            }
+
+            found = true;
+            img.style.border = style_em_size + 'px solid ' + style_em_color;
+            img.style.cursor = 'pointer';
+
+            img.onclick = function () {
+                addToFound();
+                return false;
+            };
+
+            img.onmouseover = function () {
+                selectedimg = this;
+
+                var ele_a = d.createElement('a');
+                ele_a.href = 'javascript:void(0);';
+                ele_a.onclick = function () {
+                    addToFound();
+                    return false;
+                };
+
+                var ele_img = d.createElement('img');
+                ele_img.src = res_popupimg_src;
+                ele_img.width = res_popupimg_w;
+                ele_img.height = res_popupimg_h;
+                ele_img.alt = 'ADD TO MY FOUND';
+                ele_img.border = 0;
+
+                ele_a.appendChild(ele_img);
+
+                if (ele_popup.firstChild) {
+                    ele_popup.removeChild(ele_popup.firstChild);
+                }
+                ele_popup.appendChild(ele_a);
+
+                var offset = getElementOffset(this);
+                ele_popup.style.left = offset[0] + ((this.width + (style_em_size * 2)) / 2) - (res_popupimg_w / 2) + 'px';
+                ele_popup.style.top = offset[1] + ((this.height + (style_em_size * 2)) / 2) - (res_popupimg_h / 2) + 'px';
+                ele_popup.style.display = '';
+
+                var img = this;
+                ele_popup.onmouseover = function () {
+                    selectedimg = img;
+                };
+
+                this.style.border = style_em_size + 'px solid ' + style_om_color;
+            };
+
+            img.onmouseout = function () {
+                selectedimg = null;
+                setTimeout(function () {
+                    resetAll();
+                }, 50);
+            };
+        }
+    }
+
+    if (!found) {
+        window.alert('Image not found.');
+    }
+
+    function addToFound() {
+        var img = selectedimg;
+
+        if (img == null) {
+            return;
+        }
+
+        var params = {
+            'token': token,
+            'url': img.src,
+            'referer': (img.src == location.href ? document.referrer : location.href),
+            'title': d.title,
+            'alt': img.alt
+        };
+
+        var urlb = [];
+        urlb.push(res_endpoint);
+        urlb.push('?');
+        for (var n in params) {
+            urlb.push(encodeURIComponent(n));
+            urlb.push('=');
+            urlb.push(encodeURIComponent(params[n]));
+            urlb.push('&');
+        }
+
+        if (true) {
+            window.open(urlb.join(''),
+                    'found' + new Date().getTime(),
+                    'status=no,resizable=no,scrollbars=no,personalbar=no,directories=no,location=no,toolbar=no,menubar=no,' +
+                    'width=300,height=50,left=0,top=0');
+        }
+
+        disableImage(img);
+        resetAll();
+
+        return false;
+    }
+
+    function disableImage(img) {
+        img.onclick = null;
+        img.onmouseover = null;
+        img.onmouseout = null;
+        img.style.border = style_em_size + 'px solid #000000';
+
+        var w = img.width + (style_em_size * 2);
+        var h = img.height + (style_em_size * 2);
+
+        var e = d.createElement('div');
+        e.style.zIndex = 10010;
+        e.style.position = 'absolute';
+        e.style.margin = '0px';
+        e.style.padding = '0px';
+        e.style.borderWidth = '0px';
+        e.style.backgroundColor = '#000000';
+        e.style.width = w;
+        e.style.height = h;
+
+        var offset = getElementOffset(img);
+        e.style.left = offset[0] + 'px';
+        e.style.top = offset[1] + 'px';
+
+        d.body.appendChild(e);
+
+        e.innerHTML = '<table cellpadding="0" cellspacing="0" border="0" width="' + w + '" height="' + h + '"><tr><td align="center" valign="middle"><img src="' + res_popupimg2_src + '" width="' + res_popupimg2_w + '" height="' + res_popupimg2_h + '" border="0"></td></tr></table>';
+    }
+
+    function resetAll() {
+        for (var i = 0; i < imgs.length; i++) {
+            var img = imgs[i];
+            if (hide(img)) {
+                img.style.border = style_em_size + 'px solid ' + style_em_color;
+                if (selectedimg == null) {
+                    ele_popup.style.display = 'none';
+                }
+            }
+        }
+
+        function hide(img) {
+            if (img == selectedimg) {
+                return;
+            }
+
+            if (iswk) {
+                return img.style.borderTopWidth == style_em_size + 'px' &&
+                    img.style.borderTopStyle == 'solid' &&
+                    img.style.borderTopColor == style_om_color_ff;
+            }
+            else if (isff) {
+                return img.style.border == style_em_size + 'px solid ' + style_om_color_ff;
+            }
+            else {
+                return img.style.border == style_om_color + ' ' + style_em_size + 'px solid';
+            }
+        }
+    }
+
+    // import from prototype.js.
+    // (c) 2005 Sam Stephenson <sam@conio.net>
+    // http://prototype.conio.net
+    function getElementOffset(element) {
+        var valueT = 0, valueL = 0;
+        do {
+            valueT += element.offsetTop  || 0;
+            valueL += element.offsetLeft || 0;
+            element = element.offsetParent;
+            if (element) {
+                p = element.style.position;
+                if (p == 'relative' || p == 'absolute') break;
+            }
+        } while (element);
+        return [valueL, valueT];
+    }
+})();
+
similarity index 100%
rename from public/js/js.js
rename to js/js.js
similarity index 65%
rename from public/js/prettify/prettify.css
rename to js/prettify/prettify.css
index b35d1f90773cbc32d9d91e0fabc69df05de7df40..10f460209ef5abf7554fa805b00d7ae1ad15f6e8 100644 (file)
 .atn { color: #606; }
 .atv { color: #080; }
 .dec { color: #606; }
-pre.prettyprint, code.prettyprint { font-family:monaco, "Lucida Console", monospace; font-size:14px; line-height:1.5em; padding:0.4em 0.6em; background:#222333;
--moz-border-radius: 8px;
--webkit-border-radius: 8px;
+pre.prettyprint, code.prettyprint { 
+    font-family:monaco, "Lucida Console", monospace; font-size:14px; line-height:1.5em; padding:0.4em 0.6em; background:#222333;
+    -moz-border-radius: 8px;
+    -webkit-border-radius: 8px;
+    border:2px solid #666;
+    border-bottom-color:#bbb;
+    border-right-color:#bbb;
 }
 pre.prettyprint { padding:20px; }
 
 @media print {
   .str { color: #060; }
-  .kwd { color: #006; font-weight: bold; }
+  .kwd { color: #008; font-weight: bold; }
   .com { color: #600; font-style: italic; }
   .typ { color: #404; font-weight: bold; }
   .lit { color: #044; }
index 9c4003eacf23f8892c9403a25104b50d3e453b90..29f61989e2bb607e2d8e512ad81d024c710548dc 100644 (file)
@@ -5,7 +5,7 @@
        ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . dirname(realpath(__FILE__)));
 
        define ('SITE_TITLE', 'quilime');
-       define ('LOCAL_ROOT', '/home/quilime/quilime-site/');
+       define ('LOCAL_ROOT', '/home/quilime/quilime.com/');
        define ('WEB_ROOT', 'http://quilime.com/');
        
        define ('CONTENT_DIR', 'content');
index f6f91a57df54228f2cb22feacccd09df888e0826..db9958e97d58877d39c66e043a391b635b45a5ba 100644 (file)
@@ -1,12 +1,12 @@
 title = about
 --
 quilime.com is a codification of creative process and resources  
- by **Gabriel Dunne** ([www](http://gabrieldunne.com), [email](&#x6d;&#x61;&#x69;&#108;&#x74;&#111;&#x3a;&#x67;&#x64;&#x75;&#x6e;&#110;&#x65;&#x40;&#x71;&#117;&#105;&#x6c;&#x69;&#x6d;&#101;&#x2e;&#x63;&#111;&#x6d;))  
+by **gabriel dunne** ([www](http://gabrieldunne.com), [email](&#x6d;&#x61;&#x69;&#108;&#x74;&#111;&#x3a;&#x67;&#x64;&#x75;&#x6e;&#110;&#x65;&#x40;&#x71;&#117;&#105;&#x6c;&#x69;&#x6d;&#101;&#x2e;&#x63;&#111;&#x6d;))  
 elsewhere: 
 [flickr](http://flickr.com/photos/quilime/), 
-[delicious](http://delicious.com/quilime/), 
 [vimeo](http://vimeo.com/quilime/), 
-[soundcloud](http://soundcloud.com/quilime), 
+[delicious](http://delicious.com/quilime/),
+[twitter](http://twitter.com/quilime/),
 [github](http://github.com/quilime/)
 
-<a href="http://quilime.com/.rss" class="rss">rss</a>
+site update <a href="http://quilime.com/.rss" class="rss">rss</a>
index 6eb4d8d0eddd3e64c4892674b1343faebd42bc4a..8a3369ed3224966724a2e7dff1ca50d0ab3fbab7 100644 (file)
@@ -2,13 +2,16 @@ title = links
 type = page
 markdown = true
 --
-## friends and inspiration
+people
+------
++ gabriel dunne [gabrieldunne.com](http://gabrieldunne.com)
 + stephanie sherriff [ssherriff.com](http://ssherriff.com)
 + ryan alexander [onecm.com](http://onecm.com)
-+ daniel massey [oddsympathy.com](http://oddsympathy.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)
@@ -20,4 +23,12 @@ markdown = true
 + 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)
\ No newline at end of file
++ 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
diff --git a/pages/photo b/pages/photo
new file mode 100644 (file)
index 0000000..f1894c0
--- /dev/null
@@ -0,0 +1,3 @@
+title = photo
+template = photo
+--
index 88d8b9c7937387a878d94ba296df935a1004bde2..4ecf916b8d7332222306c9a362335614129d6e2e 100644 (file)
 <html>
 <head>
-    
+
     <?php $this->include_template('head-inc.html.tpl'); ?>
-    
-    <title><?=SITE_TITLE?></title>
-    
+
+    <title><?=SITE_TITLE?>: aggregate</title>
+
 </head>
 <body>
-    
+
     <? $this->include_template('nav.html.tpl') ?>
-    
+
 <div id="content">
-       
+
        <table border="0" id="agg"><tr>
 
        <!-- quilime:aggregate -->
        <td valign="top" class="column">
 
 <?
-       $agg = get_rss_feed('http://media.quilime.com/aggregate/index.php?return=rss'); 
+       $agg = get_rss_feed('http://media.quilime.com/aggregate/index.php?return=rss');
 ?>
-       <h2><a class="mute" href="http://media.quilime.com/aggregate/">aggregate</a></h2>
+       <h2><a href="http://media.quilime.com/aggregate/">image</a></h2>
        <ul class="image">
 
 <?
        $count = 10;
-       foreach($agg->channel->item as $item) :  
+       foreach($agg->channel->item as $item) :
        if (!$count--) break;
-       ?>    
+       ?>
        <li title="<?=$item->title?>">
                <a href="<?=$item->link?>"><img src="<?=$item->thumb?>"></a>
        </li>
        <? endforeach; ?>
        </ul>
-       
+
        <p>
-       <a class="ext" href="http://media.quilime.com/aggregate/index.php?return=rss">rss</a>, <a class="more" href="http://media.quilime.com/aggregate" title="via quilime.com/aggregate">more &rarr;</a>            
+       <a class="rss" href="http://media.quilime.com/aggregate/index.php?return=rss">rss</a>, <a class="more" href="http://media.quilime.com/aggregate" title="via quilime.com/aggregate">more &rarr;</a>
        </p>
 
        </td>
 
+               <td valign="top" class="column">
+               <?php $vid = get_rss_feed('http://quilime.tumblr.com/rss'); ?>
+               <h2><a href="http://quilime.tumblr.com/">video</a></h2>
+               <script>
+                function vtog(count) {
+                    $('.vid').hide();
+                    $('#vid_' + count).show();                    
+                }    
+               </script>
+               <ul class="video">
+               <?php
+
+               $count = 11;
+               
+               foreach($vid->channel->item as $v) :
+               if ($count-- == 0) break;
+               ?>
+               <li title="<?php echo str_replace('"', '\'', $v->title); ?>">
+                   <?
+                $desc = $v->description;
+                $patterns = array('/player.vimeo.com/', '/youtube.com/');
+                foreach($patterns as $p) {
+                   preg_match($p, $desc, $matches);
+                    echo '<a onClick="vtog('.$count.');" href="#">';                       
+                   if (sizeof($matches) > 0) {
+                           // vimeo
+                       if ('/'.$matches[0].'/' == $patterns[0]) {
+                            // get video thumbnail for vimeo                               
+                            $pattern = '/http:\/\/player.vimeo.com\/video\/(\\d+)/';                               
+                           preg_match($pattern, $desc, $m);
+                            $video_url = "http://vimeo.com/". $m[1]  ;
+                            $file = fopen($video_url, "r");
+                            $filedata = stream_get_contents($file);
+                            $html_content = strpos($filedata,"<meta property=\"og:image\"");
+                            $link_string = substr($filedata, $html_content + 35, 128);
+                            $video_id_array = explode("\"", $link_string);
+                            $thumbnail_url = $video_id_array[0];
+                            echo '<img style="width:120px; height:90px;" src="'.$thumbnail_url.'">';
+                           }
+                           // youtube
+                       if ('/'.$matches[0].'/' == $patterns[1]) {
+                            $pattern = '/http:\/\/www.youtube.com\/v\/(.+?)&/';
+                           preg_match($pattern, $desc, $m);
+                            echo '<img src="http://i3.ytimg.com/vi/'.$m[1].'/default.jpg" />';
+                           }
+                    }
+                    echo '</a>';                    
+                }
+                   ?>
+                <div class="vid" id="vid_<?=$count?>" style="display:none;">
+                <?=$v->description ?>
+                </div>
+               </li>
+               <? 
+               endforeach;
+               
+               
+               
+/*
+// get video thumbnail for vimeo
+$video_url = "http://vimeo.com/15592943"  ;
+$file = fopen($video_url, "r");
+$filedata = stream_get_contents($file);
+$html_content = strpos($filedata,"<meta property=\"og:image\"");
+$link_string = substr($filedata, $html_content + 35, 49);
+$video_id_array = explode("\"", $link_string);
+echo("LINK: " . $link_string);
+$thumbnail_url = $filedata[3];
+//               echo $thumbnail_url;
+echo '<img src="'.$link_string.'">';
+
+               */
+
+
+               ?>
+               </ul>
+               <p>
+                   <a class="rss" href="http://quilime.tumblr.com/rss">rss</a>, 
+                   <a class="more" href="http://quilime.tumblr.com" title="via tumblr">more &rarr;</a>
+               </p>
+               </td>
+
+
 <? /*
                <td valign="top" class="column">
                <?php $tube = get_rss_feed('http://gdata.youtube.com/feeds/base/users/quilime/favorites?alt=rss&v=2&orderby=published&client=ytapi-youtube-profile'); ?>
                <h2><a href="http://www.youtube.com/profile?user=kabr&view=favorites">video </a></h2>
                <ul class="video">
-               <?php 
+               <?php
                $count = 11;
-               foreach($tube->channel->item as $tube) :  
+               foreach($tube->channel->item as $tube) :
                if ($count-- == 0) break;
-               ?>    
+               ?>
                <li title="<?php echo str_replace('"', '\'', $tube->title); ?>">
-                   <? 
+                   <?
                    $url = $tube->link;
                    $pattern = '/v=(.+?)&/';
                    preg_match($pattern, $url, $matches);
                    <img src="http://i3.ytimg.com/vi/<?=$id?>/default.jpg" />
                    </a>
                </li>
-               <? endforeach; ?>  
+               <? endforeach; ?>
                </ul>
                <p>
-                   <a class="more" href="http://www.youtube.com/profile?user=quilime&view=favorites" title="via youtube">more &rarr;</a>            
+                   <a class="more" href="http://www.youtube.com/profile?user=quilime&view=favorites" title="via youtube">more &rarr;</a>
                </p>
                </td>
 */ ?>
 <? /*
        <!-- quilime:flickr -->
        <td valign="top" class="column">
-               <h3><a class="mute" href="http://flickr.com/photos/quilime/">flickr</a></h3>            
+               <h3><a  href="http://flickr.com/photos/quilime/">flickr</a></h3>
                <ul>
                <?      $count = 8; $img = get_rss_feed('http://api.flickr.com/services/feeds/photos_public.gne?id=28394478@N00&lang=en-us&format=rss_200');  ?>
         <?php foreach($img->channel->item as $item) : if (!$count--) break; ?>
 <?endforeach;?>
        </ul>
        <p>
-       <a class="ext" href="http://api.flickr.com/services/feeds/photos_public.gne?id=28394478@N00&lang=en-us&format=rss_200">rss</a>, <a class="more" href="http://flickr.com/photos/quilime/" title="via flickr">more &rarr;</a>            
+       <a class="ext" href="http://api.flickr.com/services/feeds/photos_public.gne?id=28394478@N00&lang=en-us&format=rss_200">rss</a>, <a class="more" href="http://flickr.com/photos/quilime/" title="via flickr">more &rarr;</a>
        </p>
        </td>
 */ ?>
 
        <!-- quilime:delicious -->
        <td valign="top" class="column">
-               
+
 <?
-       $url = 'https://<username>:<password>@api.del.icio.us/v1/posts/recent';
+       $url = 'https://<login>:<pass>@api.del.icio.us/v1/posts/recent';
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
        curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
        $data = curl_exec($ch);
-       curl_close($ch);     
-       $del = new SimpleXMLElement($data);   
+       curl_close($ch);
+       $del = new SimpleXMLElement($data);
 ?>
 
-       <h3><a class="mute" href="http://delicious.com/quilime/">bookmarks</a></h3>
-       
+       <h2><a  href="http://delicious.com/quilime/">link</a></h2>
+
        <ul class="bookmarks">
        <?php foreach($del->post as $d) : ?>
                <li>
-                       <a href="<?=$d['href']?>"><?=$d['description'];?></a><br/>
-                       <span class="desc"><?=$d['extended'];?></span>
+                       <a href="<?=$d['href']?>"><?=$d['description'];?></a>
+
+<? /* <em><? echo get_relative_time(strtotime($d['time'])); ?> </em> */ ?>
+
+                       <div class="desc"><?=$d['extended'];?></div>
+            <small style="color:#aaa;" class="tags"><em><? $t = explode(" ", $d['tag']); echo implode(", ", $t); ;?></em></small>
                </li>
-       <? endforeach; ?>       
+       <? endforeach; ?>
        </ul>
-       
+
        <p>
-       <a class="ext" href="http://feeds.delicious.com/v2/rss/quilime?count=15">rss</a>, <a class="more" href="http://delicious.com/quilime/" title="via delicious">more &rarr;</a>            
+       <a class="rss" href="http://feeds.delicious.com/v2/rss/quilime?count=15">rss</a>, <a class="more" href="http://delicious.com/quilime/" title="via delicious">more &rarr;</a>
        </p>
-       
-       </td>
-       
-       
-       
 
-       
-       
-       
-       
+       </td>
 
-       </tr></table>   
 
-       </div>
 
-       <? $this->include_template('footer.html.tpl'); ?>
-
-</body>
-</html>
 
-<? exit; ?>
+       </tr></table>
 
-<?
-       $page = "aggregate";
-?>
-
-<html>
+       </div>
 
-<head>
-    
-    <?php include_template('header-src.html'); ?>
-    
-    <title><?php echo SITE_TITLE; ?> - aggregate</title>
-    
-    <link rel="alternate" type="application/rss+xml" title="aggregate" href="http://media.quilime.com/aggregate/?return=rss" />    
-    
-</head>
+       <? $this->include_template('footer.html.tpl'); ?>
 
-<body>
-    
-    <?php include('nav.html'); ?>
-    
-    <div id="content">
-   
-        
-    </div>
-
-    
 </body>
-
 </html>
\ No newline at end of file
index ce2d37019437bcd4254f0ede0f6f719c327c10b3..473de341b3a1a5956185c342a490ec7a78cc7c01 100644 (file)
@@ -1,20 +1,31 @@
 <ul class="nav">          
 
-       <li><strong><a href="/"><?=SITE_TITLE;?></a></strong></li>
 
+    <li><a href="/"><?=SITE_TITLE?></a></li>
+    <li>by gabriel dunne</li>
     <li><br /></li>
 
-       <? $dirs = get_dirs("", array('recursive' => 1)); ?>
+    <li><h3>contents</h3></li>
+       <? $dirs = get_dirs("", array('recursive' => 0)); ?>
        <? foreach($dirs as $dir) : ?>
        <li><a href="<?=$dir['url']?>"><?=$dir['name']?></a></li>
        <? endforeach; ?>
 
-       <br />
-       
-       <li><a href="/projects/">projects</a></li>
-       <li><a href="/agg/">aggregate</a></li>  
+       <li><a href="/photo/">photo</a></li>
+       <li><a href="/agg/">aggregate</a></li>
        <li><a href="/links/">links</a></li>                    
        <li><a href="/about/">about</a></li>            
 
+<br />
+
+<? /*
+<ul class="index">
+    <li><h3>index</h3></li>
+       <? list($dirs, $total) = get_entries(""); ?>
+       <?php foreach($dirs as $entry): ?>
+    <li><a href="<?php echo $entry['url']; ?>"><?php echo $entry['title']; ?></a></li>
+    <?php endforeach; ?>
+</ul>
+*/ ?>
 
 </ul>  
diff --git a/templates/photo.html.tpl b/templates/photo.html.tpl
new file mode 100644 (file)
index 0000000..911f992
--- /dev/null
@@ -0,0 +1,82 @@
+<html>
+<head>
+    
+    <?php $this->include_template('head-inc.html.tpl'); ?>
+    
+    <title><?=SITE_TITLE?>: photo</title>
+    
+</head>
+<body>
+    
+    <? $this->include_template('nav.html.tpl') ?>
+    
+<div id="content">
+       
+
+
+<? /*
+               <td valign="top" class="column">
+               <?php $tube = get_rss_feed('http://gdata.youtube.com/feeds/base/users/quilime/favorites?alt=rss&v=2&orderby=published&client=ytapi-youtube-profile'); ?>
+               <h2><a href="http://www.youtube.com/profile?user=kabr&view=favorites">video </a></h2>
+               <ul class="video">
+               <?php 
+               $count = 11;
+               foreach($tube->channel->item as $tube) :  
+               if ($count-- == 0) break;
+               ?>    
+               <li title="<?php echo str_replace('"', '\'', $tube->title); ?>">
+                   <? 
+                   $url = $tube->link;
+                   $pattern = '/v=(.+?)&/';
+                   preg_match($pattern, $url, $matches);
+                   $id = $matches[1];
+                   ?>
+                   <a href="<?php echo $tube->link; ?>">
+
+                   <img src="http://i3.ytimg.com/vi/<?=$id?>/default.jpg" />
+                   </a>
+               </li>
+               <? endforeach; ?>  
+               </ul>
+               <p>
+                   <a class="more" href="http://www.youtube.com/profile?user=quilime&view=favorites" title="via youtube">more &rarr;</a>            
+               </p>
+               </td>
+*/ ?>
+
+       <!-- quilime:flickr -->
+               <ul>
+               <?      $count = 16; $img = get_rss_feed('http://api.flickr.com/services/feeds/photos_public.gne?id=28394478@N00&lang=en-us&format=rss_200');  ?>
+        <?php foreach($img->channel->item as $item) : if (!$count--) break; ?>
+        <li style="float:left; height:280px;margin-right:20px;">
+            <?
+                $subject = $item->description;
+               $pattern = '/<a href="http:\/\/www\.flickr\.com\/photos\/quilime\/(.*) \/><\/a><\/p>/';
+                preg_match($pattern, substr($subject, 3), $matches, PREG_OFFSET_CAPTURE);
+                echo $matches[0][0];
+            ?>
+        </li>
+<?endforeach;?>
+       </ul>
+       <p>
+       <a class="rss" href="http://api.flickr.com/services/feeds/photos_public.gne?id=28394478@N00&lang=en-us&format=rss_200">rss</a>, <a class="more" href="http://flickr.com/photos/quilime/" title="via flickr">more &rarr;</a>            
+       </p>
+
+
+
+
+       
+       
+       
+
+       
+       
+       
+
+       </div>
+
+       <? $this->include_template('footer.html.tpl'); ?>
+
+</body>
+</html>
+