Wordpress

You are currently browsing the archive for the Wordpress category.

I imported all my LiveJournal posts here. Other than posting pictures to there from Flickr, I don’t really use LJ anymore. I rarely even read my friends’ blogs there. Too bad. I still have the teeshirt.

Most of my LJ posts are protected. For this site, I’d rather have them set to private. So the section of Wordpress (Tools > Import > LiveJournal) saying this seemed relevant:

If you have any entries on LiveJournal which are marked as private, they will be password-protected when they are imported so that only people who know the password can see them.

If you don’t enter a password, ALL ENTRIES from your LiveJournal will be imported as public posts in WordPress.

Password protected seemed better than not, so I set a 30 character long password, and the form accepted all 30. When the password didn’t work, I logged in as the administrator user and looked at Publish > Visibility >

In my opinion, web forms in general should prevent the user from entering more characters than the application or database will take. Passwords are very exact, so forms for creating them definitely should not allow extraneous characters.

Followed Andy Fore’s instructions on adding WP 2.9 to the whitelist.

The only problem I have so far discovered is Tag the Net doesn’t appear to work. The error:

Fatal error: Cannot redeclare class services_json in /home/path/wplog/wp-includes/class-json.php on line 115

Looks like Wordpress distributed a new class-json.php. Back in Simple Tags 1.6.5, this specific error was supposedly fixed. My guess is something about Wordpress 2.9 re-broke it.

Disclaimer

At the request of my boss, I added this disclaimer. Positive things I say here about Blackboard are okay. Negative things require distancing my employer from me so the defamation lawsuit comes to me not them.
:)

This is a personal weblog. The opinions expressed here represent my own and not those of my employer.

Site Changes

Blog

Upgraded to the Tarski 2.5 theme. Previously I was using the Tarski 2.4.

One of the reasons I like Tarski is the opportunity for a custom header image.  Something I can use of my own. However, like the moo.com cards, finding a photo whose crop to this narrow 720×180 window isn’t so easy. At the moment I am using the train photo. Through the weekend I might try new photos.

wplog_header
Original Tarski Custom Header

IMG_3859 tarski header
Consideration one from my train photo.

IMG_3149 tarski header
Consideration two from my Queen Anne’s lace photo.

IMG_6201 tarski theme
Consideration three from my mushroom photo.

phlox tarski theme
Consideration three from my phlox photo.

Leave a comment if you see something you like.

Splash

I’m thinking of putting the above photo into the splash page as well.

The tacky Facebook profile widget got tackier. So now I have a Flickr widget for a slide show of my Most Interesting 60 photos. So, ya’ll visit the set of the strobist shoot to increase the Interestingness of your favorites into the top 10.

Have spammers figured out how to pick reCAPTCHA’s lock? All of a sudden I am getting hundreds of comment spam blocked by Akismet. When I added reCAPTCHA, it dropped to a few a month. Now 409 in a week.

Guess this is why layers of security are good.

UPDATE: Scanned through for false positives. The first word of many of them were Xanth characters: Bink, Chameleon, Dolph, Iris, Smash, Goldy, Grundy, Cherie, Chester, Roogna, Imbri.

Purely for fun. Typealyzer gives a Myers-Briggs Type Indicator result from analyzing the text in your blog. I find it interesting this blog scored an ISTP and another INTJ. Prior to working in IT, I was always an INFP. Then I started getting INTP and lately INTJ. So the ISTP is a little odd to me.

ISTP – The Mechanics

ISTP

ISTP: The Mechanic

The independent and problem-solving type. They are especially attuned to the demands of the moment are masters of responding to challenges that arise spontaneously. They generally prefer to think things out for themselves and often avoid inter-personal conflicts.

The Mechanics enjoy working together with other independent and highly skilled people and often like seek fun and action both in their work and personal life. They enjoy adventure and risk such as in driving race cars or working as policemen and firefighters.

UPDATE 2010-MAR-06: In retrospect, this makes quite a bit of sense to me. Since my profession is a technician, the mechanic, is a perfect archetype for my work. This blog mainly reflects my work, so the mechanic is the best archetype to achieve.

