Permalink 11:01:07 am, by sarneil, 93 words, 94 views   English (CA)
Categories: Activity log; Mins. worked: 90

fix urlencode problem on photo.php pages

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.


Permalink 03:21:42 pm, by sarneil, 139 words, 88 views   English (CA)
Categories: Activity log; Mins. worked: 120

Batch process images

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


Permalink 04:21:27 pm, by sarneil, 121 words, 93 views   English (CA)
Categories: Activity log; Mins. worked: 60

moved learning materials pages

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.


Permalink 01:03:23 pm, by sarneil, 139 words, 92 views   English (CA)
Categories: Activity log; Mins. worked: 60

de-orphaning links pages on Franklin site

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


Permalink 02:34:08 pm, by mholmes, 125 words, 123 views   English (CA)
Categories: Activity log; Mins. worked: 45

Request for teacher locations

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.


Permalink 03:52:22 pm, by sarneil, 87 words, 196 views   English (CA)
Categories: Activity log; Mins. worked: 90

fix broken links in mysteryquest

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.


Permalink 02:53:26 pm, by sarneil, 44 words, 289 views   English (CA)
Categories: Activity log; Mins. worked: 60

change backend database pointers

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.


Permalink 12:00:50 pm, by sarneil, 96 words, 263 views   English (CA)
Categories: Activity log; Mins. worked: 120

landing pages for parks canada

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.


Permalink 10:30:01 am, by pat, 123 words, 307 views   English (CA)
Categories: Activity log; Mins. worked: 120

Franklin Google search styled

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

It can be seen here:

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.


Permalink 04:06:05 pm, by sarneil, 83 words, 274 views   English (CA)
Categories: Activity log; Mins. worked: 60

Remove wrongly captioned image from archive

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.

:: Next Page >>

Canadian Mysteries

The Canadian Mysteries site consists of a production site containing 12 mysteries, a containing shell and 30 mysteryquests; and a database-driven development site. HCMC took over tech support in summer 08. This blog documents work done on the site from Sept 08. Earlier work is documented in the depts blog in posts prepended with CanMys


XML Feeds