This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Example extends Mustache { | |
protected function _getPartial($tag_name) { | |
$template_path = "./templates/partials/$tag_name.mustache"; | |
if (file_exists($template_path)) { | |
$this->_partials[$tag_name] = file_get_contents($template_path); | |
} | |
return parent::_getPartial($tag_name); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This... stores the current href. Pretty amazing. | |
var lastHREF = location.href; | |
// This is the dirtiest way to build the HTML of the share drop-down ever | |
function getShareHTML(url,title) { | |
var niceURL = escape(url); | |
var niceTitle = escape(title); | |
return '<li id="global-nav-share-facebook"><iframe src="http://www.facebook.com/plugins/like.php?href=' + niceURL + '&layout=button_count&show_faces=true&width=90&action=like&colorscheme=light&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true"></iframe></li>' + | |
'<li><a href="http://twitter.com/home?status=' + niceTitle + '+' + niceURL + '" target="_blank" id="global-nav-share-twitter">Twitter</a></li>' + | |
'<li><a href="mailto:?subject=' + niceTitle + '&body=' + niceURL + '" id="global-nav-share-email">E-mail</a></li>' + |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Plugin for creating new windows in JS | |
*/ | |
(function($){ | |
$.newWindow = function (el, w, h) { | |
var base = this; | |
base.$el = $(el); | |
base.init = function () { | |
base.features = 'width=' + w + ',height=' + h + ',left=' + ((screen.width-w)/2) + ',top=' + ((screen.height-h)/2 - 110); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Variation of fitvids.js I wrote to behave the way I want to. | |
*/ | |
(function($){ | |
$.fitStuff = function (el, options) { | |
var base = this; | |
base.$el = $(el); | |
base.selectors = [ | |
"iframe[src^='http://player.vimeo.com']", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function tsticka14_comment( $comment, $args, $depth ) { | |
$GLOBALS['comment'] = $comment; | |
// I kind of cheat here by not doing anything for pingbacks | |
// and trackbacks, which means the amount of stuff that | |
// displays may differ from the comment count unless | |
// pingbacks and trackbacks are disabled in the admin. | |
switch ( $comment->comment_type ) : | |
case 'pingback' : |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if ( have_comments() || comments_open() ) : ?> | |
<section id="comments"<?php if ( ! comments_open() ) : ?> class="comments-closed"<?php endif; ?>> | |
<?php if ( have_comments() ) : ?> | |
<header class="visuallyhidden"> | |
<h3>Responses</h3> | |
</header> | |
NewerOlder