cat_ID] = $zm_cat->cat_name; } $categories_tmp = array_unshift($zm_categories, "Select a category:"); $number_entries = array("Select a Number:","1","2","3","4","5","6","7","8","9","10", "12","14", "16", "18", "20" ); $options = array ( array( "name" => "Sliding Panel Settings", "type" => "heading", "desc" => "This section customizes the sliding panel area and the number of panels to be displayed.", ), array( "name" => "Sliding Panel category", "desc" => "Select the category that you would like to have displayed on the sliding.", "id" => $shortname."_gldcat", "std" => "Select a category:", "type" => "select", "options" => $zm_categories), array( "name" => "Number of sliding panels", "desc" => "Select the number of panels to display .", "id" => $shortname."_gldct", "std" => "Select a Number:", "type" => "select", "options" => $number_entries), array( "name" => "Featured Post Settings", "type" => "heading", "desc" => "This section customizes the featured post section.", ), array( "name" => "Featured post category", "desc" => "Select the category that you would like to have displayed on the featured post area.", "id" => $shortname."_feat_category", "std" => "Select a category:", "type" => "select", "options" => $zm_categories), array( "name" => "Featured Video", "type" => "heading", "desc" => " Displays a video embedded on your sidebar .", ), array("name" => "Video embed code", "desc" => "You can find the embed code for videos on all video sharing sites.", "id" => $shortname."_video", "std" => "Enter the video embed code here. Remember to change the size to 310 x 250 in the embed code.", "type" => "textarea"), array( "name" => "About Me Settings", "type" => "heading", "desc" => "Set your About me image and text from here .", ), array("name" => "About me Image", "desc" => "Enter your avatar image url here.", "id" => $shortname."_img", "std" => "My image", "type" => "text"), array("name" => "About me text", "desc" => "Enter some descriptive text about you, or your site.", "id" => $shortname."_about", "std" => "There is something about me..", "type" => "textarea"), array( "name" => "Header banner Settings", "type" => "heading", "desc" => "You can setup the 468 x 60 header banner from here", ), array( "name" => "Header banner Image", "desc" => "Enter your 468 x 60 banner image url here.", "id" => $shortname."_hbanner", "std" => "Header banner Image", "type" => "text"), array("name" => "Header banner Url", "desc" => "Enter the header banner url here.", "id" => $shortname."_hurl", "std" => "Header banner url", "type" => "text"), array( "name" => "125 x 125 banner Settings", "type" => "heading", "desc" => "You can setup three 300x90 banners on your sidebar from here", ), array("name" => "Banner-1 Image", "desc" => "Enter your 125x125 banner image url here.", "id" => $shortname."_banner1", "std" => "Banner-1 image", "type" => "text"), array("name" => "Banner-1 Url", "desc" => "Enter the banner-1 url here.", "id" => $shortname."_url1", "std" => "Banner-1 url", "type" => "text"), array("name" => "Banner-2 Image", "desc" => "Enter your 125x125 banner image url here.", "id" => $shortname."_banner2", "std" => "Banner-2 image", "type" => "text"), array("name" => "Banner-2 Url", "desc" => "Enter the banner-2 url here.", "id" => $shortname."_url2", "std" => "Banner-2 url", "type" => "text"), array("name" => "Banner-3 Image", "desc" => "Enter your 125x125 banner image url here.", "id" => $shortname."_banner3", "std" => "Banner-3 image", "type" => "text"), array("name" => "Banner-3 Url", "desc" => "Enter the banner-3 url here.", "id" => $shortname."_url3", "std" => "Banner-3 url", "type" => "text"), array("name" => "Banner-4 Image", "desc" => "Enter your 125x125 banner image url here.", "id" => $shortname."_banner4", "std" => "Banner-4 image", "type" => "text"), array("name" => "Banner-4 Url", "desc" => "Enter the banner-4 url here.", "id" => $shortname."_url4", "std" => "Banner-4 url", "type" => "text"), array( "name" => "Adsense Options", "type" => "heading", "desc" => " Setup the adsense banners for your blog .", ), array("name" => "480x60 banner on the posts", "desc" => "adsense 480 x 60 banner script .", "id" => $shortname."_ad2", "std" => "", "type" => "textarea"), ); 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=controlpanel.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=controlpanel.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.
'.$themename.' settings reset.
For more wordpress themes and support, contact the support forums