WordPress login/out

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(); ?>

Blogroll Links Favicons

I was recently having problems with the Blogroll Links Favicons WordPress plugin. The plugin gets the favicon for all the links that you have displayed on any given page using the WordPress links system. The problem was that the standard way the plugin does this is to add a new anchor link inside the list-item for each link. This was a problem for me because the anchor links were styled, so when I added the plugin everything was messed up.

I thought it would be better if the plugin just set the background image of the anchor link that was already there to the favicon and indented the text of the link. I’ve sent an email to the author of the plugin requesting that he make this the default way to display the favicons, but just incase that doesn’t happen, here’s the code that makes it happen:

(more…)

WordPress Archive Jump Menu with jQuery

With a bit of code from CSS-Tricks, an idea from the WordPress.com blog, and a little elbow grease, I was able to create something that really fits in well on my site. I transformed the jQuery that I found on CSS-Tricks, which was originally used for accordions and turned it into something largely different that I really happen to like.

All I’m doing here is creating a div with an anchor-link inside it for the controller and an unordered list for the menu items. Then I basically just create a jQuery function that turns the anchor-link into a toggle button.

(more…)

FancyFlickr Authentication

There have been a few people that have already let me know that FancyFlickr doesn’t work with hidden/private photos. Unfortunately the class that I’m using to power the plugin doesn’t have any way to authenticate. This isn’t a huge problem, as I’ve found other classes that do authenticate. The only problem is that the only one that I’ve found and like so far requires PHP5 and PEAR. Here I’d like to ask what the users of the plugin think. Should I continue on the current path — without authentication, or should I switch to a new class with these strict requirements. I’m have no idea how many shared hosting companies support PEAR, but it should be hard to find out if your hosting company does. I’d also like to hear from other developers to get their take on which route to take.

(more…)

Addicted to Flickr

When I started working on FancyFlickr recently, I needed a PHP class to handle the flickr API. I quickly found that I didn’t like many of the classes that I found, for various reasons. I got lucky when I found Addicted to Flickr. The only problem with this one, was that he wrote the class over four years ago and there was some stuff that was quite outdated. The original URLs that it created were broken, which was the biggest problem for me. I rewrote it a little bit, at least so that part works now. So I’m putting it back out there for people to download if they want.

If you run into any problems let me know. If you rewrite any other parts of it, or write a new version, let me know. I’d love to have it for the fancyflickr plugin and to be able to link to it here.

Note: This is not FancyFlickr.

Download