The website is located at: http://francotoile.uvic.ca
... which is a virtual host that points to: http://pear.hcmc.uvic.ca:8081/francotoile/francotoile/index.xql
the FrancoToile app lives in the webapps-dev directory on Pear. All of the non-essential web interfaces (the admin interface, eXide, the help docs, etc.) have been erased from the app to limit the possibility of unauthorized access.
To connect to the database: see the ODT file for connection information.
The eXist version of the site uses much of the same HTML/CSS from the PHP version, as done by Pat Szpak.
State of the Website
The site is complete aside from the odd tweak and language-related fix that Catherine sends in. All of the features work, the code is documented, and everything is running smoothly.
The Bookmarking System
(taken from: http://hcmc.uvic.ca/blogs/index.php?blog=12&p=8271&more=1&c=1&tb=1&pb=1 )
Adding a Bookmark
When a user adds a bookmark, an AJAX request with the video ID, the timestamp, and any optional comments is sent to plugins/bookmarks/ajax/add.xql. This XQuery script returns a JSON object with the ID (i.e. bookmark/@n) of the new bookmark, the timestamp, and the comments if applicable. The add.xql script actually returns XML that is passed through the eXist JSON serializer:
If the bookmark can't be added, which happens if the video ID is invalid, then a 500 error is returned.
Deleting a Bookmark
Deleting a bookmark (clicking on the 'X' image next to the bookmark in the ordered list) simply removes the bookmark from the DOM. Bookmark data files are never actually deleted from the server.
Saving a bookmark list requires no AJAX interaction with the server. Rather, all of the bookmark IDs are gathered from the ordered list of bookmarks (each of which has an ID of bookmark-## where ## corresponds to bookmark/@n in the XML data) and then simply appended to the URL of the video page. This URL is given to the user, who can add it to their bookmark collection for later use. The ids are added as comma-separated values of a "bm" GET parameter. For example: player.xql?id=fraq1&bm=54,55,56
Loading Saved Bookmarks
When a user visits a video with a bm query string (see 'Saving Bookmarks' above), an AJAX call is sent to plugins/bookmarks/ajax/load.xql for each bookmark ID in the query string. Upon successful load of the bookmark - success means that the ID corresponds to bookmark/@n and the current video corresponds to bookmark/@videoId - a JSON-serialized XML node is returned (see 'Adding a Bookmark' above), which is then used to populate the unordered list of bookmarks.
As stated on the blog ( http://hcmc.uvic.ca/blogs/index.php?blog=12&p=8288&more=1&c=1&tb=1&pb=1 ), the XML data files on Pomme have been moved to an inaccessible location, in the interests of maintaining a single set of up-to-date files (i.e. the ones on Pear). When Catherine is ready to start working on the site again, Pomme should be updated with the latest version of the files from the Pear eXist DB.
When the eXist site was switched to francotoile.uvic.ca, however, those paths became invalid. So, I updated the movie player to use the 'real' base URL on lettuce: http://lettuce.tapor.uvic.ca/~florevid/media/
This is a decent temporary solution, but I will experiment with putting the media files on the Pear file system and then using an XQuery script to stream the videos, rather than using lettuce.
***per Jamie's idea, how about a mod_proxy def. like:
http://hcmc.uvic.ca/$projName that resolves to a /home1t/$projName/media/ folder
so projects serving media can use a URL like:
After digging in our heels and grunting through a bunch of Apache rewrite rule combinations, Greg and I came up with a VirtualHost entry for francotoile2.uvic.ca that does the job, in that http://francotoile2.uvic.ca points to http://pear.hcmc.uvic.ca:8081/francotoile/francotoile/index.xql . Getting it to work basically just came down to trying a lot of different combinations of various RewriteRule and JKMount lines until something worked. We gave the VirtualHost stuff to ER at systems who implemented it (and expanded it a bit). Here's the working entry:
<VirtualHost *:80> ServerName francotoile2.uvic.ca DocumentRoot /home1t/florevid/www RewriteEngine On RewriteRule ^/$ /index.xql RewriteRule ^(.*)$ /francotoile/francotoile$1 [PT] JkMount /francotoile/francotoile/ dev JkMount /francotoile/francotoile/* dev ErrorLog "|/usr/local/sbin/cronolog /usr/local/apache2/logs/francotoile.uvic.ca-error_log.%Y%m%d.%X" CustomLog "|/usr/local/sbin/cronolog /usr/local/apache2/logs/francotoile.uvic.ca-access_log.%Y%m%d.%X" combined </VirtualHost>
Now we're just waiting on ER to point the Pear site to http://francotoile.uvic.ca instead of francotoile2, which'll wrap up the new version of the site.
The prime objective of this project is to create a prototype of a searchable digital video library representing francophone culture. It is to be implemented in French 262.
|<< <||Current||> >>|