Monthly Archives: May 2009

Foller.me is Ready to Launch. We’re going LIVE!

Good news everyone! We’re totally ready to launch! Everything is going as planned right now and we’re having a very busy weekend, but the launch date was announced and there’s nothing we can do to stop ;)

Might I start with a little press release? You can post this wherever you want, blogs, forums, chats, … newspapers, TV, radio ;) but please, schedule that for Monday (1st of June), okay?

Foller.me is a new third-party Twitter service that renders instant detailed information about a particular Twitter user’s latest 200 posts. It would generally take hours of scouting and pulling together information from hundreds of posts to scrape up some sort of insight into the user’s topic interests on Twitter. Foller.me does this in a flash, providing 3 tag clouds which represent the user’s key topics on Twitter.

How does it work? Foller.me gets access to the profile of a user via the Twitter API, scanning all the public info and his/her latest 200 tweets. It builds up three tag clouds: topics, #hashtags and @mentions, based on the user’s recent activity, excluding all stop words.

Let’s say you’ve received 20 new followers today and you cannot decide whether to follow back or not. You do NOT have the time to read 200 tweets on each of them, right? Nevertheless, you can’t just follow everyone, since you’ll get unwanted tweets in your friends timeline. Here’s the key: take a peek at ther Foller.me profiles and you’re done!

More information at foller.me
Blog at blog.foller.me

The beta version is still alive, but I’ll shoot that one down on Sunday. Everything’s set and almost working on Foller.me and take a look at your searchbox. It should indicate (lights up blue in FF3) that there’s a new search plugin available. Click on the drop-down list and select Foller.me. Anyway, I’m not sure that this would be enough, I mean wouldn’t it be nicer if there was a little button in your Firefox statusbar that you could click and input a name? Your thoughts on this one.



New Twitter Startup! Beta Testers Wanted!

Hello everyone. You might be wondering why I haven’t updated my WordPress plugins for the last two weeks. I was very busy with this new Twitter service I got in mind and I’m proud to announce that a semi-public beta is already up and running. You might want to read the blog before you go test: blog.foller.me. The beta’s located here: beta.foller.me. I’m really looking forward to your comments, bug reports, suggestions and any other kind of feedback.

Planning to launch officially (still with a beta logo though) next week or perhaps the week after if everything goes wrong. Still looking for suitable hosting services in the US (currently hosted in Moscow, Russia).

Thanks.



Linux Dummy: Unscheduled Maintenance

If anyone of you have tried to access the blog yesterday night, you might have noticed that nothing was working. Sorry! I’ll say it straight, it’s completely my fault. Yesterday evening I decided to set up a cron job for automatic backups on my VPS – a full MySQL dump and a compressed archive of the www directory. So I got a couple of error messages stating that I don’t have the right to access some files which were in the wp-content/upload and wp-content/cache folders… I was frustrated!

Next… Never attempt to do this, okay? I logged in as root, changed owner on all files and folders including sub-folders of the www directory, set it to kovshenin:kovshenin. Voila, the backup worked! In a couple of minutes my VPS ran out of memory and I couldn’t even logon via SSH to reboot the server!

Now that’s funny! I called my hosting provider this morning and asked them what happened? They said everything’s fine, rebooted my server. I managed to logon by SSH, ran the “top” command, and looked at my memory usage growth! 100% was reached in 17 minutes, and bang! Disconnect. Two more calls to my provider didn’t help. They said that the only thing they can do is reset my yesterday’s VPS state completely.

So what really happened? I’m not sure but I bet it’s the WP-Super Cache plugin for WordPress! You see, cached files were created by the user that the httpd (apache) daemon ran – thus, one called “webmaster”. The user “kovshenin” apperantly didn’t have access to those files, and the change owner command spoiled all the cache! Now the static files were owned by “kovshenin”, and “webmaster” (apache) didn’t have any rights for those files. WP-Super Cache must have been in an infinite loop trying to access those, and of course, with no luck – therefore memory leak.

After another reboot I managed to quickly get into the WordPress control panel, enable Maintenance Mode and disable all the other plugins. Enabled them one by one. Setting 0777 as the rights for the cache directory and two WP-Super Cache config files solved the problem. The site was working fine again, and the new generated cache files were owned by “webmaster”… The day has been saved.

But what about the backups? Finally, I came to a thought that both “kovshenin” and “webmaster” users should be in the same groups. So I added “webmaster” to the “kovshenin” group, and “kovshenin” to the “webmaster”. Everything’s great! Apart from the fact that my Google Analytics now shows 0 visitors for 21.05.2009. Jeez, what a dummy…



URL Shorteners and the Linkrot Apocalypse

First of all I’d like to thank you all for your support on the Twitter Friendly Links plugin for WordPress. It started out as a fairly simple URL shortener tool. Now it’s got loads of new options and some compatibility fixes. Keep the suggestions coming :)

