',
));
// close widget setting
//-----------------
$themename ="Palmixio";
$themefile = strtolower($themename);
$shortname ="pxio";
$yoururl = get_option('siteurl');
//------ begin breadcrumb
function breadcrumbs() {
$theFullUrl = $_SERVER["REQUEST_URI"];
$urlArray=explode("/",$theFullUrl);
echo '
Home';
while (list($j,$text) = each($urlArray)) {
$dir="";
if ($j > 1) {
$i=1;
while ($i < $j) {
$dir .= '/' . $urlArray[$i];
$text = $urlArray[$i];
$i++;
}
if($j < count($urlArray)-1) echo '
' . str_replace("-", " ", $text) . '';
}
}
if(is_home()) {
} elseif (is_search()) {
echo '';
} else {
echo '';
}
}
//------ end breadcrumb
$banstr = '
';
if ( version_compare( substr($wp_version, 0, 3), '2.9', '>=') ) {
// post image thumbnails, only for Wordpress 2.9 or higher
if ( function_exists( 'add_theme_support' ) ) add_theme_support( 'post-thumbnails' );
add_filter( 'post_thumbnail_html', 'my_post_image_html', 10, 3 );
function my_post_image_html( $html, $post_id, $post_image_id ) {
$html = '
' . $html . '';
return $html;
}
}
$options = array (
array(
"name" =>"option banner 125 x 125",
"id" => $shortname."_option_banner125x125",
"type" =>"optionbanner125x125",
"std" =>"false"),
array(
"name" =>"option title box banner",
"id" => $shortname."_option_title_banner",
"type" =>"optiontitlebanner",
"std" =>"Sponsors"),
array(
"name" =>"option b125tl",
"id" => $shortname."_option_b125tl",
"type" =>"optionb125tl",
"std" =>""),
array(
"name" =>"option b125tr",
"id" => $shortname."_option_b125tr",
"type" =>"optionb125tr",
"std" =>""),
array(
"name" =>"option b125tl",
"id" => $shortname."_option_b125bl",
"type" =>"optionb125bl",
"std" =>""),
array(
"name" =>"option b125tl",
"id" => $shortname."_option_b125br",
"type" =>"optionb125br",
"std" =>""),
array(
"name" =>"option menu",
"id" => $shortname."_option_menu",
"type" =>"optionmenu",
"std" =>""),
array(
"name" =>"enable login",
"desc" =>"Check this box if you would like enable login.",
"id" => $shortname."_login",
"type" =>"checkboxlogin",
"std" =>"false"),
array(
"name" =>"enable register",
"desc" =>"Check this box if you would like enable register.",
"id" => $shortname."_register",
"type" =>"checkboxregister",
"std" =>"false"),
array(
"name" =>"desable home",
"desc" =>"Check this box if you would like desable home.",
"id" => $shortname."_home",
"type" =>"checkboxhome",
"std" =>"false"),
array(
"name" =>"option breadcrumbs",
"id" => $shortname."_option_breadcrumbs",
"type" =>"optionbreadcrumbs",
"std" =>"false"),
// icons
array(
"name" =>"enable icon",
"desc" =>"Check this box if you would like enable icon.",
"id" => $shortname."_icon_twitter",
"type" =>"checkbox1",
"std" =>"false"),
array(
"name" =>"twitter page link",
"id" => $shortname."_link_twitter",
"type" =>"link1",
"std" =>""),
array(
"name" =>"enable icon",
"desc" =>"Check this box if you would like enable icon.",
"id" => $shortname."_icon_facebook",
"type" =>"checkbox2",
"std" =>"false"),
array(
"name" =>"facebook page link",
"id" => $shortname."_link_facebook",
"type" =>"link2",
"std" =>""),
array(
"name" =>"enable icon",
"desc" =>"Check this box if you would like enable icon.",
"id" => $shortname."_icon_linkedin",
"type" =>"checkbox3",
"std" =>"false"),
array(
"name" =>"linkedin page link",
"id" => $shortname."_link_linkedin",
"type" =>"link3",
"std" =>""),
array(
"name" =>"enable icon",
"desc" =>"Check this box if you would like enable icon.",
"id" => $shortname."_icon_myspace",
"type" =>"checkbox4",
"std" =>"false"),
array(
"name" =>"myspace page link",
"id" => $shortname."_link_myspace",
"type" =>"link4",
"std" =>""),
array(
"name" =>"enable icon",
"desc" =>"Check this box if you would like enable icon.",
"id" => $shortname."_icon_blogmarks",
"type" =>"checkbox5",
"std" =>"false"),
array(
"name" =>"blogmarks page link",
"id" => $shortname."_link_blogmarks",
"type" =>"link5",
"std" =>""),
array(
"name" =>"enable icon",
"desc" =>"Check this box if you would like enable icon.",
"id" => $shortname."_icon_delicious",
"type" =>"checkbox6",
"std" =>"false"),
array(
"name" =>"delicious page link",
"id" => $shortname."_link_delicious",
"type" =>"link6",
"std" =>""),
array(
"name" =>"enable icon",
"desc" =>"Check this box if you would like enable icon.",
"id" => $shortname."_icon_digg",
"type" =>"checkbox7",
"std" =>"false"),
array(
"name" =>"digg page link",
"id" => $shortname."_link_digg",
"type" =>"link7",
"std" =>""),
array(
"name" =>"enable icon",
"desc" =>"Check this box if you would like enable icon.",
"id" => $shortname."_icon_feedburner",
"type" =>"checkbox8",
"std" =>"false"),
array(
"name" =>"feedburner page link",
"id" => $shortname."_link_feedburner",
"type" =>"link8",
"std" =>""),
//
array(
"name" =>"enable icon",
"desc" =>"Check this box if you would like enable icon.",
"id" => $shortname."_icon_flickr",
"type" =>"checkbox9",
"std" =>"false"),
array(
"name" =>"flickr page link",
"id" => $shortname."_link_flickr",
"type" =>"link9",
"std" =>""),
array(
"name" =>"enable icon",
"desc" =>"Check this box if you would like enable icon.",
"id" => $shortname."_icon_friendfeed",
"type" =>"checkbox10",
"std" =>"false"),
array(
"name" =>"friendfeed page link",
"id" => $shortname."_link_friendfeed",
"type" =>"link10",
"std" =>""),
array(
"name" =>"enable icon",
"desc" =>"Check this box if you would like enable icon.",
"id" => $shortname."_icon_furl",
"type" =>"checkbox11",
"std" =>"false"),
array(
"name" =>"furl page link",
"id" => $shortname."_link_furl",
"type" =>"link11",
"std" =>""),
array(
"name" =>"enable icon",
"desc" =>"Check this box if you would like enable icon.",
"id" => $shortname."_icon_gmail",
"type" =>"checkbox12",
"std" =>"false"),
array(
"name" =>"gmail page link",
"id" => $shortname."_link_gmail",
"type" =>"link12",
"std" =>""),
array(
"name" =>"enable icon",
"desc" =>"Check this box if you would like enable icon.",
"id" => $shortname."_icon_google",
"type" =>"checkbox13",
"std" =>"false"),
array(
"name" =>"google page link",
"id" => $shortname."_link_google",
"type" =>"link13",
"std" =>""),
array(
"name" =>"enable icon",
"desc" =>"Check this box if you would like enable icon.",
"id" => $shortname."_icon_lastfm",
"type" =>"checkbox14",
"std" =>"false"),
array(
"name" =>"lastfm page link",
"id" => $shortname."_link_lastfm",
"type" =>"link14",
"std" =>""),
array(
"name" =>"enable icon",
"desc" =>"Check this box if you would like enable icon.",
"id" => $shortname."_icon_misterwong",
"type" =>"checkbox15",
"std" =>"false"),
array(
"name" =>"misterwong page link",
"id" => $shortname."_link_misterwong",
"type" =>"link15",
"std" =>""),
array(
"name" =>"enable icon",
"desc" =>"Check this box if you would like enable icon.",
"id" => $shortname."_icon_netvibes",
"type" =>"checkbox16",
"std" =>"false"),
array(
"name" =>"netvibes page link",
"id" => $shortname."_link_netvibes",
"type" =>"link16",
"std" =>""),
array(
"name" =>"enable icon",
"desc" =>"Check this box if you would like enable icon.",
"id" =>$shortname."_icon_newsvine",
"type" =>"checkbox17",
"std" =>"false"),
array(
"name" =>"newsvine page link",
"id" =>$shortname."_link_newsvine",
"type" =>"link17",
"std" =>""),
array(
"name" =>"enable icon",
"desc" =>"Check this box if you would like enable icon.",
"id" => $shortname."_icon_reddit",
"type" =>"checkbox18",
"std" =>"false"),
array(
"name" =>"reddit page link",
"id" => $shortname."_link_reddit",
"type" =>"link18",
"std" =>""),
array(
"name" =>"enable icon",
"desc" =>"Check this box if you would like enable icon.",
"id" => $shortname."_icon_simpy",
"type" =>"checkbox19",
"std" =>"false"),
array(
"name" =>"simpy page link",
"id" => $shortname."_link_simpy",
"type" =>"link19",
"std" =>""),
array(
"name" =>"enable icon",
"desc" =>"Check this box if you would like enable icon.",
"id" => $shortname."_icon_stumbleupon",
"type" =>"checkbox20",
"std" =>"false"),
array(
"name" =>"stumbleupon page link",
"id" => $shortname."_link_stumbleupon",
"type" =>"link20",
"std" =>""),
array(
"name" =>"enable icon",
"desc" =>"Check this box if you would like enable icon.",
"id" => $shortname."_icon_technorati",
"type" =>"checkbox21",
"std" =>"false"),
array(
"name" =>"technorati page link",
"id" => $shortname."_link_technorati",
"type" =>"link21",
"std" =>""),
array(
"name" =>"enable icon",
"desc" =>"Check this box if you would like enable icon.",
"id" => $shortname."_icon_yahoo",
"type" =>"checkbox22",
"std" =>"false"),
array(
"name" =>"yahoo page link",
"id" => $shortname."_link_yahoo",
"type" =>"link22",
"std" =>""),
array(
"name" =>"enable icon",
"desc" =>"Check this box if you would like enable icon.",
"id" => $shortname."_icon_youtube",
"type" =>"checkbox23",
"std" =>"false"),
array(
"name" =>"youtube page link",
"id" => $shortname."_link_youtube",
"type" =>"link23",
"std" =>""),
array(
"name" =>"enable icon",
"desc" =>"Check this box if you would like enable icon.",
"id" => $shortname."_icon_blinklist",
"type" =>"checkbox24",
"std" =>"false"),
array(
"name" =>"blinklist page link",
"id" => $shortname."_link_blinklist",
"type" =>"link24",
"std" =>""),
// end icons
array(
"name" =>"option header",
"id" => $shortname."_option_header",
"type" =>"optionheader",
"std" =>"false"),
array(
"name" => "logo header",
"id" => $shortname."_logo_header",
"type" => "logo",
"std" => "logo.png"),
array(
"name" => "logo width",
"id" => $shortname."_logo_width",
"type" => "logowidth",
"std" => "560"),
array(
"name" => "logo height",
"id" => $shortname."_logo_height",
"type" => "logoheight",
"std" => "121"),
array(
"name" => "logo margin top",
"id" => $shortname."_logo_margintop",
"type" => "logomargintop",
"std" => "40"),
array(
"name" => "logo margin left",
"id" => $shortname."_logo_marginleft",
"type" => "logomarginleft",
"std" => "20"),
array(
"name" => "logo alt",
"id" => $shortname."_logo_alt",
"type" => "logoalt",
"std" => "Home"),
array(
"name" => "logo link",
"id" => $shortname."_logo_link",
"type" => "logolink",
"std" => $yoururl),
array(
"name" => "post image thumbnail",
"id" => $shortname."_thumb",
"type" => "thumb",
"std" => "false"),
array(
"name" => "excerpt or content",
"id" => $shortname."_excerpt_content",
"type" => "excerptorcontent",
"std" => "false"),
array(
"name" => "post excerpt lenght",
"id" => $shortname."_excerpt_lenght",
"type" => "excerptl",
"std" => "70"),
array(
"name" => "align thumbnail",
"id" => $shortname."_align_thumbnail",
"type" => "alignthumbnail",
"std" => "false"),
array(
"name" => "padding thumbnail",
"id" => $shortname."_padding_thumbnail",
"type" => "paddingthumb",
"std" => "15"),
array(
"name" => "border color thumbnail",
"id" => $shortname."_border_color_thumbnail",
"type" => "bordercolorthumb",
"std" => "C4C6C5"),
array(
"name" => "background color thumbnail",
"id" => $shortname."_bg_color_thumbnail",
"type" => "paddingcolorthumb",
"std" => "EFEFEF"),
array(
"name" => "background imgage thumbnail",
"id" => $shortname."_bg_img_thumbnail",
"type" => "imgthumb",
"std" => "false"),
array(
"name" => "thumbnail in pages",
"id" => $shortname."_thumb_pages",
"type" => "thumbinpages",
"std" => "false"),
array(
"name" => "thumbnail in single page",
"id" => $shortname."_thumb_single_page",
"type" => "thumbinsinglepage",
"std" => "false"),
array(
"name" => "thumbnail in single post",
"id" => $shortname."_thumb_single_post",
"type" => "thumbinsinglepost",
"std" => "false"),
array(
"name" => "thumbnail in archives",
"id" => $shortname."_thumb_archives",
"type" => "thumbinarchives",
"std" => "false"),
array(
"name" => "enabled border thumbnail in pages",
"id" => $shortname."_border_pages_t",
"type" => "borderpages",
"std" => "false"),
array(
"name" => "enabled border thumbnail in single page",
"id" => $shortname."_border_page_t",
"type" => "bordersinglepage",
"std" => "false"),
array(
"name" => "enabled border thumbnail in single post",
"id" => $shortname."_border_post_t",
"type" => "borderpost",
"std" => "false"),
array(
"name" => "enabled border thumbnail in archives",
"id" => $shortname."_border_archives_t",
"type" => "borderarchives",
"std" => "false"),
array(
"name" => "size thumbnail pages",
"id" => $shortname."_thumb_size_pages",
"type" => "thumbsizepages",
"std" => "false"),
array(
"name" => "size thumbnail page",
"id" => $shortname."_thumb_size_single_page",
"type" => "thumbsizesinglepage",
"std" => "false"),
array(
"name" => "size thumbnail post",
"id" => $shortname."_thumb_size_post",
"type" => "thumbsizesinglepost",
"std" => "false"),
array(
"name" => "size thumbnail archives",
"id" => $shortname."_thumb_size_archives",
"type" => "thumbsizearchive",
"std" => "false"),
);
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'], stripslashes($_REQUEST[ $value['id'] ] ));}
foreach ($options as $value) {
if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], stripslashes($_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 mytheme_admin() {
global $themename, $shortname, $options;
if ( $_REQUEST['saved'] ) echo '
'.$themename.' settings saved.
';
if ( $_REQUEST['reset'] ) echo '
'.$themename.' settings reset.
';
?>