WP Tweets PRO Updated – Upgrade now!

The new version of my PRO extension for WP to Twitter is now available. The update fixes a variety of minor bugs, creates some clarifying error messages – but most importantly adds some great new features.

In version 1.3.0, you can now:

Schedule a Custom Tweet

Schedule a Tweet for any time and associate it with any post you’ve published. Simple and straightforward: you can either send it as straight text — what you wrote, and nothing but what you wrote — or you can send it through the WP to Twitter template processor and fetch information from the post on the fly.

Lock Co-Tweeting to one account.

Want to send your posts to two accounts, but not to just any old account? Don’t want to expect your authors to set up their own accounts? No problem. You can set your Co-tweeting to always post to a specific second account.

Custom Filtering

WP to Twitter has a couple of filtering options — filter by category, don’t post edits, etc. However, the gamut of how you might want to filter your Tweets can be pretty complicated. WP Tweets PRO 1.3.0 adds an option to create a custom filter for Tweets – you can specify a wide variety of rules that will prevent a Tweet from being sent. Block a specific post from ever being Tweeted; block a specific author; block a specific word in the title — it’s up to you.

WP Tweets PRO does a lot to improve your ability to customize how your WordPress site communicates with Twitter – and it just got a lot more powerful!

Buy it now!

WordPress Tips: Add a custom call to action by shortcode

When building WordPress sites, I’ve often been in need of adding a call to action with a striking appearance into the site. Working by myself, that’s really no problem – but when it needs to be added into client-created posts and Pages, it can get to be a hassle — and cause long-term problems.

It’s not really effective or efficient to teach all the intricacies of HTML to every client. If you’ve created a cool CTA format which requires specific HTML you also want to make sure that this is as easy as possible for your client to enter into their post.

The easiest way to do this, in my experience, is by adding a simple shortcode, accessible using the quicktags bar in the WordPress HTML editor. (Since I care about HTML quality, I prefer to either disable the Visual editor or at least strongly discourage it’s use.)

The WordPress API makes it shockingly easy to set all this up.

First, we’ll define our Call to action shortcode:

1
add_shortcode('cta','my_cta');

Short and sweet – the first argument is your shortcode itself — with ‘cta’ defined, you’ll used [cta] as your shortcode. Next, we’ll define the function which will handle the shortcode.

2
3
4
5
6
7
8
9
10
11
function my_cta($atts, $content='') {
	extract(shortcode_atts(array(
				'class'=>'my-cta'
			), $atts));
	$output = '';
	if ( $content != '' ) {
		$output = "<div class='cta $class'><p>$content</p></div>";
	}
	return $output;
}

The arguments accepted by the ‘my_cta’ function are the attributes of the shortcode, as assigned in the extracted array and the content enclosed by the shortcode. This particular function is designed to accept one shortcode parameter; and not to output anything if there’s no enclosed body. The usage of the shortcode is like this:

[cta class="buy-now"]Buy my awesome widgets today![/cta]

The output would be:

<div class='cta buy-now'><p>Buy my awesome widgets today!</p></div>

Want to add another parameter to the shortcode? It’s easy — just add another value into the array of parameters.

Finally, we want to add the quicktag — so here it is:

15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
add_action('admin_footer','add_quicktags');
 
function add_quicktags() { ?>
<script type="text/javascript" charset="utf-8">
/* Adding Quicktag buttons (WP ver. 3.3+)
* - Button HTML ID (required)
* - Button display, value="" attribute (required)
* - Opening Tag (required)
* - Closing Tag (required)
* - Access key, accesskey="" attribute for the button (optional)
* - Title, title="" attribute (optional)
*/
QTags.addButton( 'aq_cta', 'CTA', '[cta class=""]', '[/cta]', '', 'CTA' );
</script>
<?php }

Only two pieces to this code, as well: an action added to the footer of your admin pages, and a function which inserts a new quicktag. Need to add multiple quicktags? Just add each one on a new line – there’s no need to add additional actions or additional scripts.

And here’s the whole thing — you can just drop the entire block of code into your theme’s functions.php file and everything here will be available immediately.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
add_shortcode('cta','my_cta');
 
