AOL rebranding according to my advice

December 13, 2009

In recent posts I poo-poo’d the thinking of current medial moguls vis-a-vis the Google Myspace deal as well as Rupert Murdoch’s plans to charge for their content. Now at least someone is catching on and is not intent on self-destruction as they cling on to the old way of doing things.

Here is what I said in early Nov (and numerous times before):

Content is king on the Internet. Want to improve your traffic, improve your content. Since users create the content at MySpace, it becomes essential to attract users who can consistently generate quality pop content. Even if you have to pay to get them.

Here is what AOL CEO Tim Armstrong said in early December:

Because AOL is content, the brand has to be like content: fluid, flexible, and changeable. It exists as a host for new innovations and new content experiences. In a world where people believe what you do and not what you say, it is these new experiences that will define this brand and people’s perceptions of it. AOL Seed is the first example of this. Here AOL are pioneering the content economy with a publishing platform that will allow budding creatives to publish, find an audience for their work, and make money doing so.

Media outlets that try to own and or control submitted or hosted content to their sole benefit are in for big trouble over the coming years, especially if that tactic is essential to their core business model. Think recording industry.

Yeah, maybe AOL use to suck, but now they plan to share the wealth with those who actually have a talent for creating engaging content. If AOL management can pull it off, don’t be surprised if this model is a raging success.

Rewarding individual talent is preferable to powerful people making tons of money simply because they have power and money. I’m actually quite put out with the latter.

  • Share/Bookmark

Brad & Beyonce Turkey

December 10, 2009

Check out this WordPress blog that is comprised primarily of nothing but Brad and Beyonce Turkey’s Twitter feeds. Interesting concept, off-beat subject mater. Why are they doing it?

We looked after our Turkeys too well, and got attached. Help us decide which one to keep. The one with the most to live for by Christmas will be saved.

  • Share/Bookmark

Browsing through the help wanted ads

December 9, 2009

Regular visitors know I love making fun of online job postings. Here’s a good one:

Responsible for complex process automation of the systems management applications as well as integration to create interoperability between other applications. The applications include; HP OpenView for Windows (HPOV) or HP OpenView Operations Manager (OVO) now called HP Operations Manager, software for consolidated event and performance management, HP Network Node Manager (HP NNM) now called HP Network Node Manager i-series which has embedded run-book automation technology for automatic data collection, state verification, and problem fixing, HP Service Center formerly Peregrine, HP OpenView for Internet Services (HP OVIS) now called HP Business Availability Center, HP Reporter for OpenView and HP Operations Orchestrator (OO) formerly known as PAS, formerly IConclude

Sounds like someone changes brands like they change underwear. Nothing like re-branding an entire product line once or twice to encourage confidence from your customers.

  • Share/Bookmark

Pay the content creators

November 5, 2009

News Corp’s MySpace Google deal at risk. So, how much is your Internet traffic worth?

Google agreed in 2006 to pay News Corp $900m for the exclusive right to provide search advertising to the once-thriving site over three years if MySpace could guarantee a minimum volume of traffic.

A guaranteed minimum amount of traffic sounds like a guaranteed minimum amount of ad revenue for Google. No wonder Google is doing so well if they can consistently cut sweetheart deals like that.

Here is what Rupert needs to do if he wants to bring MySpace back to a competitive if not dominant position: Let the people creating the content share in ad revenue. The way it is now, users make the content and MySpace and Google make a fortune from people looking at it.

Content is king on the Internet. Want to improve your traffic, improve your content. Since users create the content at MySpace, it becomes essential to attract users who can consistently generate quality pop content. Even if you have to pay to get them.

A simple setup based on traffic should do it. Here is a sample:

# hits/mo     Stipend
1000          $5
10000         $50
100000         $750

MySpace could also give users the option of selling lucrative local ad blocks in addition to using pluggable ads from whatever provider they want. As with all things, free people being fairly compensated for their work is the best way to build a strong and enduring enterprise. Fall away from free enterprise principles in exchange for the easier softer way and you always get the same things: decay and tyranny, illustrated appropriately here by the MySpace Google deal.

Google is the only game in town because they have made it easy for content aggregators to make a gjillion dollars. With a little innovation and work the ad monopoly can be wrenched from Google’s iron grasp. The we’ll see how dedicated to ‘do no evil’ they are.

  • Share/Bookmark

WordPress drill-down admin pages

