Kevin Phillips http://kevinphillips.co.nz en Now I am a web hosting company http://kevinphillips.co.nz/news/now-i-am-web-hosting-company <div class="field field-name-body field-type-text-with-summary field-label-hidden view-mode-rss"><div class="field-items"><div class="field-item even" property="content:encoded"><p>Welcome to <a href="http://www.livehost.co.nz">LiveHost</a></p> <p><a href="http://www.livehost.co.nz" title="LiveHost Web Hosting"><img src="/sites/default/files/logo_white.jpg" alt="LiveHost Image" title="Best hosting in New Zealand" height="63" width="218" /></a></p> <p> </p> <p>After resigning as a director of Devol - I needed to host a few website, although I still have access to Devol's servers and continue to maintain them, I thought it would be unethical to continue using their resources for own my personal use.</p> <p>What would happen if one of my development projects brought the their servers down !!!!</p> <p>I tried quite a few hosting companies inluding Flexihost and I would say they are very good but to actually host multiple website you need to activate a reseller's account to get enough databases and bandwidth etc.</p> <p>I actually had quite a few requirements:</p> <ul><li>php 5.2.x and php 5.3.x on the same account that could be used on a domain by domain basis.</li> <li>Access to the php.ini file.</li> <li>SSH root login.</li> <li>Dedicated IP address.</li> <li>Client login access.</li> <li>unlimited (or large quota) disk space.</li> <li>unlimited (or large quota) bandwidth.</li> <li>unlimited MySql Databases (I'm always running new projects as sub domains)</li> <li>unlimited (or large quota) sub domains.</li> </ul><p>plus all the usual stuff you get with cPanel.</p> <p>But most important was minimum latency - I've used some servers that were so bad we regularly got the WSOD (White Screen of Death) in Drupal.</p> <p>Putting all this together it was becoming quite hard to find a hosting solution.  I spoke to a number of other developers - who all agreed that getting good hosting was hard. Plently of cheap stuff but just didn't cut the mustard.</p> <p>The first requirement (different php) ruled out 90% of hosting companies.</p> <p>The problem with the hosting companies I came across was that they were all resellers for another company, so as you moved further down the food chain you got less for more money.  Almost like pyramid selling back in the old days.</p> <p>Getting support was some what variable. One of the problems I came across was that many of the resellers were using the same upstream provider, Web Drive (I won't go into that particular company at this point) having tried a number of hosting providers suddenly I found my domains' DNS being deleted or email not working. It appears that because the resellers were using the same provider when one of them deleted my old account details it went across the board (Could be a security problem here !!). The other thing was opening a ticket normally meant waiting for the hosting company to open a ticket with their hosting provider.</p> <p>This also leads to over selling - hundreds of WordPress installs all fighting for a small amount of server resources!!!!</p> <p>I'm also not too sure that many of the resellers I came across actually had a lot of Server/Software experience.</p> <p>Not one to be beaten I did the next best thing - I created my own hosting company with all the above requirements built in.</p> <p>Welcome to <a href="http://www.livehost.co.nz">LiveHost</a></p> <p><a href="http://www.livehost.co.nz" title="LiveHost Web Hosting"><img src="/sites/default/files/logo_white.jpg" alt="LiveHost Image" title="Best hosting in New Zealand" height="63" width="218" /></a></p> </div></div></div><section class="field field-name-field-tags field-type-taxonomy-term-reference field-label-above view-mode-rss clearfix"> <h2 class="field-label">Tags:&nbsp;</h2> <ul class="field-items"> <li class="field-item even" rel="dc:subject"> <a href="/tags/hosting" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Hosting</a> </li> <li class="field-item odd" rel="dc:subject"> <a href="/tags/livehost" typeof="skos:Concept" property="rdfs:label skos:prefLabel">LiveHost</a> </li> <li class="field-item even" rel="dc:subject"> <a href="/tags/cpanel" typeof="skos:Concept" property="rdfs:label skos:prefLabel">cPanel</a> </li> </ul> </section> Wed, 18 Apr 2012 22:54:18 +0000 kevin 40 at http://kevinphillips.co.nz http://kevinphillips.co.nz/news/now-i-am-web-hosting-company#comments Drupal Professional For Hire http://kevinphillips.co.nz/news/drupal-professional-hire <div class="field field-name-field-image field-type-image field-label-hidden view-mode-rss"> <div class="field-items"> <figure class="field-item" rel="og:image rdfs:seeAlso" resource="http://kevinphillips.co.nz/sites/default/files/styles/large/public/field/image/iStock_000012643202Large.jpg"> <img typeof="foaf:Image" src="http://kevinphillips.co.nz/sites/default/files/styles/large/public/field/image/iStock_000012643202Large.jpg" width="480" height="324" alt="One Door closes another one opens" /> </figure> </div> </div> <div class="field field-name-body field-type-text-with-summary field-label-hidden view-mode-rss"><div class="field-items"><div class="field-item even" property="content:encoded"><p>I have recently resigned as technical director from <a href="http://www.devol.co.nz" target="_blank" title="Devol Limited">Devol Limited</a>, although I'm still contracted back to do some work. This means I have spare time on my hands for freelance work.</p> <p>You can see some of my latest work on <a href="http://www.devol.co.nz/portfolio-grid" target="_blank">Devol's Portfolio page</a> which shows a range of sites build on Drupal 6 &amp; 7, Codeigniter and WordPress.</p> <p>My skills are php, mysql, html, css and jQuery with a little bit of Photoshop.</p> <p>If you have a need for a developer/themer then please feel free to <a href="/contact">contact me</a>.</p> </div></div></div><section class="field field-name-field-tags field-type-taxonomy-term-reference field-label-above view-mode-rss clearfix"> <h2 class="field-label">Tags:&nbsp;</h2> <ul class="field-items"> <li class="field-item even" rel="dc:subject"> <a href="/tags/drupal" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Drupal</a> </li> </ul> </section> Sat, 31 Mar 2012 20:00:38 +0000 kevin 39 at http://kevinphillips.co.nz http://kevinphillips.co.nz/news/drupal-professional-hire#comments Drupal Hosting in New Zealand http://kevinphillips.co.nz/news/drupal-hosting-new-zealand <div class="field field-name-field-image field-type-image field-label-hidden view-mode-rss"> <div class="field-items"> <figure class="field-item" rel="og:image rdfs:seeAlso" resource="http://kevinphillips.co.nz/sites/default/files/styles/large/public/field/image/iStock_000004968817XSmall.jpg"> <img typeof="foaf:Image" src="http://kevinphillips.co.nz/sites/default/files/styles/large/public/field/image/iStock_000004968817XSmall.jpg" width="425" height="282" alt="FlexiHost" /> </figure> </div> </div> <div class="field field-name-body field-type-text-with-summary field-label-hidden view-mode-rss"><div class="field-items"><div class="field-item even" property="content:encoded"><p>Hosting Drupal websites in New Zealand can be quite a hassle. Overseas, offer much more options and can be a lot cheaper but the latency sometimes is just not acceptable.  I tried using Rackspace but we ended up with WSOD so many times because of their server speed.</p> <p>I've tried 247hosting.co.nz but they were really bad - guaranteed money back, that's a joke!! We are still waiting for our refund.  Just as a side note they also brought the webhosting review site and suddenly all the bad reviews about them disappeared.</p> <p><!--break--></p> <p><a href="http://www.flexihost.co.nz/announcements.php?id=32" target="_blank">Read more about it</a>.</p> <p>I've found a good hosting solution called FlexiHost and I can say without a doubt they are the best that I've ever dealt with.</p> </div></div></div><section class="field field-name-field-tags field-type-taxonomy-term-reference field-label-above view-mode-rss clearfix"> <h2 class="field-label">Tags:&nbsp;</h2> <ul class="field-items"> <li class="field-item even" rel="dc:subject"> <a href="/tags/drupal" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Drupal</a> </li> <li class="field-item odd" rel="dc:subject"> <a href="/tags/new-zealand" typeof="skos:Concept" property="rdfs:label skos:prefLabel">New Zealand</a> </li> </ul> </section> Wed, 14 Mar 2012 05:54:04 +0000 kevin 37 at http://kevinphillips.co.nz http://kevinphillips.co.nz/news/drupal-hosting-new-zealand#comments Using IMCE with Image Field in CCK http://kevinphillips.co.nz/news/using-imce-image-field-cck <div class="field field-name-field-image field-type-image field-label-hidden view-mode-rss"> <div class="field-items"> <figure class="field-item" rel="og:image rdfs:seeAlso" resource="http://kevinphillips.co.nz/sites/default/files/styles/large/public/field/image/dove_in_flight_2.jpg"> <img typeof="foaf:Image" src="http://kevinphillips.co.nz/sites/default/files/styles/large/public/field/image/dove_in_flight_2.jpg" width="379" height="336" alt="Just works" /> </figure> </div> </div> <div class="field field-name-body field-type-text-with-summary field-label-hidden view-mode-rss"><div class="field-items"><div class="field-item even" property="content:encoded"><p>Just another quick tip for Drupal 7.</p> <p>Within a custom content type that has an image upload field I want to give the user access to images already uploaded rather than uploading the image again to use on a node.</p> <p>Drupal model filefield_source currently will not do the job - some technical stuff about images already uploaded through imce are not registered in the database. Here's the <a href="http://drupal.org/node/436182">link</a> to the issue queue.</p> <p>This module  <a href="http://drupal.org/project/imce_filefield">http://drupal.org/project/imce_filefield</a>  by  <a href="http://drupal.org/user/9910" title="View user profile.">ufku</a> does the trick.</p> <p>I've tested it and it seems to be top notch.</p> </div></div></div><section class="field field-name-field-tags field-type-taxonomy-term-reference field-label-above view-mode-rss clearfix"> <h2 class="field-label">Tags:&nbsp;</h2> <ul class="field-items"> <li class="field-item even" rel="dc:subject"> <a href="/tags/drupal" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Drupal</a> </li> </ul> </section> Tue, 21 Feb 2012 03:53:11 +0000 kevin 36 at http://kevinphillips.co.nz http://kevinphillips.co.nz/news/using-imce-image-field-cck#comments My WordPress Site got hacked http://kevinphillips.co.nz/news/my-wordpress-site-got-hacked <div class="field field-name-field-image field-type-image field-label-hidden view-mode-rss"> <div class="field-items"> <figure class="field-item" rel="og:image rdfs:seeAlso" resource="http://kevinphillips.co.nz/sites/default/files/styles/large/public/field/image/hacked.png"> <img typeof="foaf:Image" src="http://kevinphillips.co.nz/sites/default/files/styles/large/public/field/image/hacked.png" width="300" height="267" alt="Wordpress site hacked" /> </figure> </div> </div> <div class="field field-name-body field-type-text-with-summary field-label-hidden view-mode-rss"><div class="field-items"><div class="field-item even" property="content:encoded"><p>I don't believe it - my WordPress site got hacked !</p> <p>They were posting comments with link backs to their sites, I've got anti-spam blah blah blah. Now to post a comment you have to leave an email address but there was no email address in the comment form when I looked at them from the admin screen. Strange.</p> <p>So I turned commenting off but still I was getting comment spam.</p> <p>Wordpress 3.3.1</p> <p>No strange plugins.</p> <p>I'm running my own servers not shared hosting (no other sites touched but none of them are on WordPress).</p> <p>So I guess it's back to Drupal. However what is really pissing me off is the fact I'd only just finished theming it.</p> <p>I work with Drupal quite a lot, it's a bit over the top for a simple blog but at least it's secure!!!</p> </div></div></div><section class="field field-name-field-tags field-type-taxonomy-term-reference field-label-above view-mode-rss clearfix"> <h2 class="field-label">Tags:&nbsp;</h2> <ul class="field-items"> <li class="field-item even" rel="dc:subject"> <a href="/tags/wordpress" typeof="skos:Concept" property="rdfs:label skos:prefLabel">WordPress</a> </li> </ul> </section> Fri, 03 Feb 2012 23:25:54 +0000 kevin 35 at http://kevinphillips.co.nz http://kevinphillips.co.nz/news/my-wordpress-site-got-hacked#comments Drupal 7.10 http://kevinphillips.co.nz/news/drupal-710 <div class="field field-name-field-image field-type-image field-label-hidden view-mode-rss"> <div class="field-items"> <figure class="field-item" rel="og:image rdfs:seeAlso" resource="http://kevinphillips.co.nz/sites/default/files/styles/large/public/field/image/iStock_000009339689Medium.jpg"> <img typeof="foaf:Image" src="http://kevinphillips.co.nz/sites/default/files/styles/large/public/field/image/iStock_000009339689Medium.jpg" width="480" height="321" alt="Lonely Boats on the Drupal Beach" /> </figure> </div> </div> <div class="field field-name-body field-type-text-with-summary field-label-hidden view-mode-rss"><div class="field-items"><div class="field-item even" property="content:encoded"><p style="color: #000000; font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">Last year I was very disappointed with Drupal 7 to the fact that we as a company stopped using it but at last Drupal 7 is stable enough to start using on production sites.</p> <p style="color: #000000; font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">I'm also very impressed with how Drupal Commerce is coming along and I'll be using it in the next project that requires a shopping cart.</p> <p style="color: #000000; font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">We looked at Wordpress for shopping carts but they all seemed to lack something and you needed to pay for the pro version to get any useful functionality.</p> </div></div></div><section class="field field-name-field-tags field-type-taxonomy-term-reference field-label-above view-mode-rss clearfix"> <h2 class="field-label">Tags:&nbsp;</h2> <ul class="field-items"> <li class="field-item even" rel="dc:subject"> <a href="/tags/drupal" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Drupal</a> </li> </ul> </section> Sun, 29 Jan 2012 21:29:00 +0000 kevin 34 at http://kevinphillips.co.nz http://kevinphillips.co.nz/news/drupal-710#comments My Rates Quote http://kevinphillips.co.nz/news/my-rates-quote <div class="field field-name-body field-type-text-with-summary field-label-hidden view-mode-rss"><div class="field-items"><div class="field-item even" property="content:encoded"><p style="color: #000000; font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">I just love this quotation!</p> <p style="color: #000000; font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">My rates are as follows:<br />$50/hour<br />$75/hour if you watch<br />$100/hour if you help</p> </div></div></div> Mon, 19 Dec 2011 22:12:00 +0000 kevin 33 at http://kevinphillips.co.nz http://kevinphillips.co.nz/news/my-rates-quote#comments Wordpress 3 Quick Tip Import Content http://kevinphillips.co.nz/news/wordpress-3-quick-tip-import-content <div class="field field-name-body field-type-text-with-summary field-label-hidden view-mode-rss"><div class="field-items"><div class="field-item even" property="content:encoded"><p>This tip probably applies to all versions of WP but when you export your content from one site to another the user id for anonymous users that have left a comment changes from zero to the authors' id.</p> <p>This causes a problem if you have Gravatars enabled because it send the wrong email address to the Gravatar Site.</p> <p>Weird !!!!</p> </div></div></div><section class="field field-name-field-tags field-type-taxonomy-term-reference field-label-above view-mode-rss clearfix"> <h2 class="field-label">Tags:&nbsp;</h2> <ul class="field-items"> <li class="field-item even" rel="dc:subject"> <a href="/tags/wordpress" typeof="skos:Concept" property="rdfs:label skos:prefLabel">WordPress</a> </li> </ul> </section> Sun, 18 Dec 2011 22:12:00 +0000 kevin 32 at http://kevinphillips.co.nz http://kevinphillips.co.nz/news/wordpress-3-quick-tip-import-content#comments Codeigniter smtp from localhost http://kevinphillips.co.nz/news/codeigniter-smtp-localhost <div class="field field-name-body field-type-text-with-summary field-label-hidden view-mode-rss"><div class="field-items"><div class="field-item even" property="content:encoded"><p style="color: #000000; font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">Just a quick tip on how to use smtp on codeigniter from your localhost without using gmail etc.</p> <p style="color: #000000; font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">First of all,  with codeigniter 2+ you can create separate directories inside your application/config folder</p> <p style="color: #000000; font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">ie</p> <p style="color: #000000; font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">application/config/development/</p> <p style="color: #000000; font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">and</p> <p style="color: #000000; font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">application/config/production/</p> <!--break--> <p style="color: #000000; font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">Codeigniter takes it's lead from the main index.php file where you can set the ENVIRONMENT constant.</p> <p style="color: #000000; font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">So in this sub folders you can have database.php with settings for localhost (development) or your live server(production).</p> <p style="color: #000000; font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">Did you know that you can also put your email library configuration config file in these directories ?</p> <p style="color: #000000; font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">I find that MAMP and WAMP seem to have problems using the default php mail function so I like to use my ISP's smtp server when I'm on localhost. In most cases you don't need a password (they allow through their network protocol).</p> <p style="color: #000000; font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">So in application/config/development/email.php add</p> <pre style="font: 12px/18px Consolas,Monaco,monospace; color: #000000; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;">&lt;?php if ( ! defined('BASEPATH')) exit ('No direct script access allowed') $config['protocol'] = 'smtp'; $config['smtp_host'] = 'smtp.vodafone.co.nz'; //use your own isp's url</pre><p style="color: #000000; font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> </p> <p style="color: #000000; font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">That's it - happy codeigniting</p> </div></div></div><section class="field field-name-field-tags field-type-taxonomy-term-reference field-label-above view-mode-rss clearfix"> <h2 class="field-label">Tags:&nbsp;</h2> <ul class="field-items"> <li class="field-item even" rel="dc:subject"> <a href="/tags/codeigniter" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Codeigniter</a> </li> <li class="field-item odd" rel="dc:subject"> <a href="/tags/smtp" typeof="skos:Concept" property="rdfs:label skos:prefLabel">SMTP</a> </li> <li class="field-item even" rel="dc:subject"> <a href="/tags/email" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Email</a> </li> </ul> </section> Sat, 10 Dec 2011 03:46:00 +0000 kevin 31 at http://kevinphillips.co.nz http://kevinphillips.co.nz/news/codeigniter-smtp-localhost#comments Pyro CMS Plugin http://kevinphillips.co.nz/news/pyro-cms-plugin <div class="field field-name-body field-type-text-with-summary field-label-hidden view-mode-rss"><div class="field-items"><div class="field-item even" property="content:encoded"><p style="color: #000000; font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">Just been messing around with PyroCMS (version 2), a cms built on codeigniter.</p> <p style="color: #000000; font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">I couldn't find a function/plugin within the core install that allows you to switch between classes for the purpose of setting up columns.</p> <p style="color: #000000; font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">So I've thrown a quick one together.</p> <!--break--> <p style="color: #000000; font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">so create a plugin called switcher (You can call it anything you like) in</p> <p style="color: #000000; font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">site/addons/shared_addons/plugins/switcher.php</p> <pre style="font: 12px/18px Consolas,Monaco,monospace; color: #000000; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;">&lt;?php defined('BASEPATH') OR exit('No direct script access allowed'); /**  * Switcher Plugin  *  * usage {{ switcher:class_row }}  * Note:  * Each class is separated by the pipe key and no spaces.  * No limit to the number of alternate classes.  *  * @package        PyroCMS  * @author        Kevin Phillips  * @copyright    Copyright (c) Kevin Phillips  * @link http://kevinphillips.co.nz  * @param string  * @return string  */ class Plugin_Switcher extends Plugin {     function class_row()     {         $classes = $this-&gt;attribute('class');         $values = explode('|', $classes);         // Uses Codeigniter String Helper function alternator();         if( ! function_exists('alternator'))         {             $CI =&amp; get_instance();             $CI-&gt;load-&gt;helper('string');         }         return call_user_func_array('alternator', $values);     } }</pre><p style="color: #000000; font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">so to use this plugin just add the switcher to which ever element you want to add a ccs class to.</p> <pre style="font: 12px/18px Consolas,Monaco,monospace; color: #000000; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;">&lt;p&gt;     {{ blog:posts limit=&amp;quot;5&amp;quot; order-by=&amp;quot;title&amp;quot; order-dir=&amp;quot;desc&amp;quot; url=&amp;quot;news&amp;quot; }} &lt;div class="{{ switcher:class_row class="left_col|center_col|right_col" }}"&gt; &lt;h2&gt;     {{ title }}&lt;/h2&gt; &lt;p&gt;     {{ intro }} &lt;a href="{{ url }}" title="Read more about: {{ title }}"&gt;Read more&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Written by: &lt;a href="/users/profile/{{ author_id }}"&gt; {{ author_name }}&lt;/a&gt;&lt;/p&gt; &lt;p&gt; &lt;/div&gt;      {{ /blog:posts }}&lt;/p&gt;</pre><p style="color: #000000; font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="color: #800000;"><br /></span></p> <p style="color: #000000; font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> </p> <p style="color: #000000; font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">Now your div's will have the class attached to them as the blog loops.</p> <p style="color: #000000; font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">You can download the code from<span class="Apple-converted-space"> </span><a href="https://github.com/dollardad/PyroCMS-switcher" target="_blank" title="GitHub">GitHub</a></p> </div></div></div><section class="field field-name-field-tags field-type-taxonomy-term-reference field-label-above view-mode-rss clearfix"> <h2 class="field-label">Tags:&nbsp;</h2> <ul class="field-items"> <li class="field-item even" rel="dc:subject"> <a href="/tags/codeigniter" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Codeigniter</a> </li> <li class="field-item odd" rel="dc:subject"> <a href="/tags/pyrocms" typeof="skos:Concept" property="rdfs:label skos:prefLabel">PyroCMS</a> </li> </ul> </section> Wed, 30 Nov 2011 22:12:00 +0000 kevin 30 at http://kevinphillips.co.nz http://kevinphillips.co.nz/news/pyro-cms-plugin#comments