Heal Your Church WebSite Rotating Header Image

What if Starbucks Marketed Like a Church? A Parable.

What if Starbucks Marketed Like a Church? A Parable:

I think I encountered this particular ‘brand’ of Church marketing when I first moved down to the Raleigh burbs of Apex.

It does inspire me to want to ‘reel-off’ a parody of “what if Amazon.com sold books like a Church website?”

Hmmmm …

Post to Twitter Post to Delicious Post to Facebook Post to MySpace Post to StumbleUpon

Setting up multiple test sites in XAMPP via virtual sites

It’s NEVER a good idea to test new designs, programs and/or learn new stuff on a production website. This article describes how to create multiple virtual servers on a Windows 7 platform using XAMPP to create a perfect Linux/Apache like test bed.XAMPP + Win7 = great platform to test Wordpress, MovableType and   Drupal

Some Context

I’m in the process of re-factoring some websites I’ve let go fallow far too long. Part of this process includes setting up a Linux-like test site on my brand new Windows7-driven Lenovo U350 via XAMPP.

Yeah, I know, that was a lot all at once, so let’s break some of this down for those of you who don’t code for a living:

What’s XAMPP?

The WikiPedia defines XAMPPas follows:

(pronounced /ˈzæmp/ or /ˈɛks.æmp/[1]) is a free and open source cross-platform web server package, consisting mainly of the Apache HTTP Server, MySQL database, and interpreters for scripts written in the PHP and Perl programming languages …

… The program is released under the terms of the GNU General Public License and acts as a free web server capable of serving dynamic pages. XAMPP is available for Microsoft Windows, Linux, Solaris, and Mac OS X, and is mainly used for web development projects..

In short, XAMPP gives me a Linux/LAMP development platform on a Windows based machine.

My Situation

Whether it’s learning something for work, or working on a church website, often find myself jumping between languages such as Perl, PHP and Python … and content ‘manglement’ systems such as WordPress, Drupal and MovableType, I find it’s easier to keep things organized if I:

  1. keep each project in its own path
  2. establish a virtual server for each project
  3. enter the project name in the address bar of my browser

Getting it done

By default, “localhost” is the default domain name for your PC. It resolves to IP address 127.0.0.1.

But just as a hosting provider can support several domain names on a single IP address, so too can your Windows system.

Below are the steps to get this done:

Step 1 – identify the new host

Unlike Windows XP or Vista,  for Windows 7 you’ll need to right click on the NotePad program and “Run as Administrator” as pictured below:

Notepad - Open as Admin

This is because the file we want to edit is now protected. That file is located at:


C:\Windows\System32\drivers\etc\hosts

Once you’ve opened the file and on or about line 23, edit your file so it reads:


127.0.0.1       localhost
127.0.0.1       drupal

Save it, close your notepad editor, so you don’t shoot yourself in the foot in admin mode.

Step 2 – establish the virtual host

Keep in mind, the primary purpose of XAMPP is to give you an Apache server that runs on your local machine.

That in mind, you’ll need to edit one more file:


notepad C:\xampp\apache\conf\extra\httpd-vhosts.conf

Once in, you’ll want to modify it so it reads:


NameVirtualHost *:80
<VirtualHost *:80>
 ServerAdmin postmaster@dummy-host.localhost
 DocumentRoot "C:/xampp/htdocs"
 ServerName localhost:80
 ServerAlias localhost
 ErrorLog "logs/dummy-host.localhost-error.log"
 CustomLog "logs/dummy-host.localhost-access.log" combined
</VirtualHost>
<VirtualHost *:80>
 ServerAdmin postmaster@drupal-host.localhost
 DocumentRoot "C:/xampp/htdocs/drupal"
 ServerName drupal:80
 ServerAlias drupal
 ErrorLog "logs/drupal-host.localhost-error.log"
 CustomLog "logs/drupal-host.localhost-access.log" combined
</VirtualHost>

