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
<!-- | |
// Add these two meta tags to yourdomain.com. | |
// Now you can use yourdomain.com as your OpenID | |
// and authenticate using your Google account. | |
// Thanks: http://www.abstractioneer.org/2009/12/openid-delegation-for-googles-op.html | |
--> | |
<link rel="openid2.provider" href="https://www.google.com/accounts/o8/ud?source=profiles" > | |
<link rel="openid2.local_id" href="http://www.google.com/profiles/[your_google_profile_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
// wraps the first character of a paragraph with <div class="dropclass"></div> | |
// expects a jQuery paragraph object | |
// ex: dropCap($('.story p:first')); | |
function dropCap($target) { | |
$first_p = $target.html().trim(); // removes any leading whitespace | |
if ($first_p.charAt(0) != '<') { | |
// not a html tag | |
$target.html( '<div class="dropcap">' + $first_p.charAt(0) + '</div> ' + $first_p.substring(1) ); |
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
// Save Form Field Prompts (jQuery) | |
// | |
// If you have form fields with default values like "Enter search term" | |
// this code will save that value, hide it when a user focuses on the field | |
// and restores it when they leave the field if they didn't enter anything. | |
// Select the fields you want to save | |
var $fields = $(".commentform textarea, .commentform input.text"); | |
// No need to change anything below here |
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 ( arg(0) == 'node' && is_numeric(arg(1)) ) { | |
$node = node_load(arg(1)); | |
print "node:" . $node->type; | |
} else { | |
print "not a node"; | |
} | |
?> |
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
<!-- Add this between the <head></head> tags to influence how Facebook sees your site when someone shares it. --> | |
<meta name="title" content="This is the title of my site." /> | |
<meta name="description" content="This is a description of my site." /> | |
<link rel="image_src" href="http://mysite.com/logo.png" /> |
NewerOlder