Today I came across a bunch of articles about link relations, the way Google and other search engines treat them, and the way a variety of scripts, plugins, tools, etc. work with them. It seems that there isn’t a strong standard yet (perhaps everybody’s waiting for W3C) so most clients now support different styles.

I’m talking about the shortlink, short_url, short-url and other relations in HTML and HTTP responses. In the Twitter Friendly Links plugin I went with the shortlink specification as stated here although there’s a competing alternative which looks alike. Anyway, I wrote about extending the plugin and creating a little API that could transform long permalinks to short ones within the blog. It seems that there’s no need for that. If Twitter could access the page we link to, look out for the shortlink in the head section (or perhaps the HTTP response) then return THAT short link instead of the old-fashion bit.ly trimmed one, that’d be great, right?

There’s also one called rev=canonical, which pretty much does the same as a link rel=shortlink. It’s being used on many sites right now, though I’m not sure that Google reads that at all. Webmasters confuse this with the rel=canonical which on the other hand got Google support in February this year. The idea behind rev=canonical is to specify the reversed canonical, i.e. (perhaps) a shorter link to the same page, but it came up with a bunch of security issues for cross-domain linking (like when specifying a short link generated via TinyURL). Also, the rev attribute is gonna be gone in HTML5, but until then we’re free to use it, so that’s why I included this option in the lates (0.3.4) release of Twitter Friendly Links.

If you’re interested in linking relations, you might want to read:

Note, that these are just thoughts, standards yet to come :) We DO have to get rid of those TinyURL ugly links though somehow. Good luck!

P.S. Twitter Friendly Links is now compatible with AskApache Google 404.



Compatibility: Twitter Tools & Twitter Friendly Links

Due to many requests for twitter friendly links in the Twitter Tools plugin by Alex King I’ve decided to take a look. Alex King surely did a great job in his plugin by leaving a filter which I could use in my plugin without touching the sources of Twitter Tools.

The toughest thing was to find this great wordpress function called url_to_postid() which takes a wordpress URL and tries to convert it into a suitable post ID. It isn’t documented in the codex and I had no idea what keywords to use to find it through Google (was looking for permalink to post id, permalink to id. I’ve highlighted these so that other peeps could find it faster than I did).

Now I’ve got a new function available in my plugin:

echo permalink_to_twitter_link($permalink);

And of course I’ve added an option called “Twitter Tools fix” in the Settings page of the Twitter Friendly Links plugin to let you fellows decide whether you want cool short links or those nasty long ones. I ran a couple of tests on a testing Twitter account, seemed to work fine for me. Comments and suggestions are welcome as usual ;)

The fix was introduced in version 0.3.2. The AJAX/jQuery pagination was also fixed in this release. Available in the WordPress plugin directory.

Cheers!



Twitter Friendly Links Video: Live at WordPress.tv!

I’m very glad to announce that the Twitter Friendly Links video I did a couple of days ago is now hosted at WordPress.tv! Big shout out to Michael who uploaded the video in HQ – thanks Mike!

There’s been a plugin update a few hours ago – 0.3.1. I managed to suit Twitter Friendly Links to blogs that run WordPress in a different directory. Also got a report that it doesn’t work for certain linking style in the multi-user WordPress (MU). Hope the new version fixes the issue. Oh, and I’m still looking for the plugins that conflict with Twitter Friendly Links (as reported earlier on the plugin page), can’t find it anywhere, and forums are dead too, how sad :( If anybody finds out something about it, please feedback – that’ll be so helpful!

And for those of you wondering what’s next… Here are some plans:

  • Customizable text for the Tweet area in Edit Post/Page forms
  • A simple API which will take a link to a certain post on input and output the short link for the post. This will hopefully let us pick Twitter Friendly Links in software like TweetDeck (instead of the standard tinyurl, trim, …) if everything goes well. I’ll be counting on you to vote ;)
  • Also need to come up with something to make third-party plugins (such as Twitter Tools, Sociable, Tweetmeme) tweet out cool links instead of TinyURLs

Guess that’s all for now. Suggestions are still welcome!



Video: Twitter Friendly Links for WordPress

This is my first ever video. Make sure you watch it in HQ ;) Comments are welcome! Also, if you liked the plugin you could embed this video in your own blog. I’d really appreciate that!



WordPress: Twitter Friendly Links Plugin. Stage Two

Missed the beta? No problemo! Just a flashback – the plugin transforms permalinks on your blog into short fancy links within your own domain name: http://kovshenin.com/wordpress/plugins/twitter-friendly-links/ into a short and Twitter friendly http://kovshenin.com/712 similar to what TinyURL does, remember?

