<?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>Jess McKenzie</title>
	<atom:link href="http://jzm.co.nz/Blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://jzm.co.nz/Blog</link>
	<description>The Person That Lives In Another World - The Web Development  World</description>
	<lastBuildDate>Thu, 16 Feb 2012 03:34:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Creating valid but dynamic layouts in PHP</title>
		<link>http://jzm.co.nz/Blog/creating-valid-but-dynamic-layouts-in-php/</link>
		<comments>http://jzm.co.nz/Blog/creating-valid-but-dynamic-layouts-in-php/#comments</comments>
		<pubDate>Wed, 19 Oct 2011 04:15:50 +0000</pubDate>
		<dc:creator>Jess</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://jzm.co.nz/Blog/?p=169</guid>
		<description><![CDATA[When creating a dynamic layout in PHP how do you go about creating unique divs if they are being used on a repetitive scale for example galleries portfolios. I was thinking I could have the following:]]></description>
			<content:encoded><![CDATA[<p>When creating a dynamic layout in PHP how do you go about creating unique divs if they are being used on a repetitive scale for example galleries portfolios.</p>
<p>I was thinking I could have the following:</p>
<p><code>
<div id="thisisadiv<?php echo $function;?>"</code></p>
<p>but by using this it of course altered my divs with a number therefore screwed up my css.</p>
<p>What would you do?    </p>
]]></content:encoded>
			<wfw:commentRss>http://jzm.co.nz/Blog/creating-valid-but-dynamic-layouts-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Move_Upload Error</title>
		<link>http://jzm.co.nz/Blog/php-move_upload-error/</link>
		<comments>http://jzm.co.nz/Blog/php-move_upload-error/#comments</comments>
		<pubDate>Thu, 20 Jan 2011 04:08:50 +0000</pubDate>
		<dc:creator>Jess</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[move_uploaded_file]]></category>
		<category><![CDATA[privileges]]></category>

		<guid isPermaLink="false">http://jzm.co.nz/Blog/?p=165</guid>
		<description><![CDATA[Hello, I am having another issue with the below code: $target = "/dir/includes/images/Gallery/"; $target = move_uploaded_file($_FILES ['ImagePath']['tmp_name'], $_SERVER['DOCUMENT_ROOT']. "$target"); When I try and upload I get the following warning; Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move &#8216;/tmp/php1O7Yzh&#8217; to &#8216;/home/user/public_html/dir/includes/images/Gallery/&#8217; in /home/user/public_html/dir/Admin/includes/class/class.image.php on line 94 I have set the Gallery privileges to 757 and still no luck. [...]]]></description>
			<content:encoded><![CDATA[<p>Hello,</p>
<p>I am having another issue with the below code:<br />
<code></p>
<p>   $target = "/dir/includes/images/Gallery/";</p>
<p>	    $target = move_uploaded_file($_FILES ['ImagePath']['tmp_name'], $_SERVER['DOCUMENT_ROOT']. "$target");</p>
<p></code></p>
<p>When I try and upload I get the following warning;</p>
<p>Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move &#8216;/tmp/php1O7Yzh&#8217; to &#8216;/home/user/public_html/dir/includes/images/Gallery/&#8217; in /home/user/public_html/dir/Admin/includes/class/class.image.php on line 94</p>
<p>I have set the Gallery privileges to 757 and still no luck.  What could I try?</p>
<p><strong>Update</strong></p>
<p>Thanks to <a href="http://sheldon.lendrum.co.nz">Sheldon Lendrum</a>,  I was told that $target did not have a name, I needed to add . $_FILES['ImagePath']['name'] onto $target</p>
]]></content:encoded>
			<wfw:commentRss>http://jzm.co.nz/Blog/php-move_upload-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript Regex Not Working</title>
		<link>http://jzm.co.nz/Blog/javascript-regex-not-working/</link>
		<comments>http://jzm.co.nz/Blog/javascript-regex-not-working/#comments</comments>
		<pubDate>Wed, 19 Jan 2011 22:59:48 +0000</pubDate>
		<dc:creator>Jess</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">http://jzm.co.nz/Blog/?p=162</guid>
		<description><![CDATA[Hey Guys, Could someone please tell me why my regex is not working in the below code for some reason it likes alpha characters as well. // Check Phone Number function CheckPhone(sFieldID) { var bValid = false; var sVF = id(sFieldID).value; // gets the fields value var phoneobj = new RegExp("^[0-9]$"); //Checks the Phone is [...]]]></description>
			<content:encoded><![CDATA[<p>Hey Guys,</p>
<p>Could someone please tell me why my regex is not working in the below code for some reason it likes alpha characters as well.<br />
<code></p>
<p>	// Check Phone Number<br />
	function CheckPhone(sFieldID) {</p>
<p>		var bValid = false;<br />
		var sVF = id(sFieldID).value; // gets the fields value<br />
		var phoneobj = new RegExp("^[0-9]$"); //Checks the Phone is valid</p>
<p>		if((sVF.length > 0) &#038;&#038; (phoneobj.test(sVF))) {</p>
<p>			id(sFieldID +"Error").innerHTML ="<span>Valid</span>";<br />
			id(sFieldID +"Error").innerHTML ="Not Valid";<br />
			bValid = true;</p>
<p>		} else {</p>
<p>			id(sFieldID +"Error").innerHTML ="Not Valid";</p>
<p>		}</p>
<p>		return bValid;</p>
<p>	}<br />
</code></p>
<p>Thanks</p>
]]></content:encoded>
			<wfw:commentRss>http://jzm.co.nz/Blog/javascript-regex-not-working/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Contact Form</title>
		<link>http://jzm.co.nz/Blog/php-contact-form/</link>
		<comments>http://jzm.co.nz/Blog/php-contact-form/#comments</comments>
		<pubDate>Sat, 30 Oct 2010 01:47:36 +0000</pubDate>
		<dc:creator>Jess</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Contact]]></category>
		<category><![CDATA[Form]]></category>
		<category><![CDATA[Mailer]]></category>
		<category><![CDATA[Process]]></category>
		<category><![CDATA[Spammers]]></category>
		<category><![CDATA[SSX]]></category>

		<guid isPermaLink="false">http://jzm.co.nz/Blog/?p=156</guid>
		<description><![CDATA[For all of my websites I use the following PHP process script.  What I would like to know is how other PHP coders would alter or change it to protect it from spammers and xss attacks.  Is PHP Mailer any good? Below is the process code of a form that lets you select the subject.]]></description>
			<content:encoded><![CDATA[<p>For all of my websites I use the following PHP process script.  What I would like to know is how other PHP coders would alter or change it to protect it from spammers and xss attacks.  Is PHP Mailer any good?  Below is the process code of a form that lets you select the subject.</p>
<pre lang="php">

<?php

session_start();

if (!empty($_POST['validation']) &#038;&#038; strlen($_POST['validation'])==10){

	$required_fields = array('name', 'email', 'phone', 'subject', 'message');

	foreach($_POST as $key => $value) {

		$_SESSION[$key] = trim($value);

		if(in_array($key, $required_fields) &#038;&#038; empty($value)) $errors[] = ucwords($key) .' is required!';

	}

	if(!$errors) {

		$subject = $_SESSION['subject'];

		$message = $_SESSION['subject'] ."\n\n";

		$message .= "Name: ". $_SESSION['name'] ."\n";

		$message .= "E-Mail: ". $_SESSION['email'] ."\n\n";

		$message .= "Phone: ". $_SESSION['phone'] ."\n";

		$message .= "Message: ". wordwrap ($_SESSION['message']);

		$message .= "\n\n";

		$message .= date('j/m/Y g:ia');

		$headers  = "From:" . $_SESSION['name'] ." <". $_SESSION['email'] .">\n";

		$headers .= "Reply-To: ". $_SESSION['name'] ." <". $_SESSION['email'] .">\n";

		$headers .= "Return-Path: ". $_SESSION['name'] ." <". $_SESSION['email'] .">\n";

		$headers .= "Bcc:\n";

		if(mail($to, $subject, $message,$headers)){

			$status = "Thank You, Your enquiry has been sent.";

		}else{

			$status = "ERROR! There was a system error, Please send your enquiry again.";

		}

	}else{

		$status = implode('', $errors	);

	}

}
	$_SESSION['error'] = $status;
	header("Location: ../contact.php");
	die();

?>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://jzm.co.nz/Blog/php-contact-form/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Jquery.Cycle Help</title>
		<link>http://jzm.co.nz/Blog/jquery-cycle-help/</link>
		<comments>http://jzm.co.nz/Blog/jquery-cycle-help/#comments</comments>
		<pubDate>Fri, 20 Aug 2010 03:18:25 +0000</pubDate>
		<dc:creator>Jess</dc:creator>
				<category><![CDATA[Jquery]]></category>
		<category><![CDATA[cycle]]></category>
		<category><![CDATA[help]]></category>

		<guid isPermaLink="false">http://jzm.co.nz/Blog/?p=153</guid>
		<description><![CDATA[I have got the following code: What I would like to do is enable it so when the space bar is pressed &#8211; the slideshow stops.  When is is pressed again the slideshow resumes.  I have googled and have not come across anything like what I am looking for. $(document).ready(function() { $(&#8216;.slideshow&#8217;).cycle({ fx: &#8216;fade&#8217; // [...]]]></description>
			<content:encoded><![CDATA[<p>I have got the following code:</p>
<p>What I would like to do is  enable it so when the space bar is pressed &#8211; the slideshow stops.  When  is is pressed again the slideshow resumes.  I have googled and have not  come across anything like what I am looking for.</p>
<p>$(document).ready(function() {<br />
$(&#8216;.slideshow&#8217;).cycle({<br />
fx: &#8216;fade&#8217; // choose your transition type, ex: fade, scrollUp, shuffle, etc&#8230;<br />
});<br />
});</p>
]]></content:encoded>
			<wfw:commentRss>http://jzm.co.nz/Blog/jquery-cycle-help/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Are We Now Getting Quicker Response&#8217;s From Businesses</title>
		<link>http://jzm.co.nz/Blog/are-we-now-getting-quicker-responses-from-businesses/</link>
		<comments>http://jzm.co.nz/Blog/are-we-now-getting-quicker-responses-from-businesses/#comments</comments>
		<pubDate>Mon, 09 Aug 2010 05:38:25 +0000</pubDate>
		<dc:creator>Jess</dc:creator>
				<category><![CDATA[Social Media]]></category>
		<category><![CDATA[Business]]></category>
		<category><![CDATA[Contact]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Telecom]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[Vodafone]]></category>

		<guid isPermaLink="false">http://jzm.co.nz/Blog/?p=148</guid>
		<description><![CDATA[Today I was away from my course due to expecting some course text books and with all of this rain at the moment I did not want them getting wet.  So knowing that they were sent on Thursday afternoon  I e-mail the company this morning asking for the track and trace number so I could [...]]]></description>
			<content:encoded><![CDATA[<p>Today I was away from my course due to expecting some course text books and with all of this rain at the moment I did not want them getting wet.  So knowing that they were sent on Thursday afternoon  I e-mail the company this morning asking for the track and trace number so I could find out when my package will be arriving.  At about 4PM I placed a tweet over Twitter because I was a bit let down by the service a few minutes later I get a reply.</p>
<p>This has got me thinking due to I have had also quicker responses from other big names businesses via Twitter and from my point of view I find it quicker to get answers from them via Twitter then ring and be placed on hold listening to the Natures Best CD for a hour.</p>
<p>Is social media the new way of getting answers?</p>
<p>[poll id="4"]</p>
]]></content:encoded>
			<wfw:commentRss>http://jzm.co.nz/Blog/are-we-now-getting-quicker-responses-from-businesses/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Images and Web</title>
		<link>http://jzm.co.nz/Blog/images-and-web/</link>
		<comments>http://jzm.co.nz/Blog/images-and-web/#comments</comments>
		<pubDate>Fri, 23 Jul 2010 01:17:00 +0000</pubDate>
		<dc:creator>Jess</dc:creator>
				<category><![CDATA[Graphics]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[.gif]]></category>
		<category><![CDATA[.jpg]]></category>
		<category><![CDATA[.png]]></category>
		<category><![CDATA[Formats]]></category>
		<category><![CDATA[Images]]></category>
		<category><![CDATA[Slicing]]></category>

		<guid isPermaLink="false">http://jzm.co.nz/Blog/?p=143</guid>
		<description><![CDATA[Today, We learnt about slicing a website ready for html coding.  The tutor proceeded to tell us that it was best to save graphics in .JPG but the thing is I cannot remember the last time I used a .JPG file in a website. As a Developer what file format do you use? [poll id="3"]]]></description>
			<content:encoded><![CDATA[<p>Today, We learnt about slicing a website ready for html coding.  The tutor proceeded to tell us that it was best to save graphics in .JPG but the thing is I cannot remember the last time I used a .JPG file in a website.</p>
<p style="text-align: center;"><strong>As a Developer what file format do you use?</strong></p>
<p style="text-align: center;">
<p style="text-align: center;">[poll id="3"]</p>
]]></content:encoded>
			<wfw:commentRss>http://jzm.co.nz/Blog/images-and-web/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>General Website Usability Vs Disability Usability</title>
		<link>http://jzm.co.nz/Blog/general-website-usability-vs-disability-usability/</link>
		<comments>http://jzm.co.nz/Blog/general-website-usability-vs-disability-usability/#comments</comments>
		<pubDate>Wed, 14 Jul 2010 07:03:50 +0000</pubDate>
		<dc:creator>Jess</dc:creator>
				<category><![CDATA[Usability]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Disability]]></category>
		<category><![CDATA[Guidelines]]></category>
		<category><![CDATA[Planning]]></category>

		<guid isPermaLink="false">http://jzm.co.nz/Blog/?p=136</guid>
		<description><![CDATA[During my first two days of learning I have come to a very serious issue when it comes to learning about website usability it seems that disability usability gets interlinked with general website usability.  I have thought to myself that this cannot be correct.  I proceeded to send an e-mail to Nic Steenhout from Accessibility [...]]]></description>
			<content:encoded><![CDATA[<p>During my first two days of learning I have come to a very serious issue when it comes to learning about website usability it seems that disability usability gets interlinked with general website usability.  I have thought to myself that this cannot be correct.  I proceeded to send an e-mail to Nic Steenhout from <a href="http://accessibility.net.nz/">Accessibility NZ</a> stating:</p>
<p><strong>Should disability usability come under its own section away from general usability?</strong></p>
<p>Nic&#8217;s response was very informative and along the same lines that I have been thinking over the past couple of days.</p>
<p>&#8220;This is, I think, one of the most important issues of accessibility/usability. A lot of people believe that if they know usability, they know accessibility. And it&#8217;s not the case at all.  &#8220;Disability accessibility&#8221; is a topic all of its own, it does not come under &#8220;general usability&#8221;. Note, we talk about disability accessibility, not disability usability.&#8221;</p>
<p>Nic also goes onto say &#8220;I think it&#8217;s a bloody shame that schools/university teaching web development barely touch on usability and rarely discuss accessibility. Particularly in view of legal requirements for websites needing to be accessible.&#8221;</p>
<p>Now after all of this I now have another question:</p>
<p>Why is there no teaching about disability usability when it comes to learning/studying about web development and should this be included within the usability guidelines?</p>
]]></content:encoded>
			<wfw:commentRss>http://jzm.co.nz/Blog/general-website-usability-vs-disability-usability/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Website Usability</title>
		<link>http://jzm.co.nz/Blog/website-usability/</link>
		<comments>http://jzm.co.nz/Blog/website-usability/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 03:16:24 +0000</pubDate>
		<dc:creator>Jess</dc:creator>
				<category><![CDATA[Usability]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Clients]]></category>
		<category><![CDATA[Interface]]></category>
		<category><![CDATA[Methods]]></category>
		<category><![CDATA[Planning]]></category>
		<category><![CDATA[User]]></category>
		<category><![CDATA[Website]]></category>

		<guid isPermaLink="false">http://jzm.co.nz/Blog/?p=112</guid>
		<description><![CDATA[Today was my first day beginning a Diploma of Web Development at Natcoll and the first section that we are covering is about website usability and the methods that are out there.  The question that I have been pondering over today  is that even through we think that &#8220;usability&#8221; is common knowledge. Do you as [...]]]></description>
			<content:encoded><![CDATA[<p>Today was my first day beginning a <a href="http://www.natcoll.ac.nz/courses/diploma-of-web-development/">Diploma of Web Development</a> at <a href="http://www.natcoll.ac.nz">Natcoll</a> and the first section that we are covering is about website usability and the methods that are out there.  The question that I have been pondering over today  is that even through we think that &#8220;usability&#8221; is common knowledge.</p>
<p>Do you as a Web Developer use any of these <a href="http://www.usability.gov/methods/index.html">Methods</a> in your day to day working environment?.</p>
<p>Please feel free to leave a comment or to vote in the poll.</p>
<p>[poll id="2"]</p>
]]></content:encoded>
			<wfw:commentRss>http://jzm.co.nz/Blog/website-usability/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Adding Modules In Oscommerce</title>
		<link>http://jzm.co.nz/Blog/adding-modules-in-oscommerce/</link>
		<comments>http://jzm.co.nz/Blog/adding-modules-in-oscommerce/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 23:19:39 +0000</pubDate>
		<dc:creator>Jess</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Adding]]></category>
		<category><![CDATA[Module]]></category>
		<category><![CDATA[Modules]]></category>
		<category><![CDATA[OSC]]></category>
		<category><![CDATA[Oscommerce]]></category>

		<guid isPermaLink="false">http://jzm.co.nz/Blog/?p=80</guid>
		<description><![CDATA[I have been working on a website that has required me to create new shipping methods. The steps below will enable you to create ether new payment or shipping modules. Yourmodule = Module Name Step One: Make a back up copy of the following files: Your OSC Dir /includes/modules/shipping or payment dictionary/item.php. and Your OSC [...]]]></description>
			<content:encoded><![CDATA[<p>I have been working on a website that has required me to create new shipping methods.  The steps below will enable you to create ether new payment or shipping modules.</p>
<p><strong>Yourmodule = Module Name</strong></p>
<p><strong>Step One:</strong><br />
Make a back up copy of the following files:</p>
<p>Your OSC Dir /includes/modules/shipping  <strong>or </strong>payment dictionary/item.php.</p>
<p>and</p>
<p>Your OSC Dir /public_html/includes/languages/english/modules/shipping <strong>or </strong>payment dictionary/item.php.</p>
<p><strong>Step Two</strong></p>
<p>Open up the <strong>modules </strong>item.php file and re save it as <strong>yourmodule.php</strong>.</p>
<p><strong>Step Three</strong></p>
<p>Make the following changes:</p>
<pre lang="PHP">/*
$Id: yourmodule.php 1739 2007-12-20 00:52:16Z hpdl $

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

Copyright (c) 2003 osCommerce

Released under the GNU General Public License
*/

class yourmodule {
var $code, $title, $description, $icon, $enabled;

// class constructor
function yourmodule() {
global $order;

$this-&gt;code = 'yourmodule';
$this-&gt;title = MODULE_SHIPPING_YOURMODULE_TEXT_TITLE;
$this-&gt;description = MODULE_SHIPPING_YOURMODULE_TEXT_DESCRIPTION;
$this-&gt;sort_order = MODULE_SHIPPING_YOURMODULE_SORT_ORDER;
$this-&gt;icon = '';
$this-&gt;tax_class = MODULE_SHIPPING_YOURMODULE_TAX_CLASS;
$this-&gt;enabled = ((MODULE_SHIPPING_YOURMODULE_STATUS == 'True') ? true : false);

if ( ($this-&gt;enabled == true) &amp;&amp; ((int)MODULE_SHIPPING_YOURMODULE_ZONE &gt; 0) ) {
$check_flag = false;
$check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_YOURMODULE_ZONE . "' and zone_country_id = '" . $order-&gt;delivery['country']['id'] . "' order by zone_id");
while ($check = tep_db_fetch_array($check_query)) {
if ($check['zone_id'] &lt; 1) {             $check_flag = true;             break;           } elseif ($check['zone_id'] == $order-&gt;delivery['zone_id']) {
$check_flag = true;
break;
}
}

if ($check_flag == false) {
$this-&gt;enabled = false;
}
}
}

// class methods
function quote($method = '') {
global $order, $total_count;

$this-&gt;quotes = array('id' =&gt; $this-&gt;code,
'module' =&gt; MODULE_SHIPPING_YOURMODULE_TEXT_TITLE,
'methods' =&gt; array(array('id' =&gt; $this-&gt;code,
'title' =&gt; MODULE_SHIPPING_YOURMODULE_TEXT_WAY,
'cost' =&gt; (MODULE_SHIPPING_YOURMODULE_COST * $total_count) + MODULE_SHIPPING_YOURMODULE_HANDLING)));

if ($this-&gt;tax_class &gt; 0) {
$this-&gt;quotes['tax'] = tep_get_tax_rate($this-&gt;tax_class, $order-&gt;delivery['country']['id'], $order-&gt;delivery['zone_id']);
}

if (tep_not_null($this-&gt;icon)) $this-&gt;quotes['icon'] = tep_image($this-&gt;icon, $this-&gt;title);

return $this-&gt;quotes;
}

function check() {
if (!isset($this-&gt;_check)) {
$check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_YOURMODULE_STATUS'");
$this-&gt;_check = tep_db_num_rows($check_query);
}
return $this-&gt;_check;
}

function install() {
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable fifteen Shipping', 'MODULE_SHIPPING_YOURMODULE_STATUS', 'True', 'Do you want to offer per fifteen rate shipping?', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Shipping Cost', 'MODULE_SHIPPING_YOURMODULE_COST', '2.50', 'The shipping cost will be multiplied by the number of items in an order that uses this shipping method.', '6', '0', now())");
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Handling Fee', 'MODULE_SHIPPING_YOURMODULE_HANDLING', '0', 'Handling fee for this shipping method.', '6', '0', now())");
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Tax Class', 'MODULE_SHIPPING_YOURMODULE_TAX_CLASS', '0', 'Use the following tax class on the shipping fee.', '6', '0', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now())");
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Shipping Zone', 'MODULE_SHIPPING_YOURMODULE_ZONE', '0', 'If a zone is selected, only enable this shipping method for that zone.', '6', '0', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())");
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_SHIPPING_YOURMODULE_SORT_ORDER', '0', 'Sort order of display.', '6', '0', now())");
}

function remove() {
tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this-&gt;keys()) . "')");
}

function keys() {
return array('MODULE_SHIPPING_YOURMODULE_STATUS', 'MODULE_SHIPPING_YOURMODULE_COST', 'MODULE_SHIPPING_YOURMODULE_HANDLING', 'MODULE_SHIPPING_YOURMODULE_TAX_CLASS', 'MODULE_SHIPPING_YOURMODULE_ZONE', 'MODULE_SHIPPING_YOURMODULE_SORT_ORDER');
}
}</pre>
<p><strong>Step Four</strong></p>
<p>Open up the <strong>languages </strong>item.php file and re save it as <strong>yourmodule.php.</strong></p>
<p><strong>Step Five</strong></p>
<p>Make the following changes:</p>
<pre lang="PHP">
<?php
/*
$Id: yourmodule.php 1739 2007-12-20 00:52:16Z hpdl $

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

Copyright (c) 2002 osCommerce

Released under the GNU General Public License
*/

define('MODULE_SHIPPING_YOURMODULE_TEXT_TITLE', 'Module Text');
define('MODULE_SHIPPING_YOURMODULE_TEXT_DESCRIPTION', 'ModuleText');
define('MODULE_SHIPPING_YOURMODULE_TEXT_WAY', 'Module Text');
?>
</pre>
<p><strong> Step Five</strong></p>
<p> Install the modules via OSC Admin</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://jzm.co.nz/Blog/adding-modules-in-oscommerce/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

