"; } // Template tag: echoes a page list for navigation // Sandbox based, plus options function iodiir_globalnav() { global $pages_to_exclude; $iodiir_is_front = get_option('page_on_front'); $iodiir_frontpage = get_option('show_on_front'); if(get_settings('iodiir_excludepages')!='') { $pages_to_exclude = get_settings('iodiir_excludepages'); } echo ""; } // Search form for header function iodiir_search() { ?> "About Text", "id" => $shortname."_about_text", "std" => "", "type" => "textarea"), array( "name" => "Footer Credits", "id" => $shortname."_footer_credit", "std" => "top. [blog] is © [author]. Design is [design].", "type" => "textarea"), array( "name" => "Post Signature", "id" => $shortname."_sig", "std" => "", "type" => "textarea"), array( "id" => $shortname."_body_font_family", "name" => "Base Font Family", "std" => "'Lucida Sans Unicode', 'Lucida Grande', sans-serif", "type" => "radio", "options" => array( "'Segoe UI', 'Arial Narrow', 'Helvetica Neue', sans-serif", "Georgia, Times, serif", "'Lucida Sans Unicode', 'Lucida Grande', sans-serif", "'Trebuchet MS', Helvetica, sans-serif", "Candara, Verdana, Geneva, sans serif" ) ), array( "name" => "Show Categories", "id" => $shortname."_show_cats", "type" => "checkbox", "std" => "true" ), array( "name" => "Show Author", "id" => $shortname."_show_author", "type" => "checkbox", "std" => "false" ), array ( "name" => "Show Valid XHTML", "id" => $shortname."_show_valid", "type" => "select", "std" => "None", "options" => array("XHTML-CSS", "Invalid", "None") ), array ( "name" => "Check for Updates", "id" => $shortname."_check_update", "type" => "select", "std" => "Dashboard", "options" => array("Dashboard", "Options Page", "Don't Check") ) ); function iodiir_add_admin() { global $themename, $shortname, $options; if ( $_GET['page'] == basename(__FILE__) ) { if ( 'save' == $_REQUEST['action'] ) { //special case for page exclusions if( isset( $_POST[ 'excludepages' ] ) ) { update_option( 'iodiir_excludepages', implode(',', $_POST['excludepages']) ); } else { delete_option( 'iodiir_excludepages' ); } //...and back to the undersigned's options 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'] ); } } // goto theme edit page header("Location: themes.php?page=functions.php&saved=true"); die; } else if( 'reset' == $_REQUEST['action'] ) { delete_option( 'iodiir_excludepages' ); foreach ($options as $value) { delete_option( $value['id'] ); } header("Location: themes.php?page=functions.php&reset=true"); die; } } if (current_user_can('edit_themes')) { add_theme_page($themename." Options", "Current Theme Options", 'edit_themes', basename(__FILE__), 'iodiir_admin'); } } function iodiir_admin() { global $themename, $shortname, $options; if ( $_REQUEST['saved'] ) echo '

'.$themename.' settings saved.

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

'.$themename.' settings reset.

'; ?>

settings

get_results("SELECT ID, post_title from $wpdb->posts WHERE post_type='page' AND post_parent=0 ORDER BY post_title"); $iodiir_is_front = get_option('page_on_front'); $iodiir_frontpage = get_option('show_on_front'); $excludepages = explode(',', get_settings('iodiir_excludepages')); if($results) { _e('
: " />
:
:
: />
/>
Pages to exclude from global navigation:'); foreach($results as $page) { echo 'ID, $excludepages)) { echo ' checked="checked"'; } // since static front pages are automatically removed, // we might as well make that clear on the options page. if ($iodiir_frontpage == 'page' && $page->ID == $iodiir_is_front){ echo ' checked="checked" disabled="disabled"'; } echo ' /> ' . $page->post_title . '
'; } } ?>

Reset

Dream in Infrared Credits

This theme is based on Sandbox developed by Scott Allan Wallick and Andy Skelton.
This options panel was originally developed by The Undersigned, and has been added to by Sadish Bala, Scott Allan Wallick, Doug Stewart, and the theme author.

'. $iodiir_sig .'

'; }; $content .= '
'. stripslashes($sig) .'
'; return $content; } // Custom Header API // Check to see if it exists first if (function_exists('add_custom_image_header')) { define('HEADER_TEXTCOLOR', 'b9b9b9'); define('HEADER_IMAGE', '%s/img/logo.gif'); // %s is theme dir uri define('HEADER_IMAGE_WIDTH', 125); define('HEADER_IMAGE_HEIGHT', 185); function header_style() { ?> guid; ?> '

', 'title_after'=>'

', 'show_images'=>true)); } else { // Queries db for links, gets stuff to display global $wpdb; // Results are for 2.0-style links $cats = $wpdb->get_results(" SELECT DISTINCT link_category, cat_name, show_images, show_description, show_rating, show_updated, sort_order, sort_desc, list_limit FROM `$wpdb->links` LEFT JOIN `$wpdb->linkcategories` ON (link_category = cat_id) WHERE link_visible = 'Y' AND list_limit <> 0 ORDER BY cat_name ASC", ARRAY_A); if ($cats) { foreach ($cats as $cat) { $orderby = $cat['sort_order']; $orderby = (bool_from_yn($cat['sort_desc'])?'_':'') . $orderby; // Display the category name echo ' \n"; } } } } // Sandbox widgets: initializes Widgets for the Sandbox function sandbox_widgets_init() { if ( !function_exists('register_sidebars') ) return; // Overrides the Widgets default and uses

's for sidebar headings $p = array( 'before_title' => "

", 'after_title' => "

\n", ); // How many? Two?! That's it? register_sidebars(2, $p); // Registers the widgets specific to the Sandbox, as set earlier unregister_widget_control('search'); register_sidebar_widget(__('Links', 'iodiir'), 'widget_sandbox_links', null, 'links'); unregister_widget_control('links'); } // Check for updates, if selected $iodiir_updater = get_option('iodiir_check_update'); if ($iodiir_updater == "Dashboard") { add_action('activity_box_end', 'iodiir_version'); } else if ($iodiir_updater == "Options Page") { add_action('iodiir_opts', 'iodiir_version'); } // Custom header add_custom_image_header('header_style', 'iodiir_admin_header_style'); // Runs our code at the end to check that everything needed has loaded add_action('init', 'sandbox_widgets_init'); add_action('admin_menu', 'iodiir_add_admin'); add_action('the_content', 'iodiir_sig'); add_action('the_content_rss', 'iodiir_sig'); // Adds filters for greater compliance add_filter('archive_meta', 'wptexturize'); add_filter('archive_meta', 'convert_smilies'); add_filter('archive_meta', 'convert_chars'); add_filter('archive_meta', 'wpautop'); ?>