October 8, 2009

I was gaining momentum on the Geocache Manager WordPress plugin last week after solving a couple of longstanding problems with unauthenticated Ajax calls and a few Javascript quirks with Internet Explorer when yet another pesky problem surfaces. When I say pesky it means that I have been fooling around with it for several days without zeroing in on a solution, thus making zero headway on the project. To make matters worse, the problem lies with a feature that has existed from the beginning and had worked until I upgraded from WordPress Mu 2.7 to 2.8.4a last week.

In the admin panel I have a custom top level menu with two entries: a page for the map management and a page for options. The following bit of code…

function addAdminMenu(){
	add_action('admin_menu', array(&$this, 'gcgc_plugin_menu'));
}

function gcgc_plugin_menu() {
	$gcgc_relpath  = str_replace('\\','/',dirname(__FILE__));
	$parent = $gcgc_relpath.'/gcgc-admin-form.php';
  	add_menu_page('Private Geocache Manager', 'Geocache', 1,
                                 $parent, array(&$this, 'gcgc_admin_page'));
  	add_submenu_page($parent, 'Geocache Options', 'Options', 1,
                                 'gcgc_options', array(&$this, 'gcgc_options_page'));
}

function gcgc_options_page(){
	$gcgc_relpath  = str_replace('\\','/',dirname(__FILE__));
	include($gcgc_relpath.'/gcgc-options-form.php');
}		

function gcgc_admin_page() {
	$gcgc_relpath  = str_replace('\\','/',dirname(__FILE__));
	include($gcgc_relpath.'/gcgc-admin-form.php');
}

…will give you a menu like so:
geocache-menu

That all works. The geocache admin form lists all the courses defined and for each course there is a link to load a new admin page for that course. This is basic functionality that has existed since the 1st week of development and suddenly the link no longer works. The link now generates a redirect to a sub-blog with a page not found. WTF! Where do you start at on that.

I admit I am a little weak on WordPress redirects and I am having a difficult time understanding why the redirect would go to a sub-blog in the WordPress Mu installation instead of the current blog. But aside from that I don’t understand why it started issuing a redirect in the first place when the code that generates the link hasn’t changed in like five months.

UPDATE: I fixed the redirect problem by deleting the sub-blogs. Now I am just getting a mangled url, like so:

http://gulfcoastgeocache.com/wp-admin/?c=1
So let's go over what I am thinking so far. I am of course using the wp-admin framework and have the faulty link set up similar to the pages accessed from the admin menu. The URL on the Geocache admin link is:
.../wp-admin/admin.php?page=private-geocache-manager/gcgc-admin-form.php
Then on that page there is an entry for each geocache course and each course has an anchor link to its own admin page, like so:
<a href=".../wp-admin/admin.php?
        page=private-geocache-manager/gcgc-admin-cache.php&id=20">
Geocache Name</a>

After checking the usual suspects -- verifying paths, searching for typos, confirming no function parameters had been inadvertently changed -- the only thing I can think of is that the drill-down admin page was working previously only due to a flaw in previous WordPress. I remember when putting it in that it seemed easy. Too easy.

Over the past few days I've done quite a bit of searching using every term anyone could probably think of having to do with registering an admin page that is not on a menu. Compared to other development platforms out there (Make no mistake, WordPress is a development platform) there just is not that much in-depth technical documentation outside of your standard stuff. There are many redundant articles on adding an admin menu, for example, but not much on adding a multi-page, drill-down admin system. You have to figure that out on your own. Either not many people are doing advanced development or they are very tight-lipped about their stuff.

This morning I finally came upon an article that at least verifies my thinking:

WordPress 2.8.1 contains changes to improve the security of plugins by ensuring that only correctly registered plugin pages can be accessed as well as only showing the link to the page to users who have the capability required in the add_x_page call.

The article makes no mention of dynamically created sub-pages accessed by means other than the WordPress menu structure but down in the comments I find a fellow traveler:

I already have add_action(’admin_menu’, ‘FUNCTION’); for my main settings page. However, there’s a plugin page which is not a menu link (but an inside plugin page which is referenced when the plugin settings are saved).

And the answer to my problem, if not the solution:

You cannot just link to pages that are not registered as this would make it easy to load up files which should not be loaded so you have two choices to fix your plugin.

He goes onto say that the workaround is to use a WordPress admin action hook or a call back to the main page to process the main form submissions.

