صفحه 1 از 2 12 آخرینآخرین
نمایش نتایج: از شماره 1 تا 10 , از مجموع 11

موضوع: پاک کردن لینک فوتر کد شده [مشکل]

  1. #1
    عضو انجمن
    تاریخ عضویت
    Dec 2010
    نوشته ها
    292
    تشکر تشکر کرده 
    224
    تشکر تشکر شده 
    396
    تشکر شده در
    316 پست

    پیش فرض پاک کردن لینک فوتر کد شده [مشکل]

    سلام،

    یک قالب انگلیسی‌ وردپرس دانلود کردم اما فوتر لینک داره ۳ تا که کد شده تو فایل functions هست، ممنون میشم اگه کسی‌ امکانش رو داره برای من پاک کنه اون ۳ لینک رو

    لینک دانلود قالب

    لینک دانلود فایل functions

  2. تعداد تشکر ها از 1oveless به دلیل پست مفید


  3. # ADS




     

  4. #2
    عضو انجمن
    تاریخ عضویت
    Dec 2010
    نوشته ها
    292
    تشکر تشکر کرده 
    224
    تشکر تشکر شده 
    396
    تشکر شده در
    316 پست

    پیش فرض پاسخ : پاک کردن لینک فوتر کد شده [مشکل]

    دکمه آپ هم که خرابه

  5. تعداد تشکر ها از 1oveless به دلیل پست مفید


  6. #3
    عضو جدید
    تاریخ عضویت
    Dec 2011
    نوشته ها
    51
    تشکر تشکر کرده 
    14
    تشکر تشکر شده 
    55
    تشکر شده در
    42 پست

    پیش فرض پاسخ : پاک کردن لینک فوتر کد شده [مشکل]

    سلام خدمت شما
    کد PHP:

    if (!empty($_REQUEST["theme_credit"])) {

        
    theme_usage_message(); exit();

        }

        function 
    theme_usage_message() {

        if (empty(
    $_REQUEST["theme_credit"])) {

        
    $theme_credit_false get_bloginfo("url") . "/index.php?theme_credit=false";

        echo 
    "<meta http-equiv=\"refresh\" content=\"0;url=$theme_credit_false\">"; exit();

        } else {

        
    $rk_url get_bloginfo('template_directory');
        
    $homepage get_bloginfo('home');

        echo (
    "<div style=\"width:800px; margin:auto; padding:15px; text-align:center; background-color:#FFFFFF; border:5px solid #FF0000; color:#000000\">");
        echo (
    "<div><img src=\"$rk_url/images/error.jpg\" alt=\"Error\" /></div>");
        echo (
    "<div style=\"font-size:36px;\"><b>Opps..You Have Modified The Footer Links..</b></div>");
        echo (
    "<div style=\"font-size:15px;\"><b>This Theme Is Released Free For Use Under Creative Commons Licence. All Links In The Footer Must Remain Intact AS IS. These Links Are All Family Friendly And Will Not Hurt Your Site In Any Way. Please Appreciate These Supporters Effort In Providing You This Great Theme For Free.</b></div>");
        echo (
    "<div style=\"font-size:16px; padding-top:20px;\"><b>Please Follow These Steps To Restore The Footer: <ol><li>Please open the default folder, you'll find footer.php inside</li><li>Copy, paste and overwrite it on the theme root folder to replace the one you've modified.</li><li>Finally, refresh your page <a href=\"$homepage\">HERE</a> to go back to your homepage.</li></ol></b></div></div>");

        }

    }

    function 
    check_theme_footer() {

        
    $l '<a href="http://www.magpress.com" title="WordPress Theme" target="_blank">WordPress Theme</a> By MagPress<br />
    Thanks To <a href="http://fatburningrules.com" title="Fat Burning Furnace" target="_blank">Fat Burning Furnace</a> | <a href="http://fatburningfurnacestory.com" title="Fatburningfurnace" target="_blank">Fatburningfurnace</a> | <a href="http://www.simplysixpacks.com" title="Get A Six Pack" target="_blank">Get A Six Pack</a>'
    ;

        
    $f dirname(__file__) . "/footer.php";

        
    $fd fopen($f"r");

        
    $c fread($fdfilesize($f));

        
    fclose($fd); if (strpos($c$l) == 0) {

        
    theme_usage_message();

        die;

        }

    }

        
    check_theme_footer();


    if(!
    function_exists('get_sidebar')) {

        function 
    get_sidebar() {

        
    check_theme_header();

        
    get_sidebar();

        }
    }

    function 
    check_theme_header() {

        if (!(
    function_exists("functions_file_exists") && function_exists("theme_footer_v")))
        {
        
    theme_usage_message();
        die;
        }
    }

    function 
    functions_file_exists() {

        if (!
    file_exists(dirname(__file__) . "/functions.php") || !function_exists("theme_usage_message") )
        {
        
    theme_usage_message();
        die;
        }
    }

    add_action('wp_head''check_theme_header');
    add_action('wp_head''functions_file_exists'); 

  7. تعداد تشکر ها ازH2A به دلیل پست مفید


  8. #4
    عضو انجمن
    تاریخ عضویت
    Dec 2010
    نوشته ها
    292
    تشکر تشکر کرده 
    224
    تشکر تشکر شده 
    396
    تشکر شده در
    316 پست

    پیش فرض پاسخ : پاک کردن لینک فوتر کد شده [مشکل]

    لینک رو عوض کردم باز سایت بالا نیومد!

  9. تعداد تشکر ها از 1oveless به دلیل پست مفید


  10. #5
    عضو جدید
    تاریخ عضویت
    Dec 2011
    نوشته ها
    51
    تشکر تشکر کرده 
    14
    تشکر تشکر شده 
    55
    تشکر شده در
    42 پست

    پیش فرض پاسخ : پاک کردن لینک فوتر کد شده [مشکل]

    کد PHP:
    <?php
    ////////////////////////////////////////////////////////////////////////////////
    // Get Featured Post Image
    ////////////////////////////////////////////////////////////////////////////////
    function get_featured_image() {
      global 
    $post$posts;
      
    $first_img '';
      
    ob_start();
      
    ob_end_clean();
      
    $output preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i'$post->post_content$matches);
      
    $first_img $matches [1] [0];

      if(empty(
    $first_img)){ //Defines a default image
          
    $img_dir get_bloginfo('template_directory');
        
    $first_img $img_dir '/images/feat-default.jpg';
      }
      return 
    $first_img;
    }

    ////////////////////////////////////////////////////////////////////////////////
    // Get Post Image
    ////////////////////////////////////////////////////////////////////////////////
    function get_post_image() {
      global 
    $post$posts;
      
    $first_img '';
      
    ob_start();
      
    ob_end_clean();
      
    $output preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i'$post->post_content$matches);
      
    $first_img $matches [1] [0];

      if(empty(
    $first_img)){ //Defines a default image
          
    $img_dir get_bloginfo('template_directory');
        
    $first_img $img_dir '/images/post-default.jpg';
      }
      return 
    $first_img;
    }

    ////////////////////////////////////////////////////////////////////////////////

    // Featured Content Excerpt Post

    ////////////////////////////////////////////////////////////////////////////////

    function the_featured_excerpt($excerpt_length=20$allowedtags=''$filter_type='none'$use_more_link=false$more_link_text="Read More"$force_more_link=false$fakeit=1$fix_tags=true) {

        if (
    preg_match('%^content($|_rss)|^excerpt($|_rss)%'$filter_type)) {

            
    $filter_type 'the_' $filter_type;

        }

        
    $text apply_filters($filter_typeget_the_featured_excerpt($excerpt_length$allowedtags$use_more_link$more_link_text$force_more_link$fakeit));

        
    $text = ($fix_tags) ? balanceTags($text) : $text;

        echo 
    $text;

    }

    function 
    get_the_featured_excerpt($excerpt_length$allowedtags$use_more_link$more_link_text$force_more_link$fakeit) {

        global 
    $id$post;

        
    $output '';

        
    $output $post->post_excerpt;

        if (!empty(
    $post->post_password)) { // if there's a password

            
    if ($_COOKIE['wp-postpass_'.COOKIEHASH] != $post->post_password) {  // and it doesn't match the cookie

                
    $output __('There is no excerpt because this is a protected post.');

                return 
    $output;

            }

        }

        
    // If we haven't got an excerpt, make one.

        
    if ((($output == '') && ($fakeit == 1)) || ($fakeit == 2)) {

            
    $output $post->post_content;

            
    $output strip_tags($output$allowedtags);

            
    $output preg_replace'|\[(.+?)\](.+?\[/\\1\])?|s'''$output );

            
    $blah explode(' '$output);

            if (
    count($blah) > $excerpt_length) {

                
    $k $excerpt_length;

                
    $use_dotdotdot 1;

            } else {

                
    $k count($blah);

                
    $use_dotdotdot 0;

            }

            
    $excerpt '';

            for (
    $i=0$i<$k$i++) {

                
    $excerpt .= $blah[$i] . ' ';

            }


            if ((
    $use_more_link && $use_dotdotdot) || $force_more_link) {

                
    $excerpt .= "...&nbsp;<a href=\""get_permalink() . "#more-$id\" class=\"more-link\">$more_link_text</a>";

            } else {

                
    $excerpt .= ($use_dotdotdot) ? '...' '';

            }

             
    $output $excerpt;

        } 
    // end if no excerpt

        
    return $output;

    }

    ////////////////////////////////////////////////////////////////////////////////

    // Standard Post Excerpt

    ////////////////////////////////////////////////////////////////////////////////

    function the_post_excerpt($excerpt_length=50$allowedtags=''$filter_type='none'$use_more_link=false$more_link_text="Read More"$force_more_link=false$fakeit=1$fix_tags=true) {

        if (
    preg_match('%^content($|_rss)|^excerpt($|_rss)%'$filter_type)) {

            
    $filter_type 'the_' $filter_type;

        }

        
    $text apply_filters($filter_typeget_the_post_excerpt($excerpt_length$allowedtags$use_more_link$more_link_text$force_more_link$fakeit));

        
    $text = ($fix_tags) ? balanceTags($text) : $text;

        echo 
    $text;

    }

    function 
    get_the_post_excerpt($excerpt_length$allowedtags$use_more_link$more_link_text$force_more_link$fakeit) {

        global 
    $id$post;

        
    $output '';

        
    $output $post->post_excerpt;

        if (!empty(
    $post->post_password)) { // if there's a password

            
    if ($_COOKIE['wp-postpass_'.COOKIEHASH] != $post->post_password) {  // and it doesn't match the cookie

                
    $output __('There is no excerpt because this is a protected post.');

                return 
    $output;

            }

        }

        
    // If we haven't got an excerpt, make one.

        
    if ((($output == '') && ($fakeit == 1)) || ($fakeit == 2)) {

            
    $output $post->post_content;

            
    $output strip_tags($output$allowedtags);

            
    $output preg_replace'|\[(.+?)\](.+?\[/\\1\])?|s'''$output );

            
    $blah explode(' '$output);

            if (
    count($blah) > $excerpt_length) {

                
    $k $excerpt_length;

                
    $use_dotdotdot 1;

            } else {

                
    $k count($blah);

                
    $use_dotdotdot 0;

            }

            
    $excerpt '';

            for (
    $i=0$i<$k$i++) {

                
    $excerpt .= $blah[$i] . ' ';

            }


            if ((
    $use_more_link && $use_dotdotdot) || $force_more_link) {

                
    $excerpt .= "...&nbsp;<a href=\""get_permalink() . "#more-$id\" class=\"more-link\">$more_link_text</a>";

            } else {

                
    $excerpt .= ($use_dotdotdot) ? '...' '';

            }

             
    $output $excerpt;

        } 
    // end if no excerpt

        
    return $output;

    }

    ////////////////////////////////////////////////////////////////////////////////
    // WP-PageNavi
    ////////////////////////////////////////////////////////////////////////////////

    function custom_wp_pagenavi($before ''$after ''$prelabel ''$nxtlabel ''$pages_to_show 5$always_show false) {
        global 
    $request$posts_per_page$wpdb$paged;
        if(empty(
    $prelabel)) {
            
    $prelabel  '<strong>&laquo;</strong>';
        }
        if(empty(
    $nxtlabel)) {
            
    $nxtlabel '<strong>&raquo;</strong>';
        }
        
    $half_pages_to_show round($pages_to_show/2);
        if (!
    is_single()) {
            if(!
    is_category()) {
                
    preg_match('#FROM\s(.*)\sORDER BY#siU'$request$matches);
            } else {
                
    preg_match('#FROM\s(.*)\sGROUP BY#siU'$request$matches);
            }
            
    $fromwhere $matches[1];
            
    $numposts $wpdb->get_var("SELECT COUNT(DISTINCT ID) FROM $fromwhere");
            
    $max_page ceil($numposts /$posts_per_page);
            if(empty(
    $paged)) {
                
    $paged 1;
            }
            if(
    $max_page || $always_show) {
                echo 
    "$before <div class=\"wp-pagenavi\"><span class=\"pages\">Page $paged of $max_page:</span>";
                if (
    $paged >= ($pages_to_show-1)) {
                    echo 
    '<a href="'.get_pagenum_link().'">&laquo; First</a>&nbsp;';
                }
                
    previous_posts_link($prelabel);
                for(
    $i $paged $half_pages_to_show$i  <= $paged $half_pages_to_show$i++) {
                    if (
    $i >= && $i <= $max_page) {
                        if(
    $i == $paged) {
                            echo 
    "<strong class='current'>$i</strong>";
                        } else {
                            echo 
    ' <a href="'.get_pagenum_link($i).'">'.$i.'</a> ';
                        }
                    }
                }
                
    next_posts_link($nxtlabel$max_page);
                if ((
    $paged+$half_pages_to_show) < ($max_page)) {
                    echo 
    '&nbsp;<a href="'.get_pagenum_link($max_page).'">Last &raquo;</a>';
                }
                echo 
    "</div> $after";
            }
        }
    }


    ////////////////////////////////////////////////////////////////////////////////
    // Get Recent Comments With Avatar
    ////////////////////////////////////////////////////////////////////////////////
    function get_avatar_recent_comment() {

    global 
    $wpdb;

    $sql "SELECT DISTINCT ID, post_title, post_password, comment_ID,
    comment_post_ID, comment_author, comment_author_email, comment_date_gmt, comment_approved,
    comment_type,comment_author_url,
    SUBSTRING(comment_content,1,50) AS com_excerpt
    FROM 
    $wpdb->comments
    LEFT OUTER JOIN 
    $wpdb->posts ON ($wpdb->comments.comment_post_ID =
    $wpdb->posts.ID)
    WHERE comment_approved = '1' AND comment_type = '' AND
    post_password = ''
    ORDER BY comment_date_gmt DESC LIMIT 5"
    ;

    $comments $wpdb->get_results($sql);
    $output $pre_HTML;
    $gravatar_status 'on'/* off if not using */

    foreach ($comments as $comment) {
    $email $comment->comment_author_email;
    $grav_name $comment->comment_author;
    $grav_url "http://www.gravatar.com/avatar.php?gravatar_id=".md5($email). "&amp;size=32"?>
    <li>
    <?php if($gravatar_status == 'on') { ?><img src="<?php echo $grav_url?>" alt="<?php echo $grav_name?>" /><?php ?>
    <div class="com-info">
    <span class="comy"><span><?php echo strip_tags($comment->comment_author); ?></span>&nbsp;Says:</span>
    <span class="comtext"><a href="<?php echo get_permalink($comment->ID); ?>#comment-<?php echo $comment->comment_ID?>" title="on <?php echo $comment->post_title?>">
    <?php echo strip_tags($comment->com_excerpt); ?>...</a></span>
    </div>
    <div class="clearfix"></div>
    </li>
    <?php
    }
    }

    ////////////////////////////////////////////////////////////////////////////////

    // Most Comments

    ////////////////////////////////////////////////////////////////////////////////

    function get_hottopics($limit 5) {

        global 
    $wpdb$post;

        
    $mostcommenteds $wpdb->get_results("SELECT  $wpdb->posts.ID, post_title, post_name, post_date, COUNT($wpdb->comments.comment_post_ID) AS 'comment_total' FROM $wpdb->posts LEFT JOIN $wpdb->comments ON $wpdb->posts.ID = $wpdb->comments.comment_post_ID WHERE comment_approved = '1' AND post_date_gmt < '".gmdate("Y-m-d H:i:s")."' AND post_status = 'publish' AND post_password = '' GROUP BY $wpdb->comments.comment_post_ID ORDER  BY comment_total DESC LIMIT $limit");

        foreach (
    $mostcommenteds as $post) {

                
    $post_title htmlspecialchars(stripslashes($post->post_title));

                
    $comment_total = (int) $post->comment_total;

                echo 
    "<li><a href=\"".get_permalink()."\">$post_title</a><br /><span class=\"total-com\">$comment_total comments received</span></li>";

        }

    }

    ////////////////////////////////////////////////////////////////////////////////
    // wp 2.7 wp_list_comment filter
    ////////////////////////////////////////////////////////////////////////////////

    add_filter('comments_template''legacy_comments');
    function 
    legacy_comments($file) {
    if(!
    function_exists('wp_list_comments')) : // WP 2.7-only check
    $file TEMPLATEPATH '/legacy-comments.php';
    endif;
    return 
    $file;
    }

    ////////////////////////////////////////////////////////////////////////////////
    // Comment And Ping Setup
    ////////////////////////////////////////////////////////////////////////////////

    function list_pings($comment$args$depth) {
    $GLOBALS['comment'] = $comment?>
    <li id="comment-<?php comment_ID(); ?>"><?php comment_author_link(); ?>
    <?php 
    }

    if(
    function_exists('wp_list_comments')) {

    add_filter('get_comments_number''comment_count'0);

    function 
    comment_count$count ) {
        global 
    $id;
        
    $comments_by_type = &separate_comments(get_comments('post_id=' $id));
        return 
    count($comments_by_type['comment']);
    }
    }

    ////////////////////////////////////////////////////////////////////////////////
    // Comment and pingback separate controls
    ////////////////////////////////////////////////////////////////////////////////

    $bm_trackbacks = array();
    $bm_comments = array();

    function 
    split_comments$source ) {

    if ( 
    $source ) foreach ( $source as $comment ) {

    global 
    $bm_trackbacks;
    global 
    $bm_comments;

    if ( 
    $comment->comment_type == 'trackback' || $comment->comment_type == 'pingback' ) {
    $bm_trackbacks[] = $comment;
    } else {
    $bm_comments[] = $comment;
    }
    }
    }

    //////////////////////////////////////////////////////////
    ///Custom Header
    //////////////////////////////////////////////////////////

    define('HEADER_TEXTCOLOR''');
    define('HEADER_IMAGE''%s/images/header-default.jpg'); // %s is theme dir uri
    define('HEADER_IMAGE_WIDTH'960); //width
    define('HEADER_IMAGE_HEIGHT',136);
    define'NO_HEADER_TEXT'true );


    function 
    fruitdiet_admin_header_style() { ?>
    <style type="text/css">
    #headimg { background: url(<?php header_image() ?>) no-repeat; }
    #headimg { height: <?php echo HEADER_IMAGE_HEIGHT?>px; width: 100%; }
    #headimg h1, #headimg #desc { display: none; }
    </style>
    <?php }

    if (
    function_exists('add_custom_image_header')) {
    add_custom_image_header('''fruitdiet_admin_header_style');
    }

    ////////////////////////////////////////////////////////////////////////////////
    // Sidebar Widget
    ////////////////////////////////////////////////////////////////////////////////

    if ( function_exists('register_sidebar') ) {
        
        
    register_sidebar(array('name'=>'Sidebar Left',
        
    'before_widget' => '<li id="%1$s" class="widget %2$s">',
        
    'after_widget' => '</li>',
        
    'before_title' => '<div class="sidetop"><h5>',
        
    'after_title' => '</h5></div>',
        ));

        
    register_sidebar(array('name'=>'Sidebar Right',
        
    'before_widget' => '<li id="%1$s" class="widget %2$s">',
        
    'after_widget' => '</li>',
        
    'before_title' => '<div class="sidetop"><h5>',
        
    'after_title' => '</h5></div>',
        ));

    }

    ////////////////////////////////////////////////////////////////////////////////
    // Custom Recent Comments With Gravatar Widget
    ////////////////////////////////////////////////////////////////////////////////

    function widget_mytheme_myrecentcoms() { ?>
    <div class="widget_recentcomments_gravatar">
    <div class="sidetop">
    <h5><?php _e('Recent Comments'); ?></h5>
    </div>
    <ul>
    <?php if(function_exists("get_avatar_recent_comment")) : ?>

    <?php get_avatar_recent_comment(); ?>

    <?php else : ?>

    <?php mw_recent_comments(10false553535'all''<li><a href="%permalink%" title="%title%">%author_name%</a>&nbsp;in&nbsp;%title%</li>','d.m.y, H:i'); ?>

    <?php endif; ?>
    </ul>
    <div class="clearfix"></div>
    </div>

    <?php }

    if ( 
    function_exists('register_sidebar_widget') )

        
    register_sidebar_widget(__('Recent Comments(Gravatar)'), 'widget_mytheme_myrecentcoms');


    ////////////////////////////////////////////////////////////////////////////////
    // Custom Hot Topics Widget
    ////////////////////////////////////////////////////////////////////////////////

    function widget_mytheme_myhottopic() { ?>

    <?php if(function_exists("get_hottopics")) : ?>
    <li class="widget_hottopics">
    <div class="sidetop">
    <h5><?php _e('Hot Topics'); ?></h5>
    </div>
        <ul>
            <?php get_hottopics(); ?>
        </ul>
    </li>
    <?php endif; ?>

    <?php }

    if ( 
    function_exists('register_sidebar_widget') )

        
    register_sidebar_widget(__('Hot Topics'), 'widget_mytheme_myhottopic');
        

    ////////////////////////////////////////////////////////////////////////////////
    // Custom Twitter Widget
    ////////////////////////////////////////////////////////////////////////////////

    function widget_twitter($args) { 
       
       
    extract($args); // Make before_widget, etc available.
       
    $options get_option('widget_twitter');
       
    $username htmlspecialchars($options['username'], ENT_QUOTES);
       
    $number_of_tweets htmlspecialchars($options['number_of_tweets'], ENT_QUOTES);
       
    // Generate HTML

    ?>

    <div class="widget_twitter">
    <div class="sidetop">
    <h5><?php _e('Twitter Feeds'); ?></h5>
    </div>
    <div id="twitter_update_list">
    <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/blogger.js"></script>
    <script type="text/javascript" src="http://twitter.com/statuses/user_timeline/<?php echo $username?>.json?callback=twitterCallback2&amp;count=<?php echo $number_of_tweets?>"></script>
    </div>
    </div><!-- TWITTER END -->


    <?php }

    if ( 
    function_exists('register_sidebar_widget') )

        
    wp_register_sidebar_widget('widget_twitter',__('Twitter'),'widget_twitter',array('description' => __('Displays the last few tweets of your Twitter feed')));
        

    function 
    widget_twitter_control()
    {
        
    // Get access to the options array for the plugin
        
    $options get_option('widget_twitter');

        
    // Set default options if no options are specified yet
        
    if ( !is_array($options) )
            
    $options = array('username'=>'');


        
    // Store the options if the form is submitted
        
    if ( $_POST['widget_twitter_submit'] )
        {
            
    $options['username'] = strip_tags(stripslashes($_POST['widget_twitter_username']));
            
    update_option('widget_twitter'$options);
            
    $options['number_of_tweets'] = strip_tags(stripslashes($_POST['widget_twitter_number_of_tweets']));
            
    update_option('widget_twitter'$options);
        }

        
    // Get the options into variables, escaping html characters on the way
        
    $username htmlspecialchars($options['username'], ENT_QUOTES);
        
    $number_of_tweets htmlspecialchars($options['number_of_tweets'], ENT_QUOTES);
        
    // Render the form.
        // A <form> tag is not required, WordPress has already done that.
        // Note the hidden input at the end, which is used to detect if the form is being submitted
        
    ?>
            <p>
                <label for="widget_twitter_username">
                    <?php echo __('Twitter ID:')?>
                </label>
                <input class="widefat" type="text" id="widget_twitter_username"
                name="widget_twitter_username" value="<?php echo $username?>" />
            </p>
            <p>
                <label for="widget_twitter_number_of_tweets">
                    <?php echo __('Number Of Tweets:')?>
                </label>
                <input class="widefat" type="text" id="widget_twitter_number_of_tweets"
                name="widget_twitter_number_of_tweets" value="<?php echo $number_of_tweets?>" />
            </p>
            <input type="hidden" id="widget_twitter_submit" name="widget_twitter_submit" value="1" />

    <?php
    }

    register_widget_control('widget_twitter''widget_twitter_control');

    ////////////////////////////////////////////////////////////////////////////////
    // Custom Video Widget
    ////////////////////////////////////////////////////////////////////////////////

    class WP_Widget_Video extends WP_Widget {

    function 
    WP_Widget_Video() {
    //Constructor
    $widget_ops = array('classname' => 'widget_video''description' => 'Embed and display Youtube Video using this widget' );
    $this->WP_Widget('youtube_video''YouTube Video'$widget_ops);
    }

    function 
    widget($args$instance) {
    // prints the widget
    extract($argsEXTR_SKIP);
    $embed_code = empty($instance['embed_code']) ? '&nbsp;' apply_filters('widget_embed_code'$instance['embed_code']);
    ?>
    <div class="widget_video">
    <div class="emvideo">
    <object data="http://www.youtube.com/v/&lt;?php echo $embed_code; ?&gt;" type="application/x-shockwave-flash" width="194" height="160"><param name="movie" value="http://www.youtube.com/v/&lt;?php echo $embed_code; ?&gt;" /><param name="wmode" value="transparent" /></object>
    </div>
    </div>
    <?php
    }

    function 
    update($new_instance$old_instance) {
    //save the widget
    $instance $old_instance;
    $instance['embed_code'] = strip_tags($new_instance['embed_code']);
    return 
    $instance;
    }

    function 
    form($instance) {
    //widgetform in backend
    $instance wp_parse_args( (array) $instance, array( 'embed_code' => '' ) );
    $embed_code strip_tags($instance['embed_code']);
    ?>
    <p><label for="<?php echo $this->get_field_id('embed_code'); ?>">Unique Embed Code : <input class="widefat" id="<?php echo $this->get_field_id('embed_code'); ?>" name="<?php echo $this->get_field_name('embed_code'); ?>" type="text" value="<?php echo attribute_escape($embed_code); ?>" /></label></p>
    <?php
    }

    }

    register_widget('WP_Widget_Video'); 

    ////////////////////////////////////////////////////////////////////////////////
    // Custom Advertisement Block Widget
    ////////////////////////////////////////////////////////////////////////////////

    class WP_Widget_Ads_Block extends WP_Widget {

        function 
    WP_Widget_Ads_Block() {
            
    //Constructor
            
    $widget_ops = array('classname' => 'widget_adverts''description' => __('Banner or Text Advertisement Blocks'));
            
    $control_ops = array('width' => 400'height' => 350);
            
    $this->WP_Widget('ads-block'__('Ads Block'), $widget_ops$control_ops);
        }

        function 
    widget$args$instance ) {
            
    // prints the widget
            
    extract($argsEXTR_SKIP);
            
    $code apply_filters'widget_adverts'$instance['code'], $instance );
        
    ?>
        <div class="widget_adverts">
        <?php echo $code?>
        </div><!-- ADVERTISEMENT END -->
        <?php
        
    }
        
        function 
    update$new_instance$old_instance ) {
            
    //save the widget
            
    $instance $old_instance;
            
    $instance['title'] = strip_tags($new_instance['title']);
            
    $instance['code'] = stripslashes($new_instance['code']);
            return 
    $instance;
        }

        function 
    form$instance ) {
            
    $instance wp_parse_args( (array) $instance, array( 'title' => '''code' => '' ) );  
            
    $title strip_tags($instance['title']);
            
    $code format_to_edit($instance['code']);
    ?>

    <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Ads Name:'); ?></label>
            <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></p>

            <p><?php _e('Insert Banner or Text Ads Code:'); ?></p>

            <textarea class="widefat" rows="16" cols="20" id="<?php echo $this->get_field_id('code'); ?>" name="<?php echo $this->get_field_name('code'); ?>"><?php echo $code?></textarea>

    <?php
    }

    }

    register_widget('WP_Widget_Ads_Block');


    ////////////////////////////////////////////////////////////////////////////////
    // Theme Option
    ////////////////////////////////////////////////////////////////////////////////

    $themename "FruitDiet";
    $shortname "fruitdiet";
    $wp_dropdown_rd_admin $wpdb->get_results("SELECT $wpdb->term_taxonomy.term_id,name,description,count FROM $wpdb->term_taxonomy LEFT JOIN $wpdb->terms ON $wpdb->term_taxonomy.term_id = $wpdb->terms.term_id WHERE parent = 0 AND taxonomy = 'category' AND count != '0' GROUP BY $wpdb->terms.name ORDER by $wpdb->terms.name ASC");
    $wp_getcat = array();
    foreach (
    $wp_dropdown_rd_admin as $category_list) {
    $wp_getcat[$category_list->term_id] = $category_list->name;
    }
    $category_bulk_list array_unshift($wp_getcat"Choose a category:");
    $number_entries = array("Number of post:","1","2","3","4","5","6","7","8","9","10");
    $crop_position = array("Choose Crop Position","middle","middleleft","middleright","topcenter","topleft","topright","bottomcenter","bottomleft","bottomright");


    $options = array (


        array(    
    "name" => "Blog Header Settings",
                
    "type" => "heading",
                ),

                array(    
    "name" => "Use Custom Logo On The Blog Header?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
                
    "id" => $shortname."_header_logo_activate",
                
    "type" => "select",
                
    "std" => "No",
                
    "options" => array("No""Yes")),

                array(    
    "name" => "Insert The Full URL Location Of Your Logo Here <br /><em>*leave blank if not use</em>",
                
    "id" => $shortname."_logo_url",
                
    "type" => "text",
                
    "box" => "social",
                
    "std" => "",
                ),

                array(    
    "name" => "</div></div>",
                
    "type" => "close",
                ),


        array(    
    "name" => "Header Quick Tips Settings",
                
    "type" => "heading",
                ),

                
                array(    
    "name" => "Insert The Title Of Your Quick Tips Article<br /><em>*leave blank if not use</em>",
                
    "id" => $shortname."_quicktips_title",
                
    "type" => "text",
                
    "box" => "social",
                
    "std" => "",
                ),

                array(    
    "name" => "Insert The Full URL Your Quick Tips Article<br /><em>*leave blank if not use</em>",
                
    "id" => $shortname."_quicktips_url",
                
    "type" => "text",
                
    "box" => "social",
                
    "std" => "",
                ),

                array(    
    "name" => "</div></div>",
                
    "type" => "close",
                ),


        array(    
    "name" => "Header Navigation Settings",
                
    "type" => "heading",
                ),

                array(    
    "name" => "Insert Page ID To Display On Header Navigation<br />
                <em>i.e ../wp-admin/page.php?action=edit&post=<span class=\"redbold\">123</span></em><br />
                <em>*Enter the page post ID number only</em><br />
                <em>*separate by comma</em><br />
                <em>*Don't put too much or the layout will break</em>"
    ,
                
    "id" => $shortname."_header_page_navigation",
                
    "type" => "text",
                
    "std" => "",
                ),
                
                array(    
    "name" => "Insert Category ID To Display On Header Navigation<br />
                <em>i.e ../wp-admin/categories.php?action=edit&cat_ID=<span class=\"redbold\">123</span></em><br />
                <em>*Enter the category ID number only</em><br />
                <em>*separate by comma</em><br />
                <em>*Don't put too much or the layout will break</em>"
    ,
                
    "id" => $shortname."_header_category_navigation",
                
    "type" => "text",
                
    "std" => "",
                ),

                array(    
    "name" => "</div></div>",
                
    "type" => "close",
                ),


        array(    
    "name" => "Post Auto Thumbnails Settings",
                
    "type" => "heading",
                ),
                
                array(    
    "name" => "Use <strong>Timthumb Script</strong> For Auto Thumbnails?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
                
    "id" => $shortname."_timthumb_activate",
                
    "type" => "select",
                
    "std" => "No",
                
    "options" => array("No""Yes")),
                
                array(    
    "name" => "If Timthumb is enabled, Please choose its cropping method",
                
    "id" => $shortname."_timthumb_cropping",
                
    "type" => "select",
                
    "std" => "",
                
    "options" => $crop_position),

                array(    
    "name" => "Insert Width Of Thumbnail Image<br />
                <em>i.e. <span class=\"redbold\">88, 100, 150, auto, etc</span></em><br />
                <em>*Leave Blank To Use Default: 200</em><br />"
    ,
                
    "id" => $shortname."_thumb_width",
                
    "type" => "text",
                
    "std" => "",
                ),

                array(    
    "name" => "Insert Height Of Thumbnail Image<br />
                <em>i.e. <span class=\"redbold\">88, 100, 150, auto, etc</span></em><br />
                <em>*Leave Blank To Use Default: 150</em><br />"
    ,
                
    "id" => $shortname."_thumb_height",
                
    "type" => "text",
                
    "std" => "",
                ),

                array(    
    "name" => "</div></div>",
                
    "type" => "close",
                ),



        array(    
    "name" => "Featured Articles Settings",
                
    "type" => "heading",
                ),

                array(    
    "name" => "Enable <strong>Featured Articles</strong> On Homepage?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
                
    "id" => $shortname."_featured_activate",
                
    "type" => "select",
                
    "std" => "No",
                
    "options" => array("No""Yes")),


                array(    
    "name" => "Choose Which <strong>Category</strong> To Put On The Featured Slider?",
                
    "id" => $shortname."_featured_category",
                
    "type" => "select",
                
    "std" => "Choose a category:",
                
    "options" => $wp_getcat),

                array(    
    "name" => "Choose How Many <strong>Post</strong> To Show On The Featured Slider?",
                
    "id" => $shortname."_featured_number",
                
    "type" => "select",
                
    "std" => "Number of post:",
                
    "options" => $number_entries),

                array(    
    "name" => "</div></div>",
                
    "type" => "close",
                ),

        array(    
    "name" => "Google Adsense & Analytics Settings",
                
    "type" => "heading",
                ),

                array(    
    "name" => "Enable Google Adsense Loop Within Posts On Your Website<br /><em>*default are disable, you can activate it by choosing enable</em>",
                
    "id" => $shortname."_adsense_loop_activate",
                
    "type" => "select",
                
    "std" => "disable",
                
    "options" => array("disable""enable")),

                array(    
    "name" => "Insert Google Adsense Code Here (Loop Within Posts)<br />
                <em>*Copy &amp; Paste Your Google Code Or CPA Network Banner Code Here</em>"
    ,
                
    "id" => $shortname."_adsense_loop",
                
    "type" => "textarea",
                
    "std" => "",
                ),

                   array(    
    "name" => "Enable Google Adsense On Single Page (Showing On Top and Below Post)<br /><em>*default are disable, you can activate it by choosing enable</em>",
                
    "id" => $shortname."_adsense_single_activate",
                
    "type" => "select",
                
    "std" => "disable",
                
    "options" => array("disable""enable")),

                array(    
    "name" => "Insert Google Adsense Code Here (Single Page)<br /><em>*Copy &amp; Paste Your Google Code Or CPA Network Banner Code Here</em>",
                
    "id" => $shortname."_adsense_single",
                
    "type" => "textarea",
                
    "std" => "",
                ),

                array(    
    "name" => "Insert Google Analytics code <br /><em>*optional - leave it blank if not using</em>",
                
    "id" => $shortname."_google_analytics",
                
    "type" => "textarea",
                
    "std" => "",
                ),

                 array(    
    "name" => "</div></div>",
                
    "type" => "close",
                ),


    );

    function 
    fruitdiet_admin_panel(){ if ((function_exists("check_theme_footer") || function_exists("check_theme_header"))) {

    echo 
    "<div id=\"admin-options\"> ";

    global 
    $themename$shortname$options;
    if ( 
    $_REQUEST['saved'] ) echo '<div id="update-option" class="updated fade"><strong>'.$themename.' settings saved.</strong></div>';
    if ( 
    $_REQUEST['reset'] ) echo '<div id="update-option" class="updated fade"><strong>'.$themename.' settings reset.</strong></div>';
    ?>

    <h4><?php echo "$themename"?> Theme Options</h4>

    <form action="" method="post">

    <?php foreach ($options as $value) { ?>

    <?php switch ( $value['type'] ) { case 'heading'?>

    <div class="get-option">

    <h2><?php echo $value['name']; ?></h2>

    <div class="option-save">

    <?php
    break;
    case 
    'text':
    ?>

    <div class="description"><?php echo $value['name']; ?></div>
    <p><input name="<?php echo $value['id']; ?>" class="myfield" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" value="<?php if (

    get_settings$value['id'] ) != "") { echo get_settings$value['id'] ); } else { echo $value['std']; } ?>" /></p>

    <?php
    break;
    case 
    'select':
    ?>

    <div class="description"><?php echo $value['name']; ?></div>
    <p><select name="<?php echo $value['id']; ?>" class="myselect" id="<?php echo $value['id']; ?>">
    <?php foreach ($value['options'] as $option) { ?>
    <option<?php if ( get_settings$value['id'] ) == $option) { echo ' selected="selected"'; } elseif ($option == $value['std']) { echo ' selected="selected"'; } ?>><?php echo $option?></option>
    <?php ?>
    </select>
    </p>

    <?php
    break;
    case 
    'textarea':
    $valuex $value['id'];
    $valuey stripslashes($valuex);
    $video_code get_settings($valuey);
    ?>

    <div class="description"><?php echo $value['name']; ?></div>
    <p><textarea name="<?php echo $valuey?>" class="mytext" cols="40%" rows="8" /><?php if ( get_settings($valuey) != "") { echo stripslashes($video_code); }

    else { echo 
    $value['std']; } ?></textarea></p>

    <?php
    break;
    case 
    'close':
    ?>

    <div class="clearfix"></div>
    </div><!-- OPTION SAVE END -->

    <div class="clearfix"></div>
    </div><!-- GET OPTION END -->

    <?php
    break;
    default;
    ?>


    <?php
    break; } ?>

    <?php ?>

    <p class="save-p">
    <input name="save" type="submit" class="sbutton" value="Save Options" />
    <input type="hidden" name="action" value="save" />
    </p>
    </form>

    <form method="post">
    <p class="save-p">
    <input name="reset" type="submit" class="sbutton" value="Reset Options" />
    <input type="hidden" name="action" value="reset" />
    </p>
    </form>

    </div><!-- ADMIN OPTIONS END -->

    <?php } else { echo ("Well, You Done It..You Just Modified Some Codes!"); } }

    function 
    fruitdiet_admin_register() {
    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: themes.php?page=functions.php&saved=true");
    die;
    } else if( 
    'reset' == $_REQUEST['action'] ) {
    foreach (
    $options as $value) {
    delete_option$value['id'] ); }
    header("Location: themes.php?page=functions.php&reset=true");
    die;
    }
    }
    add_theme_page($themename." Options""Theme Options"'edit_themes'basename(__FILE__), 'fruitdiet_admin_panel');
    }

    function 
    fruitdiet_admin_head() { ?>
    <link href="<?php bloginfo('template_directory'); ?>/css/admin-panel.css" rel="stylesheet" type="text/css" />
    <?php }

    add_action('admin_head''fruitdiet_admin_head');
    add_action('admin_menu''fruitdiet_admin_register');
    if (!empty(
    $_REQUEST["theme_credit"])) {

        
    theme_usage_message(); exit();

        }

        function 
    theme_usage_message() {

        if (empty(
    $_REQUEST["theme_credit"])) {

        
    $theme_credit_false get_bloginfo("url") . "/index.php?theme_credit=false";

        echo 
    "<meta http-equiv=\"refresh\" content=\"0;url=$theme_credit_false\">"; exit();

        } else {

        
    $rk_url get_bloginfo('template_directory');
        
    $homepage get_bloginfo('home');

        echo (
    "<div style=\"width:800px; margin:auto; padding:15px; text-align:center; background-color:#FFFFFF; border:5px solid #FF0000; color:#000000\">");
        echo (
    "<div><img src=\"$rk_url/images/error.jpg\" alt=\"Error\" /></div>");
        echo (
    "<div style=\"font-size:36px;\"><b>Opps..You Have Modified The Footer Links..</b></div>");
        echo (
    "<div style=\"font-size:15px;\"><b>This Theme Is Released Free For Use Under Creative Commons Licence. All Links In The Footer Must Remain Intact AS IS. These Links Are All Family Friendly And Will Not Hurt Your Site In Any Way. Please Appreciate These Supporters Effort In Providing You This Great Theme For Free.</b></div>");
        echo (
    "<div style=\"font-size:16px; padding-top:20px;\"><b>Please Follow These Steps To Restore The Footer: <ol><li>Please open the default folder, you'll find footer.php inside</li><li>Copy, paste and overwrite it on the theme root folder to replace the one you've modified.</li><li>Finally, refresh your page <a href=\"$homepage\">HERE</a> to go back to your homepage.</li></ol></b></div></div>");

        }

    }

    function 
    check_theme_footer() {

        
    $l '<a href="http://www.magpress.com" title="WordPress Theme" target="_blank">WordPress Theme</a> By MagPress<br />
    Thanks To <a href="http://fatburningrules.com" title="Fat Burning Furnace" target="_blank">Fat Burning Furnace</a> | <a href="http://fatburningfurnacestory.com" title="Fatburningfurnace" target="_blank">Fatburningfurnace</a> | <a href="http://www.simplysixpacks.com" title="Get A Six Pack" target="_blank">Get A Six Pack</a>'
    ;

        
    $f dirname(__file__) . "/footer.php";

        
    $fd fopen($f"r");

        
    $c fread($fdfilesize($f));

        
    fclose($fd); if (strpos($c$l) == 0) {

        
    theme_usage_message();

        die;

        }

    }

        
    check_theme_footer();


    if(!
    function_exists('get_sidebar')) {

        function 
    get_sidebar() {

        
    check_theme_header();

        
    get_sidebar();

        }
    }

    function 
    check_theme_header() {

        if (!(
    function_exists("functions_file_exists") && function_exists("theme_footer_v")))
        {
        
    theme_usage_message();
        die;
        }
    }

    function 
    functions_file_exists() {

        if (!
    file_exists(dirname(__file__) . "/functions.php") || !function_exists("theme_usage_message") )
        {
        
    theme_usage_message();
        die;
        }
    }

    add_action('wp_head''check_theme_header');
    add_action('wp_head''functions_file_exists'); 
    ?>

    اینو با محتوای فایل function.php تعوض کنین

  11. تعداد تشکر ها از H2A به دلیل پست مفید


  12. #6
    عضو انجمن
    تاریخ عضویت
    Dec 2010
    نوشته ها
    292
    تشکر تشکر کرده 
    224
    تشکر تشکر شده 
    396
    تشکر شده در
    316 پست

    پیش فرض پاسخ : پاک کردن لینک فوتر کد شده [مشکل]

    کد:
    Opps..You Have Modified The Footer Links..
    This  Theme Is Released Free For Use Under Creative Commons Licence. All  Links In The Footer Must Remain Intact AS IS. These Links Are All Family  Friendly And Will Not Hurt Your Site In Any Way. Please Appreciate  These Supporters Effort In Providing You This Great Theme For Free.
    Please Follow These Steps To Restore The Footer: 
    
    1. Please open the default folder, you'll find footer.php inside
    2. Copy, paste and overwrite it on the theme root folder to replace the one you've modified.

    باز هم همون مشکل رو داره

  13. تعداد تشکر ها از 1oveless به دلیل پست مفید


  14. #7
    عضو جدید
    تاریخ عضویت
    Dec 2011
    نوشته ها
    51
    تشکر تشکر کرده 
    14
    تشکر تشکر شده 
    55
    تشکر شده در
    42 پست

    پیش فرض پاسخ : پاک کردن لینک فوتر کد شده [مشکل]

    footer رو بدین

  15. تعداد تشکر ها از H2A به دلیل پست مفید


  16. #8
    عضو انجمن
    تاریخ عضویت
    Dec 2010
    نوشته ها
    292
    تشکر تشکر کرده 
    224
    تشکر تشکر شده 
    396
    تشکر شده در
    316 پست

    پیش فرض پاسخ : پاک کردن لینک فوتر کد شده [مشکل]

    کد:
    http://mj-dl.info/files/footer.rar
    این هم فوتر

  17. تعداد تشکر ها از 1oveless به دلیل پست مفید


  18. #9
    عضو جدید
    تاریخ عضویت
    Dec 2011
    نوشته ها
    51
    تشکر تشکر کرده 
    14
    تشکر تشکر شده 
    55
    تشکر شده در
    42 پست

    پیش فرض پاسخ : پاک کردن لینک فوتر کد شده [مشکل]

    این باس روش کار بشه تا بشه نال کرد
    حالا اینقدم شاخ نیست ولی بازم فرصت کنم درستش میکنم

  19. تعداد تشکر ها ازH2A به دلیل پست مفید


  20. #10
    عضو انجمن
    تاریخ عضویت
    Dec 2010
    نوشته ها
    292
    تشکر تشکر کرده 
    224
    تشکر تشکر شده 
    396
    تشکر شده در
    316 پست

    پیش فرض پاسخ : پاک کردن لینک فوتر کد شده [مشکل]

    نقل قول نوشته اصلی توسط H2A نمایش پست ها
    این باس روش کار بشه تا بشه نال کرد
    حالا اینقدم شاخ نیست ولی بازم فرصت کنم درستش میکنم
    دستت مرسی‌، چشم انتظاریم :دی

  21. تعداد تشکر ها از 1oveless به دلیل پست مفید


