WPMu Development for Education

Making WPMU work in education, one hack at a time

Archive for the 'PHP' Category

A follow-up on use of WordPress Surveys plugin

Posted by Randy on 3rd March 2010

I wrote early last month on an employee workplace feedback tool we launched using our WordPress MU installation and the Survey plug-in.  Overall the plugin worked well.  Here is a screen shot of one of our forms:

The main issue was a problem in the table that holds the responses.  The field that stores the user answer is limited to 255 characters, but no limit is enforced on the form.  And when users are invited to submit free form comments they quickly exceed the 255 limit.  The result is that a number of the responses were cut off in the database, and some of the user response was lost.  Not the nicest thing to realize after the fact, but luckily the fix is easy.

To make the alteration change open the plugin’s surveys.php  file and find the create table section.  Right around line 101 you’ll see the code that creates the surveys_result_answer table.  Alter the ‘user_answer’ column to use the blob data type — you’ll see it is set to a text(255) type, which is too short for many users.

CREATE TABLE {$wpdb->prefix}surveys_result_answer ((
`ID` int(11) unsigned NOT NULL auto_increment,
`result_ID` int(11) unsigned NOT NULL,
`answer_ID` int(11) unsigned NOT NULL,
`question_ID` int(11) unsigned NOT NULL,
`user_answer` blob NOT NULL,
PRIMARY KEY  (`ID`),
KEY `question_ID` (`question_ID`),
KEY `answer_ID` (`answer_ID`),
KEY `result_ID` (`result_ID`)
) ;

This small change fixes that problem.  The only other note is we used this tool on a members-only site.  I’d want to give it a thorough security check before using this on a public site.  I did note the user-text was escaped, so it looks like some protections are in place.  But these days you can never be too security conscious.

Surveys < Plugins < WordPress < Tools < Bin-Co

Surveys WordPress plugin lets you add surveys to your blog. You can let the visitors take surveys and see the result from the admin side. The user who take the survey can enter their details at the end of the survey – or leave it as an anonymous result.

Related Posts

Posted in Data, PHP, Plug-in, Technology, WordPress, blog, content, plugin, plugins | Comments Off

Layoffs are bad for business

Posted by Randy on 17th February 2010

Turns out layoff are bad for workers, the company and the economy.   Consider this:  SouthWest Airlines has never had an involuntary layoff in their 40 year history — and they are now the largest domestic US airline.   Layoffs kill worker morale, erode loyalty, often lead to the best workers leaving with a loss of corporate memory.   These negative effects linger long after the layoff event, even into periods of economic recovery.  Conventional wisdom that they save the company money are also normally misplaced once all expenses, from payouts to departing workers to losses in productivity, are calculated.  All this is not to say that companies don’t need to restructure periodically — it is just that management should be looking far enough ahead and watching current trends closely enough to know when conditions change.   Reactive business strategy– like layoffs or across the board percentage cuts –  is always too little, too late.  Bad times reveals weakness.

Closing minds: How layoffs can be bad for business :: Spring 2008 :: Washington State Magazine

Workers whose jobs are in danger are less healthy and happy. That’s been common knowledge for years, says Probst. Countless studies have looked at job insecurity and its negative effects on employee health and morale. But businesses focused on the bottom line don’t really care about those results, she says.

The Case Against Layoffs: They Often Backfire – Newsweek.com

Our overreliance on downsizing is killing workers, the economy—and even the bottom line…Today the one airline that didn’t cut staff, Southwest, still has never
had an involuntary layoff in its almost 40-year history. It’s now the
largest domestic U.S. airline and has a market capitalization bigger
than all its domestic competitors combined.

Related Posts

Posted in Lifestyle, PHP, Security | Comments Off

Extending Google Wave with Gravity

Posted by Randy on 8th February 2010

Confused by what Google Wave might be useful for?  Here is a nicely demonstrated scenario going through a business process modeling project.    I like the example of new members re-playing the Wave to catch up on the team’s progress — very efficient.  It seems to me that a workplace effort to encourage this type of Google Wave use would need some type of kick-off/introduction workshop.  Get a big group together, have some scripted collaborative tasks, and have them use wave to accomplish those tasks.  You’d teach the tool and also work on the general topic of effective collaboration/team work.

Using Gravity to collaborate on processes

Google Wave has been around for a few months now and though the hype is fading away we are seeing more and more practical use-cases in the enterprise. One excellent example is SAP’s Business Process Modelling tool gone collaborative; Gravity. We have been fortunate to work with a prototype version of Gravity with access to the minds behind the concept. Gravity is a Business Process Modeling tool which can be accessed as a gadget in the Google Wave client. This integration in Google Wave allows for collaboration over time and / or near real time, on business processes. This model is exportable to Netweaver BPM via BPMN 2.0 XML, thus making it a fully integrable modelling tool for use in an SAP landscape. Still puzzled? check this video with an explanatory example:

Related Posts

Posted in Learn, PHP, PLE, access, blog, video | Comments Off

WP – collecting user feedback

Posted by Randy on 8th February 2010

Just yesterday I had a request to create a tool to collect some follow-up responses from our staff regarding a recent university-wide workplace survey.   So we need something simple, easy to maintain, quick to launch AND that collects the responses in a format that permits easy and flexible reporting.  As I recently demonstrated our WordPress MU installation makes it easy to launch a project-specific site which includes user-login tied to the school’s central user authentication system.  So simple-easy-quick — doing this through WordPress gets me at least half-way there.  And I remembered a recent suggestion in my Twitter feed to look at the WordPress Surveys plugin.

The plugin is pretty simple and written clearly enough to make adjustments easy.  And most importantly it utilizes a table structure that is normalized, and well structured, which will work well for the eventual reporting needs.  I did do some hacking around in the code to change some of the default behavior — mostly just commenting out features we didn’t want.  These would lend themselves well to some additional options in the plug-in settings — maybe I’ll get around to adding those in at some point.  When it comes to the reports I’ll also go into the background, using PHPMyAdmin to grab the tables directly — again it wouldn’t take much to add more flexibility into the WordPress admin panel options for the plug-in, but I’m still running in the quick/simple mode here.  And with the help of the Plaintxt theme it is up and running.

The plugin could be quite useful for all sorts of user feedback on a site, not just surveys.  The nicely structured data collected in plugin-specific tables would make reporting really flexible.

WordPress › Surveys « WordPress Plugins

The Surveys WordPress plugin lets you add surveys to you blog. You can let the vistors take surveys and see the result from the admin side.

Related Posts

Posted in Data, PHP, PLE, Plug-in, Technology, Twitter, WordPress, blog, database, hacking, plugin, plugins, project | Comments Off

HipHop from FaceBook – potential game changer for PHP

Posted by Randy on 3rd February 2010

A new open source project from FaceBook, HipHop for PHP, could bring big improvements for PHP developers.  From the description on Facebook’s Developers site HipHop for PHP will translate PHP code into C++, reducing cpu usage by as much at 50%.  And for a big site like FaceBook, written in PHP, this is a pretty significant improvement.  The ease of writing in PHP, with the performance benefits of C++ — sounds like a great combination.  There is nothing except an announcement so far, but expect more very soon.

PHP Magazine, PHP Training, PHP Conferences, PHP Books, PHP Apparel — php|architect

“We think that HipHop has the potential to bring significant changes to the way we use and interact with PHP; … said Marco Tabini, CEO of Blue Parabola.

Facebook Developers | HipHop for PHP: Move Fast

One of the key values at Facebook is to move fast. For the past six years, we have been able to accomplish a lot thanks to rapid pace of development that PHP offers. As a programming language, PHP is simple. Simple to learn, simple to write, simple to read, and simple to debug. We are able to get new engineers ramped up at Facebook a lot faster with PHP than with other languages, which allows us to innovate faster.

Related Posts

Posted in Open Source, PHP, PLE, Technology, blog, books, conference, facebook, project, training | Comments Off

Google tablet rumours?

Posted by Randy on 3rd February 2010

As much as I love Apple and freely admit they make great products, I also have concerns with Apple’s closed-system approach. While there are some valid points to Apple’s ‘let us do the driving’ philosophy, I think users are better served when technology platforms are open.  So how cool would a Google tablet be?  After all, if they want to beat Windows at its own game, what better strategy than ripping off an Apple idea?

Google’s Tablet versus Apple’s iPad: Open versus Closed?

More importantly, though, Google’s tablet will have one major advantage over Apple’s iPad: it will have an open application platform.

Related Posts

Posted in Design, Microsoft, PHP, PLE, Tag, Web, application | Comments Off

Teambox — Yammer or Google Wave alternative?

Posted by Randy on 21st January 2010

Yammer use took off in our workplace late last year, but since everyone has returned from the Christmas break interest seems to have dropped off somewhat.   Maybe something like TeamBox, with its richer toolset, might be more attractive.  Teambox organizes communication around projects.  Users are members of projects, and a project has communication divided into conversations, task lists, pages and files.  The concept seems to have similarities with Google Wave, but at first glance the user interface seems a lot more familiar.  And TeamBox is open source allowing installation on your own server — so you can own the data.  And can customize the app (built with Ruby on Rails).  Now I just need a project to test it with…

Community: Teambox is a public open-source project.
Installing:If you want to run your own server with Teambox, some knowledge of Ruby on Rails and UNIX is very recommended.

Blog Archive » The quiet majority in collaborative communities

Message traffic on our company Yammer network is following the classic 80-20 principle, although in our case it is closer to 85-15.

Twitter for Teams: Teambox Launches Web-Based Collaboration Tool

The Twitter-like UX is familiar and fast, and the interface seems simultaneously lightweight and robust. For project management and team collaboration – including distributed teams – we can see this application going over very well.

Related Posts

Posted in Data, Open Source, PHP, PLE, Ruby, Technology, Twitter, Web, Yammer, application, blog, management, project, project management, rails | Comments Off

MTA comes to its senses and releases schedule data to developers

Posted by Randy on 19th January 2010

Some public agencies understand that their data is our data — some public, or quasi-public agencies has taken a different tack.  The New York Mass Transit Authority at one point maintained that transit schedules were copyrighted — nice to see they’ve come to a more reasonable attitude.  Whatever their misgivings, this will make their service, and customer relations/communication better.

MTA Will Allow App Developers To Access Transit Data – Gothamist

It’s not all doom-and-gloom for the Metropolitan Transportation Authority. The MTA has released its route and schedule information, potentially allowing developers to create apps with accurate subway, commuter train, and bus timetables without facing as much of a risk of legal action from the agency.

Related Posts

Posted in Data, Design, PHP, access | Comments Off

Google Wave? Why?

Posted by Randy on 21st December 2009

So after all the hype I finally got a Google Wave account and well…. well…what was all the hype really about?  And I guess I’m not alone in being underwhelmed.  Now yes, it is really beta (not just a perpetual beta that really isn’t) and they are trying to do something completely different.  Plus, as with any social networking/collaboration tool it isn’t much fun when there aren’t many people using it.  I do fault them for producing something that doesn’t run in Internet Explorer, and didn’t even seem to run too well in Firefox.  Browser dependent behavior is a cop-out at best.   Maybe it, or the protocol will become useful for something really good over time, or the user community will embrace it in numbers to reach some tipping point.  But until then I’m much more interested in the possibilities of other tools — like BuddyPress.

Top 10 Failures of 2009

Google Wave Sucked:  This is one case where the hype was as noisy as the app – and both were deafening. We have to hand it to Google’s publicity team; we don’t know one geek who wasn’t positively salivating for a Wave invite.

Related Posts

Posted in Firefox, Learn, PHP, PLE, Web, social networking | Comments Off

WordPress vs. Twitter?

Posted by Randy on 2nd December 2009

In the theory of limited time and resources, if people do more of one thing then they do less of something else.  So if Twitter is growing, what is losing out?  Are Twitter, WordPress, Facebook, LinkedIn, Yammer, etc. competitors, or do they complement each other?  I have accounts on all these services, and for me they complement each other nicely:

  • Twitter – perfect for sharing random thoughts with a wide group of friends and collegues — auto-posts to my Facebook and LinkedIN status and with the #yam hashtag to my Yammer account. Use TweetDesk for both Twitter and Facebook.
  • WordPress — good for longer, more thoughtful stuff, which I’ll want to refer back to.  Post update notices automatically go to Twitter (which then re-distributes to the other channels as listed above.)
  • Facebook — for communication/discussion with family and friends — rarely update status directly, letting Twitter feed do the work for me.
  • LinkedIn — not as active a channel as I’d like, but still a good source for keeping up with work-related/professional colleagues — the group conversations, especially the WordPress group are great – get updates via email.
  • Yammer — only been using it for a month for internal Yale networking, but proving to be quite useful.  Normally post directly, but sometimes feed posts from Twitter.

You’ll note a big theme here is the cross-posting between the channels.  So while it might seem like a lot to monitor at first,  TweetDesk and email keep me notified and connected pretty easily.

And what suffers?  In my household the television is rarely on.  And in recent months my email volume has dropped significantly — at least for real communication (not counting spam.)  And I don’t play phone tag very much.

Mullenweg Speaks Out on Twitter, WordPress and the Question of Competition

After recent comScore data showed Twitter stats leveling off as WordPress traffic continued to grow, some bloggers framed the results as an either/or proposition; if one platforms wins, the other loses.  WordPress founder Matt Mullenweg has weighed in on the subject, stating that the interaction between microblogging and what he’s calling “megablogging” is hardly a zero-sum game. “It’s not really a ‘versus,’ it’s an ‘and’,” he wrote.

Related Posts

Posted in Data, Matt Mullenweg, PHP, Technology, Twitter, Web, WordPress, WordPress founder, blog, blogging, founder | Comments Off