<?php

/*
 *	CloudFw Variables
 *
**/

$theme_setting_slug = 'CloudFW';
$slider_slug = 'CloudFW_Slider';
$page = isset($_GET["page"]) ? $_GET["page"] : '';
$upload_dir = wp_upload_dir();

define( 'CLOUD_PAGE', 'admin.php?page='.$page );
define( 'CLOUD_THEMENAME', 'Positive' );
define( 'CLOUD_THEMEKEY', 'positive' );
define( 'PFIX', apply_filters('cloudfw_pfix','positive') );
define( 'CLOUD_VERSION', '2.0' );
define( 'CLOUD_THEMEVERSION', '1.0.4' );
define( 'CLOUD_THEMEID', 'positivetheme' );
define( 'CLOUD_UPLOAD_DIR',  $upload_dir["basedir"].'/' );
define( 'TMP_URL', get_template_directory_uri() );
define( 'SKINS_DIR',  TMP_URL.'/lib/skins/' );
define( 'FONTS_DIR',  TMP_URL.'/lib/fonts/' );
define( 'ICONS_DIR',  TMP_URL.'/lib/icons/' );
define( 'TMP_ADMIN',  TMP_URL. '/cloudfw' );
define( 'TMP_ADMIN_SRC', TMP_URL. '/cloudfw/cloudfw' );
define( 'TMP_ADMIN_PATH', TEMPLATEPATH. '/cloudfw' );
define( 'TMP_INCLUDES', TEMPLATEPATH. '/includes' );

$doc_url = 'http://docs.cloudfw.net/positive/';
$ga_page = 'admin.php?page='.$theme_setting_slug.'&tab=system&jump=1';
$custom_sidebar_page = 'admin.php?page='.$theme_setting_slug.'&tab=general&jump=4';


/**
 *	CloudFw Default CSS Skins
 *	
 *	@since 1.0
**/
$theme_skins["default"] = array(
	"name"			=> "Default Blank Theme",
	"css"			=> "default/load.css",
	"ie"			=> "",
	"ie7"			=> "",
	//"thumbnail"		=> TMP_URL."/lib/skins/default/thumb_.png",
	"version"		=> '1.0'
	);


/*
 *	CloudFw Register Fonts
 *	
 *	@since 1.0
**/
cloudfw_register_font('default', 'Arial, Helvetica, sans-serif', 'Arial, Helvetica');
cloudfw_register_font('default', 'Tahoma, Geneva, sans-serif', 'Tahoma');
cloudfw_register_font('default', '\'Trebuchet MS\', Arial, Helvetica, sans-serif', 'Trebuchet MS');
cloudfw_register_font('default', '\'Times New Roman\', Times, serif', 'Times New Roman');
cloudfw_register_font('default', 'Georgia \'Times New Roman\', Times, serif', 'Georgia');
cloudfw_register_font('default', '\'Lucida Sans Unicode\', \'Lucida Grande\', sans-serif', 'Lucida Sans Unicode');
cloudfw_register_font('default', 'Verdana, Geneva, sans-serif', 'Verdana');
cloudfw_register_font('default', '\'Courier New\', Courier, monospace', 'Courier New, Monospace');

cloudfw_register_font('custom', 'Aaargh', 'Aaargh', 'Aaargh/load.css');
cloudfw_register_font('custom', 'AurulentSans', 'AurulentSans', 'AurulentSans/load.css');
cloudfw_register_font('custom', 'AurulentSansBold', 'AurulentSansBold', 'AurulentSansBold/load.css');
cloudfw_register_font('custom', 'BebasNeueRegular', 'Bebas Neue Regular', 'bebas/load.css');
cloudfw_register_font('custom', 'BPreplayRegular', 'BPreplayRegular', 'BPreplayRegular/load.css');
cloudfw_register_font('custom', 'BPreplayBold', 'BPreplayBold', 'BPreplayBold/load.css');
cloudfw_register_font('custom', 'Candela', 'Candela', 'Candela/load.css');
cloudfw_register_font('custom', 'CandelaBold', 'CandelaBold', 'CandelaBold/load.css');
cloudfw_register_font('custom', 'ColaborateRegular', 'ColaborateRegular', 'Colaborate/load.css');
cloudfw_register_font('custom', 'COM4tSans', 'COM4t Sans', 'COM4tSans/load.css');
cloudfw_register_font('custom', 'DekarRegular', 'Dekar', 'Dekar/load.css');
cloudfw_register_font('custom', 'FolksRegular', 'Folks', 'Folks/load.css');
cloudfw_register_font('custom', 'junctionregularRegular', 'Junkction', 'Junkction/load.css');
cloudfw_register_font('custom', 'LacunaRegular', 'Lacuna', 'Lacuna/load.css');
cloudfw_register_font('custom', 'LeagueGothicRegular', 'League Gothic', 'League/load.css');
cloudfw_register_font('custom', 'MergeRegular', 'Merge', 'Merge/load.css');
cloudfw_register_font('custom', 'MolotRegular', 'Molot Regular', 'Molot/load.css');
cloudfw_register_font('custom', 'MuseoSans500', 'Museo Sans', 'MuseoSans/load.css');
cloudfw_register_font('custom', 'nevisBold', 'Nevis', 'Nevis/load.css');
cloudfw_register_font('custom', 'OblikBold', 'Oblik Bold', 'Oblik/load.css');
cloudfw_register_font('custom', 'PerspectiveSansRegular', 'Perspective', 'Perspective/load.css');
cloudfw_register_font('custom', 'SteelFish', 'SteelFish', 'SteelFish/load.css');
cloudfw_register_font('custom', 'TitilliumLRegular', 'Titillium', 'Titillium/load.css');
cloudfw_register_font('custom', 'ZagRegular', 'Zag', 'Zag/load.css');

