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

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

Do Good and be That Guy

Self promotion is getting other people to WANT to do your promotion for you. Peter Shankman personifies and lives this notion. He is well known for HARO, which has changed how media, individuals, and companies connect. His presentation at SXSW was powerful and mind changing, enough so that I’m promoting right now. It is about creating win-wins. These wins can also be good for the environment as Val Casey pointed out in her Keynote speech. So how do you do good and be that guy or that company that everyone talks about and make money? Read more

QT Listview Delegates Paint

It took some trial and error to create an appropriate paint method for inactive items in an item delegate for QT’s list view. Here are some pointers.

Getting Wordpress Page IDs

Some Wordpress plugins and themes require you to supply a list of page ids. This brief video tutorial shows you how to get those IDs for a page or post.

Mary of ProVirtual Solutions suggested the Reveal IDs for WP-Admin plugin to help get the IDs .

Getting rid of an email account?

A friend in his newsletter, BLIANESWORLD asked:

Have you ever switched your email address? I know it is a pain, but I’m thinking
of doing so sometime in the future.

As such, I have heard that there are services that make this much easier for you
to make such a switch. If so, have you ever used such services? And if you have,
what was your reaction to them?

My answer, don’t consolidate instead.
Read more