« October 2006 | Main | December 2006 »

November 13, 2006

Onward to a new port...

Today marks another step towards website redesign implementation. If you are lucky enough to be able to reach the <a href="http://www.library.vcu.edu:83/">redesign port</a>, kudos to you, you may now view the development of the web site. If not, um... wait until December like everyone else. With this new port we can test all links as though they are in the root of the production server. This in turn will hopefully limit the amount of errors that occur during roll out. Anyway I had nothing to do with making the port it is just really cool.

Now off to what I did today. On the standard footer for most VCU Libraries there is a "Updated" section, this is dynamic for all pages using the .html extension. Coldfusion files on the other hand are not parsed the same way as .html files and as such do not have a truly dynamic footer. I have been researching various ways to implement this "Updated" feature, but I had only succeeded in confusing myself. When first researching I came across "event gateways" in Coldfusion which run a .cfc file when an event occurs, such as a file system change like a file addition or a file being saved. I did not realize that this was meant mainly for creating custom logging systems, not the dynamic "Updated" feature. After more research I found a code example that looked like this:

<cfdirectory action="list"
                   directory="#ExpandPath(".")#\"
                   name="qGetLastdateModified"
                   filter="#ListLast(CGI.SCRIPT_NAME, "/")#">
<cfif qGetLastdateModified.recordCount>
    <cfoutput>Updated: #DateFormat(qGetLastdateModified.dateLastModified, "mm/dd/ yyyy")#</cfoutput>
</cfif>
Sadly this did not work, rather nothing happened and I assumed that it was just a busted snippet of code. After consulting liveDocs I decided to take apart the code and see what went wrong where. The main issue was in the line:
directory="#ExpandPath(".")#\"
notice the "\" at the end of the line. This code was meant for a windows system. After replacing it with a "/" the last modified date was returned as "11/13/2006". Now off to livedocs again to figure out how to use DateFormat. In the end the result for the "updated" was:
<cfdirectory action="list"
                   directory="#ExpandPath(".")#/"
                   name="qGetLastdateModified"
                   filter="#ListLast(CGI.SCRIPT_NAME, "/")#">
<cfif qGetLastdateModified.recordCount>
    <cfoutput>Updated: #DateFormat(qGetLastdateModified.dateLastModified, "mmmm dd, yyyy")#</cfoutput>
</cfif>

November 1, 2006

SpryEffects...

With the redesign we have many opportunities to integrate new technologies, due to the fact that computers have higher performance capabilities and the number of internet users on broadband increases, allowing more content to be moved faster. One of these new technologies is using client-side scripting to alter the presentation of the content. For instance the redesign now has a hidden element that blinds down after the user clicks a button. The effects used come from the Spry framework from adobe labs. They were created for inclusion in an AJAX framework that adobe labs was putting together. After some experimenting and slight modification the effects code now fits our needs. Also better accessibility features have also been integrated. Adjusting the text-size has been made easier by the inclusion of a small bar with preset font sizes displayed. Once the user clicks one of the font sizes the site will adjust accordingly changing all the fonts to the desired size. Due to the modularity of the code it is possible to have the elements resize based on the font-size allowing the site to keep its look-and-feel at various font-sizes.