Latest Photos

Archive

Blog Archive for November, 2008

Emailer Component, with a twist

Thursday, 13 November 2008
Tagged: Website, General

Implemented the mailout facility for the Enquiries page, finally. Not that this is difficult at all, since CakePHP provides a nice ready-to-use Email Component. But with the help of Dale, I was able to devise a manner in which the Email component is extended, slightly, to provide site-wide settings in a transparent manner.

While this is entirely possible from the Email component as it is, you would need to either apply these settings in your AppController, or change the setting in each controller that used the Email Component. What I have achieved basically overloads the send() function, and applies the sitewide settings before passing the call back to the parent Email component. Simple, yet effective. But wait, theres more...

0 Comments  |  Continue Reading >

Recent Comments CakePHP Element

Wednesday, 12 November 2008
Tagged: Website, General

Another little move forward in the scheme of things. I now have a Recent Comments element on some of the pages to indicate the latest 5 comments that have been made on the blog overall. I am not entirely certain that this is ideal moving forward. If traffic picks up on this site, there could be multiple per day, and this will tick over fairly regularly. What I might consider doing is storing a counterCache on the BlogPost model, which should automagically update as comments are made. This should, in turn update the 'modified' automagic field, creating an orderable index by which I could list the last commented posts.

So, rather than listing the last comments, I list the most recently commented on posts. This isn't something I have seen anywhere, its just something I thought could assist the diversification of content thats being presented at any point in time. With a particularly interesting post, using the current element, you could potentially have the last 5 comments based on a single post.

3 Comments  |  Continue Reading >

Contact form and cleanup

Sunday, 9 November 2008
Tagged: Website, General

A bit of an interesting night. I haven't often gone back to my CSS and refactored to ensure its minimal, optimal, etc.. Its a worthwhile exercise, and not often done, from my experience. I've also setup the contact form. This is setup and working to both keep a record of the contact, and to email it off to yours truly.

Well, I feel pretty lame writing this blog entry, because the activities tonight aren't anything ground breaking or spectacular. But these are things that are necessary and integral to the site. I've made some pretty decent moves towards the syntax highlighting solution, which I will update you all on in the next few days.

0 Comments  |  Continue Reading >

Curse that Little Big Planet

Saturday, 8 November 2008
Tagged: Website, General

The sole reason that for the last couple of days, there has been little to no progress in development of this site, the design for the Slavitica site, cleaning of the new motorbike, and work in general... The recent release of Little Big Planet, a cute new game for the Playstation 3. In fact, its the reason I bought my PS3 on launch, so long ago. Its an extensible environment with an extensive set of storyline levels to play through and seamless internet integration for co-operative play. So impressive in fact, that its now bundled with PS3's on purchase.

But anyway, this is not really a game review site. But I highly recommend buying this game. You'll giggle yourself silly. On the work front, I've decided that its time to move beyond the blog for now, as thats taking up a little too much time. There are a few minor features that need to be looked at and then its time to give some attention to the wiki and projects page. I may even take a small break in there to populate my resume page also.

0 Comments  |  Continue Reading >

Blog Archive complete, simple too!

Thursday, 6 November 2008
Tagged: Website, General

Not much code digging tonight, as the Archive element for the blog pages was way less complex than I had initially anticipated. What I wanted as a basic display of the months in which posts had been made, and to have them list in the side bar of the site. Nothing fancy there, but it meant grouping, ordering, and returning non-standard fields. All of which turned out to be a piece of Cake.. PHP, that is.

The first thing to note is that I am using some automagic within CakePHP, in that it automatically populates a 'created' field on a table, when the data is created. This is absolutely perfect for things like blog entries. Sure there are situations in which you might want to back-date a post, but I tend to just leave the dates natural, and the auto created field suits this just fine.

0 Comments  |  Continue Reading >

Tag Cloud Quickie

Wednesday, 5 November 2008
Tagged: Website, General

Are tag clouds really useful? Do people actually use them? Are we ditching the traditional search and find mechanisms for this messy block of varying font sizes and word lengths? Personally I don't like them, and I rarely if ever find myself using one.

It has made me consider whether I really want to include one on this new site. They are so widespread now that I had kinda included it in my development plans without really giving it the planning required to determine if such a feature was required, or even desired. Are they used by the common user? Or are they just the "Web 2.x" way of spamming keywords to get better search engine ranking?

1 Comment  |  Continue Reading >

CakePHP Syntax Shot Down

Saturday, 1 November 2008
Tagged: Website, General

It lasted almost 24 hours. You have to give it credit, thats a record breaking short lifespan for a generic helper. The CakePHP Syntax Highlighting helper that I created last night has been deemed somewhat less than useful. While its operation is clean, conforming to standards and working well, its not practical for the situation I had in mind. That being the inclusion of code blocks in blog posts.

Blog posts can be done in a number of ways. The method I prefer is the plain xhtml textarea using markdown, or a very slim CMS that allows bullet points, and maybe bold. One thing is certain for any blog entry that needs to utilise code blocks: The majority of the time the blog post content will contain code blocks and non-code blocked content. Thus, parsing becomes an issue, as we really want to parse the complete page on render, or onload, to look for markdown tags, and apply styling as necessary.

0 Comments  |  Continue Reading >

CakePHP Syntax Highlighting Helper

Saturday, 1 November 2008
Tagged: Website, General

Well, goals rock. You can't get anything really productive done without setting attainable goals. They help structure your thought processes, and give you direction. They keep you on track, and they pay off in the end.

I've had on my list of things to complete for this site 'Syntax Highlighter', for a while... I didn't really know what I was going to do. There are a whole bunch of Javascript solutions out there that can do it, but I don't like that they take a while to render, and you are handing the visual presentation of part of your site off to the clients browser to render, if its got the power to.

0 Comments  |  Continue Reading >