"General Settings", "type" => "heading"), array( "name" => "Ads Link #1", "desc" => "This is for the 280x250 ads banner.

", "id" => $shortname."_adsense_301", "std" => "Enter Ads Code Here", "type" => "textarea"), array( "name" => "Ads Link #2", "desc" => "This is for the 280x250 ads banner.

", "id" => $shortname."_adsense_302", "std" => "Enter Ads Code Here", "type" => "textarea"), array( "name" => "Fallow me at:", "type" => "heading"), array( "name" => "Facebook URL", "desc" => "Add Facebook links", "id" => $shortname."_ad_1214", "type" => "textarea_01"), array( "name" => "You Tube URL", "desc" => "Add You Tube links", "id" => $shortname."_ad_124", "type" => "textarea_01"), array( "name" => "Myspace URL", "desc" => "Add Myspace links", "id" => $shortname."_ad_125", "type" => "textarea_01"), array( "name" => "Twitter URL", "desc" => "Add twitter links", "id" => $shortname."_ad_126", "type" => "textarea_01"), ); function mytheme_add_admin() { global $themename, $shortname, $options; if ( $_GET['page'] == basename(__FILE__) ) { if ( 'save' == $_REQUEST['action'] ) { foreach ($options as $value) { if($value['type'] != 'multicheck'){ update_option( $value['id'], $_REQUEST[ $value['id'] ] ); }else{ foreach($value['options'] as $mc_key => $mc_value){ $up_opt = $value['id'].'_'.$mc_key; update_option($up_opt, $_REQUEST[$up_opt] ); } } } foreach ($options as $value) { if($value['type'] != 'multicheck'){ if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } else { delete_option( $value['id'] ); } }else{ foreach($value['options'] as $mc_key => $mc_value){ $up_opt = $value['id'].'_'.$mc_key; if( isset( $_REQUEST[ $up_opt ] ) ) { update_option( $up_opt, $_REQUEST[ $up_opt ] ); } else { delete_option( $up_opt ); } } } } header("Location: themes.php?page=functions.php&saved=true"); die; } else if( 'reset' == $_REQUEST['action'] ) { foreach ($options as $value) { if($value['type'] != 'multicheck'){ delete_option( $value['id'] ); }else{ foreach($value['options'] as $mc_key => $mc_value){ $del_opt = $value['id'].'_'.$mc_key; delete_option($del_opt); } } } 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.

'; ?>

options

" /> $option) { $radio_setting = get_settings($value['id']); if($radio_setting != ''){ if ($key == get_settings($value['id']) ) { $checked = "checked=\"checked\""; } else { $checked = ""; } }else{ if($key == $value['std']){ $checked = "checked=\"checked\""; }else{ $checked = ""; } }?> />
/> $option) { $pn_key = $value['id'] . '_' . $key; $checkbox_setting = get_settings($pn_key); if($checkbox_setting != ''){ if (get_settings($pn_key) ) { $checked = "checked=\"checked\""; } else { $checked = ""; } }else{ if($key == $value['std']){ $checked = "checked=\"checked\""; }else{ $checked = ""; } }?> />

:   ', ']]>', $content); $content = strip_tags($content); if (strlen($_GET['p']) > 0) { echo "

"; echo $content; echo " "."Read More →"; echo "

"; } else if ((strlen($content)>$max_char) && ($espacio = strpos($content, " ", $max_char ))) { $content = substr($content, 0, $espacio); $content = $content; echo "

"; echo $content; echo "..."; echo " ".$more_link_text.""; echo "

"; } else { echo "

"; echo $content; echo " "."Read More →"; echo "

"; } } ?>