fix urlencode problem on photo.php pages

April 18th, 2018
I recently added urlencode() to the invocation of $_GET variables in each of 11 photos.php files. That solved the problem of vulnerability to code-injection attack, but as one of the variables was a pathname, the "/" characters were encoded and thus when that argument was passed on, the encoded path of course failed. I added a function to unencode just the slash characters and passed the urlencoded path to it, thus returning a path in which all potentially dangerous characters other than the "/" are still escaped. That should make the page useable and secure.

Batch process images

January 11th, 2018

Franklin site has four standard sizes for the image of each object in the archive: original as provided, 1024px wide, 500px wide, 100x100px thumbnail. In the archive/imageImages folder of the site, there are subfolders original, thumbnail, 1024 and 500

For the batch of new images from Parks Canada, I created a new folder for each size containing the original images. I then
cd into the 500 folder
sips --resampleWidth 500 *.jpg [image is 500px wide by Ypx high to maintain aspect ratio of original]
cd into the 1024 folder
sips --resampleWidth 1024 *.jpg [image is 1024px wide by Ypx high to maintain aspect ratio of original]
cd into the thumbnail folder
sips --resampleHeightWidth 100 100 *.jpg [image is 100px wide by 100px high, aspect ratio will be sacrificed - image distorted]

Then I copied those images into the appropriate subfolder in the archive/imageImages folder

moved learning materials pages

December 1st, 2017

The two learning materials pages are in the root of the franklin site, i.e. not in any section or subsection and thus outside the navigational structure of the site (kind of orphaned). Also means these two html pages have to be maintained manually, rather than by maintaining the xml data file and then transforming to create the html files.
I've created an xml file in the Home section for french (material pedagogique) and for english (learning materials) and modified the transformation and schema files to generate html pages properly in the home section.
The two files in the root folder, I've added a meta redirect to each to redirect to the appropriate page in the home section of the site.

de-orphaning links pages on Franklin site

November 30th, 2017
These two files: http://www.canadianmysteries.ca/sites/franklin/links_fr.htm http://www.canadianmysteries.ca/sites/franklin/links_en.htm Are manually written and maintained files outside the nav scheme of the rest of the Franklin site, and thus can't be generated in the normal way (i.e. an xml file with appropriate section and subsection metadata. I could create an XML data file for each of those two pages in the Home section, so they would behave just like all the others. Then those two orphan pages I could replace with redirect pages which would take you to the correct page in the Home section (so existing links to those orphan pages don't break). e.g. http://www.canadianmysteries.ca/sites/franklin/home/homeNews_en.htm and http://www.canadianmysteries.ca/sites/franklin/home/homeNews_fr.htm

Request for teacher locations

March 30th, 2017

JL called asking for a list of the Canadian cities from which teachers have registered. I pulled the XML version of the tg_users table from the server and ran this:

let $tables := for $t in //table[column[@name='mailingCountry'][normalize-space(upper-case(.)) = 'CANADA']] return $t
let $addresses := for $t in $tables return normalize-space(upper-case(concat($t/column[@name='mailingCity'], ', ', $t/column[@name='mailingState'])))
let $uniqueAddresses := distinct-values($addresses)
let $orderedAddresses := for $u in $uniqueAddresses order by $u return $u
return string-join($orderedAddresses, '
')

to get a quick-and-dirty list of city, province. I had to search-and-replace some ugly character encoding issues -- the db thinks it has UTF-8 but the data coming in has obviously been 8859-1. Sent the results to JL.

fix broken links in mysteryquest

November 7th, 2016
in MQ/42/support/mq42_0002en.pdf, there were a number of broken links because there were typos in the links. Tried to edit in text editor, but that borked file. Then opened file in Adobe Acrobat Pro, and it wouldn't let me edit the existing links, but would let me create a new link object on top of each existing on, which is what I did. Not sure if that stupidity is due to PDF format or my specific combination of editor version and data file version.

change backend database pointers

May 18th, 2016

changed 22 instances of "csmgenr2.uvic.ca" to "gen1p.mysql.uvic.ca" as the old mysql server is being decommissioned.
Some old instances Seems to be working. If there are problems, they will occur trying to create or authenticate a teacher id and password.

landing pages for parks canada

April 28th, 2016
Based on meeting a week or so ago with JL, MF and parks canada people : I created a links page in the root of the Franklin site containing brief blurb and link to 1) home page for site, 2) mysteryquests listing for site, 3) teachers' guides for site. Also created a new page in the mysteryquests/sites folder containing only the five quests for Franklin, derived from the indexpage which contains quests for all the sites. I sent URLs to MF and JL for approval. Once I have that I'll deploy fully and let parks canada know the URLs.

Franklin Google search styled

September 30th, 2015

I styled the Google Search bar and results page for the for the Franklin site.

It can be seen here:
http://www.canadianmysteries.ca:8080/demo/current/home/googleCSE.htm

Styling was done using a combination of the Google provided console for "look and feel" and many forced styling changes with "!important" rule to override Google's property values. This was done through the sites own style sheet: FranklinLayout.css.

While waiting for the site's owners to approve or not approve the engine we have to figure out a method of providing a French language results and search bar. This involves making a second search engine with French as its default language and then serving it only to pages with "_fr" in their file names.

Remove wrongly captioned image from archive

September 18th, 2015
In the summer the ComradeGraves file showed an image of graves with a caption identifying them as Franklin crew graves. Turns out that out page is an accurate characterization of a mis-captioned image. The graves are not those of Franklin crew. Fell between the cracks, so I've now removed that file from archive and its entry in the index of photos. The other issues raised at the same time I had already addressed, but checked them again to make sure they'd been done.