A number of improvements and feature additions to Savory Bookmarks were pushed today, notably Facebook share integration and UI improvements to the bookmarklet. Here’s a run-down of all the changes:
A number of improvements and feature additions to Savory Bookmarks were pushed today, notably Facebook share integration and UI improvements to the bookmarklet. Here’s a run-down of all the changes:
Here’s a follow up from my previous post on using the Visa Signature concierge service. I received an email today from my concierge Erik, less than 24 hours after making the initial request
I had asked for a list of kid-friendly things to do around the Washington D.C. area and to leave out the most obvious and well-heeled sites, you know, filed under: off the beaten path. Here’s the list!
For whatever reason, an old Tim Ferris post caught my eye today about taking advantage of the Visa Signature concierge service. A quick call to Chase confirmed that I did NOT have Visa Signature on my Chase Freedom card, but that I WAS qualified to upgrade to the Chase Sapphire card that DID. Woo Hoo!
So, I’m doing my own test…
Tomorrow I should have the results of my query: what are the kids friendly things to do, off the beaten path, in and around Washington D.C.
Stay Tuned!
Just checked in a fix that affected any paged tag view, e.g. if you clicked beyond page 1 of any tag view the results would be empty. Thanks to @HiMYSYeD for catching this one! You can download the latest from bitbucket. More info at the Savory Bookmarks page.
After installing this fix, update your permalinks: Settings > Permalinks > Save Changes.
When web programming in PHP it’s not often that you get to delve into the functional-style, but when you do, the moment is truly glorious!
Here’s a problem I ran into recently: I wanted a string containing the current post tags but with each prefixed by another string (e.g. our friend the octothorpe ‘#’) and delimited by another string (e.g. a space).
The last few days have seen a fury of activity on Savory. Here’s a brief rundown of the latest features: Bookmarkets and Twitter sharing. Get to know all the features and downloads on the Savory Bookmark page.
When experimenting and testing with WordPress taxonomies sometimes you end up with a lot of junk in the database that wouldn’t look good on a production site or even demoing to friends. In my situation, a lot of foobar tags were used during the testing of my Savory Bookmarks plugin.
A quick search revealed an SQL way of deleting orphaned tags — those with counts of zero that should not be associated with any objects such as posts, pages and custom post types as long as the WordPress taxonomy API was used. Here’s what the query looks like:
If you’re creating an application that uses WordPress for other than a blogging platform, then you might want to consider throwing out its default URL rules. I’ll use my Savory Bookmarks as an example.
Savory uses custom post types to store bookmarks. This means that the WordPress LOOP has to be completly sidetracked to instead query for this post type instead of standard blog posts. In fact, the Savory application does NOTHING with blog posts, archives and categories. So, why not clean up the URL rules and make sure nobody is taking backdoors to unforeseen 404 pages.
There are lots of filters for handling URL re-write rules, but since we’re starting from scratch, we’ll use rewrite_rules_array filter.
Here’s something I wanted for my Delicious clone Savory — a list of the most recent tags added to posts. This question was answered on Stack Overflow. I copied that code and made a couple handy functions to insert directly into any theme or plugin. I should probably add a UNIQUE clause in there somewhere to filter out duplicate tags
/*
* get recent tags
*/
function get_recent_tags($limit = 10) {
global $wpdb;
$sql = "SELECT $wpdb->terms.term_id, $wpdb->terms.name, $wpdb->terms.slug
FROM $wpdb->terms
INNER JOIN $wpdb->term_taxonomy ON ($wpdb->terms.term_id = $wpdb->term_taxonomy.term_id)
INNER JOIN $wpdb->term_relationships ON ($wpdb->terms.term_id = $wpdb->term_relationships.term_taxonomy_id)
INNER JOIN $wpdb->posts ON ($wpdb->term_relationships.object_id = $wpdb->posts.ID)
WHERE $wpdb->term_taxonomy.taxonomy = 'post_tag'
ORDER BY $wpdb->posts.post_date DESC LIMIT 1,$limit";
return $wpdb->get_results($wpdb->prepare($sql));
}
/*
* echo recent tags
*/
function the_recent_tags($before = "<ul class='recenttags'><li>", $between = "</li><li>", $after = "</li></ul>") {
// before
echo $before;
// each tag
$tags = $this->get_recent_tags();
$tag_html = function($x) {
return sprintf("<a href=\"" . get_tag_link( $x->term_id) . "\">%s</a>", $x->name);
};
$tag_a = array_map($tag_html, $tags );
echo implode($between, $tag_a);
// after
echo $after;
}