Posts tagged `code`

This entry pertains to work done in the context of my employment. Please remember, however, that any opinions expressed on this blog do not necessarily reflect those of my employer or co-workers.

The Problem

Admissions needed help. They had been moved from their former product, Exeter, to Banner’s native admissions module. But Banner’s interface stinks, and there was no decent way for counselors to do, well, anything. They relied on daily reports run out of an Excel pivot table by the executive directory of admissions, and therefore they lived on paper. The counselors needed a better way to get their work done and stay on top (figuratively speaking) of their recruits.

Enter my department. It fell to us, after some discussion, to build a tool that would be initial for undergraduate counselors, to let them slice and dice their data as needed. After a pilot run, it will gradually be expanded to include graduate and transfer admissions, as well as reporting tools for directors and and other muckity-mucks.

Read more…

§2354 · September 11, 2008 · (No comments) · Tags: , , , , , , ,

This plugin’s functionality is now largely integrated into WordPress Core. It is neither maintained nor supported.

My Post Classes plugin from yesterday has morphed into the much fuller Semantic Classes plugin. For a full description/documentation, see its project page.

In brief, the plugin is a combination of modified code from Scott Wallick’s Sandbox and some coding of my own. It seeks to bring Sandbox’s wonderful semantic class generation into plugin form, where it can be easily included in other themes by means of a template tag.

As of v0.2, it provides the following functions:

Posts
Return a post’s categories with a modifiable prefix
Return a post’s tags with a modifiable prefix
Return a post’s author with a modifiable prefix
Return a post’s date elements (year, month, day, hour) with modifiable prefixes
Body
Return a body’s type(s); e.g. ‘single’ or ‘archive’ or ‘home’
Return a body’s date elements with modifiable prefixes; associated dates for entries with date data (see documentation) and current date for searches, home, etc.
Comments
Return a comment’s metadata; e.g. differentiate site users, post author
Return a comment’s date elements with modifiable prefixes
Return an ‘alt’ class for alternating comments

If you’re interested, give it a whirl. I’m no experienced plugin writer, but I’m pretty pleased with this.

§2008 · March 12, 2008 · (No comments) · Tags: , , ,

This plugin has been superseded by the much-improved Semantic Classes plugin

I’ve written a small WordPress plugin that provides some new template tags that return a post’s tags, categories, author, and date; useful for CSS trickery.

You can view its page here.

This initial release provides the following items:

<?php generate_tag_class(); ?>
This function returns a space-delineated list of the post’s tags, prefixed with ‘tag-’
e.g. tag-politics tag-election-2008
<?php generate_category_class(); ?>
This function returns a space-delinated list of the post’s categories, prefixed with ‘category-’
e.g. category-personal category-random-thoughts
<?php generate_author_class(); ?>
This function returns the author name of a post, prefixed with ‘author-’
e.g. author-Heliologue
<?php generate_date_class(); ?>
This function returns a space-delineated list of the post’s date, prefixed with ‘y’ (year), ‘m’ (month), and ‘d’ (day).
e.g. y2008 m03 d11
§2004 · March 11, 2008 · 4 comments · Tags: , , , , ,

Two months ago, I wrote about using the jQuery library to extract citation information from blockquotes.

Just for grins, I’ve worked that snippet of code up into a genuine jQuery plugin. Go ahead and visit the page for more information. Or, download it directly.

MIT license.

§1922 · November 5, 2007 · 2 comments · Tags: , , ,

5 Nov. 2007 • I’ve formatted this code as a plugin, too. Go to the project page.

Blockquotes, by definition, can and should in most cases have a title attribute and, if possible, a cite attribute. The former is the actually name of the quote’s source. The latter is the URI to the quotes location, if it was retrieved online.

For instance:

<blockquote cite="http://heliologue.com" title="A Modest Construct">
 
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Integer arcu ligula, tempus vel, dignissim at, molestie ut, leo. Etiam luctus, ipsum sit amet tincidunt malesuada, magna nisi feugiat eros, in tempus libero justo sed dui. Aliquam bibendum pulvinar turpis. Ut iaculis gravida nibh. Quisque elementum ligula vel nibh. Sed leo augue, tempor sed, nonummy in, interdum at, quam. Ut cursus tincidunt felis. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Integer pharetra vulputate nunc. Cras nec felis ornare augue tempor fermentum. Nullam rutrum malesuada nunc. Aliquam vel purus. Aliquam faucibus malesuada orci. Nulla sit amet nulla sit amet tortor fermentum euismod.
 
</blockquote>

This is all well and good for search engines, but it doesn’t do much for human readers (who are arguably more important, though it depends on who you ask). A human might want to see something like this:

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Integer arcu ligula, tempus vel, dignissim at, molestie ut, leo. Etiam luctus, ipsum sit amet tincidunt malesuada, magna nisi feugiat eros, in tempus libero justo sed dui. Aliquam bibendum pulvinar turpis. Ut iaculis gravida nibh. Quisque elementum ligula vel nibh. Sed leo augue, tempor sed, nonummy in, interdum at, quam. Ut cursus tincidunt felis. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Integer pharetra vulputate nunc. Cras nec felis ornare augue tempor fermentum. Nullam rutrum malesuada nunc. Aliquam vel purus. Aliquam faucibus malesuada orci. Nulla sit amet nulla sit amet tortor fermentum euismod.

A Modest Construct

Which I achieved by appending

<cite class="source">
     <a href="http://heliologue.com" title="A Modest Construct">A Modest Construct</a>
</cite>

to the blockquote.

But nobody wants to hard-code a citation into every blockquote, especially when it’s technically correct to attach the information to the semantic element in question (the blockquote, for those of you not following along). So, how to be structurally correct when using blockquotes, while still allowing human readers the benefit of such data?

Read more…

§1906 · September 18, 2007 · 1 comment · Tags: , , , , , ,