<?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>Roxxor Tech Blog</title>
	<atom:link href="http://www.roxxor.co.uk/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.roxxor.co.uk/blog</link>
	<description></description>
	<lastBuildDate>Tue, 20 Jul 2010 20:30:59 +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>CakePHP join models &#8211; or hasMany through</title>
		<link>http://www.roxxor.co.uk/blog/2010/07/cakephp-join-models-or-hasmany-through/</link>
		<comments>http://www.roxxor.co.uk/blog/2010/07/cakephp-join-models-or-hasmany-through/#comments</comments>
		<pubDate>Tue, 20 Jul 2010 19:41:21 +0000</pubDate>
		<dc:creator>Allistair</dc:creator>
				<category><![CDATA[CakePHP]]></category>

		<guid isPermaLink="false">http://www.roxxor.co.uk/blog/?p=47</guid>
		<description><![CDATA[The following article has been coded, tested and submitted to the Cake 1.3 Book by Roxxor but has yet to be published. It is sometimes desirable to store additional data with a many to many association. Consider the following Student hasAndBelongsToMany Course Course hasAndBelongsToMany Student In other words, a Student can take many Courses and [...]]]></description>
			<content:encoded><![CDATA[<p class="note">The following article has been coded, tested and submitted to the <a href="http://book.cakephp.org/view/875/x1-3-Collection">Cake 1.3 Book</a> by Roxxor but has yet to be published.</p>
<p>
It is sometimes desirable to store additional data with a many to many association. Consider the following
</p>
<pre class="brush:plain">
Student hasAndBelongsToMany Course
Course hasAndBelongsToMany Student
</pre>
<p>
In other words, a Student can take many Courses and a Course can be taken my many Students. This is a simple many to many association demanding a table such as this
</p>
<pre class="brush:plain">
id | student_id | course_id
</pre>
<p>
Now what if we want to store the number of days that were attended by the student on the course and their final grade? The table we&#8217;d want would be
</p>
<pre class="brush:plain">
id | student_id | course_id | days_attended | grade
</pre>
<p>
The trouble is, hasAndBelongsToMany will not support this type of scenario because when hasAndBelongsToMany associations are saved, the association is deleted first. You would lose the extra data in the columns as it is not replaced in the new insert.
</p>
<p>
The way to implement our requirement is to use a <strong>join model</strong>, otherwise known (in Rails) as a <strong>hasMany through</strong> association. That is, the association is a model itself. So, we can create a new model CourseMembership. Take a look at the following models.
</p>
<pre class="brush:php">
		student.php

		class Student extends AppModel
		{
			public $hasMany = array(
				'CourseMembership'
			);

			public $validate = array(
				'first_name' => array(
					'rule' => 'notEmpty',
					'message' => 'A first name is required'
				),
				'last_name' => array(
					'rule' => 'notEmpty',
					'message' => 'A last name is required'
				)
			);
		}      

		course.php

		class Course extends AppModel
		{
			public $hasMany = array(
				'CourseMembership'
			);

			public $validate = array(
				'name' => array(
					'rule' => 'notEmpty',
					'message' => 'A course name is required'
				)
			);
		}

		course_membership.php

		class CourseMembership extends AppModel
		{
			public $belongsTo = array(
				'Student', 'Course'
			);

			public $validate = array(
				'days_attended' => array(
					'rule' => 'numeric',
					'message' => 'Enter the number of days the student attended'
				),
				'grade' => array(
					'rule' => 'notEmpty',
					'message' => 'Select the grade the student received'
				)
			);
		}
</pre>
<p>
The CourseMembership join model uniquely identifies a given Student&#8217;s participation on a Course in addition to extra meta-information.
</p>
<h3>Working with join model data</h3>
<p>
Now that the models have been defined, let&#8217;s see how we can save all of this. Let&#8217;s say the Head of Cake School has asked us the developer to write an application that allows him to log a student&#8217;s attendance on a course with days attended and grade. Take a look at the following code.
</p>
<pre class="brush:php">
	controllers/course_membership_controller.php

	class CourseMembershipsController extends AppController
	{
		public $uses = array('CourseMembership');

		public function index() {
			$this->set('course_memberships_list', $this->CourseMembership->find('all'));
		}

		public function add() {

			if (! empty($this->data)) {

				if ($this->CourseMembership->saveAll(
					$this->data, array('validate' => 'first'))) {

					$this->redirect(array('action' => 'index'));
				}
			}
		}
	}

	views/course_memberships/add.ctp

		echo $form->create('CourseMembership');
		echo $form->input('Student.first_name');
		echo $form->input('Student.last_name');
		echo $form->input('Course.name');
		echo $form->input('CourseMembership.days_attended');
		echo $form->input('CourseMembership.grade');
		echo '<button type="submit">Save</button>';
		echo $form->end();
</pre>
<p>
You can see that the form uses the form helper&#8217;s dot notation to build up the data array for the controller&#8217;s save which looks a bit like this when submitted.
</p>
<pre class="brush:plain">
	Array
	(
	    [Student] => Array
	        (
	            [first_name] => Joe
	            [last_name] => Bloggs
	        )

	    [Course] => Array
	        (
	            [name] => Cake
	        )

	    [CourseMembership] => Array
	        (
	            [days_attended] => 5
	            [grade] => A
	        )

	)
</pre>
<p>
Cake will happily be able to save the lot together and assigning the foreign keys of the Student and Course into CourseMembership with a saveAll call with this data structure. If we run the index action of our CourseMembershipsController the data structure received now from a find(&#8216;all&#8217;) is:
</p>
<pre class="brush:plain">
	Array
	(
	    [0] => Array
	        (
	            [CourseMembership] => Array
	                (
	                    [id] => 1
	                    [student_id] => 1
	                    [course_id] => 1
	                    [days_attended] => 5
	                    [grade] => A
	                )

	            [Student] => Array
	                (
	                    [id] => 1
	                    [first_name] => Joe
	                    [last_name] => Bloggs
	                )

	            [Course] => Array
	                (
	                    [id] => 1
	                    [name] => Cake
	                )

	        )

	)
</pre>
<p>
There are of course many ways to work with a join model. The version above assumes you want to save everything at-once. There will be cases where you want to create the Student and Course independently and at a later point associate the two together with a CourseMembership. So you might have a form that allows selection of existing students and courses from picklists or ID entry and then the two meta-fields for the CourseMembership, e.g.
</p>
<pre class="brush:php">

	views/course_memberships/add.ctp

	echo $form->create('CourseMembership');
	echo $form->input('Student.id', array('type' => 'text', 'label' => 'Student ID', 'default' => 1));
	echo $form->input('Course.id', array('type' => 'text', 'label' => 'Course ID', 'default' => 1));
	echo $form->input('CourseMembership.days_attended');
	echo $form->input('CourseMembership.grade');
	echo '<button type="submit">Save</button>';
	echo $form->end();
</pre>
<pre class="brush:plain">
	$this->data when POSTed

	Array
	(
	    [Student] => Array
	        (
	            [id] => 1
	        )

	    [Course] => Array
	        (
	            [id] => 1
	        )

	    [CourseMembership] => Array
	        (
	            [days_attended] => 10
	            [grade] => 5
	        )

	)
</pre>
<p>
Again Cake is good to us and pulls the Student id and Course id into the CourseMembership with the saveAll.</p>
<p><p>
Join models are pretty useful things to be able to use and Cake makes it easy to do so with its built-in hasMany and belongsTo associations and saveAll feature.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.roxxor.co.uk/blog/2010/07/cakephp-join-models-or-hasmany-through/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wrapping text in FPDF table cells</title>
		<link>http://www.roxxor.co.uk/blog/2007/10/wrapping-text-in-fpdf-table-cells/</link>
		<comments>http://www.roxxor.co.uk/blog/2007/10/wrapping-text-in-fpdf-table-cells/#comments</comments>
		<pubDate>Fri, 05 Oct 2007 10:37:09 +0000</pubDate>
		<dc:creator>Allistair</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.roxxor.co.uk/blog/2007/10/05/wrapping-text-in-fpdf-table-cells/</guid>
		<description><![CDATA[This article aims to help those who like myself wondered how to make text wrap within a table cell using FPDF to generate a the PDF. A few posts around the web seem to have missed the point that wrapping comes out of the box in FPDF using the MultiCell function. However, it&#8217;s just a [...]]]></description>
			<content:encoded><![CDATA[<p>This article aims to help those who like myself wondered how to make text wrap within a table cell using FPDF to generate a the PDF. A few posts around the web seem to have missed the point that wrapping comes out of the box in FPDF using the MultiCell function. However, it&#8217;s just a tiny bit tricky but not prohibitively so. So, this is what we are aiming for &#8211; an invoice.</p>
<p><img src="/blog/wp-content/uploads/2007/10/invoice.gif" alt="FPDF Invoice" /></p>
<p>There are 2 examples of wrapping here. Firstly the client address is wrapped, and secondly the first row of the line item data has a wrapped description.</p>
<p><a href="http://www.roxxor.co.uk/repository/demos/fpdf/" target="_blank">View the PDF here</a></p>
<p>In both cases the MultiCell in-built function is used. Before I had this solution working I was using the Cell function. In that case, long text simply continued through to the next cell &#8216;Quantity&#8217;. In the case of Cell, you can simply output a series of calls to the function with a cell width and so fourth and the cells will line up against each other on the same line.</p>
<p>When I switched to MultiCell for the first cell of each row only, I found that it would cause all subsequent cells in the same row to wrap to the next line. Therefore my solution was to use the SetXY function to reposition the &#8216;cursor&#8217; back to where the 2nd cell of the current row would normally be, and then proceed to use Cell calls.</p>
<p>In order to do that it&#8217;s a case of marking the current X and Y coordinates of the cursor prior to entering the line item loop and calling SetXY just after the 1st cell MultiCell function call. That solved the line wrapping issue and my text wrapped inside the first cell &#8211; great.</p>
<p>The second issue however is that the MultiCell is arbitrarily high depending on the amount of text wrapping going on. I had been provided a static height to my Cell calls as as such they were now out of line with the first column, that is, the text and border lines were all out of sync with the 1st column.</p>
<p>To solve that problem it was a case of grabbing the Y coordinate of the cursor before and immediately after the MultiCell call, finding the difference to ascertain the height of the cell, and then using this to size the height of the remaining Cell calls on the row.</p>
<p><strong>Source Code</strong></p>
<p>Please feel free to <a href="http://www.roxxor.co.uk/repository/demos/fpdf/InvoicePDF.zip">download the source code for this article</a> which builds the invoice PDF as described.</p>
<p>The source code is provided as a ZIP file with <strong>index.php</strong> and <strong>InvoicePDF.class.php</strong>. You will need to <a href="http://www.fpdf.org/" target="_blank">obtain the FPDF library</a> yourself and modify the <strong>index.php</strong> include file locations.</p>
<p>Best of luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.roxxor.co.uk/blog/2007/10/wrapping-text-in-fpdf-table-cells/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Moo &#8211; a simple idea done fantastically well</title>
		<link>http://www.roxxor.co.uk/blog/2007/09/moo-a-simple-idea-done-fantastically-well/</link>
		<comments>http://www.roxxor.co.uk/blog/2007/09/moo-a-simple-idea-done-fantastically-well/#comments</comments>
		<pubDate>Fri, 07 Sep 2007 08:55:42 +0000</pubDate>
		<dc:creator>Allistair</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Review]]></category>
		<category><![CDATA[Websites]]></category>

		<guid isPermaLink="false">http://www.roxxor.co.uk/blog/2007/09/07/moo-a-simple-idea-done-fantastically-well/</guid>
		<description><![CDATA[Today is very exciting for me (as well as others &#8211; National Defence Day in Pakistan, Independence Day in Brazil and Victory Day in Mozambique). But I&#8217;m excited because I received my Moo minicards &#8211; my roxxor business cards. Moo is an online printing company that produce a small set of quality eco-friendly products such [...]]]></description>
			<content:encoded><![CDATA[<p>Today is very exciting for me (as well as others &#8211; National Defence Day in Pakistan, Independence Day in Brazil and Victory Day in Mozambique). But I&#8217;m excited because I received my <a href="http://www.moo.com" title="Moo" target="_blank">Moo</a> minicards &#8211; my roxxor business cards.</p>
<p>Moo is an online printing company that produce a small set of quality eco-friendly products such as minicards, stickerbooks and notecards, and for a great price and fast global delivery.</p>
<p style="text-align: center"><img src="/blog/wp-content/uploads/2007/09/moo_1.jpg" alt="Moo Minicards Box" /></p>
<p>The great thing about Moo is that you can upload your photos or (the bit that I like) brilliantly get it to import photos out of your favourite  image-related accounts that you may have around the web such as Flickr, Bebo, VOX and more. Or, if you don&#8217;t have any images, they have some stuff for you to choose from. They don&#8217;t yet do full photo albums but I really hope they do in future.</p>
<p>We decided at roxxor to use Moo Minicards for our business cards. A business card says a lot about the person or company giving it and we felt we wanted to (as Ben likes to say) &#8220;eat our own dog food&#8221; and demonstrate our awareness and support of excellent web businesses.</p>
<p style="text-align: center" align="left"><img src="/blog/wp-content/uploads/2007/09/moo_3.jpg" alt="My Moo Minicard Front" /></p>
<p>Moo provides an online editor for entering the information for your card and placing imagery if you are customising it yourself. We chose to download the Photoshop templates for ours but you need not. When you&#8217;re happy, you submit your design, pay a good price and just 3 days later you get an exciting little box packed full of cards. Simplicity.</p>
<p>The first thing you&#8217;ll notice is their size. This size was typical of &#8220;calling cards&#8221; back in the day, and are 1/2 the size of a normal business card. Most of the time normal business cards do not use that space and if they do look over-crowded and ugly. The material is best described as a satin finish &#8211; that is, not glossy and not matte but just a slight sheen. The thickness is pleasingly thick and together with their size makes bending only possible in one direction.</p>
<p style="text-align: center"><img src="/blog/wp-content/uploads/2007/09/moo_2.jpg" alt="My Moo Minicard" /></p>
<p>We chose to make an impact with our brand on the front side of the card, whilst adding limited contact information to the rear. And yet even with this smaller card, it looks fresh and spacious whilst still providing clear brand and enough information.</p>
<p>We highly recommend <a href="http://www.moo.com" target="_blank">Moo</a> &#8211; it&#8217;s one of the more useful companies out there on the web doing a fantastic job of a simple idea &#8211; just as business should be.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.roxxor.co.uk/blog/2007/09/moo-a-simple-idea-done-fantastically-well/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What Browser Version To Design For</title>
		<link>http://www.roxxor.co.uk/blog/2007/08/what-browser-version-to-design-for/</link>
		<comments>http://www.roxxor.co.uk/blog/2007/08/what-browser-version-to-design-for/#comments</comments>
		<pubDate>Thu, 16 Aug 2007 11:38:19 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.roxxor.co.uk/blog/2007/08/16/what-browser-version-to-design-for/</guid>
		<description><![CDATA[We always try to design things so they are cross browser compatible and that things work and look the same for all user no matter what version or operating system they are using. We encountered a problem recently with a site not rendering correctly in IE6.0 &#8211; of course our dev guys fixed this right [...]]]></description>
			<content:encoded><![CDATA[<p>We always try to design things so they are cross browser compatible and that things work and look the same for all user no matter what version or operating system they are using.</p>
<p>We encountered a problem recently with a site not rendering correctly in IE6.0 &#8211; of course our dev guys fixed this right up but this inspired me to get some stats on just what browsers folks were using on our clients web sites. I took a peak at the analytics for this across a range of our clients that have significant traffic volumes (in excess of 1M visit per month) and a varied demographic user base across a range of industry sectors (Fashion, Retail and Transport) to make these stats work as &#8216;real&#8217; averages.</p>
<p>It made interesting reading and I thought you might like to see the results.</p>
<table unselectable="on" border="1" cellpadding="2" cellspacing="0" width="458">
<tr>
<td valign="top" width="98"><strong>ORDER</strong></td>
<td valign="top" width="141"><strong>BROWSER</strong></td>
<td valign="top" width="217"><strong>PERCENTAGE OF TRAFFIC</strong></td>
</tr>
<tr>
<td valign="top" width="98"><strong>1</strong></td>
<td valign="top" width="141"><strong>Internet Explorer</strong></td>
<td valign="top" width="217"><strong>88.58%</strong></td>
</tr>
<tr>
<td valign="top" width="98">a</td>
<td valign="top" width="141">v6.0</td>
<td valign="top" width="217">57.71%</td>
</tr>
<tr>
<td valign="top" width="98">b</td>
<td valign="top" width="141">v7.0</td>
<td valign="top" width="217">41.68%</td>
</tr>
<tr>
<td valign="top" width="98">c</td>
<td valign="top" width="141">v5.5</td>
<td valign="top" width="217">0.37%</td>
</tr>
<tr>
<td valign="top" width="98"><strong>2</strong></td>
<td valign="top" width="141"><strong>Firefox</strong></td>
<td valign="top" width="217"><strong>9.00%</strong></td>
</tr>
<tr>
<td valign="top" width="98">a</td>
<td valign="top" width="141">2.0.0.6</td>
<td valign="top" width="217">37.79%</td>
</tr>
<tr>
<td valign="top" width="98">b</td>
<td valign="top" width="141">2.0.0.5</td>
<td valign="top" width="217">30.91%</td>
</tr>
<tr>
<td valign="top" width="98">c</td>
<td valign="top" width="141">2.0.0.4</td>
<td valign="top" width="217">11.84%</td>
</tr>
<tr>
<td valign="top" width="98">d</td>
<td valign="top" width="141">1.5.0.12</td>
<td valign="top" width="217">7.97%</td>
</tr>
<tr>
<td valign="top" width="98">e</td>
<td valign="top" width="141">1.0.7</td>
<td valign="top" width="217">2.13%</td>
</tr>
<tr>
<td valign="top" width="98"><strong>3</strong></td>
<td valign="top" width="141"><strong>Safari</strong></td>
<td valign="top" width="217"><strong>1.91%</strong></td>
</tr>
<tr>
<td valign="top" width="98"><strong>4</strong></td>
<td valign="top" width="144"><strong>Opera</strong></td>
<td valign="top" width="217"><strong>0.29%</strong></td>
</tr>
<tr>
<td valign="top" width="98"><strong>5</strong></td>
<td valign="top" width="144"><strong>Mozilla</strong></td>
<td valign="top" width="217"><strong>0.08%</strong></td>
</tr>
</table>
<p>Based on this data we have decided to rule out IE5.5 from any design/dev decisions going forwards. Sorry to any of you still using this, but there just aren&#8217;t enough of you out there to warrant the additional tests.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.roxxor.co.uk/blog/2007/08/what-browser-version-to-design-for/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Populate PHP Object Attributes from Database Column Names Dynamically</title>
		<link>http://www.roxxor.co.uk/blog/2007/07/populate-php-object-attributes-from-database-column-names-dynamically/</link>
		<comments>http://www.roxxor.co.uk/blog/2007/07/populate-php-object-attributes-from-database-column-names-dynamically/#comments</comments>
		<pubDate>Tue, 03 Jul 2007 20:27:41 +0000</pubDate>
		<dc:creator>Allistair</dc:creator>
				<category><![CDATA[OOP]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.roxxor.co.uk/blog/2007/07/03/populate-php-object-attributes-from-database-column-names-dynamically/</guid>
		<description><![CDATA[If you like coding PHP the OOP way then you will often find yourself in the arduous position of needing to populate your object attributes (member variables) from database row data. And you do this again and again and again, and you find it all rather repetitive, which it is. And you don&#8217;t fancy looking [...]]]></description>
			<content:encoded><![CDATA[<p>If you like coding PHP the OOP way then you will often find yourself in the arduous position of needing to populate your object attributes (member variables) from database row data. And you do this again and again and again, and you find it all rather repetitive, which it is. And you don&#8217;t fancy looking at an object relational mapping solution for now, but promise yourself you will &#8220;Another Time&#8221;.</p>
<p>Here it is;</p>
<pre class="brush:php">
class MyObject {
  function __construct($data = NULL) {
    if ($data) {
      foreach ($data as $ak => $av) {
        eval("\$this->" . $this->db2Camel($ak) . " = '{$av}';");
      }
    }
  }

  function db2Camel($str) {
    $str = strtolower($str);
    $parts = explode('_', $str);
    for ($i = 0; $i < count($parts); $i++) {
      if ($i == 0) {
        $parts[$i] = strtolower($parts[$i]);
      } else {
        $parts[$i] = ucfirst($parts[$i]);
      }
    }
    return implode('', $parts);
  }
}
</pre>
<p>This code relies on a number of assumptions. These are, but are probably not limited to;</p>
<ol>
<li>The data parameter to the constructor is an associative array, depicting a row from the database.</li>
<li>That the database column names are lowercase, and separated by underscores, e.g. the_column_name</li>
<li>Your attributes will be in camel casing as governed by the db2Camel function</li>
<li>Your attributes will be public as they do not benefit from an explicit declaration of access scope such as private or protected.</li>
<li>You will access the attributes direct on the object, not through get accessors, e.g. $obj-&gt;theAttribute</li>
<li>A programmer would not know the attributes that an object contained from reading the code, they would need to understand the constructor's function and consult the database column names to infer the attribute names.</li>
</ol>
<p>If you are happy with all those assumptions, then this code might just prove quite handy in expediating the process of population of PHP object attributes dynamically from a database.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.roxxor.co.uk/blog/2007/07/populate-php-object-attributes-from-database-column-names-dynamically/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XAMPP on Vista</title>
		<link>http://www.roxxor.co.uk/blog/2007/06/xampp-on-vista/</link>
		<comments>http://www.roxxor.co.uk/blog/2007/06/xampp-on-vista/#comments</comments>
		<pubDate>Tue, 26 Jun 2007 13:32:27 +0000</pubDate>
		<dc:creator>Allistair</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Windows Vista]]></category>
		<category><![CDATA[xAMP Stack]]></category>

		<guid isPermaLink="false">http://blog.roxxor.co.uk/?p=4</guid>
		<description><![CDATA[Getting XAMPP working on Vista requires 2 things as far as I can see. I tried a fresh 1.6.2 install today but it does not work out of the box. Vista complains only about the Apache web server. Reading around, I saw developers saying all sorts, such as making copies of the XAMPP folder to ensure Vista [...]]]></description>
			<content:encoded><![CDATA[<p>Getting XAMPP working on Vista requires 2 things as far as I can see. I tried a fresh 1.6.2 install today but it does not work out of the box. Vista complains only about the Apache web server.</p>
<p>Reading around, I saw developers saying all sorts, such as making copies of the XAMPP folder to ensure Vista had the right permissions, or turning Vista&#8217;s User Access Control mechanism off, or installing services from the command line and so on and fourth.</p>
<p>But amongst all these suggestions, only 2 things need to be done to get XAMPP (1.6.2 anyway) working on Vista.</p>
<p>First, don&#8217;t forget to run setup_xampp.bat in the XAMPP installation folder.</p>
<p>And secondly, you need a file called <strong>msvcp71.dll </strong>to reside in the root XAMPP folder. I copied this from my old XP Windows/system32 folder, but you might need to get it elsewhere.</p>
<p>If you do these 2 things, XAMPP should fire up no problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.roxxor.co.uk/blog/2007/06/xampp-on-vista/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Handling HTML Entities in XML Passed to Flash Dynamic Text Fields</title>
		<link>http://www.roxxor.co.uk/blog/2007/06/handling-html-entities-in-xml-passed-to-flash-dynamic-text-field/</link>
		<comments>http://www.roxxor.co.uk/blog/2007/06/handling-html-entities-in-xml-passed-to-flash-dynamic-text-field/#comments</comments>
		<pubDate>Tue, 26 Jun 2007 13:01:54 +0000</pubDate>
		<dc:creator>Allistair</dc:creator>
				<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://blog.roxxor.co.uk/?p=3</guid>
		<description><![CDATA[Today I had to solve the problem of HTML entities such as &#38;apos; showing their full entity-selves when injected dynamically into dynamic text fields. The entities originated from an XML input stream fed into the Flash movie. Quite a few folk out there seem to have developed string search and replace functions, but these are [...]]]></description>
			<content:encoded><![CDATA[<p>Today I had to solve the problem of HTML entities such as &amp;apos; showing their full entity-selves when injected dynamically into dynamic text fields.</p>
<p>The entities originated from an XML input stream fed into the Flash movie.</p>
<p>Quite a few folk out there seem to have developed string search and replace functions, but these are limited by the anticipated characters.</p>
<p>I found a much simpler method was just to set the dynamic text field instance&#8217;s .html attribute to true, and then inject the text into the .htmlText rather than the .text attribute. Flash apparantly then displays the characters properly.</p>
<p>And I should add that the dynamic text field in question still has anti-aliasing applied in case any of you are worried that using the html attributes do not support it.</p>
<p>Happy days.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.roxxor.co.uk/blog/2007/06/handling-html-entities-in-xml-passed-to-flash-dynamic-text-field/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
