The BookArc for iPad is a thing of beauty. It’s gorgeous to look at and a perfect companion for the iPad. If you’re considering getting the Apple iPad dock, skip it. Get this instead. It works in portrait or landscape. It’s sturdy. It doubles as a halfpipe for pixies when turned upside down.
Blog
-
Add a Tweet Button to WordPress Posts
Want to add a Twitter Tweet button to your WordPress posts? It’s super easy:
Horizontal Button:
[php]
<a href="http://twitter.com/share" class="twitter-share-button" data-url="<?php echo get_permalink(); ?>" data-count="horizontal" data-text="Check out <?php the_title(); ?> on < ?php bloginfo( ‘name’ ); ?>" data-via="cdharrison">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
[/php]Vertical Button:
[php]
<a href="http://twitter.com/share" class="twitter-share-button" data-url="<?php echo get_permalink(); ?>" data-count="vertical" data-text="Check out <?php the_title(); ?> on < ?php bloginfo( ‘name’ ); ?>" data-via="cdharrison">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
[/php]Simple, No-Count Button:
[php]
<a href="http://twitter.com/share" class="twitter-share-button" data-url="<?php echo get_permalink(); ?>" data-count="none" data-text="Check out <?php the_title(); ?> on < ?php bloginfo( ‘name’ ); ?>" data-via="cdharrison">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
[/php]Customizing Output:
- Change out
data-via="cdharrison"
to your your own Twitter handle. - The inclusion of
data-text="Check out < ?php the_title(); ?> on < ?php bloginfo( 'name' ); ?>"
isn’t necessary, but it’ll give you greater control over the intial text. - I’ve added these to my sidebar.php (and are only displayed on pages using my single.php template) but this can be customized to be included on pages, archive pages, etc.
Updates:
- rawurlencode(get_permalink()); isn’t necessary and can actually cause the widget to report incorrectly if placed outside of the loop. Fixed code examples.
- Change out
-
How to display total number of Custom Posts on a WordPress site
Based on this quick tip from WPRecipes, I was able to quickly figure out how to count and display the number of Custom Posts (of a particular type) that I had on a site.
[sourcecode language=”php”]
<?php
$numposts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE (post_status = ‘publish’ AND post_type = ‘listing’)");
if (0 < $numposts) $numposts = number_format($numposts);
?>
[/sourcecode]Simply replace
post_type = 'listing'
with whatever you’ve named your custom post type. Then, to get the number to display somewhere on your page, simply insert the following code where appropriate:[sourcecode language=”php”]
<?php echo $numposts ?>
[/sourcecode] -
8-Point Star Flower
8-Point Flower is the first of several pattern packs I’ll be releasing over the next few weeks. (If you like these, please let me know!) It’s inspired by Islamic geometric patterns (which are pretty fascinating/incredible, I might add). The zip file contains: 6 PNGs (2 transparent versions not shown); Adobe Illustrator CS5 (.ai) files – single block or large pattern; and a Photoshop CS5 (.psd) file. Older versions of Illustrator or Photoshop should open the files. Best of all: It’s free and it’s licensed under a CC-BY-SA 3.0 license.
Grab Pattern Pack 01
-
Using data sets and variables in Photoshop
Hop on over to the OnWired blog where I’ve posted a brief tutorial on how to start working with variables and data sets in Photoshop. When I spoke in front of RefreshColumbia/CAUG a couple of months ago, I showed a brief demo of how to do this and many in attendance didn’t know this was possible with Photoshop. (If you have any feedback on the tutorial, I’d love to hear it.)
Using Datasets in Photoshop
-
Weightloss
Officially I’m down 17.2 lbs overall, but I didn’t weigh-in this past weekend. (I’m certain I’ve gained since last weigh-in.) I’ve started making excuses for myself. I haven’t been active. I’ve been feeling pretty defeated. WeightWatchers works, but I haven’t kept track of my Points, and I’ve allowed myself to cheat far too often. When you’re losing a pound here and pound there without really trying, it’s easy to trick yourself into thinking “this one bad snack/meal/whatever” is okay this one time. The problem is that one time turns into several if you let it.
I’ve got a lot more weight to lose. So much so that I’m starting to consider seriously trying to get on The Biggest Loser or gastric bypass surgery. I refuse to give up. That’d be the easy way. I’ve got a long way to go and I’ve only just begun. I need to push myself harder. I need to be more realistic about what I can and cannot eat.
How do you keep yourself motivated?
-
Strange Encounter
Last night, around 11:30pm, I was on the way home from picking Kim and my niece up from the Daughtry concert. We stopped at a Burger King to get something to drink and eat for the two of them. While in the drive-thru I was approached by an older woman who asked if we could help her get gas. She was shaking; said she was from Waynesboro and was using her brother’s van because she had to take him to the hospital today. She continuned to tell me that her purse was in her car in her brother’s driveway in Waynesboro. It sounded sketchy, as most requests for money usually do, but I helped her out anyway. Why? Well, I’d like to think that if I was ever in her position, assuming she was telling the truth (and I feel like she was), someone would be willing to help me out as well. I told her to drive across the street to a gas station and I’d buy some gas for her. I paid for enough fuel for her to easily get back to Waynesboro. Shook her hand. Wished her luck. And went back on my way home.
I hope she made it to hers. I hope she’ll pay it forward.
-
CSS Best Practices for Team-Based Development
CSS Best Practices for Team-Based Development. Great post and great advice from my friend Emily Lewis.
-
Support 5by5.tv
The 5by5 network has created the premiere network of podcasts for geeks, designers and developers. Their broadcasts are free, but now you can support the shows by becoming a supporter. If you’re not familiar with 5by5, my personal favorite is The Big Web Show hosted by Dan Benjamin & Jeffrey Zeldman. But, to be honest, you can’t go wrong with any of their shows.