<?php
/**
 * MyArcadePlugin Pro Theme Options helps theme developers to create MyArcadePlugin Pro compatible theme backends.
 * @package MyArcadePlugin Pro Theme Settings
 * @author Onedin Ibrocevic & Daniel Bakovic
 * @version 2.00
 */

$shortname = str_replace(' ', '_', strtolower(MYAPB_THEMENAME));

function myabp_get_theme_option($option)
{
	global $shortname;
	return stripslashes(get_option($shortname . '_' . $option));
}

function myabp_get_theme_settings($option)
{
	return stripslashes(get_option($option));
}

/** Theme  Admin  Panel **/
// Get all categories
$slidercategs_obj = get_categories('hide_empty=0');
$slidercategs = array();

foreach ($slidercategs_obj as $categ) {
  $slidercategs[$categ->cat_ID] = $categ->cat_name;
}
 
$blogcats = array();
$blogcats = $slidercategs;
$blogcats[] = '-- none --';

$options = array (
    
		// Recommended Plugins					
		array(	"type" 		=> "open"),					
		array(	"name" 		=> "Recommended Plugin Status",
        		"type" 		=> "title",
				    "desc" 		=> "Here you can see a list of recommended plugins, so all themes functions will work properly. A 'X' marks a plugin which is not installed."),
		array( 	"name" 		=> "MyArcadePlugin Pro",
        "function"	  => "get_game",
        		"type" 		=> "plugincheck"),
		array( 	"name" 		=> "MyGameListCreator",
				"function"	  => "get_game_list",
        		"type" 		=> "plugincheck"),
		array( 	"name" 		=> "MyScoresPresenter",
				"function"	  => "myscore_get_latest_scores",
        		"type" 		=> "plugincheck"),
		array( 	"name" 		=> "WP-PageNavi",
				"function"	  => "wp_pagenavi",
        		"type" 		=> "plugincheck"),
		array( 	"name" 		=> "WP-PostRatings",
				"function"	  => "the_ratings",
        		"type" 		=> "plugincheck"),
		array( 	"name" 		=> "WP-PostViews",
				"function"	  => "the_views",
        		"type" 		=> "plugincheck"),
    array( 	"name" 		=> "WP Favorite Posts",
				"function"	  => "wpfp_link",
        		"type" 		=> "plugincheck"),
    array( 	"name" 		=> "Sexy Bookmarks",
				"function"	  => "selfserv_shareaholic",
        		"type" 		=> "plugincheck"),
		array(	"type" 		=> "close"),
    
    // Theme Settings					
		array(  "type" 		=> "open"),					
		array(  "name" 		=> "Layout Settings",
        		"type" 		=> "title",
            "desc" 		=> "This section customizes the look of the theme."),
    array(  "name"    => "Blog category",
            "desc"    => "Select a category that should be used as the regular blog.",
            "id"      => $shortname."_blog_category",
            "std"     => "-- none --",
            "type"    => "select",
            "options" => $blogcats),            
		array(  "name"   	=> "Main Color Scheme",
	          "desc"   	=> "Choose a template color scheme.",
	          "id"     	=> $shortname."_color_scheme",
	          "std"    	=> "Default",
	          "type"   	=> "select",
	          "options"	=> array("Default", "Blue", "Red", "Pink") ),
    array(  "name"   	=> "Sidebar Position",
	          "desc"   	=> "Choose a sidebar position.",
	          "id"     	=> $shortname."_sidebar_position",
	          "std"    	=> "right",
	          "type"   	=> "select",
	          "options"	=> array('right', 'left') ),    
    array( 	"name" 		=> "Games per Box",
        		"desc" 		=> "Set the number of games that should be shown in each category box on the front page",
        		"id" 		  => $shortname."_box_count",
            "std"    	=> "6",
        		"type" 		=> "text"),
    array(  "name"    => "Game Category Presentation",
            "desc"    => "Select how the category boxes should be displayed on the front page",
            "id"      => $shortname."_box_design",
            "std"     => "Vertical",
            "type"    => "select",
            "options" => array("Horizontal", "Vertical", "Full", "Half", "Miniclip") ),
    array( 	"name" 		=> "Hide Category Boxes",
        		"desc" 		=> "Select the categories which should be excluded from the front page view.",
        		"id" 		  => $shortname."_exclude_front_cat",
            "std"    	=> "",
            "options"	=> $slidercategs,
        		"type" 		=> "exclude_categories"),           
		array(  "name"   	=> "Game Embed Box",
	          "desc"   	=> "Enable or disable the game embed box ('Embed this game on your site..').",
	          "id"     	=> $shortname."_share_box",
	          "std"    	=> "enable",
	          "type"   	=> "select",
	          "options"	=> array( 'disable', 'enable' ) ),
		array(  "name"   	=> "Game Order",
	          "desc"   	=> "Select how games should be ordered on the front page. Info: Random order may slow down your site!",
	          "id"     	=> $shortname."_order_games",
	          "std"    	=> "Descending",
	          "type"   	=> "select",
	          "options"	=> array( 'Descending', 'Random' ) ),
		array( 	"name" 		=> "Front Page Text",
        		"desc" 		=> "Here you can add some text for SEO purpose or just to introduce your site.",
        		"id" 		  => $shortname."_frontpage_text",
            "std"    	=> "",
        		"type" 		=> "textarea"),
		array( 	"name" 		=> "Load jQuery from Google CDN",
        		"desc" 		=> "Enable this if you want to load the jQuery library from Google CDN instead from your site. This could reduce the load time of your site.",
        		"id" 		  => $shortname."_jquery_cdn",
            "std"    	=> "disable",
            "type"   	=> "select",
	          "options"	=> array( 'disable', 'enable' ) ),
		array( 	"name" 		=> "Display Game Screen Shots",
        		"desc" 		=> "Enable this if you want to display game screenshots on single game pages (only when available).",
        		"id" 		  => $shortname."_dispay_screens",
            "std"    	=> "disable",
            "type"   	=> "select",
	          "options"	=> array( 'disable', 'enable' ) ),      
    array(	"type" 		=> "savebutton"),
		array(	"type" 		=> "close"),
    
		// Header 
		array(	"type" 		=> "open"),					
		array(	"name" 		=> "Customize Header",
        		"type" 		=> "title",
				    "desc" 		=> "Here you can specify all header settings for your template."),
		array(  "name"   	=> "Custom Favicon",
	          "desc"   	=> "Enable or disable the Custom Favicon.",
	          "id"     	=> $shortname."_custom_favicon_status",
	          "std"    	=> "disable",
	          "type"   	=> "select",
	          "options"	=> array( 'disable', 'enable' ) ),
		array( 	"name" 		=> "",
        		"desc" 		=> "The complete URL to your favicon.",
        		"id" 		  => $shortname."_custom_favicon",
            "std"    	=> "",
        		"type" 		=> "text"),
    array(  "name"    => "Custom Logo",
            "desc"    => "The complete URL to you logo. Maximum dimensions are 460x80px.",
            "id"      => $shortname."_custom_logo",
            "std"    	=> "",
            "type"    => "text"),    
    array(  "name"    => "Site Keywords",
            "desc"    => "The keywords that best describe your website seperated by a coma(,). This is a meta-tag within the HEAD tags.",
            "id"      => $shortname."_custom_site_keywords",
            "std"    	=> "",
            "type"    => "text"),
    array(  "name"    => "Site Description",
            "desc"    => "A small description of your site for the meta-tag",
            "id"      => $shortname."_custom_sitedesc",
            "std"    	=> "",
            "type"    => "textarea"),
    array(  "name"    => "Description and Keywords Status",
            "desc"    => "Disable Site Description and Site Keywords if you use a SEO plugin.",
            "id"      => $shortname."_site_sitedesc_status",
            "std"     => "disable",
            "type"    => "select",            
            "options" => array('enable', 'disable') ),  
    array(  "name"   	=> "Custom Header Code",
	          "desc"   	=> "Enable or disable the Custom Header Code.",
	          "id"     	=> $shortname."_custom_headercode_status",
	          "std"    	=> "disable",
	          "type"   	=> "select",
	          "options"	=> array( 'disable', 'enable' ) ),
		array( 	"name" 		=> "",
        		"desc" 		=> "Enter special code. ( e.g.: Mochi Verification)",
        		"id" 		  => $shortname."_custom_headercode",
            "std"    	=> "",
        		"type" 		=> "textarea"),	
    array(	"type" 		=> "savebutton"),
		array(	"type" 		=> "close"),
    
		// Special Footer					
		array(	"type" 		=> "open"),					
		array(	"name" 		=> "Customize Footer",
        		"type" 		=> "title",
				    "desc" 		=> "Here you can specify all footer settings for your template."),
    array(  "name"   	=> "Custom Footer Code",
	          "desc"   	=> "Enable or disable the Custom Footer Code.",
	          "id"     	=> $shortname."_custom_footercode_status",
	          "std"    	=> "disable",
	          "type"   	=> "select",
	          "options"	=> array( 'disable', 'enable' ) ),
		array( 	"name" 		=> "",
        		"desc" 		=> "Enter special code ( e.g.: Google Analytics).",
        		"id" 		  => $shortname."_custom_footercode",
            "std"    	=> "",
        		"type" 		=> "textarea"),
    array(  "name"    => "MyArcadePlugin Affiliate Link",
            "desc"    => "Enter your MyArcadePlugin affiliate link here to promote MyArcadePlugin and to earn extra money! If you do not have an affiliate account, please create one: <a href='http://myarcadeplugin.com/affiliate-program/' title='MyArcadePlugin Affiliate Program' target='_blank'>Affiliate Program</a>",
            "id"      => $shortname."_affiliate",
            "std"    	=> "",
            "type"    => "text"),
    array(  "name"    => "Affiliate Link Text",
            "desc"    => "You can enter a user defined Link Text for your affliate link. E.g <strong>MyArcadePlugin - Arcade Solution</strong>",
            "id"      => $shortname."_affiliate_text",
            "std"    	=> "",
            "type"    => "text"),    
    array(	"type" 		=> "savebutton"),
		array(	"type" 		=> "close"),
    
    // Top Slider Settings
    array(  "type"    => "open"), 
    array(  "name"    => "Top Slider Settings",
            "type"    => "title",
            "desc"    => "This section customizes the sliders and the number of shown games."),
    array(  "name"   	=> "Slider Type",
	          "desc"   	=> "Select a slider that should be shown on the fron page.",
	          "id"     	=> $shortname."_slider_type",
	          "std"    	=> "Default",
	          "type"   	=> "select",
	          "options"	=> array( 'Default', 'nivoSlider')),
    array(  "name"    => "Top Slider category",
            "desc"    => "Select game categories that should be displayed on the top slider.",
            "id"      => $shortname."_slidercategory",
            "std"     => "",
            "type"    => "exclude_categories",
            "options" => $slidercategs),
    array(  "name"   	=> "Auto scroll",
	          "desc"   	=> "Enable or disable auto scroll.",
	          "id"     	=> $shortname."_topslider_auto",
	          "std"    	=> "disable",
	          "type"   	=> "select",
	          "options"	=> array( 'disable', 'enable' ) ),    
		array(  "name"   	=> "Game Order",
	          "desc"   	=> "Select how games should be ordered on the slider. Info: Random order may slow down your site!",
	          "id"     	=> $shortname."_order_games_slider",
	          "std"    	=> "Descending",
	          "type"   	=> "select",
	          "options"	=> array( 'Descending', 'Random' ) ), 
    array(	"type" 		=> "savebutton"),
    array(  "type"    => "close"),
    
    // Featured Slider Settings 
    /*array(  "type"    => "open"), 
    array(  "name"    => "Featured Slider Settings",
            "type"    => "title",
            "desc"    => "This section customizes the featured slider.",
    ),    
    array(  "name"    => "Number of featured games",                                         
            "desc"    => "Set the number of games that should be shown on the <strong>featured slider</strong>. The game are ordered randomly.",
            "id"      => $shortname."_featured_count",
            "std"     => "16",
            "type"    => "text"
    ),  
    array(	"type" 		=> "savebutton"),
    array(  "type"    => "close"), */
    
		// Banner Options
		array(	"type" 		=> "open"),					
		array(  "name"    => "Advertisement Banner",
            "type"    => "title",
            "desc"    => "Manage your banner and adsense advertisement areas.",
    ),     
    array(  "name"    => "Header Banner",
            "desc"    => "Put your code for 468x60 banner here",
            "id"      => $shortname."_headerad",
            "std"     => "",
            "type"    => "textarea"
    ),      
    array(  "name"    => "Content Banner",
            "desc"    => "Put your code for 300x250 banner here.",
            "id"      => $shortname."_adcontent",
            "std"     => "",
            "type"    => "textarea"
    ),            
    array(  "name"    => "Game Preloader Banner",
            "desc"    => "Put your advertisement code for the game preloader here.",
            "id"      => $shortname."_loadinggameadcode",
            "std"     => "",
            "type"    => "textarea"
    ),   
    array(  "name"    => "Over Game Banner",
            "desc"    => "Put your code for 728x90 banner here.",
            "id"      => $shortname."_adtop",
            "std"     => "",
            "type"    => "textarea"
    ),
    array(  "name"   	=> "",
	          "desc"   	=> "Enable or disable 150px space between the over game banner and the game to match Google Adsense ToS.",
	          "id"     	=> $shortname."_150_space",
	          "std"    	=> "disable",
	          "type"   	=> "select",
	          "options"	=> array( 'disable', 'enable' ) ),    
    
    array(  "name"    => "Banner for Index Page",
            "desc"    => "Put your code for 200x200 banner here.",
            "id"      => $shortname."_adindex",
            "std"     => "",
            "type"    => "textarea"
    ),  
    
    array(	"type" 		=> "savebutton"),
		array(	"type" 		=> "close" ),
    
		// Loader
		array(	"type" 		=> "open"),					
		array(	"name" 		=> "Progress Bar",
        		"type" 		=> "title",
				    "desc" 		=> "This section customizes the settings of the single game site."),
		array(  "name"   	=> "Progress Bar",
	          "desc"   	=> "Enable or disable the progress bar.",
	          "id"     	=> $shortname."_progressbarstatus",
	          "std"    	=> "enable",
	          "type"   	=> "select",
	          "options"	=> array( 'enable', 'disable' ) ),
		array(  "name" 		=> "",
            "desc" 		=> "Select the delay in ms before the progress bar starts to load.",
            "id" 		  => $shortname."_progressbardelay",
            "std" 		=> "0",
            "type" 		=> "select",
            "options" => array( "0", "500", "1000", "1500", "2000", "2500", "3000", "3500", "4000", "4500", "5000", "5500", "6000", "6500", "7500", "8000", "9000" ) ),
		array(  "name" 		=> "",
            "desc" 		=> "Select the load speed index of the progress bar",
            "id" 		  => $shortname."_progressbarspeedindex",
            "std" 		=> "10",
            "type" 		=> "select",
            "options" => array( "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20" ) ),
		array(  "name"   	=> "",
	          "desc"   	=> "Enable or disable the text under the progress bar .",
	          "id"     	=> $shortname."_progressbartextloadstatus",
	          "std"     => "enable",
	          "type"    => "select",
	          "options" => array('enable', 'disable') ),
		array( 	"name" 		=> "",
        		"desc" 		=> "Progress Bar Text",
		   		  "id" 		  => $shortname."_progressbartextload",
				    "std"     => "<p>Game loaded, click here to start the game!</p>",
        		"type" 		=> "text"),
		array( 	"name" 		=> "",
        		"desc" 		=> "Set the limit in percent of the loading progress when the Progress Bar Text should be shown",
		   		  "id"  		=> $shortname."_progressbartextloadlimit",
            "std" 		=> "35",
            "type" 		=> "select",
				    "options" 	=> array( "0", "5", "10", "15", "20", "25", "30", "35", "40", "45", "50", "55", "60", "65", "70", "75", "80", "85", "90", "95", "100" ) ),
		array( 	"name" 		=> "",
        		"desc" 		=> "Define the textcolor of the percentage text.",
		   		  "id" 		  => $shortname."_progressbartextcolor",
				    "std"     => "#000000",
        		"type" 		=> "text"),
		array( 	"name" 		=> "",
        		"desc" 		=> "Define the bordercolor of the progress bar.",
		   		  "id"     	=> $shortname."_progressbarbordercolor",
				    "std"    	=> "#000000",
        		"type" 		=> "text"),
		array( 	"name" 		=> "",
        		"desc" 		=> "Define the backgroundcolor of the progress bar.",
		   		  "id" 		  => $shortname."_progressbarbackgroundcolor",
				    "std"     => "#ffffff",
        		"type" 		=> "text"),
		array( 	"name" 		=> "",
        		"desc" 		=> "Define the loading color of the progress bar.",
		   		  "id" 		  => $shortname."_progressbarloadcolor",
				    "std"     => "#999999",
        		"type" 		=> "text"),
    array(	"type" 		=> "savebutton"),
		array(	"type" 		=> "close")
);
?>