function my_cta($atts, $content='') {
	extract(shortcode_atts(array(
				'class'=>'my-cta'
			), $atts));
	$output = '';
	if ( $content != '' ) {
		$output = "<div class='$class'><p>$content</p></div>";
	}
	return $output;
}
 
// Add buttons to html editor
add_action('admin_footer','add_quicktags');
 
function add_quicktags() {  ?>
<script type="text/javascript" charset="utf-8">
/* Adding Quicktag buttons (WP ver. 3.3+)
* - Button HTML ID (required)
* - Button display, value="" attribute (required)
* - Opening Tag (required)
* - Closing Tag (required)
* - Access key, accesskey="" attribute for the button (optional)
* - Title, title="" attribute (optional)
*/
QTags.addButton( 'aq_cta', 'CTA', '[cta class=""]', '[/cta]', '', 'CTA' );
</script>
<?php
}

The whole thing is only 30 lines of code – including 9 lines of comments.

My Calendar 2.0 released!

It’s difficult to decide exactly when to increment a major version number. In truth, My Calendar 2.0 is not much more different from 1.11.x than 1.11.x was from 1.10.x; but the difference between version 1.0 and 2.0 is truly striking. In fact, there may not be more than a few dozen lines of code in common between the two versions.

The main purpose behind the rewriting involved in My Calendar 2.0 was about long-term performance. All versions in the 1.x series had a common problem: while saving and editing events was a very simple database query, fetching events from the database was kind of crazy. Anybody who looks at input/output efficiency will tell you that it’s more efficient to read from a database than to write to a database. So, superficially, having a simple database input is efficient. But the trade off was some very complicated data manipulation that needed to happen in order to calculate the date for every single event rendered. Not a big deal when you’ve got a handful of events; but if you’ve got hundreds of events in a month it could become a pretty crushing load. This was the lot of using recurring events.

So now the queries to fetch events have been greatly simplified. Saving new events is less efficient, yes – it will take longer to write events because those recurring events are now being calculated when they’re saved, so that those calculations never need to be done on the front end.

Now, this meant rewriting everything that displayed or fetched events – iCal, RSS, calendar output, upcoming events lists — everything. It also meant rewriting everything that saved or edited events. So I’m not entirely expecting this new release to be bug free — rewriting everything took a long time (nearly 3 months), with an additional month dedicated to testing and bug fixes. It’s only been 18 hours since I released 2.0.0, and version 2.0.1 – with three bug fixes – is already out.

I’m dedicated to getting this version at 100% as fast as possible, however. If you encounter a bug, let me know about it promptly, and I’ll get right on it!

Enough with the techy talk. What else is new?

My Calendar 2.0 includes a whole slew of improved views and filtering tools for the events manager lists. You can now define categories as “Private”, so that only logged-in users will see them. You can limit your calendar output by author. There’s a new template tag, “{timerange}”, which does pretty much what you’d expect. A wide variety of outstanding bugs were fixed. That’s about it. Most importantly, My Calendar 2.0 sets the stage for new development in many directions.

Like what? What’s coming up?

The first big new thing is already here — the first My Calendar PRO extension. This is the first in what will be a suite of add-ons for My Calendar which provide additional functionality. This one, My Calendar: Submissions, gives you a method to let your visitors and members submit events. They can submit them for free or they can buy a key which can be used for submitting events. Read more about My Calendar: Submissions!

WP to Twitter and the recent Twitter API change announcements

Twitter is currently in the much-lambasted and disruptive process of making big changes to their API. As the author of a WordPress plug-in which only exists with any value due to its ability to use the Twitter API, I have to be pretty attentive to these kinds of changes.

The API changes probably won’t have any significant impact on WP to Twitter or on most users of WP to Twitter. Technically, I’ve needed to change the name of the application since their last major change in terms of service – the use of the “Twitter” mark is a violation of their terms of service. (Technically, a violation of their trademark guidelines.) That will probably happen in the next few months – so be warned. It’s going to be a pain, but I have to do it.

However, these changes — as published so far — don’t appear to have a major impact on a software application like WP to Twitter.

First, a significant set of the changes regard the display of Tweets. Well, fortunately, WP to Twitter doesn’t display Tweets in any way. So, I can pretty much ignore that entire section.