cloudfw_register_font('google', array('Allan', 'Allerta', 'Anton', 'Arimo', 'Arvo', 'Bangers', 'Bentham', 'Bevan', 'Cabin', 'Cabin Sketch', 'Calligraffitti', 'Candal', 'Cantarell', 'Chewy', 'Coda', 'Copse', 'Corben', 'Droid Sans', 'Just+Another+Hand', 'Kreon', 'Kristi', 'Lato', 'Maiden+Orange', 'Merriweather', 'Molengo', 'Neucha', 'Neuton', 'Nobile', 'Oswald', 'PT+Sans', 'PT Sans Narrow', 'PT+Serif', 'Philosopher', 'Puritan', 'Raleway', 'Quattrocento+Sans', 'Ubuntu', 'Vollkorn'));


/*
 *	CloudFw Register PreDefined Patterns
 *	
 *
 *	[ID, Name, CSS Code, Group]
 *	@since 1.0
**/

cloudfw_register_pattern('dot-1', 'Dotted #1', 'background-image: url('.TMP_URL.'/lib/imgs/patterns/pattern-dot-1.png); background-repeat: repeat', 'Dots');
cloudfw_register_pattern('pattern-2', 'Soft Vertical Line', 'background-image: url('.TMP_URL.'/lib/imgs/navigation-pattern.png); background-repeat: repeat', 'Stripes');
cloudfw_register_pattern('dot-2', 'Crosswise', 'background-image: url('.TMP_URL.'/lib/imgs/patterns/pattern-dot-2.png); background-repeat: repeat; background-attachment: fixed', 'Stripes');
cloudfw_register_pattern('ver-dark-1', 'Vertical Dark Line 10%', 'background-image: url('.TMP_URL.'/lib/imgs/patterns/pattern-ver-line-10.png); background-repeat:repeat; background-position: 0 0;', 'Stripes');
cloudfw_register_pattern('ver-dark-2', 'Vertical Dark Line 20%', 'background-image: url('.TMP_URL.'/lib/imgs/patterns/pattern-ver-line-20.png); background-repeat:repeat; background-position: 0 0;', 'Stripes');
cloudfw_register_pattern('ver-dark-3', 'Vertical Dark Line 30%', 'background-image: url('.TMP_URL.'/lib/imgs/patterns/pattern-ver-line-30.png); background-repeat:repeat; background-position: 0 0;', 'Stripes');
cloudfw_register_pattern('ver-dark-4', 'Vertical Dark Line 40%', 'background-image: url('.TMP_URL.'/lib/imgs/patterns/pattern-ver-line-40.png); background-repeat:repeat; background-position: 0 0;', 'Stripes');
cloudfw_register_pattern('ver-dark-5', 'Vertical Dark Line 50%', 'background-image: url('.TMP_URL.'/lib/imgs/patterns/pattern-ver-line-50.png); background-repeat:repeat; background-position: 0 0;', 'Stripes');

