Week 6 – A Day Late Again!

Week 6, its a day late again…

Essentially I’m working on duplicating the reports trac does! Which is just a matter of working out the right query to run.

Doing this has led me to discover the need for another extra taxonomy, in order to trac the ticket ID, as relying on the post ID means the value gets horribly inflated, and numbers skipped, thru WordPress auto saving and revision tracking.

So thats last week and this week in a nutshell, working on front end stuff.

Tho I don’t quite think this is right, it works but is probably not the best way to do this:

add_action('template_redirect', 'bp_output_tickets');

function bp_output_tickets() {
	
	global $wp;
	if (substr($wp->request, 0, 7) != 'tickets') {
		return;
	}
	global $bp_taxonomies, $bp_post_type, $bp_reports;
	
	// need to configure to get from slug?!
	$loadreport = $_REQUEST['report'] ? $_REQUEST['report'] : 'all';
	
	add_action('wp_head', 'bp_style_hack');
	
	get_header();

--SNIP--
}

For a start it relies on the permalinks not being set to ?p=ID
Thoughts?

Update: Heres a quick screenshot….