Note, in the default XAMPP install, the above is commented out, and the hosts are dummy and dummy2. I simply un-commented everything and renamed dummy2 to drupal.

Step 3

Restart your Apache server. The easiest way to do this is stop and start the server through the can be done through the console as pictured below:

XAMPP Console

Step 4 – Test It

Finally, you’ll want to test it by entering “drupal” in the address bar of the browser of your choice.

Before you do that, you may want to create the directory C:\xampp\htdocs\drupal …

… and then add an index.html, .php, .pl OR .py file to provide the ubiquitous “Hello World!” to demonstrate everything is running as planned.

Wrap-up

Additional Resources

I’m not the first person to write on this topic, nor will I be the last. That said, here are some other sites that offer similar tutorials in case the one above is still as clear as mud.

Why Bother?

Some of you may be wondering why bother at all? Why not just work on your live site.

Personally, as an IT professional with a couple of decades experience, I can say with utter certainty – backed-up with copious examples – that this is a recipe for disaster.

Instead, why not simply take an old box and install a Linux distribution such as Ubuntu or Fedora … or do what I did, took a new box an added XAMPP.

Either way, you’ll be glad you did when one of your tests or learning experiences fries your non-production site.

Post to Twitter Post to Delicious Post to Facebook Post to MySpace Post to StumbleUpon

WordCamp Raleigh 2010, Liveblogging, Day 2