I’ve updated the plugin a couple of hours ago to version 0.2. The new key features are the “Twitter Stuff” form in your edit post page, with the shortlink and an example of the message to Twitter, with a link that takes you directly to Twitter with the predefined text not more than 140 characters. Very handy indeed.

Here’s the plugin page by the way: Twitter Friendly Links and don’t forget to check out the screenshots!

Next. You might have noticed that I got a new line just under the tags list in every post – shortlink. I’ve added a function to the plugin called twitter_link() which returns the short link for a post when used within the loop. Here’s my code snippet in single.php:

if (function_exists("twitter_link")) {
    echo 'Shortlink: <a href="'.twitter_link().'">'.twitter_link().'</a>';
}

Make sure you use the function_exists() function to check before using, otherwise you’ll get an error message if for some reason the plugin is missing or deactivated (if you’re a Theme developer for instance).

One more thing. Most of you know Joost de Valk and his Sociable plugin. There’s a TwitThis button which takes you to Twitter.com and the predefined tweet text is simply the permalink of your post. Digging his well-written php code I managed to add my own button called Twitter, that does the same, but the predefined text is the title of the current post plus the shortlink, all trimmed to 140 characters.

So here’s my version of sociable.php (just replace the one in your plugin). Changes are on lines 518-522, 631-650 and 681. Please do not use this version of sociable.php unless you use the Twitter Friendly Links plugin, cause I haven’t written any checks before using the functions. Joost might consider this extension then polish it off in the next updates. The Twitter button may then be chosen from the Sociable section in your WordPress Settings.



Javascript in WordPress: 2 Functions 2 Save Your Day

I’ve introduced Javascript mode in the latest update of Quick Flickr Widget (1.2.7) for WordPress, and I just wanted to give you a short advice about handling javascript code in your WordPress plugins.

The wp_enqueue_script WordPress function helps you add javascript code to your head section, so you don’t have to mess up with the header.php file. One of the frequently asked questions is how do you get your plugin to load a javascript file that’s located in your plugin folder? Here’s the right way to do it:

$quick_flickr_plugin_url = trailingslashit(get_bloginfo('wpurl')).PLUGINDIR.'/'. dirname(plugin_basename(__FILE__));
wp_enqueue_script('quick_flickr_widget', $quick_flickr_plugin_url.'/quick_flickr_widget.js');

This should be in the init of your plugin (take a look at add_action).

Another good problem is passing your php variables to javascript. This is pretty simple with a WordPress function called wp_localize_script. Here’s a quick sample based on the flickr widget. Remember, we’re still in the init section.

wp_localize_script('quick_flickr_widget', 'FlickrOptions', $options);

You’ll get the $options variable output right before your javascript file in javascript format, like this:

<script type='text/javascript'>
/* <![CDATA[ */
	FlickrOptions = {
		title: "",
		view: "_m",
		before_flickr_widget: "<div class="flickr">",
		after_flickr_widget: "</div>",
// and so on

This makes it W3C valid (using CDATA) and easy to retrieve from within your javascript file: alert(FlickrOptions.title). There you go, one more reason to love WordPress ;)



New WordPress Plugin: Twitter Friendly Links

So, you promote your blog posts via Twitter, huh? Me too. And those long blog post URLs, ugh! Yeah, we got rid of those using URL shortening services like TinyURL and tr.im but what about the name and/or brand? Your blog posts might be fab – very interesting to read and three thousand comments on each. But are you getting people to remember your website address in Twitter? No. Do you get backlinks from Twitter using TinyURL? No. Can you measure site statistics from TinyURL links on Twitter? No.

I’ve been inspired by a blog post (jeez I can’t remember where I read it, I’ll add the link as soon as I do) about the importance of posting nice links into Twitter. So I decided to create a plugin for WordPress, that would allow you to have your own TinyURL within your domain name. Here’s a quick example:

http://kovshenin.com/wordpress/plugins/twitter-friendly-links/

Might look like this in Twitter:

http://kovshenin.com/712

Which will take you to the page above with a simple redirect. I called the plugin Twitter Friendly Links. The go part of the address is customizable (dunno why I picked “go”, it may be “to” or just “g” for go or “p” for post – any way you like it). The TinyURL link (http://tinyurl.com/c9wpdc) is currently 1 symbol shorter, but it IS very ugly, isn’t it?

Also, there are some URL shortening services that open up the desired link in a stupid frame with stupid ads. What if TinyURL decide to make some money on ads? My suggestion: move on to your own domain. Oh and what if you have a very long domain that doesn’t fit into 140 characters in Twitter? Unlucky! ;)

Here’s the plugin page: Twitter Friendly Links

Please don’t forget that I am in the middle of the development process, so don’t shout at the first couple of betas, okay? And gimme feedback on anything that comes into your head. Also, stay tuned for the next release this week. If everything goes as expected you will have an options page in your wordpress administration as well as short links to copy to clipboard for every post.

Cheers!