How can I add Expire headers to images?

This can be done with Apache configuration, I have used this snippet in the past in .htaccess: ExpiresActive On ExpiresByType image/gif “access plus 1 month” ExpiresByType image/png “access plus 1 month” ExpiresByType image/jpeg “access plus 1 month” Can be set up with plugin as well. W3 Total Cache (which I currently use) can do that … Read more

Plugin to host auctions on your site

@solomongaby Please take the time to read the documentation for a plug-in before discounting it as useful. From the WP Auction documentation: How do I place an Auction in a Post/Page? First, you need to add your auction. Set the “Show auction in AJAX Popup?:” to No and enter the URL of your Post or … Read more

problems with wordpress and php version 5.3.3-1

The latest and greatest php version is always the recommended version. Seriously. All core devs use it when developing trunk. Only a few bother to test older php versions, as can be seen by the occasional ticket opened related to php4 or php5.x incompatibility. The same cannot be said by plugin authors, however… As you … Read more

add_query_arg not working

If you take a look where the category_link hook is defined in category-template.php you’ll see this particular hook passes on two variables. The second variable is the category ID, but your callback function treats that second incoming variable as a query object. Simply put, you’re looking for a query_vars property/key that does not and cannot … Read more

MySql database help for a plugin

Hi @ntechi: I think this is what you are looking for: $sql =<<< SQL SELECT id FROM myrp_ratings AS rat, INNER JOIN wp_comments AS com ON com.comment_ID = rat.comment_id WHERE 1=1 AND com.comment_author_email=”%s” AND rat.value != ‘0’ AND rat.value != ‘1’ LIMIT 1 SQL; $sql = $wpdb->prepare($sql,’[email protected]’); $id = $wpdb->get_var($sql); if (is_null($id)) { $wpdb->query(“INSERT INTO … Read more