Archive for September, 2007

WordPress AdSense Widget

Bit by bit the site is getting customized and I learn something new every day. Today’s lesson was, “programming language updates may affect your website even if you know nothing about programming.” Obvious, huh? Try fixing the problem if you don’t program. Try even figuring what questions to ask.

The lastest addition to the site was the AdSense widget created by Mike Smullin that goes in the sidebar. It works with the K2 theme too (which I am using) which is a bonus. Apparently, before this new version of WordPress (3.2 not the upcoming 3.3 version) the K2 theme just used a traditional sidebar and then along came Widgets. I kind of like widgets because they allow people who don’t know a lot of programming to either drop other’s code into a text widget and it looks good or it lets you play around with coding on your own (not that I have).

There is a slight problem with this widget for those of us who are apparently using PHP5 on our hosting providers. I only found an answer, which I took on blind faith in those who program, in the comments section of the AdSense for Wordpress widget homepage. It isn’t addressed in any documentation or post and if I wasn’t familiar with the concepts of programming I would have just written the widget off. As it was, I only found the solution by reading every single post and searching the web for over an hour.

The solution lies in changing a few lines of code. I honestly don’t even know what these changes mean, but I made them and they worked. Thank you Sean!!

From http://www.mikesmullin.com/2006/04/01/adsense-widget-wordpress-sidebar/

    1. Sean Says:
      Everything looks good, but seems to break under PHP5. It’s the array_merge() function, which broke a couple of my scripts when upgrading. I had to change line #78 from:$options = array_merge(widget_adsense_options(), get_option(’widget_adsense’));to:$wadsense = get_option(’widget_adsense’);
      $options = array_merge(widget_adsense_options(), array($wadsense));And then everything worked fine.- Sean

I guess part of me laments how quickly things change sometimes; it doesn’t give us time to assimilate anything on more than one concept at a time. And I am interested in more than one.

Finally - Wordpress is Installed…for Crankybunny.com only

After numerous attempts to figure out Addon Domains in cPanel - I finally have a working installation of Wordpress for the Crankybunny.com blog. I still have the blog running on TypePad under http://crankybunny.typepad.com, but will change that over as soon as I play around a little bit with the formatting - you know, change the colors, fix the sidebars and figure out the whole georss/maps thing.

What you need to have multiple domains with multiple copies of Wordpress is the following:

  1. Create your add on domain
    • If, like me, the domain you registered under was sort of a place holder, then welcome to the mire of weird file structure.
    • You do not need to keep the crappy auto-name that cpanel creates for your folder name. I renamed my wpcrankybunny - as I will have mupliple domains (and multiple wordpress folders)
    • The name “wpcrankybunny” is sort of misleading because it is not just a WordPress folder - it will be ALL of my Crankybunny files: photos, gps tracks, misc.
  2. Ignore all the other subdomain crap that get created and focus on your addon domain.
  3. The actual location of the addon domain files is in the “public_html” file in your cpanel file structure - this sort of becomes your “root” directory for your addon domain.
  4. Create a SQL database on cPanel and note the name and password info
  5. Edit your wp_config.php file - add the database info from Step 4.
  6. Upload the WordPress folder CONTENTS to your addon domain root folder (…public_html/wpcrankybunny/)
  7. To get to the install page for WordPress enter in your browser: http://www.crankybunny.com/wp-install.php NOT http://www.crankybunny.com/wpcrankybunny/wp-install.php.

Repeat for the rest of the WordPress installs you want to set up. At least here - the installs are in different folders. The only thing still bothering me is that WordPress is not contained in it’s own special WordPress folder (MovableType was and I like that).

The directory structure of cPanel and how WordPress uses directories are a little confusing. I don’t like that cPanel is making assumptions about where to go when I type my url in - I can’t figure out how my main domain works and dumped a bogus index.html up to “hide” my directory structure. Nothing but index.html would work which is a little pissy.

And WordPress makes some assumptions too - I can’t put WordPress in a separate folder (…public_html/wpcrankybunny/wp) because then the only way to get to my site would be to type http://www.crankybunny.com/wp. Sucks! Maybe I’m missing something.

If you have multiple domains and are using a web hosting provider that runs off of cPanel I would recommend either getting an account for each domain separately or try a resellers package which will set up a cpanel for each domain separately. The whole concept of hosting multiple domains under one original domain’s file structure sucks and I don’t know why the web hosting community - and specifically cpanel - doesn’t acknowledge this little quirk. I haven’t tried either of these myself as I’m tired of screwing with that particular problem.

Viewing Flickr geotagged photos in a KML

Just found this today.

This guy Adam, has written an application that will turn your geotagged photoset on Flickr into a KML file.  This is a missing link for the masses.

Link to online application is here: http://www2.adamfranco.com/photosetToKML.php

After agonizing over how to share my photos both in just a visual format as well as a geographic I think that there are two main ways to share photos over the web.

1) Use a free but limited service like Picasa Web Albums (avail via your Google sign in), Flickr, or Panoramio (also Google).  The free services will limit something - either space used (Google allows more space for mail than photos at this point in time), upload amount, set making capabilities, photo dimensions.  In many cases though you can start paying to remove these storage barriers. 

The main problem with using a third-party photo storage service is that your photos are renamed-there would be just too many copies of rover.jpg or myhouse.jpg or some long string of numbers assigned by your camera.  With this rename, all links to the original name of your photo are lost so you can’t reference them in a url.  That is where photosetToKML.php comes in handy.  The only real problem here is that you have limited sets available to you with Flickr and no one has come up with a method for Picasa Web Albums or Panoramio yet.  I’m sure someone will.

2) The other method is to hold your card close to your chest and put your photos on your own webhost.  I would recommend reducing the file size/dimensions of your photos for this option - keeping the 2MB+ images on your home computer (don’t forget to back them up though!).  I use a 640×480 image size for my other website (http://www.steady-as-she-goes.com).  My indespensible tool for creating geotagged (geolocated) photos and KML files in this instance is RoboGeo because you can enter a directory where your photos are stored and RoboGeo will automatically create those pesky html links for you.

With all the options for photo-sharing (and I haven’t even mentioned the for-money sites) it is becoming difficult to settle down.  Everyone wants to do different things with their photos - the quantity is proliferating, but the locational quality is questionable. And no one really has a good answer yet for the "why" of geotagging general photos. 

I know why I want to do it - I think that it is interesting to be able to show my vacation photos on a map - or in a pop-up to people who are interested in my journeys - but when you multiply me by millions - what can we get out of the resulting photos as a society?  If all the photos are sitting in a bunch different, unconnected services(it’s too much of a pain in the ass to put them on multiple services - and a waste of space) what is going to tie them together and what information are we going to derive from them (and their location and comments)?