'Sidebar', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); endif; function unregister_problem_widgets() { unregister_sidebar_widget('Search'); } add_action('widgets_init','unregister_problem_widgets'); function i_want_html_generator(){return '';} add_filter('wp_generator_type','i_want_html_generator'); define ("blogdir", get_bloginfo("template_directory") . "/"); define ("blogimages", blogdir . "images/"); define ("home", get_bloginfo('url'). "/"); define ("blogname", get_bloginfo("name")); define ("blogdesc", get_bloginfo("description")); define ("ad468x60", stripcslashes($theme_settings["ad468x60"])); define ("ad336x280", stripcslashes($theme_settings["ad336x280"])); define ("sidebar_ad", stripcslashes($theme_settings["sidebar_ad"])); define ("feedid" ,$theme_settings["feedburner"]); define ("poststyle" , $theme_settings["openpost"]); if (is_array($theme_settings["featured_cats"])){ define ("featured_categories", implode(",", $theme_settings["featured_cats"])); } function the_short_description ($limit=60, $words=false, $echo = true) { global $post; $postd = strip_tags($post->post_content); if ($words){ $w = explode(" ", $postd); $ret = array_slice($w, 0, $limit); }else{ $ret = substr($postd, 0, $limit); } if ($echo){ echo $ret; }else{ return $ret; } } /*function remove_more_link($content) { $match = preg_match('/(.+)/i', $content, $matches); if ($match) { return str_replace($matches[0], '

', $content); } return $content; } add_filter('the_content', 'remove_more_link');*/ function the_new_content (){ ob_start(); the_content(); $content = ob_get_contents(); ob_end_clean(); $match = preg_match('/
(.+)/i', $content, $matches); if ($match) { return str_replace($matches[0], '

', $content); } return $content; } function moreLink(){ ob_start(); the_content(); $content = ob_get_contents(); ob_end_clean(); $match = preg_match('/
(.+)/i', $content, $matches); //echo "
" . print_r($matches, false) . "
"; if ($match) { return $matches[1]; } return false; } function modifyText ($text, $excerpt_length=20, $strip="

",$echo=1){ $text = apply_filters('the_content', $text); $text = str_replace(']]>', ']]>', $text); //$text = strip_tags($text); $words = explode(' ', $text, $excerpt_length + 1); if (count($words) > $excerpt_length) { array_pop($words); //array_push($words, '[...]'); $text = implode(' ', $words); } if ($echo==1){ echo strip_tags($text,$strip); }else{ return strip_tags($text,$strip); } } function modifyTextPost ($excerpt_length=20, $strip="",$echo=1){ global $post; $text = $post->post_content; $text = apply_filters('the_content', $text); $text = str_replace(']]>', ']]>', $text); $text = strip_tags($text,$strip); $words = explode(' ', $text, $excerpt_length + 1); if (count($words) > $excerpt_length) { array_pop($words); //array_push($words, '[...]'); $text = implode(' ', $words); } if ($echo==1){ echo $text; }else{ return $text; } } function blogname (){ $blogname = get_bloginfo("name"); $exp = explode(" ", $blogname); $tot = count($exp); $lastword = end($exp); $left = implode(" ", array_slice($exp,0, count($exp)-1)); echo " " . $left . " " . $lastword; } function the_tab_image ($w=82, $h=57, $def = "demo.png", $key='image'){ global $post; $image = get_post_meta($post->ID, $key, true); if ( $image ) { $g = blogdir . "thumb.php?src=" . $image . "&h=$h&w=$w&zc=1&q=100"; }else{ $g = blogimages . $def; } echo $g; } function the_big_image ($s='', $e=''){ global $post; $image = get_post_meta($post->ID, 'big_image', true); if ( $image ) { echo $s; echo ""; echo $e; } } function the_short_title($limit=26, $title='', $echo=1){ if (empty($title)){ $title = strip_tags(the_title('','',false)); } if (strlen($title)<=$limit){ }else{ $title = strip_tags(substr_replace(the_title('','',false),' ...',$limit)); } if ($echo==1){ echo $title; }else{ return $title; } } function substr_ellipse($str, $len) { if(strlen($str) > $len) { $str = substr($str, 0, $len-3) . "..."; } return $str; } function callback($buffer){ $buffer = strip_tags($buffer); return "" . substr($buffer, 0, 140) . "... "; } function the_new_excerpt(){ ob_start("callback"); the_excerpt(); ob_end_flush(); } function callback2($buffer){ $buffer = strip_tags($buffer); return "" . substr($buffer, 0, 220) . "... "; } function the_new_excerpt2(){ ob_start("callback2"); the_excerpt(); ob_end_flush(); } function most_popular_posts() { global $wpdb; $request = "SELECT ID, post_title, COUNT($wpdb->comments.comment_post_ID) AS 'comment_count' FROM $wpdb->posts, $wpdb->comments"; $request .= " WHERE comment_approved = '1' AND $wpdb->posts.ID=$wpdb->comments.comment_post_ID AND post_status = 'publish'"; $request .= " GROUP BY $wpdb->comments.comment_post_ID ORDER BY comment_count DESC"; $posts = $wpdb->get_results($request); if ($posts) { foreach ($posts as $post) { $new_posts[] = $post->ID; } } else { $new_posts[] = "0"; } return $new_posts; } function recent_commented_posts() { global $wpdb; $request = "SELECT comment_ID, comment_post_ID FROM $wpdb->comments"; $request .= " WHERE comment_approved = '1'"; $request .= " ORDER BY comment_ID DESC"; $posts = $wpdb->get_results($request); if ($posts) { foreach ($posts as $post) { $new_posts[] = $post->comment_post_ID; } } else { $new_posts[] = "0"; } return $new_posts; } //////////////////////////////////////////////////////////////////////////////// // THEME OPTION FOR BLOG //////////////////////////////////////////////////////////////////////////////// $themename = blogname; $shortname = "ti"; $wp_dropdown_rd_admin = get_categories('hide_empty=0&orderby=name'); $wp_getcat = array(); foreach ($wp_dropdown_rd_admin as $category_list) { $wp_getcat[$category_list->cat_ID] = $category_list->cat_name; } $wp_listposts = array(2,4,6,8,10,12,14,16); function mytheme_bz_admin() { global $themename, $shortname, $options, $wp_getcat, $wp_listposts; $theme_settings = get_option("theme_settings"); if ( $_REQUEST['saved'] ) echo '

'.$themename.' settings saved.

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

'.$themename.' settings reset.

'; ?>
Blog Advertisments Settings

Ad Code ( 468 x 60 ):
Top Header

Ad Code ( 336 x 280 ):
Post Bottom

Ad Code ( 336 x 280 ):
Sidebar