cloudfw_register_pattern('pattern-1', 'Minimal Triangle', 'background-image: url('.TMP_URL.'/lib/imgs/patterns/pattern-1.png); background-repeat: repeat', 'Triangles');
cloudfw_register_pattern('ver-triangle-1-05', 'Triangle #1 05%', 'background-image: url('.TMP_URL.'/lib/imgs/patterns/pattern-triangle-05.png); background-repeat:repeat; background-position: 0 0;', 'Triangles');
cloudfw_register_pattern('ver-triangle-1-10', 'Triangle #1 10%', 'background-image: url('.TMP_URL.'/lib/imgs/patterns/pattern-triangle-10.png); background-repeat:repeat; background-position: 0 0;', 'Triangles');
cloudfw_register_pattern('ver-triangle-1-20', 'Triangle #1 20%', 'background-image: url('.TMP_URL.'/lib/imgs/patterns/pattern-triangle-20.png); background-repeat:repeat; background-position: 0 0;', 'Triangles');
cloudfw_register_pattern('ver-triangle-1-30', 'Triangle #1 30%', 'background-image: url('.TMP_URL.'/lib/imgs/patterns/pattern-triangle-30.png); background-repeat:repeat; background-position: 0 0;', 'Triangles');
cloudfw_register_pattern('ver-triangle-1-40', 'Triangle #1 40%', 'background-image: url('.TMP_URL.'/lib/imgs/patterns/pattern-triangle-40.png); background-repeat:repeat; background-position: 0 0;', 'Triangles');

	
/*
 *	CloudFw Sliders
 *
 *	@hook: cloudfw_sliders
 *	@since 1.0
**/	 

function cloudfw_sliders() {
	$theme_sliders["default_slider"] = array(
		"name" 	=> __('Header Slider','cloudfw')
	);
	$theme_sliders["inpage_slider"] = array(
		"name" 	=> __('Inline Slider','cloudfw')
	);
	$theme_sliders["nivo_slider"] = array(
		"name" 	=> __('Nivo Slider','cloudfw')
	);
	$theme_sliders["piecemaker_slider"] = array(
		"name" 	=> __('3D Piecemaker Slider','cloudfw')
	);	
	$theme_sliders["galleria"] = array(
		"name" 	=> __('Galleria','cloudfw')
	);
		
	return apply_filters('cloudfw_sliders', $theme_sliders);	
}


/*
 *	CloudFw Social Services
 *
 *	%1$s : URL,		%2$s: Title
 *
 *	@hook: cloudfw_social_services
 *	@since 1.0
**/	 
function cloudfw_social_services() {
	$social_services = array();
	$social_services["facebook"] = array( "item_name"	=> "Facebook", "item_regex" 	=> 'http://www.facebook.com/share.php?u=%1$s&amp;t=%2$s' );
	$social_services["twitter"] = array( "item_name"	=> "Twitter", "item_regex" 	=> 'http://twitter.com/share?url=%1$s&amp;text=%2$s' );
	$social_services["friendfeed"] = array( "item_name"	=> "FriendFeed",  "item_regex" 	=> 'http://www.friendfeed.com/share?link=%1$s&amp;title=%2$s' );
	$social_services["digg"] = array( "item_name"	=> "Digg", "item_regex" 	=> 'http://digg.com/submit?url=%1$s&amp;title=%2$s' );
	$social_services["tumblr"] = array( "item_name"	=> "Tumblr", "item_regex" 	=> 'http://www.tumblr.com/share?u=%1$s&amp;t=%2$s' );
	$social_services["delicious"] = array(  "item_name"	=> "Delicious", "item_regex" 	=> 'http://delicious.com/post?url=%1$s&amp;title=%2$s' );
	$social_services["myspace"] = array( "item_name"	=> "Myspace", "item_regex" 	=> 'http://www.myspace.com/Modules/PostTo/Pages/?u=%1$s&amp;t=%2$s' );
	$social_services["linkedin"] = array( "item_name"	=> "LinkedIn", "item_regex" 	=> 'http://www.linkedin.com/shareArticle?mini=true&amp;url=%1$s&amp;title=%2$s' );
	$social_services["mixx"] = array( "item_name"	=> "Mixx", "item_regex" 	=> 'http://www.mixx.com/submit?page_url=%1$s&amp;title=%2$s' );
	$social_services["google"] = array( "item_name"	=> "Google", "item_regex" 	=> 'http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=%1$s&amp;title=%2$s' );
	$social_services["netvibes"] = array( "item_name"	=> "Netvibes", "item_regex" 	=> 'http://www.netvibes.com/share?url=%1$s&amp;title=%2$s' );
	$social_services["posterous"] = array( "item_name"	=> "Posterous", "item_regex" 	=> 'http://posterous.com/share?linkto=%1$s&amp;title=%2$s'  );
	$social_services["reddit"] = array( "item_name"	=> "Reddit",  "item_regex" 	=> 'http://reddit.com/submit?url=%1$s&amp;title=%2$s' );
	$social_services["stumbleupon"] = array( "item_name"	=> "Stumbleupon",  "item_regex" 	=> 'http://www.stumbleupon.com/submit?url=%1$s&amp;title=%2$s' );
	$social_services["technorati"] = array( "item_name"	=> "Technorati", "item_regex" 	=> 'http://technorati.com/faves?add=%1$s' );
	$social_services["yahoo-buzz"] = array( "item_name"	=> "Yahoo Buzz", "item_regex" 	=> 'http://buzz.yahoo.com/submit/?submitUrl=%1$s&amp;submitHeadline=%2$s' );
	return apply_filters('cloudfw_social_services', $social_services);
}

