Skip to content


Wordpress 2.5 – The Vista of Blog Platforms

So it’s been about a weeks since it was out, so I figure, why not? After all I have the Wordpress Automatic Upgrade plugin, so this should be a breeze. Now this plugin makes upgrading Wordpress ridiculously simple. It handles file backups, database backups, deactivating and reactivating all plugins, etc.

So I go through the process and I’m not totally disappointed. There were the normal problems we have with all upgrades and some new ones:

  • Theme Issues: This only happened on one of my blogs. Heck, it’s an old theme, so that’s to be expected. The widgets didn’t quite work right, but it was fixable.
  • Plugin Issues: Of course there will be those. Some plugins haven’t been updated yet, some just required me to update them. And with the new plugin update feature, it was quite easy to fix these problems. Then, there are some plugins I just had to totally disable, but upgrades for these are coming out everyday. I’m down to one old plugin that hasn’t been updated yet.

Posted in Blog, General.

Tagged with , .


CakePHP Auth Component – Will You Remember Me Tomorrow?

This is the third installment of my Auth Component Tutorial. This tutorial builds on the first installment, so make sure you grab the download file:

Download: CakePHP Auth 1  CakePHP Auth 1 (4.3 KiB, 9,978 hits)


You’ll find it on almost every popular web site’s login page; a nice lil’ checkbox that says “Remember Me”. It seems to have become a basic addition to any page with a login form. Generally, when a user logs into a web site, he’s logged in until his session expires. Which usually translates to when they close the browser window or when they allow the session to timeout.

With a Remember Me cookie, you hit the lil’ checkbox and it stores a lil’ cookie on the user’s computer. This cookie can contain various information (we’ll get to that later) but it essentially enables the user to bypass the login process the next time he comes to the page requiring authentication.

So, the simplest way to proceed is to list changes by file, so strap in your seat belts, here goes.

The Obvious, The Login Form – login.ctp

Now of course you need to add the checkbox and a label for said checkbox. Simple enough:

Posted in General.

Tagged with , , , .


Yay! Wordpress 2.5. Almost Perfect

Now I don’t have to tell you guys about all the goodies that Wordpress 2.5 brings, but I’ll name a few anyways:

  • New fresh Admin theme
  • Nice Dashboard
  • You can modify the link for “Incoming Links”. Technorati anyone?
  • Finally included Tag Management
  • Concurrent Post Editing Protection
  • One Click Plugin upgrades. Oh yes. It’s about time.
  • Built in Gallery
  • Nice Flash Media Uploader

There’s just ONE thing that rubs me the wrong way.

They’ve gone an given the admin theme a fixed width layout, designed for a 1024px monitor. Why, Wordpress, why? This is really a pain, after I decided to get (not one, but) two 19″ Wide Screen LCD monitors. Luckily, there’s a plugin that puts things back into perspective.

Posted in General.

Tagged with , .


JQuery, Prototype, and MooTools Benchmark – SlickSpeed

Introduction

Before I even start, let me state that I’m a JQuery fan. Ever since I’ve started with JavaScript frameworks I’ve weighed the pros and cons, and trust me there are a lot. You’ll always find people arguing Prototype, JQuery or MooTools. I went with JQuery because it could do all that I wanted with the least amount of bloat. I’m sorry, Prototype may do a hell of a lot, but I don’t think that I could make enough use or that 100 KB to justify it. Plus, Prototype can’t even handle basics on its own without having to piggy back off of script.aculo.us and it’s effects library.

Speed

Now with every new version of a Framework that comes out, this argument comes up again and again. Finally, we have something to put the arguments to rest.

slickspeed

In my personal testing, I’ve found that JQuery 1.21 leads the pack, but only in Internet Explorer. In Firefox it comes in dead last. Does this discourage me? Maybe a lil’ bit. Am I going to stop using JQuery and switch to Prototype? I think not.

Posted in JavaScript.

Tagged with , , , , , , , .


CakePHP Auth Component – Tutorial Two

This is the second installment of my Auth Component Tutorial. I included a link to download a file for during the first installment:

