Category — Tips & Tricks
Stumble Upon Can Really Drive Traffic
I have been a StumbleUpon user for a while now but never really got into it. When I was board or wanted to see something new I would hit the stumble icon and find a new random website. I thought that was all to it but yesterday I decided to try to Stumble our blog posts on this site. To my amazement our traffic had a huge spike all from one post. How to remove pesky SVN files.

This just goes to show you how using social media can help you get more visitors to your site.
If you are interested in using StumbleUpon then here is some great links of reference:
February 11, 2008 No Comments
Don’t make these stupid mistakes
ID-Ten-T Error
A term often used by tech support operators and computer experts to describe a problem that is due to the user’s ignorance instead of a software or hardware malfunction.
Here is a fun post where I will list out several dumb mistakes I have made with this site since starting it a few weeks ago.
1. Always Backup Your Data
I have been a windows users for probably the past 10 years. Basically since I started using a computer. At the beginning of this year I switched to my first Mac and I love using it however I keep really screwing up my sites when I perform upgrades.
I have Transmit as the ftp client and when I upgrade I just put all the files and tell it to Replace all the files. This does not achieve the effect I want. Yes it replaces the files but also deletes all the files that are not getting overwritten. So basically I loose important files that would otherwise remain uploaded.
2. Never drop all your database tables
This one is pretty obvious but it caught me.
While creating the install for 68kb I added this little portion of code to drop all the tables before installing.
$tables = $this->db->list_tables();
foreach($tables as $table)
{
$sSQL="DROP TABLE IF EXISTS ".$table;
$this->db->query($sSQL);
}
It seemed fine at the time because I was running on localhost and it didn’t matter if all the tables where removed. I uploaded this to the server and decided to install it in the same database as the site and guess what happened.
I am sure you guessed correct. Everything was gone!
The only plus side was Google had a few of the pages and posts cached so I could rebuild what they had.
Now that I have shared my stupid mistakes why don’t you share yours?
November 15, 2007 No Comments
CodeIgniter and SimplePie

I have been trying to get our rss feed into the administration area of 68kb for a few days now and after trying countless ways I just could not get it to work. Finally after reading loads of forum threads I was able to successfully integrate SimplePie. For anyone else having trouble I will go through all the steps I took to get it working.
Step 1.
Download SimplePie. I used v1.0.1
Step 2.
Rename simplepie.inc to Simplepie.php and save it to system/application/libraries folder.
Step 3.
Open your controller file and add this code:
$this->load->library('simplepie');
$link = 'http://68kb.com/category/news/feed';
$data['feed'] = new SimplePie();
$data['feed']->set_feed_url($link);
$data['feed']->enable_cache(false);
$data['feed']->init();
$data['feed']->handle_content_type();
Of course make sure you pass “$data” to the view file.
Step 4.
Open your view file and add this:
<?php if ($feed->data): ?>
<?php $items = $feed->get_items(); ?>
<?php foreach ($items as $item): ?>
<strong><a href="<?php echo $item->get_permalink(); ?>"><?php echo $item->get_title(); ?></a></strong> - <?php echo $item->get_date('j M Y'); ?>
<p><?php echo $item->get_description(); ?></p>
<?php endforeach; ?>
<?php endif; ?>
I know this seems pretty basic but it took me ages to get it running. I would like to thank CI user MASS MASS for this forum thread which helped me tremendously.
October 31, 2007 7 Comments
Templating With CodeIgniter
I started working on the template system today and thought I would share some of things I am doing. One of the features I wanted was to have an easy template system and it must be flexible enough to not choke if a certain template body file couldn’t be found. Another thing I like to do is have one global layout file and include the body portion where needed. This way you do not have to worry about a header, footer, etc.
[Read more →]
October 28, 2007 3 Comments