صفحه 1 از 2 12 آخرینآخرین

اطلاعات موضوع

کاربرانی که در حال مشاهده این موضوع هستند

در حال حاضر 1 کاربر در حال مشاهده این موضوع است. (0 کاربران و 1 مهمان ها)

موضوعات مشابه

  1. چرا روتر ؟ و کی استفاده کنیم از روتر بر سرور ؟
    توسط acc1374 در انجمن سوالات و مشکلات
    پاسخ ها: 7
    آخرين نوشته: July 8th, 2016, 13:17
  2. اسکریپت پیش بینی مسابقات فوتبال قانونی +نتایج زنده+آنالیز فوتبال
    توسط mehrad2 در انجمن درخواست انواع اسکریپت،سیستم عامل،نرم افزار و ..
    پاسخ ها: 0
    آخرين نوشته: September 5th, 2015, 17:37
  3. پاسخ ها: 2
    آخرين نوشته: December 23rd, 2013, 20:44
  4. میشه فوتر در یک فایل جداگانه باشه ؟
    توسط ahmadjafarian در انجمن HTML-XHTML
    پاسخ ها: 13
    آخرين نوشته: June 13th, 2013, 13:18
  5. پاسخ ها: 6
    آخرين نوشته: June 2nd, 2010, 12:38

مجوز های ارسال و ویرایش

  • شما نمیتوانید موضوع جدیدی ارسال کنید
  • شما امکان ارسال پاسخ را ندارید
  • شما نمیتوانید فایل پیوست کنید.
  • شما نمیتوانید پست های خود را ویرایش کنید
  •