Second, the next big set of changes have to do with application size. Now, WP to Twitter does have over a million downloads – which probably translates to 20 or 30,000 active users. Maybe even more. However, from the Twitter application perspective every one of those users is a separate application; so none of them are large scale applications which will greatly impact Twitter.

Third, they’re modifying the rate limiting rules. While hypothetically this could effect WP to Twitter, it’s not very likely. The limit is something like 60 calls per hour for a given endpoint. WP to Twitter uses only one endpoint – the status update endpoint – so you may run into this if you’re posting more than 60 times per hour from your WordPress blog. Possible, but not very likely.

So, on the basis of what Twitter has published so far, WP to Twitter appears to be safe. However, it is certain that these rules are not the complete set of rule changes. For now, I’ll just try and keep up with the information and find out what’s going to happen. WP to Twitter isn’t going anywhere yet.

But I do suggest that you subscribe to my blog to keep updated…

Translating (my) WordPress Plug-ins

Getting plug-ins localized can be a big challenge. Depending on a single very dedicated person to translate hundreds of out-of-context strings (and to update them when the next version comes available) is far from reasonable.

As a result, the translations available for my plug-ins have tended towards the sketchily inaccurate. Not because the translations are bad (although, to be honest, I don’t really know that), but because many, many strings are missing from the translations. Even the best translations are still only around 90% completed — and a lot of the older translations for some plug-ins now only provide a translation of 15-20% of the plug-in.

It’s inevitable, really. Somebody needs a translation for a project, so they do it – but then the project is done and nobody is continuing to take care of updating the translation.

To help solve this problem, I’m doing what a lot of developers have done in the past: turning to GlotPress so I can crowdsource the translations.

Translations will no longer be dependent on one person to provide the entire translation — instead, people can wander in, translate a few strings, then disappear — and I’ll just be happy that they’ve brought my project closer to being fully translated!

You can find my GlotPress installation at translate.joedolson.com. You’ll need a user login to start translating, and I’m opting not to allow self-registrations right now, so contact me and I’ll set you up with an account.

Thank you in advance!

WP to Twitter 2.4.0 release — with PRO upgrade!

I finally released version 2.4.0 of WP to Twitter today. The latest major version release was quite a long time ago – 2.3.0 went out in June of 2011, and although it has received 18 (18!) bug fix or minor feature updates since then, the plug-in hasn’t had a good overhaul for a very long time.

Well, that’s not true anymore. The version I released today has some pretty substantial changes — it no longer requires cURL support, for one thing! A lot of the changes to WP to Twitter are, however, very un-sexy back-end rewriting.

What’s more significant is that I’m simultaneously releasing a brand new thing for me: a PRO upgrade to WP to Twitter!

It’s called WP Tweets PRO. WP Tweets PRO is all about new features: delayed tweeting of your new posts, automatically scheduled re-posting so those overseas readers don’t miss out, and full support for personalized Twitter posting for each author on your site.

WP Tweets PRO is available with a single-site license ($25) or a multi-site license ($90).

Buy the Single site license:

Buy the Multi-site license:

I hope you find it useful — that was certainly my goal!

Looking for developers for My Calendar customizations

I get a lot of feature requests and customization requests for my event management WordPress plug-in. These requests range from minor tweaks, which I can add as features in less than 10 minutes to major re-skinning and behavioral changes. When I get a request which can potentially be worked into the calendar software as a permanent part of the plug-in, I’m usually happy to take on that work — but I only have so much time, and I’d rather put that time in on making a better plug-in rather than doing new styling and custom behaviors.

So, I’m in need of a few people who are skilled developers with strong CSS, JavaScript and/or WordPress/PHP experience. I’ll maintain this list as people I trust to do high-quality customization work with My Calendar (or with other work, potentially).

Mostly, this will be CSS/JavaScript work. There may be occasional needs to PHP customizations, but that will probably be more rare.

If you’re interested in being on this list, please contact me. Provide a couple of work samples where you’ve done CSS/JavaScript work. If possible, an actual instance of customizing My Calendar would be very beneficial.

This isn’t likely to be a flood of work – but what I’m getting is more than what I can do.

Thank you!

Page 1 of 3123

Return to Top