Archive

Posts Tagged ‘WordPress’

How to add WordPress meta boxes to the sidebar

March 27th, 2009 2 comments

Unfortunately, the WordPress online documentation is a mess of old, outdated API information and when I tried to make a little plugin today and have it put a little meta box in the sidebar of the edit/new post admin pages, I had one hell of a hard time getting things to work the way it was documented.

Everywhere I looked, it told me to hook on to the “admin_menu” event when I wanted to queue up my meta box using add_meta_box().  After a bit of messing around, it seemed as though I had it working for the edit post page, but then it wasn’t showing up on the add new post page.  I did a bit of debugging and ensured that it was the fact that the add_meta_box() call wasn’t being queued properly – I assume it had something to do with when it was being added to the meta box queue… ultimately meaning that the “admin_menu” event was too early of an event for me to hook on to.
Read more…

EasyPayPal WordPress plugin fix

February 11th, 2008 No comments

This is just a small nerd post for those of you who may be trying to use the beta 3.0 series of EasyPayPal for WordPress. The script has a very common bug in it that shows up if you don’t configure any categories to be hidden unless purchased in the options. The fix is very simple and I’m rather amazed it hasn’t been committed yet. All that has to be done is to initialize the $cats variable to an empty array since the variable is only created inside a conditional (bad coding!).
Read more…

Can you digg it?

February 26th, 2007 4 comments

Everyone else seemed to have these “digg it” links on their sites, so I figured I needed it too since that’s the web 2.0 way apparently. So, now I have some pretty little “digg it” links beside each post! I haven’t tried any yet, but they should work. I’ll just wait for my first digg to happen and hope someone used a link to do it :)

Update: I have updated the iframe tag code to encode the URL, and also added a fix for IE so that the iframe would display properly.

If people are interested in adding the links to their own installations you can follow the instructions on digg.com’s site about integration which says to just insert a <script> tag, but I personally don’t really like the idea of using in-line <script> tags. They belong in the header, not strewn about in the body. So instead of using their code, I decyphered what their code did and just inserted the actual HTML. It turns out that all their script really does is just produce an <iframe> tag, so I took what they produced and tweaked it a bit and made it all web 2.0.
Read more…

Categories: General, Web Design Tags: , , ,

WordPress Flickr plugin

February 21st, 2007 3 comments

I just finished spending a few hours messing with this flickr junk which everyone seems to put on their sites (which means I’m not cool unless I have it too!). It wouldn’t have been so bad but at first I didn’t even know that you could create a flickr badge – then it took me even longer to figure out where on flickr’s site I could go to get info on making one :P

Anyways, right now I’m trying out this flickrRSS plugin which isn’t bad, but honestly doesn’t do anything spectacular, and it’s not as feature rich as using a flickr badge (though it doesn’t put a requirement of JavaScript on the client which is nice). I would prefer to use the flickr badge for now, but the default WordPress theme I’m using is horribly written (though I will say it looks rather nice – but the HTML/CSS coding causes all sorts of problems when you try to add to it) to be honest and was pissing me off as I was trying to display images as floated block elements, though this caused the rest of the sidenav to flow as if the entire image div was a floated inline block. Of course clearing all floats doesn’t work since the entire sidenav is floated itself (argh!).
Read more…