/*
 *	Social Bookmarking Services Sizes
 *
 *	@hook: cloudfw_social_services_sizes
 *	@since 1.0
**/
function cloudfw_social_services_sizes() {

	$social_services_sizes[] = array(
		"item_value"	=> "small",
		"item_class"	=> "",
		"item_html" 	=> '<span class="contrainer"><img src="'.TMP_ADMIN_SRC.'/social_icon/facebook-16x16.png" /><br/>16x16px</span>'
	);
	
	$social_services_sizes[] = array(
		"item_value"	=> "big",
		"item_class"	=> "",
		"item_html" 	=> '<span class="contrainer"><img src="'.TMP_ADMIN_SRC.'/social_icon/facebook-24x24.png" /><br/>24x24px</span>'
	);
	return apply_filters('cloudfw_social_services_sizes', $social_services_sizes);
}

/*
 *	CloudFw Predefined Buttons
 *
 *	@hook: cloudfw_buttons
 *	@since 1.0
**/
function cloudfw_button_array() {
	$cloudfw_button_colors["grey"]	= array("text"	=>	__('Grey','cloudfw'), "class" 	=> 	"grey");
	$cloudfw_button_colors["dark"]	= array("text"	=>	__('Dark','cloudfw'), "class" 	=> 	"dark");
	$cloudfw_button_colors["pink"]	= array("text"	=>	__('Pink','cloudfw'), "class" 	=> 	"pink");
	$cloudfw_button_colors["sky"]	= array("text"	=>	__('Sky','cloudfw'),  "class" 	=> 	"sky");
	$cloudfw_button_colors["red"]	= array("text"	=>	__('Red','cloudfw'),  "class" 	=> 	"red");
	$cloudfw_button_colors["ocean"]	= array("text"	=>	__('Ocean','cloudfw'),"class" 	=> 	"ocean");
	$cloudfw_button_colors["green"]	= array("text"	=>	__('Green','cloudfw'), "class" 	=> 	"green");
	$cloudfw_button_colors["brown"]	= array("text"	=>	__('Brown','cloudfw'), "class" 	=> 	"brown");
	$cloudfw_button_colors["dark_brown"] = array("text"	=>__('Dark Brown','cloudfw'), "class" 	=> 	"dark_brown");
	return apply_filters('cloudfw_buttons', $cloudfw_button_colors);
}


/*
 *	CloudFw Admin Messages
 *
 *	@hook: cloudfw_admin_messages
 *	@since 1.0
**/

