0) return true; else return false; } // retreives image from the post function getImage($num) { global $more; $more = 1; $content = get_the_content(); $count = substr_count($content, ''); $postOutput = substr($post, 0, $imgEnd+1); $image[$i] = $postOutput; $start=$imgEnd+1; $cleanF = strpos($image[$num],'src="')+5; $cleanB = strpos($image[$num],'"',$cleanF)-$cleanF; $imgThumb = substr($image[$num],$cleanF,$cleanB); } if(stristr($image[$num],')(.*?)!ise', " '$1' . stripslashes( str_replace(array('<','>'),array('<','>'),'$2') ) . '' ", $content_text); return $content_text; } add_filter('the_content','mish_code_filter', 1, 1); // CUSTOM GRAVATARS function string_limit_words($string, $word_limit){ $words = explode(' ', $string, ($word_limit + 1)); if(count($words) > $word_limit) array_pop($words); return implode(' ', $words);}; if ( !function_exists('fb_addgravatar') ) { function fb_addgravatar( $avatar_defaults ) { $myavatar = get_bloginfo('stylesheet_directory') . '/images/people-avatar.png'; $avatar_defaults[$myavatar] = 'people'; $myavatar2 = get_bloginfo('stylesheet_directory') . '/images/admin-avatar.png'; $avatar_defaults[$myavatar2] = 'Admin'; return $avatar_defaults; } add_filter( 'avatar_defaults', 'fb_addgravatar' ); }; function the_title2($before = '', $after = '', $echo = true, $length = false) { $title = get_the_title(); if ( $length && is_numeric($length) ) { $title = substr( $title, 0, $length ); } if ( strlen($title)> 0 ) { $title = apply_filters('the_title2', $before . $title . $after, $before, $after); if ( $echo ) echo $title; else return $title; } } ?>
  • id="li-comment-">
    , :
    comment_approved == '0') : ?>
    $depth, 'max_depth' => $args['max_depth']))) ?>
    tag. } ?>
  • 'Right Sidebar', 'before_widget' => '
    ', 'after_widget' => '
    ', 'before_title' => '

    ', 'after_title' => '

    ', )); } ?> cat_ID] = $category_list->cat_name; } array_unshift($wp_cats, "Choose a category"); $options = array ( array( "name" => $themename." Options", "type" => "title"), array( "name" => "Subscribe", "type" => "section"), array( "type" => "open"), array( "name" => "Feedburner ID", "desc" => "Type in your feedburner ID", "id" => $shortname."_feedburner_id", "type" => "text", "std" => "your feedburner id"), array( "name" => "Twitter ID", "desc" => "Type in your twitter ID", "id" => $shortname."_twitter_id", "type" => "text", "std" => "alivethemes"), array( "type" => "close"), array( "name" => "Featured Posts", "type" => "section"), array( "type" => "open"), array( "name" => "Enable/Disable Featured Post", "desc" => "Enable/Disable the featured posts section", "id" => $shortname."_featured_display", "type" => "select", "std" => "Display", "options" => array("Enable", "Disable")), array( "name" => "Choose Featured Category", "desc" => "Choose a category from which featured posts are drawn", "id" => $shortname."_featured_category", "type" => "select", "options" => $wp_cats, "std" => "Choose a category"), array( "name" => "Number of featured posts to show", "desc" => "Enter a number of posts you want to show in the featured category", "id" => $shortname."_featured_posts", "type" => "text", "std" => "3"), array( "type" => "close"), array( "name" => "Custom Sidebar Widgets", "type" => "section"), array( "type" => "open"), array( "name" => "Enable/Disable Latest Comments", "desc" => "Enable/Disable the latest comments custom widget from the sidebar", "id" => $shortname."_recent_comments_display", "type" => "select", "std" => "Display", "options" => array("Enable", "Disable")), array( "name" => "Enable/Disable Categories", "desc" => "Enable/Disable the categories custom widget from the sidebar", "id" => $shortname."_categories_display", "type" => "select", "std" => "Display", "options" => array("Enable", "Disable")), array( "name" => "Enable/Disable Recently Published", "desc" => "Enable/Disable the recently published custom widget from the single page sidebar", "id" => $shortname."_recent_posts_display", "type" => "select", "std" => "Display", "options" => array("Enable", "Disable")), array( "name" => "Enable/Disable Most Commented", "desc" => "Enable/Disable the most commented custom widget the sidebar", "id" => $shortname."_popular_display", "type" => "select", "std" => "Display", "options" => array("Enable", "Disable")), array( "name" => "Number of Most Commented Posts to show", "desc" => "Enter a number of posts you want to show in the most commented widget from the sidebar", "id" => $shortname."_popular_number", "std" => "5", "type" => "text"), array( "type" => "close"), array( "name" => "Ads Section", "type" => "section"), array( "type" => "open"), array( "name" => "Enable/Disable 125x125 Ad block", "desc" => "Enable/Disable the 125x125 ad block from the sidebar", "id" => $shortname."_125_ads_display", "type" => "select", "std" => "Display", "options" => array("Enable", "Disable")), array( "name" => "125x125 Ad #1 Image", "desc" => "Enter the image location of your sponsor's ad", "id" => $shortname."_ad_image_one", "std" => "http://www.skatdesign.com/images/mydiary/mydiary-ad-1.png", "type" => "text"), array( "name" => "125x125 Ad #1 URL", "desc" => "Enter the URL address of your sponsor's ad", "id" => $shortname."_ad_url_one", "std" => "#", "type" => "text"), array( "name" => "125x125 Ad #2 Image", "desc" => "Enter the image location of your sponsor's ad", "id" => $shortname."_ad_image_two", "std" => "http://www.skatdesign.com/images/mydiary/mydiary-ad-2.png", "type" => "text"), array( "name" => "125x125 Ad #2 URL", "desc" => "Enter the URL address location of your sponsor's ad", "id" => $shortname."_ad_url_two", "std" => "#", "type" => "text"), array( "name" => "125x125 Ad #3 Image", "desc" => "Enter the image location of your sponsor's ad", "id" => $shortname."_ad_image_three", "std" => "http://www.skatdesign.com/images/mydiary/mydiary-ad-3.png", "type" => "text"), array( "name" => "125x125 Ad #3 URL", "desc" => "Enter the URL address location of your sponsor's ad", "id" => $shortname."_ad_url_three", "std" => "#", "type" => "text"), array( "name" => "125x125 Ad #4 Image", "desc" => "Enter the image location of your sponsor's ad", "id" => $shortname."_ad_image_four", "std" => "http://www.skatdesign.com/images/your-125x125.png", "type" => "text"), array( "name" => "125x125 Ad #4 URL", "desc" => "Enter the URL address location of your sponsor's ad", "id" => $shortname."_ad_url_four", "std" => "#", "type" => "text"), array( "name" => "Advertise here URL", "desc" => "Enter the URL address of the page where you offer info. for people who want to advertise on your site", "id" => $shortname."_advertise_here", "std" => "#", "type" => "text"), array( "name" => "Enable/Disable 468x60 Banner after first Post", "desc" => "Enable/Disable the 468x60 banner located after the first post of each page", "id" => $shortname."_468_after_post_display", "type" => "select", "std" => "Display", "options" => array("Enable", "Disable")), array( "name" => "468x60 Banner Image", "desc" => "Enter the location of the image of the 468x60 banner", "id" => $shortname."_468_after_post_image", "std" => "http://www.skatdesign.com/images/468x60.png", "type" => "text"), array( "name" => "468x60 Banner URL", "desc" => "Enter the URL address of the 468x60 banner", "id" => $shortname."_468_after_post_url", "std" => "#", "type" => "text"), array( "type" => "close"), array( "name" => "Bottom Sidebar", "type" => "section"), array( "type" => "open"), array( "name" => "Enable/Disable Bottom Sidebar", "desc" => "Enable/Disable the bottom sidebar", "id" => $shortname."_bottom_display", "type" => "select", "std" => "Display", "options" => array("Enable", "Disable")), array( "name" => "Enable/Disable About section", "desc" => "Enable/Disable the about section from the bottom sidebar", "id" => $shortname."_about_display", "type" => "select", "std" => "Display", "options" => array("Enable", "Disable")), array( "name" => "About text", "desc" => "Enter a few words about yourself", "id" => $shortname."_about_text", "std" => "Lorem ipsum dolor sit amet sit, consectetur adipiscing elit. Donec bibendum enim ac diam vulputate in ultricies risus tempus. Sed et diam risus. Aenean risus turpis, condimentum vel, dapibus a, condimentum eu, eros amet dolor sit.", "type" => "text2"), array( "name" => "About Image", "desc" => "Enter the image location of the image to show in the about section from the bottom sidebar", "id" => $shortname."_about_image", "std" => "http://www.skatdesign.com/images/about-image.png", "type" => "text"), array( "name" => "About page URL", "desc" => "Enter the URL address of your \"About\" page", "id" => $shortname."_about_url", "std" => "#", "type" => "text"), array( "name" => "Enable/Disable Blogroll", "desc" => "Enter/Disable the blogroll widget from the bottom sidebar", "id" => $shortname."_links_display", "type" => "select", "std" => "Display", "options" => array("Enable", "Disable")), array( "name" => "Enable/Disable Latest Tweet", "desc" => "Enter/Disable the latest tweet widget from the bottom sidebar", "id" => $shortname."_tweet_display", "type" => "select", "std" => "Display", "options" => array("Enable", "Disable")), array( "type" => "close"), array( "name" => "Footer", "type" => "section"), array( "type" => "open"), array( "name" => "Google Analytics Code", "desc" => "You can paste your Google Analytics or other tracking code in this box. This will be automatically added to the footer.", "id" => $shortname."_ga_code", "type" => "textarea", "std" => ""), 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.

    " />
    />