Problem PHP in Yet Another Photoblog causes “Warning: Division by zero in exifReader.inc on line 859” (the problem line is in bold):

 

case TAG_SHUTTERSPEED:
  // More complicated way of expressing exposure time, so only use
  // this value if we don’t already have it from somewhere else.
  if ($this->ImageInfo[TAG_EXPOSURETIME] == 0){
    $sp = $this->ConvertAnyFormat($ValuePtr, $Format);
    // Temporary Workaround for divizion by zero problem
      if (!empty($sp[0])) {
        $this->ImageInfo[TAG_SHUTTERSPEED] = (1/exp($sp[0]*log(2)));
      } else {
        $this->ImageInfo[TAG_SHUTTERSPEED] = 0;
      }
    }
    break;

 

Looks like YAPB is attempting to create a value if one doesn’t exist for TAG_EXPOSURETIME by inventing a new value. In my problem picture, the exposure time is 0.003 seconds which != 0. So why is the ($this->ImageInfo[TAG_EXPOSURETIME] == 0) condition evaluated as true? 

Interestingly, just prior to this is some code dealing with TAG_EXPOSURETIME which seems to be affecting this. Changing the 0.5 to 0.0005 (less than my current value removes the problem.

case TAG_EXPOSURETIME:
  // Simplest way of expressing exposure time, so I trust it most.
  // (overwrite previously computd value if there is one)
  $tmp = $this->ConvertAnyFormat($ValuePtr, $Format);
  $this->ImageInfo['h']["exposureTime"] = sprintf(“%6.4f s (%d/%d)”,(double)$tmp[0],$tmp[1][0],$tmp[1][1]);
  if ($tmp[0] <= 0.5){
    $this->ImageInfo['h']["exposureTime"] .= sprintf(” (1/%d)”,(int)(0.5 + 1/$tmp[0]));
  }

  break;

With this conditional, the exposure time is “0.003 s (1/400) (1/400)” without “0.003 s (1/400)”. Didn’t see a reason to have it twice, so I’ve dropped it.

Also, I figure it would be better to call ImageInfo['h']["exposureTime"] instead of ImageInfo[TAG_EXPOSURETIME]. With this change, it seems to have resolved the issue for me.

Broken Links

I just broke all your links to anything other than this blog’s pages (home, quotes, reading, about). Sorry. The new autosave putting gaps in the post sequence annoyed me.

And…. it is 1:30am.

Search lijit for it or leave a comment. I’ll do my best to direct you.

For a while I have meant to do this. Here I am with insomnia, so here goes… I have implemented Gravatars for the this Blue Zinfindel theme.

Here is coding I used to implement it to this theme’s comments.php (WP Design > Theme Editor > Comments). Normal text is for context. Bold is what I added.

<li class=”<?php echo $oddcomment; ?>” id=”comment-<?php comment_ID() ?>”>
<?php echo get_avatar(get_comment_author_email(), ‘32′); ?>
<?php comment_author_link() ?>

The first place I saw to provide a function rather than a variable is the weblog tools collection post on gravatars. The above is their recommendation with size 32 image. I picked this size because it is the size of the icon inside the WP admin (tested 64, 48, and 30 with 30 seeming about right).

Once I decided to do it, it took me about an hour to find an example using get_comment_author_email() instead of $comments or $id_or_email. It’s easy to implement.

Gravatars

Probably I missed or didn’t understand the announcement.

For the past month or so, I’ve noticed all these comments with the poster’s picture next to it on various blogs. I knew them to be Wordpress blogs. I noticed my own WP had some default icon in the admin user interface. Today I finally put it all together.

A recent Wordpress version incorporated Globally Recognized Avatars into the main code. (They are also known as GRAvatars) Using a hash on the email address, it locates a Wordpress commenter’s 96×96 picture for including in the comment. Naturally, you need to register your email account with the gravatar service.

So, now many of you get to see my ugly mug!

Zemanta Pixie

« Older entries