Report abuse


			
 "How Many Big Posts do you want?",
            "id" => $shortname."_big_posts_num",
            "std" => "1",
            "type" => "text"),

	array(    "name" => "How Many Regular Posts do you want?",
            "id" => $shortname."_reg_posts_num",
            "std" => "10",
            "type" => "text"),
	
    array(    "name" => "Archive Page Name",
            "id" => $shortname."_archive_page",
            "std" => "Archives",
            "type" => "text"),

	array(    "name" => "Disable Thumbnails in Posts? (refer to theme documentation if you don't know what this is)",
            "id" => $shortname."_thumb_toggle",
            "std" => "false",
            "type" => "checkbox"),
	
    array(    "name" => "Small Thumbnail Custom Field Name (refer to theme documentation if you don't know what this is)",
            "id" => $shortname."_s_thumb_name",
            "std" => "small_thumbnail",
            "type" => "text"),

    array(    "name" => "Large Thumbnail Custom Field Name (refer to theme documentation if you don't know what this is)",
            "id" => $shortname."_l_thumb_name",
            "std" => "large_thumbnail",
			"type" => "text"),
			
	array(    "name" => "Disable Menu/Login Bar?",
            "id" => $shortname."toggle_menu",
            "std" => "false",
			"type" => "checkbox"),
			
	array(    "name" => "Disable The first Sidebar Box? (displays Categories, Feeds, Blogroll and Tags)",
            "id" => $shortname."toggle_tabbed_box_1",
            "std" => "false",
			"type" => "checkbox"),
			
	array(    "name" => "Disable The second Sidebar Box? (displays Recent Comments and Recent Posts)",
            "id" => $shortname."toggle_tabbed_box_2",
            "std" => "false",
			"type" => "checkbox"),
			
	array(    "name" => "Disable These Ads?",
            "id" => $shortname."_s_advert_toggle",
            "std" => "false",
			"type" => "checkbox"),
			
	array(    "name" => "Use an Image in The Blog's Title area (instead of Blog title and Description Text, max size: 960x150 pixels)",
            "id" => $shortname."_blogimg_toggle",
            "std" => "false",
			"type" => "checkbox"),			
			
	array(    "name" => "125x125 Advertisement-1 URL",
            "id" => $shortname."_s_advert_1_url",
            "std" => "",
			"type" => "text"),
	
	array(    "name" => "125x125 Advertisement-1 Name",
            "id" => $shortname."_s_advert_1_name",
            "std" => "",
			"type" => "text"),
			
	array(    "name" => "125x125 Advertisement-1 Image URL",
            "id" => $shortname."_s_advert_1_img",
            "std" => "",
			"type" => "text"),
	
	
	array(    "name" => "125x125 Advertisement-2 URL",
            "id" => $shortname."_s_advert_2_url",
            "std" => "",
			"type" => "text"),
			
	array(    "name" => "125x125 Advertisement-2 Name",
            "id" => $shortname."_s_advert_2_name",
            "std" => "",
			"type" => "text"),
			
	array(    "name" => "125x125 Advertisement-2 Image URL",
            "id" => $shortname."_s_advert_2_img",
            "std" => "",
			"type" => "text"),
	
	array(    "name" => "125x125 Advertisement-3 URL",
            "id" => $shortname."_s_advert_3_url",
            "std" => "",
			"type" => "text"),
			
	array(    "name" => "125x125 Advertisement-3 Name",
            "id" => $shortname."_s_advert_3_name",
            "std" => "",
			"type" => "text"),
			
	array(    "name" => "125x125 Advertisement-3 Image URL",
            "id" => $shortname."_s_advert_3_img",
            "std" => "",
			"type" => "text"),
	
	
	array(    "name" => "125x125 Advertisement-4 URL",
            "id" => $shortname."_s_advert_4_url",
            "std" => "",
			"type" => "text"),
			
	array(    "name" => "125x125 Advertisement-4 Name",
            "id" => $shortname."_s_advert_4_name",
            "std" => "",
			"type" => "text"),
			
	array(    "name" => "125x125 Advertisement-4 Image URL",
            "id" => $shortname."_s_advert_4_img",
            "std" => "",
			"type" => "text"),
			
	array(    "name" => "Disable These Ads?",
            "id" => $shortname."_m_advert_toggle",
            "std" => "false",
			"type" => "Checkbox"),
			
			
	array(    "name" => "300x250 Advertisement URL",
            "id" => $shortname."_m_advert_url",
            "std" => "",
			"type" => "text"),
			
	array(    "name" => "300x250 Advertisement Name",
            "id" => $shortname."_m_advert_name",
            "std" => "",
			"type" => "text"),
			
	array(    "name" => "300x250 Advertisement Image URL",
            "id" => $shortname."_m_advert_img",
            "std" => "",
			"type" => "text"),
			
			
	array(    "name" => "Disable This Ad?",
            "id" => $shortname."_L_advert_toggle",
            "std" => "false",
			"type" => "Checkbox"),		
			
	array(    "name" => "798x90 Advertisement Name",
            "id" => $shortname."_l_advert_name",
            "std" => "",
			"type" => "text"),
			
	array(    "name" => "798x90 Advertisement URL",
            "id" => $shortname."_l_advert_url",
            "std" => "",
			"type" => "text"),
			
	array(    "name" => "798x90 Advertisement Image URL",
            "id" => $shortname."_l_advert_img",
            "std" => "",
			"type" => "text")
);

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=functions.php&saved=true");
                die;

        } else if( 'reset' == $_REQUEST['action'] ) {

            foreach ($options as $value) {
                delete_option( $value['id'] ); }

            header("Location: themes.php?page=functions.php&reset=true");
            die;

        }
    }

    add_theme_page($themename." Options", "Current Theme 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.

'; ?>

settings

" />