<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>CornEmpire Software &#187; Webdesign</title>
	<atom:link href="http://cornempire.net/category/webdesign/feed/" rel="self" type="application/rss+xml" />
	<link>http://cornempire.net</link>
	<description>Tidbits about programming, web development, gaming and other random stuff.</description>
	<lastBuildDate>Tue, 17 Aug 2010 21:40:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>New Project: The Director!</title>
		<link>http://cornempire.net/2010/05/07/new-project-the-director/</link>
		<comments>http://cornempire.net/2010/05/07/new-project-the-director/#comments</comments>
		<pubDate>Fri, 07 May 2010 15:30:43 +0000</pubDate>
		<dc:creator>cornmaster</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Webdesign]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[Links]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[redirect]]></category>

		<guid isPermaLink="false">http://cornempire.net/?p=198</guid>
		<description><![CDATA[Just a quick announcement that I&#8217;m working on a new programming project called The Director!. It is essentially a url redirection/shortening service written in PHP and utilizing the apache rewrite module to do the really cool stuff. Those in the know realize that creating such a service is just a few lines of code in [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick announcement that I&#8217;m working on a new programming project called The Director!.  It is essentially a url redirection/shortening service written in PHP and utilizing the apache rewrite module to do the really cool stuff.</p>
<p>Those in the know realize that creating such a service is just a few lines of code in the vhost entry for apache, and then a few lines of code in a php script to do the redirection, but the goal here is to make it easy to use management interface with a bit of simple stat tracking.</p>
<p>Hoping to have version 0.1 out this weekend (depending on how my fence construction goes this weekend).</p>
<p>You can view more information here: <a href="http://wiki.cornempire.net/thedirector/start">http://wiki.cornempire.net/thedirector/start</a></p>
]]></content:encoded>
			<wfw:commentRss>http://cornempire.net/2010/05/07/new-project-the-director/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hesk Helpdesk (And Enhancements!)</title>
		<link>http://cornempire.net/2009/12/06/hesk-helpdesk-and-enhancements/</link>
		<comments>http://cornempire.net/2009/12/06/hesk-helpdesk-and-enhancements/#comments</comments>
		<pubDate>Sun, 06 Dec 2009 17:56:40 +0000</pubDate>
		<dc:creator>cornmaster</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Webdesign]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[helpdesk]]></category>
		<category><![CDATA[hesk]]></category>

		<guid isPermaLink="false">http://www.cornempire.net/?p=160</guid>
		<description><![CDATA[Edit: I&#8217;ve made a new post regarding Hesk and these enhancements for the new version 2.2. You can read it here: http://cornempire.net/2010/07/31/hesk-enhancements-for-version-2-2/ I came across the free, open source Hesk Helpdesk (http://www.hesk.com) while I was looking for a light weight help system for a project that was starting up. The project has since been put [...]]]></description>
			<content:encoded><![CDATA[<div style="padding: 5px;background-color: #C9DDEE;border: 1px solid #FFA8A8"><strong>Edit:</strong> I&#8217;ve made a new post regarding Hesk and these enhancements for the new version 2.2.  You can read it here: <a href="http://cornempire.net/2010/07/31/hesk-enhancements-for-version-2-2/">http://cornempire.net/2010/07/31/hesk-enhancements-for-version-2-2/</a></div>
<p>I came across the free, open source Hesk Helpdesk (<a href="http://www.hesk.com">http://www.hesk.com</a>) while I was looking for a light weight help system for a project that was starting up. The project has since been put on hold, but Hesk is still a great application for a helpdesk/knowledge base.  Hesk is offered as a free downloadable PHP script, as well as a Hosted Version if you do not have a server.  The hosted version will cost you $20 US a month.  You can also by a license for the downloadable version for $39.95 US to remove the Hesk branding.</p>
<p>While this application is great&#8230;</p>
<ol>
<li>Allows unlimited staff</li>
<li>Granular permissions to the system and help desk categories</li>
<li>Excellent knowledge base built in</li>
<li>Innovative system that doesn&#8217;t require user accounts for clients</li>
</ol>
<p>It is lacking a few features.  I plan to use this application to respond to clients from a number of different projects.  As such, it would be nice if they didn&#8217;t see ALL of the problem types when submitting tickets.  Because Hesk is open source, we can make a few tweaks to get directly to a specific problem type.</p>
<p>Hesk also allows custom fields for your tickets, but it shows all custom fields on all problem types.  This can get confusing for users in a multi-project environment.  I&#8217;m developing a little hack to get around this limitation.</p>
<p>I&#8217;ve outlined both of these changes required on my wiki, you can take a <a href="http://wiki.cornempire.net/doku.php?id=hesk:start">look here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://cornempire.net/2009/12/06/hesk-helpdesk-and-enhancements/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>awstats Information</title>
		<link>http://cornempire.net/2009/10/22/awstats-information/</link>
		<comments>http://cornempire.net/2009/10/22/awstats-information/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 14:54:03 +0000</pubDate>
		<dc:creator>cornmaster</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Webdesign]]></category>
		<category><![CDATA[awstats]]></category>
		<category><![CDATA[stats]]></category>
		<category><![CDATA[webhosting]]></category>
		<category><![CDATA[websites]]></category>

		<guid isPermaLink="false">http://www.cornempire.net/?p=154</guid>
		<description><![CDATA[Just surfing the web and came across this excellent site with advanced awstats configuration information. As you all know, I do enjoy using awstats, and have had to modify it in the past. Well, this site has lots of cool scripts and modifications to make awstats more useful: http://www.internetofficer.com/awstats/ My favourite modifications so far are: [...]]]></description>
			<content:encoded><![CDATA[<p>Just surfing the web and came across this excellent site with advanced awstats configuration information.  As you all know, I do enjoy using awstats, and <a href="http://www.cornempire.net/2009/08/31/adding-a-robot-to-awstats/" target="_blank">have had to modify it in the past</a>.</p>
<p>Well, this site has lots of cool scripts and modifications to make awstats more useful: <a href="http://www.internetofficer.com/awstats/" target="_blank">http://www.internetofficer.com/awstats/</a></p>
<p>My favourite modifications so far are:</p>
<ul>
<li><a href="http://www.internetofficer.com/awstats/bing/" target="_blank">Bing in awstats</a></li>
<li><a href="http://www.internetofficer.com/awstats/hotlinking-pages/" target="_blank">Detecting Hotlinking</a></li>
</ul>
<p>And don&#8217;t forget to check out my own tutorial on adding robots (<a href="http://www.cornempire.net/2009/08/31/adding-a-robot-to-awstats/">Blog Post</a>/<a href="http://wiki.cornempire.net/doku.php?id=awstats:awstatsrobots">Wiki Entry</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://cornempire.net/2009/10/22/awstats-information/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Xymon Graph All Blue</title>
		<link>http://cornempire.net/2009/07/10/xymon-graph-all-blue/</link>
		<comments>http://cornempire.net/2009/07/10/xymon-graph-all-blue/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 16:43:17 +0000</pubDate>
		<dc:creator>cornmaster</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Repair]]></category>
		<category><![CDATA[Webdesign]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[googlechrome]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[xymon]]></category>

		<guid isPermaLink="false">http://www.cornempire.net/?p=144</guid>
		<description><![CDATA[I just noticed this today. I monitor a number of sites and servers using the great Xymon system monitoring tool (Linky). It is based on early Big Brother code. Anyway, today I noticed that the graphs were all blue. Something like this: I&#8217;m using Xymon 4.2.3 on the servers, and both servers show the graph [...]]]></description>
			<content:encoded><![CDATA[<p>I just noticed this today.  I monitor a number of sites and servers using the great Xymon system monitoring tool (<a href="http://www.xymon.com" target="_blank">Linky</a>).  It is based on early Big Brother code.  Anyway, today I noticed that the graphs were all blue.  Something like this:</p>
<div id="attachment_146" class="wp-caption alignnone" style="width: 160px"><a href="http://www.cornempire.net/files/2009/07/xymongraph.png"><img class="size-thumbnail wp-image-146" src="http://www.cornempire.net/files/2009/07/xymongraph-150x150.png" alt="Bad Xymon Graph" width="150" height="150" /></a><p class="wp-caption-text">Bad Xymon Graph</p></div>
<p>I&#8217;m using Xymon 4.2.3 on the servers, and both servers show the graph like this using Firefox 3.5 on Linux.  Google Chrome development version, SeaMonkey 1.1.5, Epiphany and Galeon  all display the graph correctly.</p>
<p>I have no solution, but I thought I&#8217;d post my experience.</p>
]]></content:encoded>
			<wfw:commentRss>http://cornempire.net/2009/07/10/xymon-graph-all-blue/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>D2L Bulk Deactivation Part 2</title>
		<link>http://cornempire.net/2009/07/07/d2l-bulk-deactivation-part-2/</link>
		<comments>http://cornempire.net/2009/07/07/d2l-bulk-deactivation-part-2/#comments</comments>
		<pubDate>Tue, 07 Jul 2009 15:11:58 +0000</pubDate>
		<dc:creator>cornmaster</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Repair]]></category>
		<category><![CDATA[Webdesign]]></category>
		<category><![CDATA[d2l]]></category>
		<category><![CDATA[desire2learn]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.cornempire.net/?p=139</guid>
		<description><![CDATA[Note: Instead of editing my previous post to pieces, I thought it might be best if I repost my script with a better description of how it works. I&#8217;ve written up documentation of the script on the CornEmpire Software wiki which is available at http://wiki.cornempire.net. The documentation directly related to this script is available at [...]]]></description>
			<content:encoded><![CDATA[<h1>Note:</h1>
<p>Instead of editing my previous post to pieces, I thought it might be best if I repost my script with a better description of how it works.  I&#8217;ve written up documentation of the script on the CornEmpire Software wiki which is available at <a href="http://wiki.cornempire.net" target="_blank">http://wiki.cornempire.net</a>.  The documentation directly related to this script is available at <a href="http://wiki.cornempire.net/doku.php?id=d2l:bulkdeactivate" target="_blank">http://wiki.cornempire.net/doku.php?id=d2l:bulkdeactivate</a></p>
<h1>Introduction</h1>
<p>One of the often requested features is to be able to bulk deactivate courses in D2L after they have completed. You can currently deactivate courses, but this is a one at a time effort. This has become more important as version 8.3 of D2L brought along a new My Courses widget, which allows users to see updates from each of their courses. Unfortunately, when course access ends, they can still see the updates. This has caused confusion for many users.<br />
Another reason to deactivate courses is minimize the amount of clutter in the view of users. If course access has ended, and they cannot access the course, there is no need for the course to remain active (this could vary depending on how your roles are configured). A way around this is to script the bulk deactivation of courses. Through the use of some Javascript coding, we can instruct the web browser to visit each course, and deactivate it for us.</p>
<p><a href="http://www.cornempire.net/wordpress/wp-content/uploads/2009/06/bulk-deactivate.htm">See the script in action.</a></p>
<p>Would you like to see more?  I have the script, and it&#8217;s documentation available on this page: http://wiki.cornempire.net/doku.php?id=d2l:bulkdeactivate</p>
<p>If you have any questions, please post them below.</p>
]]></content:encoded>
			<wfw:commentRss>http://cornempire.net/2009/07/07/d2l-bulk-deactivation-part-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>IE Error: Object Expected</title>
		<link>http://cornempire.net/2009/06/09/ie-error-object-expected/</link>
		<comments>http://cornempire.net/2009/06/09/ie-error-object-expected/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 15:10:48 +0000</pubDate>
		<dc:creator>cornmaster</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Webdesign]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[ff]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.cornempire.net/?p=114</guid>
		<description><![CDATA[I&#8217;ve been recently doing some Javascript coding and ran across an error in IE that I wasn&#8217;t noticing in Firefox (well&#8230;there are hundreds of these, but this one is a show stopper). It is a small validation script for a form to do some checking before submitting.  It&#8217;s pretty simple, take a look: function validateForm(){ [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been recently doing some Javascript coding and ran across an error in IE that I wasn&#8217;t noticing in Firefox (well&#8230;there are hundreds of these, but this one is a show stopper).</p>
<p>It is a small validation script for a form to do some checking before submitting.  It&#8217;s pretty simple, take a look:</p>
<pre><code>
function validateForm(){
	/*
	 * First, get the fields.
	 */
	var name = document.getElementById('name').value;
	var title = document.getElementById('title').value;
	var phone = document.getElementById('phone').value;
	var email = document.getElementById('email').value;
	var description = document.getElementById('description').value;
	var cost = document.getElementById('cost').value;
	//pic1 = document.getElementById('pic1').value;
	//pic2 = document.getElementById('pic2').value;
	if(name == ""){
		alert('You must enter your name.');
	}
	else if(title == ""){
		alert('You must enter give your ad a title.');
	}
	else if(phone == "" &#038;&#038; email == ""){
		alert('You must enter a phone number or email address.');
	}
	else if(description == ""){
		alert('You must enter a description of the item you want to buy, sell or trade.');
	}
	else if(isNaN(cost)){
		alert('You must enter a numeric cost, without the $ symbol.');
	}
	else{
		document.getElementById('submit').style.display = 'block';
		alert('Please press the submit button below.');
	}
}
</code></pre>
<p>Executing the script on a blank form in FF would give the correct response, Enter in a name.  In IE, I would get an error on Line 15 about Object Expected (in the script, line 15 is actually a commented out line, so that error isn&#8217;t very helpful).</p>
<p>I then remembered something about IE automatically creating variables from a form by the name/id of the form field on the page.  Since my variable name, and field name were the same, it would try to compare its self created object against my test, instead of the variable that I was assigning, thus creating an error.</p>
<p>To work around this, I had to rename all of my variables (I could have also renamed all of my fields):</p>
<pre><code>
function validateForm(){
	/*
	 * First, get the fields.
	 */
	var bsname = document.getElementById('name').value;
	var bstitle = document.getElementById('title').value;
	var bsphone = document.getElementById('phone').value;
	var bsemail = document.getElementById('email').value;
	var bsdescription = document.getElementById('description').value;
	var bscost = document.getElementById('cost').value;
	//pic1 = document.getElementById('pic1').value;
	//pic2 = document.getElementById('pic2').value;
	if(bsname == ""){
		alert('You must enter your name.');
	}
	else if(bstitle == ""){
		alert('You must enter give your ad a title.');
	}
	else if(bsphone == "" &#038;&#038; bsemail == ""){
		alert('You must enter a phone number or email address.');
	}
	else if(bsdescription == ""){
		alert('You must enter a description of the item you want to buy, sell or trade.');
	}
	else if(isNaN(bscost)){
		alert('You must enter a numeric cost, without the $ symbol.');
	}
	else{
		document.getElementById('submit').style.display = 'block';
		alert('Please press the submit button below.');
	}
}
</code></pre>
<p>After this, it runs fine in both browsers.  I remember hitting my head off the wall for a LONG time when I originally encountered this error, so hopefully this will save someone else some time.</p>
]]></content:encoded>
			<wfw:commentRss>http://cornempire.net/2009/06/09/ie-error-object-expected/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Desire2Learn / Javascript Picture Library</title>
		<link>http://cornempire.net/2009/02/09/desire2learn-javascript-picture-library/</link>
		<comments>http://cornempire.net/2009/02/09/desire2learn-javascript-picture-library/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 13:56:51 +0000</pubDate>
		<dc:creator>cornmaster</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Webdesign]]></category>
		<category><![CDATA[d2l]]></category>
		<category><![CDATA[desire2learn]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[picture]]></category>

		<guid isPermaLink="false">http://www.cornempire.net/?p=91</guid>
		<description><![CDATA[Introduction The picture library built into Desire2Learn doesn’t allow for instructors to create their own libraries. Rather, all images are shared across all courses. I wrote this bit of javascript to simulate and extend the idea of a picture library in D2L (this code can also be used for any HTML page). There are two [...]]]></description>
			<content:encoded><![CDATA[<h3>Introduction</h3>
<p>The picture library built into Desire2Learn doesn’t allow for instructors to create their own libraries. Rather, all images are shared across all courses. I wrote this bit of javascript to simulate and extend the idea of a picture library in D2L (this code can also be used for any HTML page). There are two parts to the library:</p>
<dl>
<dt>The Widget Code (or HTML code for any page)</dt>
<dd> This code is the skeleton of the library.  The javascript code modifies this code in order to display the images. </dd>
<dt>The Javascript Code</dt>
<dd> This is the brain of the library. It must be installed somewhere locally and linked to the widget/HTML page. There is a configuration section at the top of the file where you can configure the library. </dd>
</dl>
<p>Here is the widget/HTML code that must be displayed on the pages.<br />
You should not edit this code as it will cause the library to malfunction.</p>
<pre><code>
&lt;html&gt;
&lt;head&gt;
	&lt;script src="picturelibrary.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;

	&lt;div id="imgwdgt"&gt;
		&lt;img src="piclibimages/test.png" id="imghldr" /&gt;
		&lt;p id="imgcptn"&gt;&lt;/p&gt;
	&lt;/div&gt;
	&lt;script type="text/javascript"&gt;
		startLibrary();
	&lt;/script&gt;

&lt;/body&gt;
&lt;/html&gt;
</code></pre>
<p>Here is the javascript code: <a href="http://www.cornempire.net/d2l/piclib/picturelibrary.js">picturelibrary.js</a><br />
You will need to right click this link and save the file to your computer before you can upload it to your D2L shell/website.</p>
<h3>Notes About The Code</h3>
<p>Not all the variables need to be set a certain way in order for the code to function. However, it is a good idea to set up any variables that you don’t want to use to be false. Some variables require others, so read the comments in the code carefully. I’ve also included them below:</p>
<pre><code>
/**
	This script presents a picture library to the user.  It has several configurable
	options which are outlined below.
	With this script, you can:
		1) Present a slide show to users
		2) Present a navigatable interface for users to scroll through the library
		3) Release an image to them based on a set date/time
		4) Release a random image from the library
**/
/**
	=== CONFIG START ===
	Here you need to specify the path to this script.  To do this you must go to the
	Edit Course section of the site, and go to Manage Files.  Then, copy the URL for
	this javascript file.  Paste the URL into the variable below.  Then remove the
	filename at the end of the URL "picturelibrary.js".  Replace the file name with
	"piclibimages/" (no quotes)
*/
var path = "http://online.mun.ca/content/Sandbox/TT/Sp07/piclibimages/";

/**
	List your images here.  By default, it will look under the piclibimages folder
	in your course files.  Change the path above if you want to load from a different
	location.

	Place the file names in the array below.  A comma must be placed after each entry
	except for the last entry in the list.
*/

var images = new Array(
	"dataspace-code.gif",
	"MedSchoolCrestSmall.gif",
	"crest-toothpaste.png"
);

/**
	List your captions here.  

	If you enable captions below, you must have at least as many captions as you have images
	above or you will probably get a javascript error when the script scrolls through the
	images.  You can have blank captions, denoted with "" in the array below.
*/
var captions = new Array(
	"The icon I created for the phpLive -&gt; Dataspace integration.",
	"Medicine School Crest",
	"Crest Toothpaste"
);

/**
	This array contains dates for the date release function of this script.  If you do not
	want to use date release, you can leave this blank.

	Each entry goes with an entry in the images array and should be formatted with
	the startdate-enddate for the image.  Only one image can be displayed at a time
	with this method.
	A sample entry is: 200809190000-200809222359
		This will allow the	image to be viewed on Friday the 19th until Monday the 22nd.

	If you want your images	to rotate through a day, you can place a * for the date and
	just include the time.
	A sample entry is: *0000-*1200
		This will allow your image to appear on the site between midnight and noon every
		day.
*/

var releasedates = new Array(
	"*0000-*1230",
	"*1231-*1300",
	"*1301-*2359"
);
//var releasedates = new Array(
//	"200809170000-200809182359",
//	"200809190000-200809202359",
//	"200809210000-200809222359"
//);

/**
	Here you can set your options for the script.
	resize = controls if images are automatically resized.  If true, width and
			 height must be set.  These are measured in pixels.  Be careful using this
			 as it will likely distort your pictures horribly.  It is much better to
			 resize your pictures before uploading them to the system.
	navigation = controls if users can navigate through images, or if they see
				 a loop of images.
	imagepause = the amount of time in milliseconds that an image appears before
				 changing.  Only used if navigation is false. 4000 = 4 seconds
	captionsdisplay = if this is set to true, the caption is pulled from the above array
			   		  and displayed with the picture.
	daterelease = Shows an image on a specific date/for a specific time.  The datearray
			      must store the dates in the format yearmonthday-yearmonthday or *time-*time.
			      the first date/time being when the image is displayed, and the second
			      when it ends.
	imagestyle = This is a CSS style tag that will be added to the image tag.
	captionstyle = This is a CSS style take that will be added to the caption.
	widgetsytle = This is a CSS style tag that well be added to the div around the image
				  and caption.
	randomstart = This variable controls whether or not the script begins on a random image.
	singlerandom = If true, this displays a single random image when the page is loaded.
*/			      

var resize = false;
var width = "";
var height = "";
var navigation = true;
var imagepause = "5000";
var captionsdisplay = true;
var daterelease = true;
var imagestyle = "margin: 0 auto; display: block; padding: 2px;";
var captionstyle = "margin: 1px; text-size: 10px; text-align: center; border: 1px dashed gray;";
var widgetstyle = "border: 2px solid black;";
var randomstart = true;
var singlerandom = false;

/**
	=== CONFIG END ===
	This is the end of configurable items for this script.  Do not edit the code below.
*/

</code></pre>
<p>Also of note is the use of CSS styles. I cannot figure out how to apply an arbitrary CSS style string to an HTML element. I can change specific things, but I cannot allow any style tags. If anyone knows how, please contact me.</p>
<p>Because of this limitation, the CSS code will only recognize:</p>
<ul>
<li>border</li>
<li>text-align</li>
<li>font-size</li>
<li>margin</li>
<li>display</li>
<li>padding</li>
</ul>
<p>You can add in your own code to the bottom by editing the doStyle function, or you can apply your own styles to the raw widget/HTML code. You must leave the style variables blank in this script.</p>
<h3>Final Thoughts</h3>
<p>I hope you find this useful, either for your D2L course, or for your personal homepage. I’ll probably post updates from time to time on this script depending on the feedback I receive. If you have any comments, you can leave them below. Take a look at some of the variable configurations below to see examples of how the code can be used.</p>
<h3>Examples</h3>
<div id="ex1">
<div id="desc1">This configuration allows you to display a slide show that updates every 5 seconds. It has a random starting point, and has captions enabled.</div>
<div id="config1" class="config">var resize = false;<br />
var width = &#8220;&#8221;;<br />
var height = &#8220;&#8221;;<br />
var navigation = false;</p>
<p>var imagepause = &#8220;5000?;<br />
var captionsdisplay = true;<br />
var daterelease = false;<br />
var imagestyle = &#8220;&#8221;;<br />
var captionstyle = &#8220;&#8221;;<br />
var widgetstyle = &#8220;&#8221;;</p>
<p>var randomstart = true;</p></div>
<p><a href="http://www.cornempire.net/d2l/piclib/exam1.html" target="_blank">View Example 1</a></div>
<hr />
<div id="ex2">
<div id="desc2">
<p>This configuration allows you to navigate the images and it also displays captions.  Styles are also applied to the image, captions and box around them both.</p></div>
<div id="config2" class="config">var resize = false;<br />
var width = &#8220;&#8221;;<br />
var height = &#8220;&#8221;;<br />
var navigation = true;<br />
var imagepause = &#8220;5000?;<br />
var captionsdisplay = true;</p>
<p>var daterelease = false;<br />
var imagestyle = &#8220;margin: 0 auto; display: block; padding: 2px;&#8221;;<br />
var captionstyle = &#8220;margin: 1px; font-size: 10px; text-align: center; border: 1px dashed gray;&#8221;;<br />
var widgetstyle = &#8220;border: 2px solid black;&#8221;;<br />
var randomstart = false;</p></div>
<p><a href="http://www.cornempire.net/d2l/piclib/exam2.html" target="_blank">View Example 2</a></div>
<hr />
<div id="ex3">
<div id="desc3">This configuration shows a different image depending on the time of day.  To best simulate Newfoundland weather.  No captions are displayed.  Not all images are displayed at any part of the day.</div>
<div id="config3" class="config">
<p>var resize = false;<br />
var width = &#8220;&#8221;;<br />
var height = &#8220;&#8221;;<br />
var navigation = false;<br />
var imagepause = &#8220;5000?;<br />
var captionsdisplay = false;</p>
<p>var daterelease = true;<br />
var imagestyle = &#8220;&#8221;;<br />
var captionstyle = &#8220;&#8221;;<br />
var widgetstyle = &#8220;&#8221;;<br />
var randomstart = false;</p>
<p>var releasedates = new Array(</p>
<p>&#8220;*-*&#8221;,<br />
&#8220;*0800-*0830?,<br />
&#8220;*0926-*1000?,<br />
&#8220;*1001-*1030?,<br />
&#8220;*0831-*0855?,<br />
&#8220;*0546-*0759?,</p>
<p>&#8220;*1031-*1130?,<br />
&#8220;*1146-*1200?,<br />
&#8220;*-*&#8221;,<br />
&#8220;*1201-*1230?,<br />
&#8220;*-*&#8221;,<br />
&#8220;*-*&#8221;,</p>
<p>&#8220;*-*&#8221;,<br />
&#8220;*1131-*1145?,<br />
&#8220;*-*&#8221;,<br />
&#8220;*1231-*1300?,<br />
&#8220;*-*&#8221;,<br />
&#8220;*-*&#8221;,</p>
<p>&#8220;*1301-*1500?,<br />
&#8220;*-*&#8221;,<br />
&#8220;*-*&#8221;,<br />
&#8220;*-*&#8221;,<br />
&#8220;*-*&#8221;,<br />
&#8220;*1501-*1600?,</p>
<p>&#8220;*1601-*1700?,<br />
&#8220;*1701-*1800?,<br />
&#8220;*1801-*1900?,<br />
&#8220;*1901-*2000?,<br />
&#8220;*2001-*2229?,<br />
&#8220;*2230-*2330?,</p>
<p>&#8220;*0000-*0030?,<br />
&#8220;*0431-*0500?,<br />
&#8220;*0031-*0130?,<br />
&#8220;*2330-*2359?,<br />
&#8220;*0501-*0545?,<br />
&#8220;*0131-*0300?,</p>
<p>&#8220;*0301-*0330?,<br />
&#8220;*0331-*0430?,<br />
&#8220;*0000-*0000?,<br />
&#8220;*-*&#8221;,<br />
&#8220;*-*&#8221;,<br />
&#8220;*-*&#8221;,</p>
<p>&#8220;*0856-*0925?,<br />
&#8220;*-*&#8221;<br />
);</p></div>
<p><a href="http://www.cornempire.net/d2l/piclib/exam3.html" target="_blank">View Example 3</a></div>
<hr />
<div id="ex4">
<div id="desc4">This configuration shows a single image.  It is random from the list of images.</div>
<div id="config4" class="config">var resize = false;<br />
var width = &#8220;&#8221;;<br />
var height = &#8220;&#8221;;<br />
var navigation = false;</p>
<p>var imagepause = &#8220;5000&#8243;;<br />
var captionsdisplay = true;<br />
var daterelease = false;<br />
var imagestyle = &#8220;&#8221;;<br />
var captionstyle = &#8220;&#8221;;<br />
var widgetstyle = &#8220;&#8221;;</p>
<p>var randomstart = true;<br />
var singlerandom = true;</p></div>
<p><a href="http://www.cornempire.net/d2l/piclib/exam4.html" target="_blank">View Example 4</a></div>
<hr />
<div id="ex5">
<div id="desc5">This configuration shows a slideshow with a 5 second pause, and a random start.</div>
<div id="config5" class="config">var resize = false;<br />
var width = &#8220;&#8221;;<br />
var height = &#8220;&#8221;;<br />
var navigation = false;<br />
var imagepause = &#8220;5000?;<br />
var captionsdisplay = false;</p>
<p>var daterelease = false;<br />
var imagestyle = &#8220;&#8221;;<br />
var captionstyle = &#8220;&#8221;;<br />
var widgetstyle = &#8220;&#8221;;<br />
var randomstart = false;<br />
var singlerandom = false;</p></div>
<p><a href="http://www.cornempire.net/d2l/piclib/exam5.html" target="_blank">View Example 5</a></div>
]]></content:encoded>
			<wfw:commentRss>http://cornempire.net/2009/02/09/desire2learn-javascript-picture-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
