Building the Science Lab

There have been a significant number of bugs with the Alternative PHP Cache (APC) over the past year, causing me to pass over PHP updates for fear of segfaults, however that has finally come to an end. APC is still just as buggy, but PHP 5.5 will be bringing Zend OPCache to the core, so I’ve decided to transition early and configure the PECL package. As Zend OPCache does not come with a User Cache, I decided to set up Memcache on the Ambrose University College Drupal website, and was seeing benchmarks of around 65 requests per second (up from 30-35 req/sec with APC only).

As APCu (userland caching) continues to branch from the crusty old APC branch, and the old APC Opcaching code is remove, I’ll be running a few tests to see whether APCu can bring more to the table than Memcache can, as I have no need for the distributed functionality that Memcache provides.

Spring Cleaning

I’ve decided to wipe out a few years worth of hastily written blog posts and start fresh. Fitting, given that I’m also switching to SpenserJ.com as my domain name, after waiting for it to expire for the better part of two years. My vision is for this site to be a landing zone for the various ideas and tweaks that come to me every week.

Upgrading a Moodle 1.9 Block to 2.0

I recently went through the process of upgrading a Moodle 1.9 block for Panopto, to support Moodle 2.0, which came out in January. As Moodle 2.0 is a huge rewrite, and is still fairly fresh, there is very little documentation on what changes need to be made, or even what functions are deprecated and need replacing. In order to upgrade the plugin at Ambrose University College, I read through multiple core classes, and compared functions in 1.9 to 2.0. In order to make things easier for myself in the future, and for anyone else upgrading a block, I have documented my changes.

Read on →

Fixing the Blackbaud NetCommunity Login Form

Blackbaud NetCommunity 6.15 has a bug in the login form, where tabbing onto the “Remember Me” field and pressing enter (normal functionality to submit a form) will take you back to the login form, with your username filled in, but no password or error. This is due to the fact that javascript is being (poorly) added directly to the HTML tags, instead of writing a simple, unobtrusive javascript function, that targets all fields on the form.

To remedy this, add a JS file to any layout that may contain a login field, and add this code:

1
2
3
4
5
6
7
8
9
10
$(function() {
  if (($loginForm = $('.LoginFormTable')).length > 0) {
    $('input[type!=submit]', $loginForm).keypress(function(e) {
      if ((e.which && e.which == 13) || (e.keyCode && event.ke == 13)) {
        $('input[type=submit]', $loginForm).click();
        return false;
      } else { return true; }
    });
  }
});

Adding iFrames to Blackbaud NetCommunity <= 6.15.70

Version 6.15 of Blackbaud NetCommunity consisted of many large changes to how BBNC works, one of which was the editor. In this update, Blackbaud moved from BBCuteEditor to TinyMCE (a great decision IMO, as TinyMCE is one of the most popular WYSIWYG editors). Sadly, patch 70 and below do not support iFrames, even if you have the iFrame set as a “Safe HTML Tag” in the settings. Blackbaud is working on a patch for this (patch 71 to be exact), however they do not have an ETA for it yet.

Read on →

Creating a Blackbaud NetCommunity Custom Part

I’ve recently been given the task of creating some custom plugins for NetCommunity, so we can do things like unify the design of our Faculty Biography pages at Ambrose. I have prior experience with C#, so I figured it would be a fairly simple process, once I figured out how their API works, however there is minimal documentation, and all of the tutorials online are either outdated or incomplete.

As such, I am going to write up a concise walkthrough for creating a NetCommunity plugin (for 6.15) using C#, from scratch, up until you have a functional part.

Read on →

Locking Down Blackbaud NetCommunity Content Authoring

At Ambrose University College, we run Blackbaud NetCommunity as our CMS, and I’ve encountered a few issues with permissions for content authors, and how the editor itself works. Over the past few weeks, in an attempt to improve the experience of both our visitors, and our content authors, I have added a few lines to our website’s javascript file (hosted in a document part).

One issue we have run into is that Internet Explorer does not play nice with our CSS3 box shadows (using CSS3Pie), and will save the progressive enhancements that are loaded specifically for IE, as part of the page and/or part, for all browsers. This results in pages that have been edited using IE, showing two box shadows in CSS3 compliant browsers, and only one in IE. Since IE is to blame (and has issues with other parts of the editor), I decided to kill off support for using IE when in administration mode.

Read on →

CSS3 and Pictos

Over the past six months, I’ve been charged with redeveloping the Ambrose University College website, using BlackBaud NetCommunity. I worked together with the creative department (mainly focused on print media) for a new design (old one is here offline), and with many other departments for training in content management and functionality. I’ve learned quite a bit through the process, and grown immensely in my skills (primarily CSS and C#.Net). This post, however, is not so much about the experience I went through, as it is with the advancements I’ve made when it comes to CSS3 replacing images, and support for it in all major browsers.

Read on →

Building Your First Adium Plugin

This guide is extremely outdated. It was originally authored on August 13th, 2010, and has not been updated recently.

As a warning, Adium Plugins use internal Adium APIs, which sometimes change. If you build a plugin, it may break with future versions of Adium, so be prepared for some upkeep down the road, unless you want to be rude and build a great program, and then abandon it and all of its users. This guide assumes that you understand the basics of Objective-C, XCode, and programming in general. If you don’t meet one of these prerequisites, please go research the basics and then come back.

Read on →