Skip to content

Posts from the ‘WordPress’ Category

21
Jun

Hello Thelonius

WordPress 3.0 “Thelonius” has dropped and all is right and good in the world. Thanks to Matt Mullenweg and all of the hard working WP devs. My upgrade experience on this site and on a WPMU/BuddyPress site I have in development went as smooth as silk. Looking forward to fully exploiting all of the 3.0 goodness in the near future.

1
Aug

WordPress Shortcode for File Inclusion

I have a project that requires a lot of complex, yet static Pages in WordPress … think lots of tabular data with heavy CSS styling. This sort of content is best written in an external editor like Zend IDE or Dreamweaver and then dropped into WordPress.

However, if you’ve ever done this, testing the page as you develop it is a huge pain in the backside. It involves cutting and pasting from the editor to WP … saving and refreshing … make changes in the external editor … rinse and repeat.

Not fun. Not efficient.

The solution is fairly straightforward — keep these files static HTML and simply include them somehow in the page. I researched the available plugins and they all seemed like overkill which added overhead. Then, in WP IRC, Fris suggested writing a custom shortcode to do the heavy lifting. 90 minutes later, I have precisely what I need and a renewed respect for WordPress and the community supporting it.

For those interested, here is the code:

< ?php

// SHORTCODE FOR STATIC FILE INCLUDE
function sc_static_html ($atts) {

	// Extract Shortcode Parameters/Attributes
    extract( shortcode_atts( array(
    'subdir' => NULL,
    'file' => NULL
    ), $atts ) );

    // Set file path
    $path_base = ABSPATH."wp-content/inc_static/";
    $path_file = ($subdir == NULL) ? $path_base.$file : $path_base.$subdir."/".$file;

    // Load file or, if absent. throw error
    if (file_exists($path_file)) {
        $file_content = file_get_contents($path_file);
        return $file_content;
    }
    else {
        trigger_error("'$path_file' file not found", E_USER_WARNING);
        return "FILE NOT FOUND: ".$path_file."SUBDIR = ".$subdir."FILE = ".$file."

";
    }
}

add_shortcode('static_html', 'sc_static_html');

?>

USE CASE

[static_html subdir="testdir" file="dirtest.html"]
31
Jan

Tell Me Your WordPress 2.7 Must Haves, Win a $50 Amazon Gift Card!

Dear WordPress Nation,

I need your help. I pour through the WP Themes and WP Plugins listings looking for the best of breed, but there is something missing … opinion based on informed experience. In other words, you.

So, based solely on your own experience, add a comment to this thread which includes the following:

  1. Name of your #1 must-have plugin.
  2. Link to said plugin.
  3. In a nod to Twitter (sort of) tell me why you cannot live without the aforementioned plugin in 140 WORDS (not characters, hence the “sort of”) or less.

This contest will run through February 15th at midnight. By February 22nd, I will select one winner who will receive a $50 Amazon Gift Card. Easy-peezy, no?

A few parameters for you …

  1. I know and use many of the most common and popular plugins for SEO, Twitter and the like. So, I am really looking for something out-of-the-ordinary. If it makes me go “Hmmm, I never thought I’d want that on my blog, but now I MUST have it!” … you have a good chance of winning.
  2. You cannot be the author of the plugin. No SPAM or shills please.
  3. Themes will be considered as well, but they better be pretty special to win.
  4. All Plugins or Themes must currently work with WordPress 2.7.
  5. You can only list one plugin/theme in one comment. Multiple entries in any form will be disqualified.
  6. Be sure to provide your email in the comment so I can contact you if you win. I promise not to SPAM you.

So there you have it. Knock my socks off, if not my pants (though no one really wants to see the latter but my wife). ;^D

Peace,

Doug

10
Jan

WordCamp Vegas – Day 1

So, I was a bit distracted by Twitter issues and could not live blog like I ‘d hoped. Happlily, the Twitter issue was resolved towards the end of the day, more on that in later post. On to my highlights …

State of the Word :: Matt Mullenweg

Matt rocked it out and dropped a couple of interesting teasers. First, WP 2.8 will focus on Themes. Look for similar auto-install features for Themes that we saw for Plugins in 2.7. Next, WordPress Handbook is coming.

Though the Codex will still live, WP Handbook will be built in Docbook XML allowing the WP documentation to be managed like software. Why is that a big deal? Well, it means the docs can be written to suit a particular release without destroying the historical record. And, edits/corrections to current and past docs can be submitted and managed like bugs.

This means, Plugin and Theme developers can commit docs in the same format. This is huge for folks who use WordPress for consulting clients because WP installs inventory the installed Themes/Plugins then could poll the WP Handbook’s Docbook XML and build a completely custom set of docs for the WP you’ve installed for your customers.

