Posts Tagged ‘Wordpress’

My URL Shortener

Posted in: Web | Tags: , ,

For some reason I’ve wanted to create my own URL shortener just for my stuff for some time now. It’s finally here: the jbe.me URL shortener. Now, I’m the only one that can use the service; it’s only for my links, but when you see a jbe.me URL you at least know it will link to something I’ve done.

It was super simple to setup.

First of all, I had to buy the jbe.me domain name ( think J B dot ME ). Unfortunatly jb.me is not a valid domain, I’m sure someone much more important than I will grab it. Anyway, jbe.me was the next best thing.

One I had the domain I installed the YOURLS (You Own URL Shortener) script at that location. It’s a series of scripts that talks to a MySQL database with some pretty cool bookmarklets and an API. The API was key for the next step: the Twitter Tools extension. As many people know, I use twitter tools to post new blog entries to my twitter profile. Since I want to get as much of my URL-shortening as possible done through the jbe.me shortener now I needed to get twitter tools to use the new system. Twitter Tools has it’s own api that will let you create a shortener for any service that you could think of with some hooks that it install for WordPress. Then I threw a plugin together using the YOURLS API and now when I publish a post, Twitter Tools uses the jbe.me shortener to shorten the URLs. Pretty Cool.

Continue Reading »

Mar
02
2010
No Comments »

Tidy up the RSS

Posted in: Wordpress | Tags: ,

I’ve been playing around with backing up my tweets lately. At this point I’m using the Twitter Tools plugin to create a weekly digest. Since I created a Tumble-blog not to long ago to share social stuff like this I also wanted the tweets to go to tumblr. Part of this was just a way to clean up Tumblr and not create a new post everytime I tweet.

Now, having the tweets on the blog is mostly for me. I didn’t want to bombard people that are subscribed to the RSS feed with this weekly mashup of all my tweets, but still be able to have the RSS feed to send to Tumblr or for anybody that wants it.

This is what I ended up doing:

function tweetRSS123($query) {
	if ($query->is_feed && !is_category()) {
		$query->set('cat','-1');
		}
return $query;
}

add_filter('pre_get_posts','tweetRSS123');

Continue Reading »

Feb
27
2010
No Comments »

Blogroll Links Favicons

Posted in: Wordpress | Tags: ,

Awhile back I wrote that I was having issues with Blogroll Links Favicons plugin for WordPress. I came up with some code that better displayed the favicons and fixed my issue. I wrote the author and he agreed that this code made more sense. I hadn’t thought about it, but recently I checked to see if the updated code had been put into the plugin and it hadn’t.

Just yesterday I emailed John about getting added as a contributor to the plugin, as he’s recently switched his personal site over to Posterous. He agreed to add me and I put my code in right away.

In the future I’m also going to be looking for ways of optimizing the plugin even more than it already is. I have quite a few links on any given page of my site that use this plugin, especially the about page. It’s getting to the point that having to retrieve all these thumbnails slows down my site, so I’m going to look into making this as fast as possible.

Let me know if you’ve got any questions or suggestions.

Jan
23
2010
5 Comments »

Problems Getting WordPress Emails

Posted in: Web | Tags: ,

Are you having problems getting email sent from you WordPress blog?

One of the features that I really like is being able to get emails when new comments are posted. I also use the Contact Form 7 plugin which needs to send mail.

The Problem

I recently switched web hosts to Webfaction. They’ve been great — what I think you should be able to expect out of shared hosting.  The only problem is that they don’t support PHP’s mail function. They claim it’s to reduce spam — mail() can be used to send email defining the from address as whatever you want without having to authenticate. It can be very convenient, but it’s really not the ideal way to send mail using PHP anyway. WordPress does it because it’s pretty rare to find a server that doesn’t support it and the alternatives are too commonly uninstalled.
Continue Reading »

Jan
11
2010
No Comments »

WordPress login/out

Posted in: Wordpress | Tags: , ,

Lately I’ve been putting a login link in the footer of my site, but it’s also nice for that to be a logout link when you’re already logged in as well as inserting a link to the site admin section. This line of code does exactly that:

<?php if ( is_user_logged_in() ) { echo "<a href='" . get_option('siteurl') . "/wp-admin/'>Site Admin</a> |"; } ?> <?php wp_loginout(); ?>
Dec
30
2009
No Comments »