function cloudfw_admin_messages() {
	
	$msgs[999] = array('msg' => __('The Theme Activated','cloudfw'), 'key' => 'update');
	
	$msgs[1000] = array('msg' => __('Options Updated','cloudfw'), 'key' => 'update');
	$msgs[1003] = array('msg' => __('There was an error when saving options','cloudfw'), 'key' => 'cancel');
	$msgs[1005] = array('msg' => __('Sidebar Created','cloudfw'), 'key' => 'add');
	$msgs[1024] = array('msg' => __('1024: An error occurred when uploading','cloudfw'), 'key' => 'cancel');
	
	$msgs[2000] = array('msg' => __('Options Deleted','cloudfw'), 'key' => 'cancel');
	$msgs[2001] = array('msg' => __('Sorry, An Error Has Occurred','cloudfw'), 'key' => 'cancel');
	$msgs[2010] = array('msg' => __('Sorry, Your Refferer Cannot Verified','cloudfw'), 'key' => 'cancel');
	
	$msgs[6001] = array('msg' => __('Slider Item Added','cloudfw'), 'key' => 'add');
	$msgs[6002] = array('msg' => __('Slider Item(s) Updated','cloudfw'), 'key' => 'update');
	$msgs[6004] = array('msg' => __('Slider Created','cloudfw'), 'key' => 'add');
	$msgs[6005] = array('msg' => __('Slider Updated','cloudfw'), 'key' => 'update');
	
	$msgs[7001] = array('msg' => __('New Skin Created','cloudfw'), 'key' => 'add');
	$msgs[7002] = array('msg' => __('The Skin Updated','cloudfw'), 'key' => 'update');
	$msgs[7003] = array('msg' => __('The Skin Deleted','cloudfw'), 'key' => 'cancel');
	$msgs[7004] = array('msg' => __('Theme Skin Changed','cloudfw'), 'key' => 'update');
	$msgs[7005] = array('msg' => __('Theme Skin Updated And Applied','cloudfw'), 'key' => 'update');
	$msgs[7006] = array('msg' => __('The Skin Duplicated','cloudfw'), 'key' => 'add');
	
	$msgs[8001] = array('msg' => __('Blog Page Created And Defined Successfully','cloudfw'), 'key' => 'add');
	$msgs[8002] = array('msg' => __('Portfolio Page Created And Defined Successfully','cloudfw'), 'key' => 'add');
	$msgs[8003] = array('msg' => __('Homepage Created Successfuly','cloudfw'), 'key' => 'add');
	$msgs[8004] = array('msg' => __('Slider Samples Created Successfuly','cloudfw'), 'key' => 'add');
	
	$msgs[8010] = array('msg' => __('Fonts Updated','cloudfw'), 'key' => 'update');
	$msgs[8011] = array('msg' => __('Fonts Settings Saved','cloudfw'), 'key' => 'update');
	
	$msgs[9000] = array('msg' => __('All Theme Settings Restored','cloudfw'), 'key' => 'cancel');
	$msgs[9001] = array('msg' => __('All Cache Files Removed','cloudfw'), 'key' => 'cancel');
	$msgs[9002] = array('msg' => __('Option File Uploaded & Saved Changes','cloudfw'), 'key' => 'add');
	$msgs[9003] = array('msg' => __('Please Upload A File','cloudfw'), 'key' => 'cancel');
	$msgs[9004] = array('msg' => __('The uploaded file not compatible with the theme!','cloudfw'), 'key' => 'cancel');
	$msgs[9005] = array('msg' => __('There was an error uploading the file, please try again!','cloudfw'), 'key' => 'cancel');
	$msgs[9006] = array('msg' => __('Type of the uploaded file not compatible with the theme','cloudfw'), 'key' => 'cancel');
	$msgs[9007] = array('msg' => __('File size too large','cloudfw'), 'key' => 'cancel');
	$msgs[9008] = array('msg' => __('Could not save uploaded file. The upload was cancelled, or server error encountered','cloudfw'), 'key' => 'cancel');
	$msgs[9009] = array('msg' => __('The upload was cancelled because of upload directory isn\'t writable','cloudfw'), 'key' => 'cancel');
	$msgs[9011] = array('msg' => __('The Skin Imported','cloudfw'), 'key' => 'add');
	$msgs[9012] = array('msg' => __('Icon Set Imported','cloudfw'), 'key' => 'add');
	$msgs[9013] = array('msg' => __('The action has been canceled. Please select some skin to backup','cloudfw'), 'key' => 'cancel');
	$msgs[9014] = array('msg' => __('Error: The Zip File Cannot Opened','cloudfw'), 'key' => 'cancel');
	$msgs[9015] = array('msg' => __('Please Upload A Zip File','cloudfw'), 'key' => 'cancel');
	$msgs[9016] = array('msg' => __('Slider Imported','cloudfw'), 'key' => 'add');
	$msgs[9017] = array('msg' => __('Could not be found any .skin file in the zip file','cloudfw'), 'key' => 'cancel');
	$msgs[9018] = array('msg' => __(TMP_PATH.'/resources/skins/ folder cannot opened to scan the skin files','cloudfw'), 'key' => 'cancel');
	$msgs[9019] = array('msg' => __('Fatal Error: Php ZipArchive extension is not found. You can not import a zip file','cloudfw'), 'key' => 'cancel');
	$msgs[9020] = array('msg' => __('The import was cancelled. <strong>'.TMP_PATH.'/resources/skins/</strong> folder is not writable','cloudfw'), 'key' => 'cancel');
	$msgs[9021] = array('msg' => __('The type of uploaded file is not valid','cloudfw'), 'key' => 'cancel');
	$msgs[9022] = array('msg' => __('Could not be found any .slider file in the zip file','cloudfw'), 'key' => 'cancel');
	
	return apply_filters('cloudfw_admin_messages', $msgs);
	
}