Call us on +44 1235 436262 or contact us Follow Electric Studio on Facebook Follow Electric Studio on TwitterFind us on Google+

Subscribe to updates


Category: WordPress Plugin

Electric Studio EU Cookie Law Compliance Notice WordPress Plugin

6 Posted July 30th 2012 by in Electric Studio, WordPress Plugin

Disclaimer: Electric Studio are not legal experts and these are just our suggestions on the matter which we hope will be useful. It is not intended as legal advice.

Electric Studio EU Cookie Law Compliance WordPress Plugin

On May 26th 2011 a new EU originated law came into effect that requires website owners to make site visitors aware of what cookies your website sets and what they do.

If you are using a WordPress website, then it’s fairly straight forward to comply. In theory you need to do two things, 1) add a “about cookies” page on your website explain what cookies are being used and for what, 2 ) flag this up and offer a way to decline or accept this using our “Electric Studio EU Cookie Law Compliance” WordPress plugin. If you want to take it to the extreme, allow for people to turn off any non essential cookies using a functionality on your site, or explain how to use the browsers settings to do the same. By non essential cookies we mean cookies that are there for your needs only, eg Google Analytics or similar cookies used for user behavioural tracking.

Continue reading Electric Studio EU Cookie Law Compliance Notice WordPress Plugin


WordPress Download Counter Plugin

119 Posted July 21st 2011 by in WordPress Plugin

The WordPress Download Counter from Electric Studio plugin allows you to keep count of which files are being downloaded from your site.

Need to keep track of what files are downloaded the most form your WordPress website? This plugin integrates seamlessly with WordPress.

Continue reading WordPress Download Counter Plugin


WordPress Auto Post Expire Plugin

56 Posted May 13th 2011 by in WordPress Plugin

The free WordPress Auto Post Expire from Electric Studio plugin allows you to set a expiry date on a post. At the set date, the post will change status into a draft and no longer display on your site.

The administration panel for this plugin that allows you to choose which post type (including custom post types) you would like to the plugin to be available on.

The Auto Post Expire plugin is great when you have posts about events, offers or other time sensitive information that needs to be automatically removed from your website.

If you want to show a date on the front-end of your site, you can use the shortcode of [expirydate format="m-d-Y"] (The format part is optional).
Developer Note: Instead of using a shortcode you can use function `esape_get_expiry_date($dateFormat = “d-M-Y”);`.

You can download the plugin at the official WordPress site.

Update: Good news, everyone!

So 1.4 of the plugin was reported broken by a number of people, so I went ahead and rewrote the whole thing to make it work nice with 3.4.2. I removed code that was using direct SQL through the database global object (if this doesn’t mean anything to you, worry not :) ). Here’s a short run-down of what happened to it, how to use, possible pitfalls, etc.

Stuff changed

jQuery and jQuery UI

Version 1.4 pulled in external scripts. This was changed in 1.5, so it is using the scripts shipped with WordPress itself. Makes code leaner, and less likely to break, plus, as you update WordPress, the scripts will get better as well.

Time

Not just date. Beforehand you set a day to expire posts. That meant that one minute after 11:59pm of the previous day, the post would disappear. What if you wanted it to expire midday? Also this data is now stored as a timestamp, which basically every known programming language understands and can produce a dateformat of your choosing. More on this later.

FAQ & Howtos

Is it going to save my preferences from 1.4?

Yes, all the options / expiry dates should carry over to 1.5 no problem.

Can I display the expiry date in the post, or in the code?

Yes. The shortcode [expirydate] is there, or you can use es_ape_exp_date() function for that in your code.

What about customizing the dateformat?

The full reference for both the shortcode and the function is below:

[expirydate format="d-M-Y"]

The default is “d-M-Y”. You can replace that with anything that is a valid php date() syntax. So if you only want the year, you would use [expirydate format="Y"], if you want to add the time as well, use [expirydate format="d-M-Y G:i"]

es_ape_exp_date( $format, $echo );

$format (string) is the same format used by the shortcode. Default is “d-M-Y”.

$echo (bool) is either true or false. True echoes the date, false returns it.

I want to get the timestamp itself, but es_ape_exp_date() will only give me a formatted date!

Fear not, for that isn’t that hard. Use this (assuming you are within The Loop):

$timestamp = get_post_meta( get_the_ID(), "es_ape_expiry", true );

You can then manipulate it however you like. Substract a week, and show an additional message if it’s going to expire soon ( “Hurry, offer ends soon!” ), or something like that. This is in seconds, so a week would be 7*24*60*60 = 604800 seconds.

Can I order the posts by expiry date (soonest to expire comes first, for example)?

Yes. Use this:

$args = array(
    'post_status' => 'publish',
    'meta_key' => 'es_ape_expiry',
    'order' => 'ASC',
    'orderby' => 'meta_key_num'
);

$ordered_posts = new WP_Query( $args );

if( $ordered_posts->have_posts() ) {
    while( $ordered_posts->have_posts() ) {
        $ordered_posts->the_post();
        # your code here ....
    }
} else {
    echo "No posts found";
}

Possible pitfalls

As I inherited the previous developer’s code, and decided the best course of action is to understand what it does, and rewrite it using the WordPress way ( “there’s a function for that” ), there might be instances where previously solved problems would crop up again.

For support, check out the plugin’s wordpress support page.


WordPress Flickr Mosaic Plugin

0 Posted January 12th 2011 by in WordPress Plugin

Electric Studio are proud to have released another WordPress Plugin, the Flickr Mosaic.

This new plugin pulls in the latest images from your Flickr RSS feed, and then shows the thumbnails as a mosaic. You can place this function either in the sidebar or anywhere in your template file you wish to show it.

Continue reading WordPress Flickr Mosaic Plugin



Page 1 of 212