I like to keep my pages small and manageable and this plugin will ultimately have half a dozen admin pages when all the features are added. As of now there are only three. But since I want many small files instead on one big file here is what I am going to do: I am going to create a main admin container page that includes the proper admin panel when loading based on the URL. Should have seen this problem coming and set up like this in the first place. Oh well. I'll report back when I get the changes complete.

Read the follow-up:

WordPress drill-down admin pages II

  • Share/Bookmark

Matrix Prof Services: Twitter spammer

October 3, 2009

I haven’t seen this technique before but I already don’t like it. In my email:

MATRIX Prof Services (MATRIXpServices) is now following your tweets on Twitter.

MATRIX Prof Services may not appear in your follower list. MATRIX Prof Services may have decided to stop following you, or the account may have been suspended for a Terms of Service violation.

I added the emphasis to show why MATRIX Prof Services sucks so bad. Of course they are not following me. It’s all automated: Follow someone, autogen the email alert, unfollow. These sumbitches learn a little something about the Internet and they think they know something. What really sucks is they will get thousands of followers.

If you go to their site let me give you a warning: Many jobs listed by these staffing services don’t exist. You heard me. Vapor ware. A staffing service sells people and to sell people you have to have a big supply of resumes. To get resumes one needs to advertise jobs. To get the most resumes with the fewest ads is why so many job listings on Monster and such have so many buzzwords in them, and why you never get a job from them. No real job is going to have 50 proficiency requirements.

If you work through one of these agencies as a contractor, you need to know how much the contract is paying and how much of a cut the agency is taking otherwise you can’t negotiate a fair deal that compensates commiserate with your skill and experience. Most will not tell you; it’s a take it or leave it deal and that’s how you can know you should walk away.

If they do tell, you might be very surprised to find out you’re making $35/hr on a contract that’s paying $65, or more. If you are a straight up 1099 contractor paying your own FICA and have no benefits that’s a whopping shitload of money you are just giving away for nothing in return. If you are struggling to raise a family, $1200/wk for the length of the contract is a lot of dough to trade for someone running a key-word search on a bunch of resumes and making a few phone calls. $30,000 on a 6 month contract. Just half that amount is the difference between making a decent living and just making it. One person should not have to earn a living for 2 people.

Make no mistake, if you take my attitude, you will find it hard to get work because the corporations who use the agencies, which is almost all of them, care more about saving a dollar than they care about the people who work for them and the agencies have a big, big stack of resumes, remember. Whether the next person is half as qualified doesn’t matter to the agency if next person will take $5/hr less, or even a dollar less for that matter. All they have to do is tell the customer the top candidate became unavailable, but they have these other candidates available, many of whom they may or may not have spoken with in months, if ever.

Given the current economic environment and high-profile business failures, corporations might want to take a closer look at how they staff their technical positions. Continue to let morons staff your critical business functions, such as IT, and your enterprise could fail. Just think, a company using Matrox Professional Services might get their next .NET engineer come from a Twitter spam.

I guess there are some reputable IT employment agencies out there but many, if not the majority, have nothing to offer except for taking a huge cut of what YOU earn. Read this earlier post to get a further idea of what I think of I.T. staffing services, and by extension the companies who rely so heavily upon them.

Related posts:

  • Share/Bookmark

WordPress custom templates and Javascript

September 27, 2009

Now that I have solved the recent unauthenticated Ajax problem in my Private Geocache Manager plugin, it’s time to move on to the second big problem that has plagued me for a while. I wasn’t even aware of it until I tried to demo the system to a user who worked at a place where Firefox isn’t available. I developed the plugin entirely in Firefox using only what I thought to be cross-platform utilities. The only thing that would even be close to non-standard code in the entire script library is jsfade, which itself is not complicated and which clearly takes into consideration the Internet Explorer quirks when performing the fade effect.

Nonetheless I still have a couple of Javascript issues outstanding which pretty much kill the whole deal since the Google Maps API is entirely a client side, Javascript environment and a big majority of folks still use Internet Explorer.

The first issue is the getElementById method somehow can’t figure out that the map canvas div element is in the DOM tree when it clearly is, throwing an ‘object expected’ error. I am accessing the elements from ajax calls so the entire page has loaded at the time of the calls so the div has obviously been declared by the time it is accessed. I think what I have to do here is check to see if the element is in the DOM tree before trying to access it. Firefox is smart enough to figure it out but I guess IE needs more explicit directions.

