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' ); //get the tags for searchbox... $tags = get_tags(); $mytags = ''; for($i = 0; $i < count($tags); ++$i) { if($tags[$i]->name): $mytags .= ', ' . $tags[$i]->name; endif; } 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( TEMPLATEPATH . '/functions/searchfield/searchfield.php' ); exit; // this stops WordPress entirely } } $themename = "AdFormat"; $shortname = "af3"; // set the defaults.. $categories = get_categories('hide_empty=0&orderby=name'); $wp_cats = array(); foreach ($categories as $category_list ) { $wp_cats[$category_list->cat_ID] = $category_list->cat_name; } array_unshift($wp_cats, "Choose a category"); $options = array ( array( "name" => $themename." Options", "type" => "title" ), array( "name" => "Size and Colours", "type" => "section" ), array( "type" => "open" ), array( "name" => "Style width", "desc" => "Select the width", "id" => $shortname."_width", "type" => "select", "options" => array("default", "1024", "1280" ), "std" => "default" ), array( "name" => "Colour Scheme", "desc" => "Select the colour scheme for the theme", "id" => $shortname."_color_scheme", "type" => "select", "options" => array("red", "blue", "green" ), "std" => "red" ), array( "type" => "close" ), array( "name" => "Adverts", "type" => "section" ), array( "type" => "open" ), 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 ( initVar($_GET['page']) == basename(__FILE__) ) { if ( 'save' == initVar($_REQUEST['action']) ) { foreach ( $options as $value ) { if ( isset( $value['id'] ) ): set_theme_mod( $value['id'], $_REQUEST[ $value['id'] ] ); endif; } foreach ($options as $value) { if( isset( $_REQUEST[ $value['id'] ] ) ) { set_theme_mod( $value['id'], initVar($_REQUEST[ $value['id'] ]) ); } else { remove_theme_mod( $value['id'] ); } } header('Location: admin.php?page=adf3_func.php&saved=true'); die; } else if( 'reset' == $_REQUEST['action'] ) { foreach ( $options as $value ) { remove_theme_mod( $value['id'] ); } header("Location: admin.php?page=adf3_func.php&reset=true"); die; } } add_theme_page( $themename . ' Theme Options', $themename . ' Options', 'edit_themes', basename(__FILE__), 'mytheme_admin' ); //add_theme_page( $themename, 'AdFormat Settings', 8, 'adfoptions', '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 ( initVar( $_REQUEST['saved'] ) ) echo '

'.$themename.' settings saved.

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

'.$themename.' settings reset.

'; ?>

Settings


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

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

'ASC', 'orderby' => 'menu_order ID', 'id' => $post->ID, 'itemtag' => 'dl', 'icontag' => 'dt', 'captiontag' => 'dd', 'columns' => 3, 'size' => 'thumbnail', 'include' => '', 'exclude' => '' ), $attr)); $id = intval($id); if ( 'RAND' == $order ) $orderby = 'none'; if ( !empty($include) ) { $include = preg_replace( '/[^0-9,]+/', '', $include ); $_attachments = get_posts( array('include' => $include, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) ); $attachments = array(); foreach ( $_attachments as $key => $val ) { $attachments[$val->ID] = $_attachments[$key]; } } elseif ( !empty($exclude) ) { $exclude = preg_replace( '/[^0-9,]+/', '', $exclude ); $attachments = get_children( array('post_parent' => $id, 'exclude' => $exclude, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) ); } else { $attachments = get_children( array('post_parent' => $id, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) ); } if ( empty($attachments) ) return ''; if ( is_feed() ) { $output = "\n"; foreach ( $attachments as $att_id => $attachment ) $output .= wp_get_attachment_link($att_id, $size, true) . "\n"; return $output; } $itemtag = tag_escape($itemtag); $captiontag = tag_escape($captiontag); $columns = intval($columns); // $itemwidth = $columns > 0 ? floor(100/$columns) : 100; $float = is_rtl() ? 'right' : 'left'; $selector = "gallery-{$instance}"; $output = apply_filters('gallery_style', " \n"; return $output; } ?>