I am working on a pretty major project right now and one of the requirements is the ability to interact with the Meetup API. I looked around and found one existing Meetup client in PHP, however it is horribly architected and as I started using it thinking I could improve it I decided it would be too much work and scrapped it to build my own. This new client is much more compact and efficient. The excerpt from the Meetup API client for PHP website says:
Meetup (http://meetup.com) is a social networking site based around community groups. Meetup provides an API to access their platform services from remote applications to manage authentication, events, rsvps and more.
Until now a good PHP client for the Meetup API has not existed. This project aims to bridge that gap by providing a high quality stand alone Meetup API PHP client. This client is simple to use through provided classes and also allows powerful advanced usage through direct queries to the API
The client is quite simple to setup and get running in your application quickly. Most of the GET endpoints are currently supported with plans on implmenting the rest and support for POST on the way. Check the following resources to get up and running.
You can get the client from the Meetup API client for PHP Github project page
Please try it out and leave feedback on issues and desired additions on the project issues page
P.S. oAuth support is currently in the works!
I was asked by another WordPress developer if there are any sites that I recommend other WordPress developers follow. I do have such a list and decided that I will publish it in the hopes that others will also find these resources useful.
Someday if I get more motivated I will add fancy images and descriptions of each site
I am working on a project that requires me to pull the last 15 minutes worth of posts from a custom post type out of the wp_posts table for analysis. I thought this would be easy and quick, however I spend around 20 minutes digging until I finally found a nugget way at the bottom of the WP_Query codex page. Web searches and looking through the post functions unfortunately got me nowhere. I hope that if you are looking to do the same thing this post will be a helpful time saver to you.
The following will return posts just from the last 15 minutes
// Create a new filtering function that will add our where clause to the query
function filter_where( $where = '' ) {
// posts in the last 15 minutes
$where .= " AND post_date > '" . date('Y-m-d', strtotime('-15 minutes')) . "'";
return $where;
}
add_filter( 'posts_where', 'filter_where' );
$query = new WP_Query( $query_string );
remove_filter( 'posts_where', 'filter_where' );
The following will return posts from a timespan of 30 to 60 days old
// Create a new filtering function that will add our where clause to the query
function filter_where( $where = '' ) {
// posts 30 to 60 days old
$where .= " AND post_date >= '" . date('Y-m-d', strtotime('-60 days')) . "'" . " AND post_date <= '" . date('Y-m-d', strtotime('-30 days')) . "'";
return $where;
}
add_filter( 'posts_where', 'filter_where' );
$query = new WP_Query( $query_string );
remove_filter( 'posts_where', 'filter_where' );
Remember, it is good etiquette to prefix the name of your functions with the name of your theme or plugin. So if your plugin is named "Cat Namez" instead of using the filter_where function name you could use catNamez_filter_where. It is a bit longer, however it prevents namespace collisions with other plugins and possible fatal errors or stack overflows.
Be sure to read the WP_Query page on the WordPress Codex too! It is where I stole this code from
If you are looking for information on hosting WordPress on Windows Azure there have been a lot of WordPress tutorials popping up in blogs lately. Unfortunately many(most) of these posts contain misinformation, error, or are out of date. The good news is that the Microsoft Interoperability team hosts an official tutorial on deploying WordPress on Windows Azure. This tutorial is the best resource available because it is written by the people who work with Windows Azure on a daily basis and who maintain the WordPress related projects for Windows Azure.Unfortunately their website does not rank well in search engines so I am posting a link to it myself to help visibility. Please please please read this tutorial. If you have questions or find bugs you can report them on the Github issue tracker or directly on the tutorial page using Disqus
How to deploy WordPress on Windows Azure
How to deploy WordPress Multisite on Windows Azure
I attended a great Seattle WordPress Developer Meetup this evening and a hot topic was what plugins to use for various things. I decided that until we have an official WordPress Seattle Developer's website I will post the plugins I am fond of here. Feel free to comment with better plugins or ideas for new plugins!
- AlexaRank - Shows your website ranking compared to millions of other websites. This is just a fun plugin
- AntiSpam Bee - Amazing plugins that stops 99.9% of all spam in it's tracks. Love it, install it on all client installs
- AntiVirus - Helps protect your blog against known exploits and injections. Seems to work very well. I generally install it for all clients
- Blog Metrics - Interesting plugin that shows metrics about the posts on your blog. I rarely actually check this but it is interesting sometimes.
- CLI Switch - Super fun plugin that switches your WordPress website into a terminal. Try it here http://ben.lobaugh.net/blog/cli. A fairly pointless plugin overall
- CodeHighlighter - Awesome plugin for posting code snippets. Changes highlighting mode per language. Unfortunately it is not available anymore, though you can email me if you want a copy.
- Events Manager - A very powerful and capable events plugin. I highly recommend trying this one out
- FancyBox for WordPress - Makes all the images in a post pop up in a pretty fancybox dialog
- FoxyShop - Powerful yet easy to use looking shopping cart. Disclaimer: I have not used the plugin actively yet
- Google Analytics for WordPress - Does like it says, adds the javascript for Google Analytics to the posts. Works well
- Tweet, Like, Google +1 and Share - Adds simple, discreet sharing buttons to your posts. Fastest plugin for social sharing I have used
- WP SlimStat - WordPressified version of SlimStat. Simply an awesome plugin that collects stats you can view right in WordPress. I use these stats much more than Google Analytics. It is also generally easier for clients to learn.
There you go. Try not to look for vulnerabilities in those and hack me now