Discover & Rate New Music Check out ChartVote. Promote the music you like.

Archive for January, 2008

100 Excellent Free WordPress Themes

Smashing Magazine has released a huge list of 100 free WordPress themes.

“High-quality WordPress themes always come in handy. Whether you are looking for some design inspiration or professional coding solutions — in both cases you can learn a lot, you can apply them and you can build customized designs upon them without reinventing the wheel all the time.

In this article we present 100 free high-quality WordPress themes. Together with hundreds of other designs, these themes have been manually selected, installed and tested over the last weeks. They all can be downloaded, customized and used for free in both personal and commercial projects. Links to demo-versions provide a direct preview of a theme.”

Check it out

PHP Framework Round Up

Software frameworks have become very popular in the last few years, mainly due to the explosive popularity of Ruby on Rails, making frameworks the new hip thing to use for development and a great buzzword to throw around like its candy.

Personally, I don’t use frameworks for my projects. I find them too constricting and I feel that I lose control over my development process, but thats just me. Some people swear and live by frameworks. Maybe one day I will find one that suits me.

Model-View-Controller (MVC) Architecture

MVC is a software approach that separates application logic from presentation. In practice, it permits your web pages to contain minimal scripting since the presentation is separate from the PHP scripting.

  • The Model represents your data structures. Typically your model classes will contain functions that help you retrieve, insert, and update information in your your database.
  • The View is the information that is being presented to a user.
  • The Controller serves as an intermediary between the Model, the View, and any other resources needed to process the HTTP request and generate a web page.

mvc.png

PHP Frameworks

  • CakePHP is a PHP framework that works on the MVC architecture and offers caching, application scaffolding, validation of model data and even a presentation API. One of the most popular PHP frameworks.
    cakephp.png
  • CodeIgniter is a PHP framework that also uses the MVC platform, has classes for data access, e-mail, FTP, and XML-RPC. Also, CodeIgniter has an exciting community and thorough documentation to get you started.
    codeigniter.gif
  • The Zend Framework is the self-proclaimed “leading open-source PHP framework.” Services included in the API include Ajax (JSON), search, syndication, web services, and a fully object oriented PHP class library.
    zend.gif
  • Symfony - A feature packed framework, but has a reputation for being server-intensive.
  • Prado - A component framework for PHP5 that has similar event based web apps similar to ASP.NET.
  • BareBones - a one-file, no-configuration, MVC framework for PHP5.

Source @ SmashingMagazine.com

Digg on the Apple Fanboy Wagon

Digg is one of the first things I read in the morning to get my daily scoop of news. Today when I visited I saw this on the home page.

diggapple.gif

I can’t lie, I’m a little giddy about the upcoming MacWorld keynote too. I don’t even own a mac, but I do get to play on my parent’s G5 with 23″ cinema display.

I am contemplating switching to a mac, but right now I can’t justify the cost.

Create a “back” button with PHP

Deziner Folio posted this PHP snippet for creating a simple back link that will take you to the previous page you were on.

Code:

PHP:
  1. <?php session_start(); ?> <!– Starting a session before the DOCTYPE –>
  2.  
  3. <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN”
  4. “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
  5.  
  6. <a href=”<?php echo $_SESSION[’back’]; ?>“>back</a> <!–The anchor tag that links to the previous page –>
  7.  
  8. <?php $_SESSION[’back’] = $_SERVER[’REQUEST_URI’]; ?> <!– Assigning the current URL to a session variable –>

Please note that first we assign the previous session variable to the anchor tag and only then re-assign the current URL to the session variable which will be read when you move on to the next page.

This being a simple PHP snippet can be used in almost every CMS (PHP based) and sure is a good addon to the accessibility of your site.

You can view the original article here

Recover Truncated PHP Serialized Arrays

Shaun Inman has posted a great function that will salvage all the data that it can in a serialized array that has been truncated. PHP's unserialize() function will fail if it encounters a malformed string. This is where repairSerializedArray() function comes in to save the day.

PHP’s native serialization text format is the simplest way to store an arbitrary array in a database without losing the types of its many values or their structure within the array. However, you might occasionally run into problems when the serialized string is longer than the database column that houses it. The resulting truncated string cannot be unserialized by PHP. The majority of the data might still be intact but PHP doesn’t know what to do with it; so I wrote a function, two actually, that does. (While PHP’s serialize() and unserialize() functions also work with objects this recovery function does not.)

Because the recursive function operates on and whittles down the actual serialized string while it attempts its recovery, a second function duplicates and prepares the string leaving the original unchanged.

Code Example

PHP:
  1. // the native unserialize() function returns false on failure
  2. $data = @unserialize($serialized); // @ silences the default PHP failure notice
  3. if ($data === false) // could not unserialize
  4. {   
  5.     $data = repairSerializedArray($serialized); // salvage what we can
  6. }

You can read the full post and download the code here

What NOT to do with a signup form

I was trying to signup for a new ad management service today, since EchoPic is getting decent traffic, to help deal with different ad services. After filling in all the required fields and double checking them myself, I clicked the submit button to be greeted with this:

badsignup.gif

"Password must containt a lowercase letter, an uppercase letter, a number and no spaces, no special characters."

Reeeaally now? Would you like me to throw in some complex math equations and a short essay on world peace? I know that analogy sounds a little far fetched, but to your users thats what you might as well be asking them. Thats SIX restrictions on the password field. Thats at least 4 too many.

In the end I didn't sign up. Make your signup forms simple and don't force your users to make up new information. Generally users will use the same password for everything, so putting such tight restrictions on a password field is not a good idea.

Short Video: Commute

I made a video of my commute from work back home.


Commute from Noah Everett on Vimeo.

My New Year Resolutions

Happy new year everyone. I haven't made a new year resolution list in a long time so I thought I'd do one this year and share it with everyone.

My New Year Resolutions
1. Get Engaged/Married
2. Earn enough income from side projects to support myself without a job
3. Become more organized
4. Payoff loans

Short-term goal for this quarter
- Finish up ChartVote!

What are your goals for this year? I'd love to hear them so leave a comment.

RSS Feed



Recommended Sites