Once more, I’m live blogging from WordPress WordCamp Raleigh (#wcraleigh) here at the Sheraton in Downtown Raleigh. I’ll be posting notes from sessions on managing events in WordPress and how powerusers can get the most out of multimedia via WordPress. Stay-tuned, I’ll be posting often all morning.

8:42 AM Arrival

WordCamp Raleigh 2010I didn’t read the schedule close enough, today’s events start at 9:30 AM rather than 9:00 … so I’m here early.

Makes me all the gladder that I didn’t speed to get here as NC64/I40 East from exit 293 to 298 are crawling with Raleigh Police issuing speeding citations. Me, I had the cruise control set as I listened to some Pentecost chants and plainsongs being played on the local classical music station.

As I get here, no surprise, a 17 year old attendee is up bright and early, while some others are lightly snoring on the mezzanine couches & chairs outside the meeting rooms. From what I glean from last night’s #WCRaleigh Tweets – there were several folks up very late having a good time.

Anyway, I’ll be live blogging from two sessions today, one for programmers on organizing events … the other for power users on podcasting, streaming, multi-media and fun like that.

Stay tuned!
Continue reading →

Post to Twitter Post to Delicious Post to Facebook Post to MySpace Post to StumbleUpon

WordCamp Raleigh 2010, Liveblogging, Day 1, Afternoon Session

As I anticipated, it’s been GREAT meeting all sorts of neat people here at WordCamp Raleigh (#wcraleigh).

1:00 PM Grant Swaim

WordCamp Raleigh 2010

How to biuld a membership-style website

The presentation is at Google Docs.

Basically the presenter is reciting the google doc … I’m going next door to the sitecast.

1:00 PM Ryan Duff
Saving Youself TIme WHen Setting UP a Dev Environment

Lots and lots of talk about SVN (subversion) Server and how to set it up on your development server.

Ugh .. this is good and important stuff for us developers, but its like watching grass grow and probably better provided in the form of 3 five-minute how-to videos.

Let me check out the SitePoint PodCast.
Continue reading →

Post to Twitter Post to Delicious Post to Facebook Post to MySpace Post to StumbleUpon

WordCamp Raleigh 2010, Liveblogging, Day 1, Morning Sessions

WordCamp Raleigh 2010One advantage to living in the peak of good living,  Apex, NC, is that I’m about a 15 to 20 minute drive from downtown Raleigh, the site of WordCamp Raleigh 2010 – where today I’ll put on my best effort to live blog about the various sessions and people I discover here.

I already know it’s going to be a fun morning as I no only discovered free parking a block away from the Sheraton in which the conference is held, but my spot was in front of a Starbucks, with none other than iThemes creator Cory Miller &  friend sitting at a table just in front of the spot – as if to reserve my place.

I’ve also run into another online BFF, WordPress ninja Nathan Rice and social media guru Wayne Sutton.

Anyway, hopefully I’ll learn much about the upcoming release of WordPress 3.0.
Continue reading →

Post to Twitter Post to Delicious Post to Facebook Post to MySpace Post to StumbleUpon

Bad idea design poster #11 – Canned Content

I’m getting very excited about the upcoming Word Camp Raleigh happening down the road from where I live next weekend.

Canned Content, about 1/2 as interesting as lima beans with 1/3 the taste and 1/10 the nutrition.I just hope its focus on WordPress Theme Frameworks, plugins and premium themes is not to the exclusion of other important topics.

Not that there’s anything wrong with terrific tools such as  Thesis, Headway, Genesis, and Builder; nor the premium themes one can purchase for them.

Rather I’m hoping that along with the discussion of getting a fast start with premium framework themes and plugins that we also remember what usability guru Jakob Nielsen said about ‘Information Foraging‘ back in 2003 when describing how to catch and keep visits from data hungry first time visitors:

The two main strategies are to make your content look like a nutritious meal and signal that it’s an easy catch. These strategies must be used in combination: users will leave if the content is good but hard to find, or if it’s easy to find but offers only empty calories.

Basically, Nielsen is detailing how to attaining user-activity goals through the careful crafting compelling content and the navigation to it – known in the web strategy/analytics world as a ‘conversion funnel.

So it is my hope that amid discussions on how to make our blogs look  ‘different like everyone else’ via various rendering engines, that we also take some time to talk about how-to develop a sensible information architecture that best suites the goals of your church and/or charity.

Put another way, we need to remember that if  “Web users behave like wild beasts in the jungle …,” then we probably want to avoid taunting such ‘Informavores‘  with ‘canned content’  when in fact only raw meat will satisfy their hunger.

In other words, just because a number of the speakers are justifiably and understandably using this conference as an opportunity to sell their template and plugin wares – it shouldn’t be to the exclusion of those in attendance whom are seeking help with all the other aspects that go along with establishing an effective web presence.

Meanwhile, if you’re headed into town, let me know. If you can’t make the event, keep in mind that there’s a “SitePoint Podcast coming to WordCamp Raleigh.”

Post to Twitter Post to Delicious Post to Facebook Post to MySpace Post to StumbleUpon

Fun with the Twitter Search API and jQuery

During a recent job interview, I admitted that “yeah, I’m a bit of an API junkie.” Anyone whose followed this site since 2002 probably has gone blind once or twice reading posts about SOAP, XML-RPC, RSS feed and other such programmer protocols and interfaces.

So why should anyone be surprised that today I’m providing a quick how-to code snippet of some fun I’m having with the Twitter Search API, REST, jQuery and jSON?

YES, I know I need to get back into providing posts about content management,  effective social media strategies and web campaigns … but for today … please indulge me with one more trip into the land of code.

Some Context

In the process of writing some WordPress plugins leveraging the Facebook API, I thought “why not twitter?

However, there are already a multitude of plugins and widgets out there that’ll show my profile.  So I turned my eyes to Twitter Search.

My first thought was to simply write this all up using not much else but the jQuery.getJSON() method.  However, this approach doesn’t lend itself well to caching – which in turn would lead to some of you with busy sites getting your widgets blacklisted by Twitter as <a href=”http://apiwiki.twitter.com/Rate-limiting” title=”Twitter API Wiki – Rate Limiting”>their default rate limit</a> for calls to the REST API is 150 requests per hour.

So now I’m working on a PHP solution inspired in large part by Arron Jorbin’s post “More Twitter Shortcodes for WordPress.” Must read for anyone working with feeds or APIs in the WordPress arena.

Hey, so where’s the jQuery & jSON?

All that context aside, I did successfully write a short snippet that used jQuery to call the RESTFul Twitter Search API and then parses the jSON into a dynamic display.

I did this in part because while I will employ some form of PHP or  Perlto cache the Twitter Search, I still might employ jQuery as the rendering mechanism for said cache. Here’s my test code so far:

/* a counter outside the context of setCountdown() */
var seconds2go = 0;

/*
 * the method that sets the visual display of the countdown timer,
 * and triggers getTweet after 2 minutes
 */
var setCountdown = function() {
  seconds2go--;
  if(seconds2go > 0) {
    $("#countdown").html("Seconds until the next refresh:' +
  ' <span>" + seconds2go + "</span>");
  } else {
    $("#countdown").html("Seconds until the next refresh:' +
  ' <span>0</span>");
    getTweet();
    seconds2go = 120;
  }
}

/*
 * the method goes out to the Titter A.P.I,
 * then parses the jSON block into the display
 */
var getTweet = function() {

  /* set everything up */
  var url="http://search.twitter.com/search.json" +
       "?rpp=5&callback=?&q=";
  var query = escape( query=$("#twittersearch").val() );
  var display = '<div class="tweetDisplayContainer error">' +
       'no records found</div>';
  var urirex = /(https?):\/\/+([\w\d:#@%\/;$()~_?\+-=\\\.&]*)/g;
  var hashrex = /\#+([\w\d:#@%/;$()~_?\+-=\\\.&]*)/g;
  var thashuri = "http://search.twitter.com/search?q=%23";
  $("#twitterresults").html('');

  /*
   * A.J.A.X. happens here -> go get the data, then parse it
   */
  $.getJSON(url+query,function(json){
  $("#twitterresults").html('<h4><a class="searchlink" href="' +
  url.replace('search\.json','search')+query +
  '" title="see the search query via Twitter">Testing: ' +
  url+query + '</a></h4>');
  if(json) {
    display = '<div class="tweetsContainer">' +
  '<dl class="tweets clearfix">';
    $.each(json.results,function(i,tweet){
      ttext = tweet.text.replace(urirex,
  '<a href="$1://$2" title="">$2</a>');
      ttext = ttext.replace(hashrex,
  '<a href="' + thashuri  + '$1" title="">#$1</a>');
      display +=  '<dt class="tweet' + i + '">' +
            '<img src="' + tweet.profile_image_url + '"  />' +
          '</dt>' +
          '<dd class="tweet' + i + '">' +
            ttext + ' <strong>via:</strong>' +
            '<a href="http://twitter.com/' + tweet.from_user +
            '" title="tweets by ' + tweet.from_user +
            '">@' + tweet.from_user + '</a>'
          '</dd>';
        });
    display += '</dl></div>';
  }
    $("#twitterresults").append(display);

  });
}

/*
 * this is where we kick-it all off,
 * assumes seconds2go = 0 initially
 */
setInterval(setCountdown, 1000);

As you can see, the most difficult part was getting it all to fit in a readable format on this blog! Well, that and some additional fun with regular expressions.

Well that and what you don’t see in the code are two html elements:

<h2 id="countdown">Seconds until the next refresh: <span>120</span></h2>

<input type="hidden" id="twittersearch" value="deanpeters #smm" />

<div id="twitterresults">no results yet</div>

Todo: I’m thinking the above script could use a bit of animation easing or some other effect so we don’t simply “flash” new results at the user. It also needs to be objectified and wrapped-up as a plugin. More on that as I work on the widget/plugin.

Demo Stuff

I did create a demo page – it’ s not pretty, but it effectively shows how to get it done. I’ll craft up some CSS for it later.

It’s basically built off a search of  deanpeters  #smm as pictured below:

twitter search criteria for jQuery test

I’ve also created a .txt version of the file if you’re interested.

Additional Reading

In the meantime, I though I’d list some of the sites I visited while approaching this exercise. Some good people providing some good examples:

FYI

Thanks for all the emails and retweets of late. Good stuff!

Post to Twitter Post to Delicious Post to Facebook Post to MySpace Post to StumbleUpon

The Facebook Activity Feed Widget Plugin for Wordpress

I’m pleased to announce the initial release of my 2nd social media plugin, the Facebook Activity Widget Plugin for Wordpress. Simply put, it automates the display of a Facebook Activity Feed on the sidebar of your blog by making it a easy-to-configure widget.

(This is a new and different plugin than my Facebook Like Button Plugin for WordPress I deployed last week.)

For those who may not be aware of what the Facebook Activity Feed is, it is a ’social plugin’  displays the most interesting recent activity taking place on your personal website and/or blog. Since the content is hosted by Facebook, the plugin can display personalized content whether or not the user has logged into your site.

The activity feed displays stories both when users like content on your site and when users share content from your site back to Facebook.  You can read more about this over on  the Facebook Activity Feed reference page.

Update April 30, 2010

Okay folks, version 0.2 is out, and now you can:

  • run as many sidebar widgets that your bandwidth can tolerate;
  • pick border colors with a little dialog box (still a little buggy for my tastes);
  • and as always, the plug-in is translation ready (thanks to those of you who’ve been contributing files to my other plugin!-)

NOTE – for those of you early adopters, looks like the WordPress repository did NOT give me the file name/path I requested.

So unfortunately, deactivate and delete version 0.1 before installing v0.2. Yeah, I know, whatta  pain.

Installation & Use

I also wanted to keep it simple, so here’s how it works — using the standard WordPress plugin installation process:

  1. Upload the ‘fbactivitywidget.zip’ file to the `/wp-content/plugins/` directory using wget, curl of ftp.
  2. ‘unzip’ the ‘fbactivitywidget.zip’ which will create the folder to the directory `/wp-content/plugins/fbactivitywidget`
  3. Activate the plugin through the ‘Plugins’ menu in WordPress
  4. Go to the Widets submenu option of the Appearance menu
  5. Drag and drop the widget entitled ‘Facebook Activity Widget’ into widget-enabled the sidebar of your choice
  6. Configure the newly dragged-n-dropped plugin through ‘Facebook Activity Widget’ contol box on the sidebar
  7. Modify the fields to choice and click save..

Here’s a screen shot below of the Appearance/Widgets screen (you’ll want to click on it to see it full size):

A screenshot of the FBActivity Feed Widget Setup Screen in action

Everything is pretty obvious from there – with the exception of the ‘domain’ parameter. Basically, it is the domain of your personal website and/or blog without the “http://” or “www.” prefixes.

You specify a domain to show activity for. The domain is matched exactly, so a plugin with site=healyourchurchwebsite.com would not include activity from obfuscator.healyourchurchwebsite.com. According to Facebook, currently you cannot currently aggregate across multiple domains.

Here’s how the FaceBook Like button appears on my own sidebar (in case you’re not reading this post from the front page :-):

How the Facebook Activity Feed Widget appears on a blog.

Download It

Also, I’m currently in the process of setting getting established with the WordPress SVN and everything else that goes with publishing an official WordPress plugin.

The plugin is now available from the WordPress Repository, until I can get the plugin its ownhome on the WordPress Plugin repository. Keep in mind it is version 0.1 version 0.2 - so expect more to come!

Download the Facebook Activity Feed Plugin for Wordpress

As NOTED before, if you implemented version 0.1, de-activate and delete first before installing 0.2 and later versions.

Other Facebook Social Plugins

I don’t know if I’m going to build an entire suite of Facebook Social Plugins for Wordpress, but with today’s deployment, that at least gives me two.

In case you’re not a regular at this blog, last week I delivered: The Facebook Like Button Plugin for WordPress.

Unlike it’s cousin here, will display the Facebook Like Button above and/or below your posts and/or pages.

FYI

I said this in my last post … but it bears repeating … please don’t forget to click the FaceBook Like Button for this post … I’d appreciate it.

Post to Twitter Post to Delicious Post to Facebook Post to MySpace Post to StumbleUpon