Enable Images!
Projects - We do what we must because we can!

BinOC Branding Magic

This code is used in BinOC to produce various bits of branding for sections. This code has two versions: CMS Made Simple Smarty and Wordpress compatible php (shown below)

Code

function binoc_branding_magic($type) {

	$uri = $_SERVER['REQUEST_URI'];

	if ($type == 'division_title' || $type == 'division_icon' || $type == 'division_text' || $type == 'division_tagline') {
		if ($uri == '/') {
			$division_title = 'Front Page (Home)';
			$division_icon = 'home';
			$division_text = 'Welcome to Binary Outcast!';
			$division_tagline = ' - Where the more you change the more you stay insane! wait...';
		}
		elseif (strstr($uri, '/blog') !== false) {
			$division_title = 'Site Updates';
			$division_icon = 'home';
			$division_text = 'Welcome to Binary Outcast!';
			$division_tagline = ' - Where the more you change the more you stay insane! wait...';
		}
		elseif (strstr($uri, '/techcentral') !== false) {
			$division_title = 'Tech Central';
			$division_icon = 'techcentral';
			$division_text = $division_title;
			$division_tagline = ' - More than just mobile!';
		}
		elseif (strstr($uri, '/productions') !== false) {
			$division_title = 'Productions';
			$division_icon= 'home';
			$division_text = $division_title;
			$division_tagline = '';
		}
		elseif (strstr($uri, '/software') !== false) {
			$division_title= 'Software';
			$division_icon= 'home';
			$division_text = $division_title;
			$division_tagline = ' - Code that goes beyond BinOC!';
		}
		elseif (strstr($uri, '/services') !== false) {
			$division_title = 'Services';
			$division_icon= 'home';
			$division_text = $division_title;
			$division_tagline = '';
		}
		elseif (strstr($uri, '/community') !== false) {
			$division_title= 'Community';
			$division_icon= 'home';
			$division_text = 'Community and Interaction';
			$division_tagline = ' - Where you and Binary Outcast collide!';
		}
		elseif (strstr($uri, '/about') !== false) {
			$division_title = 'About';
			$division_icon= 'home';
			$division_text = $division_title;
			$division_tagline = '';
		}
	}
	else {
		$division_title = 'Unknown BinOC Division';
		$division_icon= 'home';
		$division_text = $division_title;
		$division_tagline = ' - This is an error, please report it!';
	}
	
	if ($type == 'division_title') {
		$result = $division_title;
	}
	elseif ($type == 'division_icon') {
		$result = '/media/v24/img/division/ux/icons/icon-' . $division_icon . '.png';
	}
	elseif ($type == 'division_text') {
		$result = $division_text;
	}
	elseif ($type == 'division_tagline') {
		$result = $division_tagline;
	}

print $result;
}