Fix for sorting in Job Manager Wordpress Plugin

If you want to sort jobs alphabetically in Job Manager and use sticky sort for highlighted items it will mess up the order of all non-highlighted opportunities. This was my quick workaround. Hopefully it will help someone.

In frontend-jobs.php

<?php
function jobman_sort_highlighted_jobs( $a, $b ) {
	$ahighlighted = get_post_meta( $a->ID, 'highlighted', true );
	$bhighlighted = get_post_meta( $b->ID, 'highlighted', true );
	if( $ahighlighted == $bhighlighted )
		return strnatcmp($a->post_title, $b->post_title);
	if( 1 == $ahighlighted )
		return -1;
	if( 1 == $bhighlighted )
		return 1;
	return strnatcmp($a->post_title, $b->post_title);
}
?>

NextGen Gallery – auto-detect gallery

By default the NextGen gallery for wordpress requires you select the gallery to display when you use the shortcode [nggallery id=1]. However, you may note in the gallery itself you’ve already specified the page where the gallery is to be displayed (”Page Link to:”). So why select the gallery in the shortcode when the database already has this information. This short bit of code will allow you to manage the association in the gallery itself and no longer have to use the id parameter.
Read more

CakePHP Auth Compontent Management

CakePHP 1.3’s Auth Component has made authentication and ACL much easier. It however, leaves most the implementation of user management to the developer. Here are some helpful lessons we have learned to make this process less painful.
Read more

CakeFest 2010 Wrap

A quick run down of CakeFest 2010. It was great meeting a bunch of programmers and enthusiasts and finding out how they use CakePHP.

Here are my brief notes for the talks I attended and links to the presentations if I have them.

Read more

The future of flash

Whether we like it or not Flash is here to stay, especially now that CS5 is going to allow deployment to iPhone, iPad, and other “smart” devices. It just won’t be used as much for your standard web site, just for specialized applications where that level of control is necessary. Adobe isn’t stupid. They realize that Flash is a platform, not a product or a plugin. They are changing the direction of how it will be used and from what I can tell that use will be more appropriate than creating Tetris or a bunch of words floating on a web page. A great example is TweetDeck. The battle for the top platform of tomorrow’s interactive app platform is just heating up.

Optimizing Web Application Databases

User feedback regarding a CMS web application was that the certain areas of the site were running slow. There could be many reasons for this like the usual suspects of a slow internet connection, poorly optimized images and stylesheets, and large page sizes. In this case there was a large amount of data coming from a couple tables in the database and were combined together to render the page. This was slowing the page load time down as the MySQL database was combining this data. This is where a simple optimization technique called indexing can help. Read more

Web Framework Battle or Convergence

framework-battle-royalThere is a lot of flame wars and debate over what web application framework is the best. At SXSW interactive there was a panel discussion amongst some of the developers and users of a range of different frameworks. It was a battle as to who was best at documentation, setup, templates, models, and optimization. In turns out the right framework has more to do with the solution you are targeting. Read more