Download: CakePHP Auth 1  CakePHP Auth 1 (4.3 KiB, 9,978 hits)

I just think that some of the stuff in there warrants some explanation.

isAuthorized()

This function is needed when $this-Auth->authorize = ‘controller’. Theory has it, you can do something similar in app_model if $this-Auth->authorize = ‘model’, but I haven’t looked into this.

The thing that confused me about this is that I thought you were required to perform your own validation. But oh no, this is additional authorization. Sort of like what beforeSave() does, where you can cancel the save after the validation. isAuthorized() is performed after the user has been logged in. If after that, you need some additional stuff, then you can put it in there. I’m not sure why it doesn’t default to return true like beforeSave() (if everything goes well), but if it’s not present, it errors out.

$this->Auth->user(‘group_id’)

In my User Model I have a field called group_id. So you guessed it, this just returns the group_id of the user that’s logged in. Things couldn’t be simpler.

Posted in CakePHP.

Tagged with , , , .


CakePHP Auth Component For Dummies Tutorial

First off, I would like to say much thanks to Gwoo for finally helping me to understand this thing.

So I know what you’re thinking; I’m probably the last person to finally figure out the CakePHP’s Auth Component. For the past few months, I’ve been using obAuth because that’s the only authentication I could get to work with CakePHP. I think that I was just making it more difficult than it should have been.

My main resource for learning the Auth Component has been Chris’s tutorial, but even then I still needed help. Also, I’m the type that doesn’t really learn much without code.

Note that I’m running off of the CaekPHP 1.2 beta.

Getting Started

Now you can modify this however you like, but I’m starting out with the basics. You’re going to need the following:

  • A user database with fields username, password. Of course they don’t need to be named that way, but defaults are fun.
  • A User Model with Controller and Views – This can be baked from CakePHP
  • A login view for the user.
  • And a base app_controller.php. That’s it.

The Setup – app_controller and users_controller

So here’s the minimum in app_controller:

Posted in CakePHP.

Tagged with , , , .


CakePHP 1.2 Beta Released Fresh Out of The Oven – Happy New Year

So I guess the CakePHP development staff doesn’t take any holidays. Bright and early New Years Day 2008, we’re greeted with a fresh new release of CakePHP 1.2.6331 beta. No, not pre-beta a full blown beta. Needless to say I’m excited about this.

There have been some nice changes which have gone through all through the Christmas season. Guys, I thank you for your dedication. The one major thing I’m excited about is the way that the Form Helper now processes dates and times; there’s no longer a cleanUpFields() function, everything is automatic (or should I say automagic). You’ll have modify your code since the result in $this->data is slightly different. There’s been some stuff deprecated and some stuff added.

The Model::generateList() function has also be deprecated, in favor of Model::find(‘list’). It’s not an exact duplicate of generateList() but it gets the job done. Check out the cakebaker for more essential tips for upgrading from CakePHP 1.2 pre-beta to the fresh new CakePHP 1.2 beta.

Enjoy and Happy Baking!

Posted in CakePHP.

Tagged with , , , , .


InsaneGB Review – Free Web Server 5GB Disk Space, 20GB Bandwidth

I can’t remember where exactly I heard about this web host, but InsaneGB.com sounded like a great deal. You can read their website for more details, but in a nutshell they got PHP 5, MySQL 4, and everything (Databases, Add-on domains, etc) is unlimited except disk space and bandwidth. They give you 5GB for disk space and 20GB on bandwidth per month. Which is great for a free host, if you ask me; heck, they even offer cron jobs.

Testing Their Setup

So I decided to give them a shot. I put up my personal blog on their server. In retrospect, maybe that wasn’t such a great idea, but I did it anyway. At first everything was great. Stuff was fast and everything was popping up instantly. There were some things that most would consider acceptable for a free host.

  • I couldn’t run any PHP ini_set commands

    So there’s no increasing running time for scripts. I guess I would live without that.

  • You can’t open/download any files from outside servers

    This I came across when trying to use some of my Wordpress plugins that automatically install plugins and automatically upgrade the Wordpress installation. Oh, well.

Posted in General.

Tagged with , , , , , .