cat_ID] = $category_list->cat_name; } array_unshift($wp_cats, "Choose a category"); $options = array ( array( "name" => $themename." Options", "type" => "title"), array( "name" => "General", "type" => "section"), array( "type" => "open"), array( "name" => "Colour Scheme", "desc" => "Select the colour scheme for the theme", "id" => $shortname."_color_scheme", "type" => "select", "options" => array("blue", "red", "green"), "std" => "red"), array( "name" => "Header adcode", "desc" => "Add your header ad code here
(text links work best 728x15)", "id" => $shortname."_ads_header", "type" => "textarea", "std" => ''), array( "name" => "footer adcode", "desc" => "Add your footer ad code here (728x90)", "id" => $shortname."_ads_footer", "type" => "textarea", "std" => ""), array( "name" => "sidebar top adcode", "desc" => "Add your sidebar top ad code here (336x280)", "id" => $shortname."_ads_top_sidebar", "type" => "textarea", "std" => ""), array( "name" => "sidebar adcode", "desc" => "Add your sidebar ad code here (160x600)", "id" => $shortname."_ads_sidebar", "type" => "textarea", "std" => ""), array( "type" => "close"), array( "name" => "Footer", "type" => "section"), array( "type" => "open"), array( "name" => "Feedburner URL", "desc" => "Feedburner is a Google service that takes care of your RSS feed. Paste your Feedburner URL here to let readers see it in your website", "id" => $shortname."_feedburner", "type" => "text", "std" => get_bloginfo('rss2_url')), 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: admin.php?page=functions.php&saved=true"); die; } else if( 'reset' == $_REQUEST['action'] ) { foreach ($options as $value) { delete_option( $value['id'] ); } header("Location: admin.php?page=functions.php&reset=true"); die; } } add_menu_page($themename, $themename, 'administrator', basename(__FILE__), 'mytheme_admin'); } function mytheme_add_init() { $file_dir=get_bloginfo('template_directory'); wp_enqueue_style("functions", $file_dir."/functions/functions.css", false, "1.0", "all"); wp_enqueue_script("rm_script", $file_dir."/functions/rm_script.js", false, "1.0"); } function mytheme_admin() { global $themename, $shortname, $options; $i=0; if ( $_REQUEST['saved'] ) echo '

'.$themename.' settings saved.

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

'.$themename.' settings reset.

'; ?>

Settings


To easily use the theme, you can use the menu below.

" name="" id="" type="" value="" />
/>

You must be logged in to post a comment.

/>

XHTML: You can use these tags:

ID); ?>
'm' ), $atts)); $content = substr($atts[0] ,1); if($size=="s" || $size=="S"){$width=320; $height=265;} elseif ($size=="m" || $size=="M"){$width=425; $height=344;} elseif ($size=="l" || $size=="L"){$width=480; $height=385;} elseif ($size=="xl" || $size=="XL"){$width=640; $height=505;} $content = str_replace("watch?v=", "v/", $content); $output=''; return $output; } add_shortcode('youtube', 'youtube_embed'); // add [googlevideo=] function googlevideo_embed($atts, $content = null){ extract(shortcode_atts(array( 'size' => 'm' ), $atts)); $content = substr($atts[0] ,1); if($size=="s" || $size=="S"){$width=320; $height=265;} elseif ($size=="m" || $size=="M"){$width=425; $height=344;} elseif ($size=="l" || $size=="L"){$width=480; $height=385;} elseif ($size=="xl" || $size=="XL"){$width=640; $height=505;} $content = str_replace("http://video.google.com/videoplay?docid=-", "", $content); $content = 'http://video.google.com/googleplayer.swf?docId=-' . $content; $output=''; return $output; } add_shortcode('googlevideo', 'googlevideo_embed'); // push out the css function css_head() { // send the main style... wp_enqueue_style('adformat', get_bloginfo('template_url') . '/style.css'); wp_enqueue_style('adformat-search', get_bloginfo('template_url') . '/functions/searchfield/searchfield.css'); wp_enqueue_script('adformat-search', get_bloginfo('url') . '?searchform=yes', false, '1.0'); if (get_option('af3_color_scheme') == 'green'): wp_enqueue_style('adformat-green', get_bloginfo('template_url') . '/css/style-green.css'); else: if (get_option('af3_color_scheme') == 'blue'): wp_enqueue_style('adformat-blue', get_bloginfo('template_url') . '/css/style-blue.css'); else: wp_enqueue_style('adformat-red', get_bloginfo('template_url') . '/css/style-red.css'); endif; endif; } //get the tags for searchbox... $tags = get_tags(); $i=0; while($tags[$i]) { $mytags .= ', ' . $tags[$i]->name ; $i++; } define('TAGLIST', $mytags); add_filter('query_vars', 'add_my_var_main'); function add_my_var_main($public_query_vars) { $public_query_vars[] = 'searchform'; return $public_query_vars; } add_action('template_redirect', 'my_var_output_main'); function my_var_output_main() { $myvalue=get_query_var('searchform'); if ($myvalue) { include('functions/searchfield/searchfield.php'); exit; // this stops WordPress entirely } } ?>