Archive for August, 2013

8 August, 2013 — Development, Snippets

Top 10 Useful PHP Classes

Having recently got into PHP5’s Object Orientated Programming I have found some amazing ready-made PHP classes. Below is a list of the top 10 classes I have found:

  1. Email – PHPMailer
  2. Membeship – PHP User Class
  3. Fetch RSS Feed – MagPie RSS
  4. mySQL Class – ThatBlogger
  5. Simple Template Class – ThatBlogger
  6. Trackback – PHP Trackback
  7. Template – Smarty
  8. BBCode Parser – BBCodes for PHP
  9. PayPal IPN Integration – Micah Carrick
  10. PDF Generation – dompdf

If you find any more funky PHP classes please post them in the comments I’d love to see them.

6 August, 2013 — Development, Snippets

Simple PHP Template Class

Update: Now available on GitHub here. Please commit improvements.

For a recent project of mine (newsletter system) I needed a simple but effective PHP class that would allow me to send a string of data and find every word with the curly bracket around it and replace it with a word or string.

For example in my newsletter system, I needed the email’s to be customized to the person it would be sending it to such as Dear Daniel… Dear James…. but during the loop to send the email I would need to get the script to switch {name} to be Daniel. To do this I found this amazing little PHP class that does just the job.

Download

Click here to download Simple PHP Template Class.

The Usage

This class is very simple. You pass 3 variables into the function Replace.

  1. An array of keys and variables – the key will be what the script will look for in your template such as {name}. The value will be what {name} will be replaced with.
  2. The template string where the data will be replaced.
  3. If the template is case sensitive. Eg {Name} wouldn’t work in the below example where as {name} would.
// Array of variables to change, template string, case sensitive true/false
echo CurlyVariables::Replace(array('name' => $name, 'email' => $email), $string, true);

Any trouble please let me know in the comments below.

Photo by: Travis Isaacs

2 August, 2013 — WordPress

WordPress 3.6 Hits The Shelves

WordPress 3.6 has hit the shelves!

Matt Mullenweg announced on the WordPress blog the release of the latest version 3.6, which includes some major updates to autosave, post locking, a revamped revision browser, native support for audio and video embeds and improved integration with Spotify, Rdio and SoundCloud.

The release is called “Oscar” in honor of Canadian jazz pianist Oscar Peterson.

So what are you waiting for? Do download it now

1 August, 2013 — Blogging

Top 10 Blog Articles – July 2013

This website is a personal project of mine – with set goals on teaching myself, not always the easy way how to successfully set-up, run and grow a blog on the internet.

This blog has been around for approximately 3 months now and so far the traffic is going the right direction month by month. However one fact I have seen from my stats is that in those 3 months a large 86.5% of people are new unique visitors. While there is nothing wrong with that, my ultimate aim is to build traffic and build a group of returning visitors. People who check my blog once, twice or maybe more in a month to build an active community of visitors commenting.

This is why I have decided to bring a month by month list of what are my top blog articles from blogs all over the internet for you to checkout. Starting off with the month just gone July.

July 2013’s Top 10 Blog Articles

  1. WPMUorg – State of the Word: WordPress 3.7 and 3.8 Out Soon
  2. Chris Lema – How to choose a WooCommerce consultant
  3. ManageWP – How I Created an Authority Site From the Ground Up [Part 1]
  4. The Next Web – IE9 falls below 10% market share
  5. 8BIT – Introducing Required
  6. Net Tuts+ – Developing Google Chrome Extensions
  7. WP Tuts+ – How to Customize Your WordPress Theme With a Child Theme
  8. Pressgram – Success! Now, We Wait…
  9. 8BIT – WP Daily: In Good Hands
  10. Torque – Torque and The WP Daily Archives

Questions? Comments? Type them below!