The second issue is that my ajax call is throwing the dreaded ‘unspecified error’. Debugging shows the error occurs at the mySACK.runAJAX() line. It is a simple ajax call using a standard implementation of the Simplified Ajax Code Kit, or SACK, and the code works perfectly in Firefox.

    function readMapData(arg) {
      mysack = new sack(ajaxurl); //wordpress admin url for ajax hook
      mysack.setVar('action', 'getVectorMarkers');
      mysack.execute = 0;
      mysack.method = 'POST';
      mysack.setVar('id', arg);
      mysack.onCompletion  = loadOverlay;
      mysack.onError = function() { alert('Ajax error ... '); };
      mysack.runAJAX();
      return true;
    }

The onCompletion callback never fires nor does the onError callback. Since I know there is not an error on the server side the next place I need to debug is inside the SACK ‘onCompletion’ code, which I’m not too crazy about. This is where you go, hmmm, maybe I should have just used jQuery for my Ajax in the first place.

So instead of editing a bunch of code that isn’t mine (the SACK wrapper class) I downloaded and installed the MS Script Editor and used it to find the exact bit of code throwing the error:

  if (this.method == "GET") {
     var totalurlstring = this.requestFile + "?" + this.URLString;
     this.xmlhttp.open(this.method, totalurlstring, true);
  }else{
      this.xmlhttp.open(this.method, this.requestFile, true);
  }

I’m using POST method so it’s the last line throwing the error. This.request is set to the parameter passed when creating the new sack object, in our case the wp_admin url, so the code would translate into

xmlhttp.open('POST', 'http://.../wp-admin/admin-ajax.php', true);

And that’s the benefit of writing these posts. Many times you figure out the problem by the time you finish describing it. When I went to copy the ajaxurl from the editor I noticed a typo in the URL which Firefox can obviously parse but IE can’t–I had the first pair of slashes escaped, eg http:///gulfcoastgeocache.com….

Grr….

So that still leaves me with the aggravating problem of getElementById not working properly. I’m debugging that now. Once I get that one sorted out I will be 90% complete with the plugin leaving only the initial setup script and the options page to finish.

  • Share/Bookmark

WordPress ajax and $wpdb

September 20, 2009

Anyone who does any tinkering with WordPress templates or plugins is likely familiar with the WordPress class for interfacing with the WordPress MySQL database, $wpdb. In the previous article here in The Garage, Viewer-facing Ajax in WordPress Plugin, I described a problem I was having with Ajax requests from the public side of a website from a user who is not logged in. Pesky little problem it has been.

In a nutshell, if the user is not logged in they do not have access to any of the built-in WordPress Ajax functionality so you have to write your own Ajax handler, which is not a problem until you need to access the database using $wpdb since the $wpdb class is not normally available to a page or script that is loaded outside the WordPress context. My research led me to a couple tricks around this limitation such as a template redirect or loading the core Worpdress files in the external Ajax handling script, eg,

include_once(‘wp-config.php’);
include_once(‘wp-load.php’);
include_once(‘wp-includes/wp-db.php’);

In theory, after loading those core files I can now make calls to the MySQL tables using the $wpdb class just as if I was logged in to the admin panel. In the back of my mind I am thinking that maintaining extra scripts for anonymous db access is a lot of work and loading the core WordPress files is a lot of overhead just to run a couple of simple queries. Really not optimal.

So I was still looking for a better solution even as I was working on making the above work when I stumbled upon the better solution. Somewhere around March WordPress released an update (v2.8 I believe) which has support for Ajax actions initiated by a user who is not logged in. Along with the ‘wp_ajax’ hook there is now also a ‘wp_ajax_nopriv’ hook that provides the same functionality but for users that are not logged in. So when your main plugin code is loading all you need to do is check to see if the user is logged in or not and then initialize the appropriate action hook.

//load nopriv ajax handlers for front-end ajax users not logged in
if ( is_user_logged_in() ) {
    add_action('wp_ajax_getVectorMarkers', 'getVectorXML');
    add_action('wp_ajax_getVectorMarkersText', 'getVectorXMLText');
} else {
    add_action('wp_ajax_nopriv_getVectorMarkers', 'getVectorXML');
    add_action('wp_ajax_nopriv_getVectorMarkersText', 'getVectorXMLText');
};

