1)); $options = get_option('ahimsa'); $sectprefix = $options['sectprefix'] ? "§ " : ""; # defaults if( ! isset($options['showloginout' ]) ) $options['showloginout' ] = 1; if( ! isset($options['showauthors' ]) ) $options['showauthors' ] = 1; if( ! isset($options['defhidesidebar' ]) ) $options['defhidesidebar' ] = 0; if( ! isset($options['defhidesbpages' ]) ) $options['defhidesbpages' ] = 1; if( ! isset($options['sectprefix' ]) ) $options['sectprefix' ] = 1; if( ! isset($options['idxfadepmeta' ]) ) $options['idxfadepmeta' ] = 0; if( ! isset($options['showpagemeta' ]) ) $options['showpagemeta' ] = 1; if( ! isset($options['showdelic' ]) ) $options['showdelic' ] = 0; if( ! isset($options['delicid' ]) ) $options['delicid' ] = ""; if( ! isset($options['delictitle' ]) ) $options['delictitle' ] = "Recent News and Links"; if( ! isset($options['copyright' ]) ) $options['copyright' ] = ""; # end defaults update_option('ahimsa', $options); # setup admin menu add_action('admin_menu', 'ahimsa_admin_menu'); #------------------------------------------------------------------------------- function ahimsa_admin_menu() { add_theme_page('Ahimsa Options', 'Ahimsa Options', 'edit_themes', "Ahimsa", 'ahimsa_options'); } #------------------------------------------------------------------------------- function ahimsa_options() { global $options; if( $_POST['action'] == 'save' ) save_options(); print "






(does not work in IE)



(requires the del.icio.us for Wordpress plugin.)

"; } function save_options() { global $_POST, $options; $customflag = 0; /* if( $fp = fopen(TEMPLATEPATH . "/custom.css", 'w') ) { } */ print "

Ahimsa Settings saved.

"; $options['showauthors'] = ( isset($_POST['showauthors']) ) ? 1 : 0; $options['showloginout'] = ( isset($_POST['showloginout']) ) ? 1 : 0; $options['defhidesidebar'] = ( isset($_POST['defhidesidebar']) ) ? 1 : 0; $options['defhidesbpages'] = ( isset($_POST['defhidesbpages']) ) ? 1 : 0; $options['sectprefix'] = ( isset($_POST['sectprefix']) ) ? 1 : 0; $options['idxfadepmeta'] = ( isset($_POST['idxfadepmeta']) ) ? 1 : 0; $options['showpagemeta'] = ( isset($_POST['showpagemeta']) ) ? 1 : 0; $options['showdelic'] = ( isset($_POST['showdelic']) ) ? 1 : 0; $options['delicid'] = ( isset($_POST['delicid']) ) ? $_POST['delicid'] : ""; $options['delictitle'] = ( isset($_POST['delictitle']) ) ? $_POST['delictitle'] : "Recent News and Links"; $options['copyright'] = ( isset($_POST['copyright']) ) ? $_POST['copyright'] : ""; update_option('ahimsa', $options); } if ( function_exists('register_sidebar') ) register_sidebar(array( 'before_widget' => "
", 'after_widget' => "
", 'before_title' => "$sectprefix", 'after_title' => "", )); //------------------------------------------------------------------------------ function custom_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?>
writes:
at   
comment_approved == '0') : ?> Your comment is awaiting moderation.
  $depth, 'max_depth' => $args['max_depth']))) ?>