Made various tweaks to the Canadian Mysteries site.
Login to approve submission to be added to teacher's database requires admin person to authenticate twice. Problem seems to be that the php page asks for authentication, then reloads itself before completely loading the first time, so user is asked to authenticate again.
A couple of files in the Norman site had English navigation bar on French pages. No idea how that could happen, but fixed it manually. Nothing odd about the source page in the development database.
MF sent me a number of large image files to be used as posters and handouts and asked that they be added to http://www.canadianmysteries.ca/downloads/posters/ . That involved creating small versions of the images, making the large images a consistent file format (jpeg), redoing the layout of the page (I cheaped out and extended the tables that were already on the page rather than something more elegant with the DOM and css).
She also asked me to restrict access to that folder, so I put an htaccess file in there requiring authentication with a username and password I created and sent to her.
Edit markup.php in administration/generatesites of the development site so that for files of type 23 (website text), the DC.Identifier would include indexen or indexfr rather than the numerical record id.
Replaced this:
$metaDataEn = setMetadata ($row['recordId'], 'en', $sitePath."/".$dirpath."/".$row['recordId']."en.html", $row['language']);
$metaDataFr = setMetadata ($row['recordId'], 'fr', $sitePath."/".$dirpath."/".$row['recordId']."fr.html", $row['language']);
with this:
//SA 091002 modified so that documents of type 23 (website texts) would return indexen or indexfr rather than record id in the DC.identifier
if ($row['documentTypeId'] == 23) {
$metaDataEn = setMetadata ($row['recordId'], 'en', $sitePath."/".$dirpath."/"."index"."en.html", $row['language']);
$metaDataFr = setMetadata ($row['recordId'], 'fr', $sitePath."/".$dirpath."/"."index"."fr.html", $row['language']);
} else {
$metaDataEn = setMetadata ($row['recordId'], 'en', $sitePath."/".$dirpath."/".$row['recordId']."en.html", $row['language']);
$metaDataFr = setMetadata ($row['recordId'], 'fr', $sitePath."/".$dirpath."/".$row['recordId']."fr.html", $row['language']);
}
Did two regexp substitions on all the files in the Norman, Redpath and Thomson sites.
First was to replace instances of "--" separating items in the DC.Subject tag with ";". This is a simple global search and replace:
regexp search for:
(<meta name="DC.Subject" scheme="LCSH" content=")(.*?) -- (.*?)(" />)
replace with:
\1\2 ; \3\4
The second was to find instances of files in the DC.Identifier. Go through files one by one and if the file is indexen (or indexfr) then do the substitution; if the file name is anything else, then leave the file alone:
regexp search for:
(<meta name="DC.Identifier" content="http://www.canadianmysteries.ca/sites/)(.*?/)(\d+?)(en)(.html" />)
replace with:
\1\2index\4\5\r
Have to figure out in the code that takes files from the CanMys database and generates the site, how to detect files flagged and "index" files and in the code that generated the Dublin Core tags, ensure that the filename contains "index" rather than the record number of that file in the database (for french and english):
<meta name="DC.Identifier" content="http://www.canadianmysteries.ca/sites/norman/home/indexen.html" />
rather than current:
<meta name="DC.Identifier" content="http://www.canadianmysteries.ca/sites/norman/home/5936en.html" />
<meta name="DC.Identifier" content="http://www.canadianmysteries.ca/sites/norman/background/indexen.html" />
rather than current:
<meta name="DC.Identifier" content="http://www.canadianmysteries.ca/sites/norman/background/5928en.html" />
<meta name="DC.Identifier" content="http://www.canadianmysteries.ca/sites/norman/background/1930s/indexen.html" />
rather than current:
<meta name="DC.Identifier" content="http://www.canadianmysteries.ca/sites/norman/background/1930s/5925en.html" />
Uvic's php.ini sets the config item session.cookie_domain to "uvic.ca". So, if one tries to write values to a session from "canadianmysteries.ca"
(running on uvic's server) and then read them on a subsequent page, the session variables are not available.
Before starting the session, you have to include ini_set('session.cookie_domain', (strpos($_SERVER['HTTP_HOST'],'.') !== false) ? $_SERVER['HTTP_HOST'] : '');
to set that config item to whatever the current host is (canadianmysteries.ca, canadianmysteries.uvic.ca, or whatever)
I've implemented this in the teacher login section of the CanMys site, but have commented out the code with the explicit SID call, just in case we have to go back to it. Thanks to Ryan for identifying the specific solution to the problem.
processed webquests 22 through 30 through those parts of the process that I am responsible for (making the pages html valid) approximately 70 files in 9 batches each batch going through six steps
Will turn them over to Pat for him to do the rest (replacing links to PDF files with links to PDF and to HTML files)