Using the ‘wp_ajax_nopriv’ hook allowed me get rid of a lot of code that was written specifically for displaying custom maps to users who are not logged in. It makes me very happy!

Evidently not too many people know about ‘nopriv’ as the info was difficult for me to Google down. (Click here to see the thread where I found the information.) The alternative methods are also discussed in the thread if you are not in the position to upgrade to the latest WordPress version with the ‘nopriv’ option. (Here is the WordPress Trac nopriv change documentation.)

I can verify that wp_ajax_nopriv also works with WordPress Mu version 2.8.2.

  • Share/Bookmark

Viewer-facing ajax in WordPress plugin

September 3, 2009

It’s rare that I can’t solve a programming problem no matter how complex and thus I rarely leave a question on a support forum. I can’t even remember the last time; probably over a decade ago. Here is one I left recently at the supposedly fantastic WordPress.org plugin support forum.

I am writing a plugin to manage map resources and I having a couple a issues that I have been unable to figure out. I have a test site set up here –> http://gulfcoastgeocache.com/

I am using the Google Map API and lots of ajax both admin and viewer-facing to display custom maps. On the viewer facing side I am using SACK to call a small php script that in turn calls the actual function inside the plugin class.

$gcgc_path  = str_replace('\\','/',dirname(__FILE__));
require_once($gcgc_path.'/gcgcclass.php');
$gcgc_Manager->getVectorXML($_POST[id]);

The class function:

function getVectorXML(){
    header("Content-type: text/xml");
    $parms = array('id' => $_POST['id'],
                   'id_type' => 'vector_id'
                    );                         

    $cachets = $this->getVectorMapData($parms);
    $xhtml = "";
    $xhtml .= "";
    if($cachets){
      $xhtml .= "";
    	foreach ($cachets as $c){
    		$xhtml .= "";
    		}
    }
    $xhtml .= "";
    die($xhtml);
  }

Works fine if the user is logged in but is failing if user is not logged in. More accurately, the ajax round trip succeeds but my xml response is -1 if user is not logged in. No data is coming back.

The codex example for ajax does not illustrate a cookie being sent on the viewer-facing side but this is where I am thinking the problem lies, but really I am at a loss for an idea right now.

This is my first WP plugin so I may be having a noob moment. I’ve been revisiting this issue repeatedly over the past couple of months and, I hate to admit, I can’t figure it out. Any help would be greatly appreciated.

I posted that five days ago and not a peep. I even bumped it a couple of days ago. Still nothing. I’m not sure if the question is too stupid to warrant a response or if maybe it is too hard. I think the only way to get a quick response, or any response at all, for that matter, is to leave your query in broken English and to ask a question that indicates you don’t have a clue about what you are doing.

I’m not impressed. If anyone has a clue about the ajax, please let me know.

  • Share/Bookmark

My first Twitterlanche

August 27, 2009

http://ow.ly/lphd

Anyone who reads Instapundit knows what an Instalanche is. Certainly if you have ever been on the receiving end of one you know. An Instalanche is when Glenn links to your site and you get an outrageous number of hits over a couple of days. Were talking tens of thousands. Many of the lower-tier websites go down for bandwidth overages. (A blog I used to write, enormous incongruities, actually received a link from the Instapundit but it was only worth a couple a hundred hits. My instalanche that wasn’t. I sold that blog last year to someone that wanted to take it down. In hindsight, now that I’m trying to rebuild some page rank on several new websites, I think I sold EI too cheap because the site had a pagerank of 4.)

So my Twitterlanche came from, you guessed it, Twitter. All my posts from this blog and my outdoor blog are automatically tweeted. A post I made on Gulf Coast Texas Outdoor Blog got a retweet and in less than half a day I’ve had dozens of incoming Tweeters. I know dozens doesn’t sound like much, but we are talking relative here and it’s not even been a full day yet. The outdoor blog is rather new and I haven’t spent much time on it in several months. I don’t know if the Twitter referral has staying power, like Google Page Rank, but the Twitter traffic is a huge spike. I’ll update if the Twitter traffic continues in noticeable quantities.

The moral of the story: You don’t have to be a user of Twitter, or even understand how it works or why people would use it, but for maximum exposure to a potential mass audience you absolutely must include it in your website marketing strategy. It’s a gold mine once you figure out how to take advantage of it.

  • Share/Bookmark