50th Code

Monday, November 8th, 2010

Last month, I was asked to speak at two conferences (HighEdWeb, NCMPR). During both, I showed slides of our neat 50th website that lets people add a story to the map.

Since then, I have received several requests for more information and code. I already posted some of the essential code here, but people want more … so here goes:

The PCC 50th template files

You want code? You got code!

What is all this?

That zip should contain the essential files to get you started. I tried to strip out the non-relevant WP files like archive.php, search.php and 404.php. However, I did leave the header, footer and image files.

In fact, this is probably way more then you need. So, lets talk about what is most important:

index.php

Queries the newest stories and displays that cool map. Also displays the input form for adding new stories.

submit-map.php

This page inserts new maps into the DB. It is accessed by the form on index.php.

single-pcc_map.php

Displays a single map.

_source/scripts/script.js

Main javascript file for the site. Requires jQuery. Take a look at the setupAdd() function to see how the geocoding works.

_source/includes/custom-post-admin.php

Functions to help with the admin side of the custom map posts. In version 1.0, the custom posts were defined here. In 1.1 we switched to using the Custom Post Type UI plugin. However, there are still meta and menu items that need to be controlled here.

Now, be warned

I offer this code free, but with no warranty.

The site was built very quickly (less then a week) and the code has yet to be optimized. We are continuing to make improvements and fix bugs. If you find something wacky, or have questions – just let me know.

One Response to “50th Code”


  1. gabriel nagmay (dot com) | Archive » ALL THE THINGS! Says:

    […] Custom 50th installation […]

Leave a Reply

You know you want to...