November, 2009


21
Nov 09

myScoop: Updates 20-11-09

I spent a few hours last night making a few changes to myScoop. Yeah I know last night was a Friday night but sometimes sacrifices need to be made in order to grow.

Auto-Tweeting new articles
Once a new article has been fetched, a shortened URI will be assigned to the article and the script will now automatically send the Title (shortened to 90 characters) and the shortened URI which redirects straight to your article. This method is similar to the Bookmarking section which sends the title, shortened URI and the first tag in a hash tagged format.

mySccop posting to Twitter

myScoop => Twitter

Blog Stats (Graph)
Each user that submits their blog to myScoop and uses the tracking code associated with that blog has the ability to track unique visitors. This is a LIVE measurement and shows unique visitors per day for the past week. See below.

myScoop Blog Stats

myScoop Blog Stats

Other minor changes
I have added the category drop down list to the page where users submit new blogs to myScoop.

As new features get added, so do new bugs. Please let me know if you find any either by emailing me or simply posting a comment to this article. Thanks again for all your feedback, it is much appreciated.


18
Nov 09

PHP Header Include – Saving development time

I have had the opportunity to go through a lot of other developers coding skills and practices in the past few months and I must admit there is a lot of time wasting going on. Are you the type of developer that has a <title>, <meta>, <link> and <body> tag on every page without a global include? If so, let me show you how to simplify your life.

By having a global header include you can set all your title tags in one central location as well as control which page gets what header information all in one file.

Firstly, create a file called header.php and use the below template:

header.php

<?php
	// Get the filename of the current page;
	$cpage = substr(strrchr($_SERVER['PHP_SELF'], "/"), 1);
 
	// set this to a "default" title as a backup incase you forget to mention a page. This stops it from returning nothing.
	$wtitle = "My Default Website Title";
 
	// Control page titles
	switch ($cpage) {
		case "index.php": $wtitle = "Home page title"; break;
		case "contact_us.php": $wtitle = "Contact us"; break;
		case "products.php": $wtitle = "Products Page"; break;
		case "about_us.php": $wtitle = "About us"; break;
	}
 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head>
  	<title><?php echo $wtitle; ?></title>
  	<meta name="robots" content="index,follow,all" />
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 
	<link rel="stylesheet" href="css/style.css" type="text/css" />
	<?php
		// if you're on the products page, load the products.css file.
		if ($cpage == "products.php") { echo '<link rel="stylesheet" href="css/products.css" type="text/css" />'; }
	?>
</head>
 
 
<body>
 
 
<div id="wrapper">

Now you can start creating all your other pages and simply include the header.php file right at the top as follows:

index.php / contact_us.php / products.php / about_us.php

<?php include "header.php"; ?>
 
<div id="content">
<p>Content goes here</p>
</div>
 
<?php include "footer.php"; ?>

As you can see we have taken this one step further and also created a footer.php file. This comes in very handy when you need to put tracking code at the bottom of ever page. Instead of pasting it on every single file, simply paste it into the footer.php.

footer.php

</div>
 
</body>
</html>

I hope you find this as valuable as I do. If you do it differently please give us the details. After all, we all learn from each other.


17
Nov 09

myScoop – from concept to current and beyond

myScoop Logo

Every now and again I get this sudden urge to develop something that’s beyond my reach. Enter myScoop, my latest ”lets-see-if-I-can-do-it” project. myScoop is essentially a combination of most of my PHP skills that I have learnt in the passed few months and when I started with the site it was originally supposed to be a social bookmarking tool, similar to that of Muti. I’m not 100% sure of when the focus shifted to blog aggregation. Either way, I’m pretty happy of the result.

The first stage was nothing too advanced. I wanted users to be able to submit their favourite bookmarks and let my site crawl that page, retrieve the title tag and then retrieve the first paragraph of the blog/page. The user would then simply just select a category and throw in a couple of tags and press submit. The concept was easy enough and worked perfectly. myScoop would automatically assign you a shortened URL and go on to post that URL, Title, shortened description and the first tag to Twitter. Soon after that I got another bee in my bonnet and decided each submission needed its own stats page whereby a user can view how many hits it had received in the passed 30 minutes or hits per hour for the current day.

About a week later I launched the blog aggregation side of the site with the ability to add your own blog and follow other blogs. Again, the concept is simple enough; you would submit your blog address and the blog RSS feed location, and the site would crawl your RSS feed and fetch your article information. During this stage the site underwent a bit of a face lift with the help of Bonita who created the amazing myScoop logo and some great ideas from Bryan.

There are currently 2 articles discussing myScoop in fair detail:

There will be many more changes and upgrades to myScoop in the coming months. The only way myScoop is going to succeed is if it has functionality that is easy to use and understand. The only way I can get this accomplished is with the help of YOU. So im asking everyone that uses myScoop for all your ideas, comments and suggestions. Thanks for the support!


16
Nov 09

Who are you, really?

With everyone blogging these days it’s hard to find time to be original and come up with fresh content. I have created this blog in the hopes of not only documenting my personal projects, but to also share with others who are just as ambitious and passionate as I am when it comes to the extremities and complexities of the internet driven world we live in. So without rambling on too much let me introduce myself.

My name is Nick Duncan, age 25 and I (cl)aim to be a web entrepreneur by night, and a search engine optimisation consultant come advanced php web developer by day. Now that doesn’t sound like I have too much behind my name other than just a bunch of fancy words but I tend to think otherwise! I have 2 step-kids and a baby boy (Logan) that’s about to be born and take over the world. All originating from a woman that is super-hot and as loving and caring as an angel. Lucky, aren’t I?

I started web design from an early age of around 13, just a while after the PC game Interstate 76 was launched in S.A. I remember altering the game to make my car invincible with an extra gun and still make it fly, all of which was non-standard, of course! Soon after that I was into mIRC and quickly learnt I could make my own scripts within the program itself – BANG – All-Out-War was born, a text-based gangster game that seemed to have taken off like wildfire. The game reached the point whereby it hosted 100 players at any given time (after 4 months of solid development). By the time I reached 18 there was no time for fun and games any more, I had to go to work like everyone else. I landed up joining a foundry and started right at the bottom. I moved my way up through the company and in less than 3 years I received 4 promotions. I then bounced around different areas of the steel game until I realized how unhappy I was. I decided enough is enough and followed my heart, joining JD Internet Consulting who gave me the chance I needed. That was a mere 3 months ago and I have achieved so much in such a short space of time. It’s amazing how your potential can be unlocked by doing what you’re passionate about.

I wish you a warm welcome to my world and hope you enjoy the ride… Remember to keep both arms and legs inside at all times, and never, ever look down!