',
));
/** @ignore */
$themename = "SimpleNews Premium";
$shortname = "sn";
$options = array (
array( "name" => "Menu options",
"type" => "title"),
array( "type" => "open"),
array( "name" => "Do you want to disable the top menu?",
"desc" => "Check this box if you would like to DISABLE the Menu on the top.",
"id" => $shortname."_pmenu_disableone",
"type" => "checkbox",
"std" => "false"),
array( "name" => "Do you want to use selective top menu?",
"desc" => "Check this box if you would like to ENABLE the selective Menu on the top.",
"id" => $shortname."_topmenu_selector",
"type" => "checkbox",
"std" => "false"),
array("name" => "Menu items list:",
"desc" => "Set the ID's of the pages you want to use. (Separate commas, example: 1,2,3)",
"id" => $shortname."_topmenu_list",
"type" => "text",
"std" => "1,2,3"),
array( "type" => "close"),
array( "name" => "Logo options",
"type" => "title"),
array( "type" => "open"),
array("name" => "Logo Image",
"desc" => "Set the image to use as the logo image. Size: 237*54 pixel. Write in the name of the image, default is: logo.png.
(IMPORTANT: the image must be uploaded into the wp-content/themes/simplenews_premium/images directory!)",
"id" => $shortname."_logo_image",
"type" => "text",
"std" => "logo.png"),
array( "type" => "close"),
array( "name" => "Footer options",
"type" => "title"),
array( "type" => "open"),
array("name" => "Credit text",
"desc" => "Set your credit text",
"id" => $shortname."_footer_credit",
"type" => "text",
"std" => "2010. All Rights Reserved"),
array( "type" => "close"),
array( "name" => "Google Analytics options",
"type" => "title"),
array( "type" => "open"),
array("name" => "Google Analytics Tracking Code",
"desc" => "Enter your tracking code here for Google Analytics. (Complete Code, leave it blank to delete code from the site.)",
"id" => $shortname."_simplenews_analytics_code",
"type" => "textarea",
"std" => ""),
array( "type" => "close"),
array( "name" => "Advertisement options",
"type" => "title"),
array( "type" => "open"),
array( "name" => "Disable the banner Box in the sidebar?",
"desc" => "Check this box if you would like to DISABLE the banner box in the sidebar.",
"id" => $shortname."_sidebarbanner_disable",
"type" => "checkbox",
"std" => "false"),
array("name" => "Banner place #1 image",
"desc" => "Set the image for the first banner box. (IMPORTANT: the image must be uploaded into the wp-content/themes/simplenews_premium/images directory!)",
"id" => $shortname."_banner_image1",
"type" => "text",
"std" => "125_banner.jpg"),
array("name" => "Banner place #1 link",
"desc" => "Set the link for the first banner box.",
"id" => $shortname."_banner_link1",
"type" => "text",
"std" => ""),
array("name" => "Banner place #2 image",
"desc" => "Set the image for the second banner box. (IMPORTANT: the image must be uploaded into the wp-content/themes/simplenews_premium/images directory!)",
"id" => $shortname."_banner_image2",
"type" => "text",
"std" => "125_banner.jpg"),
array("name" => "Partners Banner place #2 link",
"desc" => "Set the link for the second banner box.",
"id" => $shortname."_banner_link2",
"type" => "text",
"std" => ""),
array("name" => "Banner place #3 image",
"desc" => "Set the image for the third banner box. (IMPORTANT: the image must be uploaded into the wp-content/themes/simplenews_premium/images directory!)",
"id" => $shortname."_banner_image3",
"type" => "text",
"std" => "125_banner.jpg"),
array("name" => "Banner place #3 link",
"desc" => "Set the link for the third banner box.",
"id" => $shortname."_banner_link3",
"type" => "text",
"std" => ""),
array("name" => "Banner place #4 image",
"desc" => "Set the image for the fourth banner box. (IMPORTANT: the image must be uploaded into the wp-content/themes/simplenews_premium/images directory!)",
"id" => $shortname."_banner_image4",
"type" => "text",
"std" => "125_banner.jpg"),
array("name" => "Banner place #4 link",
"desc" => "Set the link for the fourth banner box.",
"id" => $shortname."_banner_link4",
"type" => "text",
"std" => ""),
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=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", "".$themename." Options", 'edit_themes', basename(__FILE__), 'mytheme_admin');
}
function create_section_for_text($value) {
create_opening_tag($value);
$text = "";
if (get_option($value['id']) === FALSE) {
$text = $value['std'];
}
else {
$text = get_option($value['id']);
}
echo ''."\n";
create_closing_tag();
}
function mytheme_admin() {
global $themename, $shortname, $options;
if ( $_REQUEST['saved'] ) echo '