During the Q&A, I asked about the status of bbPress. Matt said to look for 1.0 at some point of 2009. Interestingly, Matt said that he considers bbPress to be better written than WP because he wrote it after he had learned a lot about coding.

On a humorous note, someone is constantly pinging Matt about bbPress status. Apparently, Matt has a bbPress “stalker”, but I swear it isn’t me. ;^D

how to run a blog with a staff of contributors :: Geoff Kleinman

Geoff offered a lot of great insights on the role of the editor in the blogosphere. As part of my plan involves a great deal collaboration, Geoff’s pragmatic insights were powerful and should bear fruit for me down the road. His is one presentation I am sure to watch again on the uStream. If you work with or supervise other creatives, I strongly suggest you do the same.

Beyond Beer and Blog: How Social Media Lit Up the Portland Tech Scene :: Aaron Hockley

Aaron set off far too many lightbulbs in my head. I’ll never turn them all off. From Ignite to Beer and Blog, I now have a few more social media pools into which I plan to dip my toes. Most powerful of Aaron’s insights – online social media is most powerful when it serves to bring people together in the real world. The “Legion of Tech” video was classic internet nerdery … and I say that with much respect and affection. Oh, and I now want to visit Portland in the worst way!

10 Steps to Search Engine Optimize your WordPress Blog :: Michael Dorausch

Michael had a great presentation regarding SEO and WordPress. As SEO is a big part of what I do everyday, a lot of it was old hat for me. But, the audience was full of raw, new bloggers as well, so it was a perfect presentation for that crowd. And, I learned a couple of cool tricks along the way. Best of all, he got people in the crowd to sing “Hello Dolly”, including Lorelle, who can really belt out a tune!

Using Your Blog for Sales and Marketing :: Chris Brogan

Brogan is a freaking nut! Again, this is said with respect and affection. After Blogworld Expo 2008, I followed him on Twitter based solely on John Hawkins’ reccomendation. For 4 months, I found Chris’ tweets interesting and useful, but I did not get why John had such a bromance for the guy. Now, I get it.

While providing a lot of useful insights, Chris had the crowd laughing and eating out of his hand. He is a gifted and entertaining storyteller, who happens to be a skilled marketer that “gets” the power of online media. While it may sound trite, his through-line was “follow your passion”. If you blog about things that are meaningful to you, your audience will find you.

Another gem, “learn from the best and then copy them”. In particular, he bemoaned the lazy, stock list of interview questions he is always asked. When we have Larry King and Charlie Rose available on Youtube, Tivo and Boxee, why wouldn’t we watch and learn how to interview from them?

This was particularly interesting because I’ve been noodling doing an independent Master’s degree. Meaning, setting a curriculum for myself and learning everything I would get in an Online Media MFA on my own. Chris Brogan pointed me at an entirely new source for faculty! W00t!

Finally, if anything will stick with me from his presentation, it will be the definition of callback. Deftly used by Mr. Brogan in his presentation, I am working callbacks into my speaking arsenal from here out.

By the Numbers: a look at stats and what they mean to you :: Lorelle VanFossen

Lorelle spent the first half of her time deconstructing a wide range of popular web analytic metrics. Nothing escaped her intense scrutiny as she introduced us all to the concept of “distracting stats” and the power of horse sex. Frankly, she shook the foundations of my understanding of web analytics … in a good way. The second half of the presentation was an in-depth demo of the stat pr0n application that is Woopra. Thanks for the beta key!

You’ve failed? Learn Why! :: Jim Kukral

Jim Kukral is the biggest failure on the interwebs, or so he wants you all to believe. I won’t be able to do the presentation any real justice, so it it is best to catch the uStream for yourself. Suffice to say that Kukral does not deliver a simple rah-rah speech filled with platitudes. Like the Mike Rowe speech I posted earlier, Kukral preaches a “get off your ass and work” approach to success. He gave me a lot of serious food for thought, all of which will likely lead to future posts when I’ve had time to digest them more fully.

All this from a Browns fan. Go figure! Oh, he also introduced us all to the word “shmoosh-rags”. Good times!

Now, I would be remiss if I did not once again say CONGRATS! to my friend, buddy, pal John Hawkins who had the vision, the will and the drive to make WordCamp Las Vegas happen. Hawk … thanks for adding a stellar event to the Vegas Tech/Social Media calendar.

In addition to the great speakers, I reconnected with friends Carl Szeibert, Todd Huish and John’s lovely wife Chris. And, for the first time in five years, I finally made it on Todd’s photoblog!

Doug and Chris Hawkins on 606 Diaries

Until tomorrow …

10
Jan

WordCamp Las Vegas 2009

Congratulations to John Hawkins! Wordcamp LV is a huge success. Having thrown a party like this, I know how much work this was. He has a great line up of speakers and the show is going off without a hitch! I’ll live-blog sessions with point of interest.