cat_ID] = $mx_cat->cat_name; } $categories_tmp = array_unshift($mx_categories, "Select a category:"); $options = array ( array( "name" => "Main Set Up", "type" => "heading", "desc" => "Set your logo and color scheme.", ), array( "name" => "Logo Display", "desc" => "The URL address of your logo (best is 400px x 60px). (Leaving it empty will display your blog title)", "id" => $shortname."_logo", "type" => "text", "std" => ""), array( "name" => "Disable Bloginfo?", "desc" => "Tick to disable Bloginfo Headline.", "id" => $shortname."_disinfo", "type" => "checkbox", "std" => "false"), array( "name" => "Disable Featured section?", "desc" => "Tick to disable Featured section.", "id" => $shortname."_disfeat", "type" => "checkbox", "std" => "false"), array( "name" => "Disable Thumbnails?", "desc" => "Tick to disable Thumbnails.", "id" => $shortname."_disthumb", "type" => "checkbox", "std" => "false"), /* featured */ array( "name" => "Featured section", "type" => "heading", "desc" => "This section customizes the featured area in the sidebar and the number of stories displayed there.", ), array( "name" => "Featured section category", "desc" => "Select the category that you would like to have displayed in Featured list on your homepage.", "id" => $shortname."_story_category", "std" => "Uncategorized", "type" => "select", "options" => $mx_categories), array( "name" => "Google Analytics", "type" => "heading", "desc" => "Please paste your Google Analytics (or other) tracking code here.", ), array( "name" => "Google Analytics", "desc" => "", "id" => $shortname."_google_analytics", "std" => "", "type" => "textarea"), array( "type" => "close"), ); function mytheme_add_admin() { global $themename, $shortname, $options; if ( $_GET['page'] == basename(__FILE__) ) { if ( 'save' == $_REQUEST['action'] ) { foreach ($options as $value) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } foreach ($options as $value) { if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } else { delete_option( $value['id'] ); } } header("Location: themes.php?page=dashboard.php&saved=true"); die; } else if( 'reset' == $_REQUEST['action'] ) { foreach ($options as $value) { delete_option( $value['id'] ); update_option( $value['id'], $value['std'] );} header("Location: themes.php?page=dashboard.php&reset=true"); die; } } add_theme_page($themename." Options", "$themename Options", 'edit_themes', basename(__FILE__), 'mytheme_admin'); } function mytheme_admin() { global $themename, $shortname, $options; if ( $_REQUEST['saved'] ) echo '

'.$themename.' settings saved.

'; if ( $_REQUEST['reset'] ) echo '

'.$themename.' settings reset.

'; ?>

theme options

: " size="40" />

:

:


/>