cat_ID] = $dd_cat->cat_name; } // Number of entries $number_entries = array("1","2","3","4","5","6","7","8","9","10", "12","14", "16", "18", "20" ); $dd_choose = array("Enable","Disable"); $dd_align = array("none","alignleft","aligncenter","alignright"); $dd_sp_choose = array("Coin Slider","jQuery Cycle","jQuery Kwicks"); $options = array ( array( "type" => "open"), array( "name" => "General", "type" => "title"), //Wordpress Upload Panel array( "name" => "Upload", "desc" => "Upload new image(logo, footer, favicon) then copy and paste url in appropriate field.", "id" => $shortname."_upload", "std" => "", "type" => "upload"), array( "name" => "Custom Logo (URL)", "desc" => "Enter the URL of the new Logo. (Eg. http://www.google.com/logo.gif). Recommended size is 300 x 120 px.", "id" => $shortname."_logo", "std" => "", "type" => "text"), array( "name" => "Custom Favicon (URL)", "desc" => "Enter the URL of the new favicon. (Eg. http://www.google.com/favicon.ico).", "std" => "", "id" => $shortname."_favicon", "type" => "text"), array( "name" => "Page Navigation", "desc" => "By default paging navigation is enabled. Check this box if you wish to use standard WordPress navigation.", "std" => "false", "id" => $shortname."_pnav", "type" => "checkbox"), array( "name" => "Contact Page Email Adress", "desc" => "If you use Contact Form Page Template please enter email adress where you want to recive your messages.", "id" => $shortname."_cpmail", "type" => "text", "std" => ""), array( "name" => "Footer Message", "desc" => "Usually your website's copyright information would go here.", "id" => $shortname."_footer", "type" => "textarea", "std" => ""), array( "name" => "Custom Footer Logo (URL)", "desc" => "Enter the URL of the new Logo. (Eg. http://www.google.com/logo.gif).", "id" => $shortname."_flogo", "std" => "", "type" => "text"), array( "name" => "Google Analytics", "desc" => "Please paste your Google Analytics (or other) tracking code here.", "id" => $shortname."_google_analytics", "type" => "textarea", "std" => ""), array( "type" => "close"), array( "type" => "open"), array( "name" => "Styling", "type" => "title"), array( "name" => "Alternative Site Color Scheme", "desc" => "Check this box if you wish to enable alternative color schemes.", "id" => $shortname."_alt_stylesheet", "std" => "false", "type" => "checkbox"), array( "name" => "Alternate Site Color", "desc" => "Click to select color", "id" => $shortname."_main_color", "type" => "color-picker", "std" => "336666"), array( "type" => "close"), array( "type" => "open"), array( "name" => "Sliding Panel", "type" => "title"), array( "name" => "Display Sliding Panel?", "desc" => "Check this box if you wish to display the sliding panel section on your homepage.", "id" => $shortname."_show_sliding", "std" => "false", "type" => "checkbox"), array( "name" => "Choose Slidnig Panel", "desc" => "Chose which sliding panel would you like to have.", "id" => $shortname."_sp", "type" => "radio", "std" => "Coin Slider", "options" => $dd_sp_choose), array( "name" => "Sliding Panel Category", "desc" => "Select the category that you would like to have displayed on the sliding panel.", "id" => $shortname."_fcat", "std" => "Select Category", "type" => "select", "options" => $dd_categories), array( "name" => "Number of Sliding Panels", "desc" => "Select the number of panels to display .", "id" => $shortname."_fcount", "std" => false, "type" => "select", "options" => $number_entries), array( "type" => "close"), array( "type" => "open"), array( "name" => "Blog", "type" => "title"), array( "name" => "Enable Post Excerpts", "desc" => "By default all posts on the blog are shown as the excerpts. You can choose to show full content if you wish.", "id" => $shortname."_excerpts", "std" => "Enable", "type" => "radio", "options" => $dd_choose ), array( "name" => "Enable Post Thumbnails", "desc" => "You can set the thumbnails on the blog either to appear or not. Thumbnails are picked from the posts first atached image and dynamicaly resized. You can override this by uploading your own thumbnail image on the post editing screen or by setting an image to be post thumbnail (WP 2.9).", "id" => $shortname."_thumbs", "std" => "Enable", "type" => "radio", "options" => $dd_choose), array( "name" => "Thumbnails Image Height", "desc" => "Here you can set the width for the post thumbnails.Enter the number of pixels (don't enter 'px')", "id" => $shortname."_fptwight", "type" => "text", "std" => "570"), array( "name" => "Thumbnails Image Width", "desc" => "Here you can set the width for the post thumbnails.Enter the number of pixels (don't enter 'px')", "id" => $shortname."_fptheight", "type" => "text", "std" => "170"), array( "name" => "Thumbnails Image Aligment", "desc" => "Choose how you want to align thumbnails", "id" => $shortname."_fptalign", "type" => "select", "std" => "none", "options" => $dd_align), array( "name" => "Post Thumbnails on Single Posts", "desc" => "You can set the thumbnails on the single posts either to appear or not. Thumbnails are picked from the posts first atached image and dynamicaly resized. You can override this by uploading your own thumbnail image on the post editing screen.", "id" => $shortname."_spthumbs", "std" => "Enable", "type" => "radio", "options" => $dd_choose), array( "name" => "Single Post Post Thumbnails Image Width", "desc" => "Here you can set the width for the post thumbnails.Enter the number of pixels (don't enter 'px')", "id" => $shortname."_sptwight", "type" => "text", "std" => "570"), array( "name" => "Single Post Thumbnails Image Height", "desc" => "Here you can set the height for the post thumbnails. Enter the number of pixels (don't enter 'px')", "id" => $shortname."_sptheight", "type" => "text", "std" => "170"), array( "name" => "Single Post Thumbnails Image Aligment", "desc" => "Choose how you want to align thumbnails", "id" => $shortname."_sptalign", "type" => "select", "std" => "none", "options" => $dd_align), array( "name" => "Post Thumbnails on Pages", "desc" => "You can set the thumbnails on the pages either to appear or not. Thumbnails are picked from the page first atached image and dynamicaly resized. You can override this by uploading your own thumbnail image on the page editing screen.", "id" => $shortname."_pthumbs", "std" => "Enable", "type" => "radio", "options" => $dd_choose), array( "name" => "Single Page Post Thumbnails Image Width", "desc" => "Here you can set the width for the post thumbnails.Enter the number of pixels (don't enter 'px')", "id" => $shortname."_ptwight", "type" => "text", "std" => "570"), array( "name" => "Single Page Thumbnails Image Height", "desc" => "Here you can set the height for the post thumbnails. Enter the number of pixels (don't enter 'px')", "id" => $shortname."_ptheight", "type" => "text", "std" => "170"), array( "name" => "Single Page Thumbnails Image Aligment", "desc" => "Choose how you want to align thumbnails", "id" => $shortname."_ptalign", "type" => "select", "std" => "none", "options" => $dd_align), array( "type" => "close") ); function dd_add_admin() { global $themename, $shortname, $options; //if ( $_GET['page'] == basename(__FILE__) ) { if (isset($_GET['page']) && $_GET['page'] == basename(__FILE__)) { if ( 'save' == $_REQUEST['action'] ) { foreach ($options as $value) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } foreach ($options as $value) { if(($value['type'] === "multicheck" or $value['type'] === "select" ) and is_array($_REQUEST[ $value['id'] ])){$_REQUEST[ $value['id'] ]=implode(',',$_REQUEST[ $value['id'] ]);} 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'] ); } header("Location: themes.php?page=controlpanel.php&reset=true"); die; } } add_theme_page($themename." Options", "".$themename." Options", 'edit_themes', basename(__FILE__), 'dd_admin'); } add_action('admin_menu', 'dd_add_admin'); function dd_admin() { global $themename, $shortname, $options; if ( $_REQUEST['saved'] ) echo '

'.$themename.' settings saved.

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

'.$themename.' settings reset.

'; ?>

Settings


" />
" class="color" />

/> $v) { ?> />

/>

Option 1 />


To complete the installation you need to CHMOD directory cache (/'.$themename.'/lib/cache) to 777 permissions. What is CHMOD?

'; } } add_action('admin_head', 'dd_warning'); // Load styles and append them to header // Get js and css scripts for styling admin menu and append them to wp admin header function dd_admin_scripts() { $url = get_template_directory_uri(); echo ''; echo ''; echo ''; } // wordpress upload panel function dd_upload_scripts() { $url = get_template_directory_uri(); wp_enqueue_script('media-upload'); wp_enqueue_script('thickbox'); wp_register_script('my-upload', $url.'/lib/admin/upload.js', array('jquery','media-upload','thickbox')); wp_enqueue_script('my-upload'); } function dd_upload_styles() { wp_enqueue_style('thickbox'); } if (isset($_GET['page']) && $_GET['page'] == 'controlpanel.php') { add_action('admin_head', 'dd_admin_scripts'); add_action('admin_print_scripts', 'dd_upload_scripts'); add_action('admin_print_styles', 'dd_upload_styles'); } ?>