رفتن به مطلب

WeaB

عضو سایت
  • تعداد ارسال‌ها

    127
  • تاریخ عضویت

  • آخرین بازدید

نوشته‌ها ارسال شده توسط WeaB

  1. با سلام

     

    میخواستم دوستان بهم کمک کنند تا در این کد که برخی سایتها که نمیخوام نمایش داده بشن رو فیلتر کنم و جلوی نمایششون رو مثلا با گذاشتن ایدی سایت بگیرم

    <?php
    $blogs = get_last_updated("",0,15);
    if( is_array( $blogs ) ) {
    	?>
    	
    	<?php foreach( $blogs as $details ) {
    		?><li><a href="http://<?php echo $details[ 'domain' ] . $details[ 'path' ] ?>"target="_blank"> <?php echo get_blog_option( 
    
    $details[ 'blog_id' ], 'blogname' ) ?></a></li><?php
    	}
    	?>
    	
    	<?php
    }
    ?>

    البته ماین رو میدونم که اگر تیک عدم معرفی به موتورهای جستجو رو بزنم یگه تو این کد نمایش داده نمیشن ولی من نمیخوام که همچین کاری بکنم و فقط میخوام که اینجا فیلتر بشن

     

    ممنون میشم تشکر

     

     

  2. در 4 ساعت قبل، Morteza گفته است :

    سلام

    دلیلش این هست که خیلی از دوستان دیگه همکاری نمی کنن و بیشتر فقط جواب میخوان :)

     

    نمایش کل پست ها:

    
    $count_posts = wp_count_posts();
    echo $count_posts->publish;

     

    نمایش کل دیدگاه ها:

    
    $comments_count = wp_count_comments();
    echo $comments_count->approved;

     

    نمایش آخرین نوشته ها:

    
    <?php
        $blogs = get_last_updated();
        foreach ($blogs as $blog) {
            switch_to_blog($blog["blog_id"]);
            $lastposts = get_posts('numberposts=1');
                    foreach($lastposts as $post) :
                    setup_postdata($post);
            ?>
                    <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
            <?php
                    endforeach;
            restore_current_blog();
            }
    ?>

     

    من برای تمام شبکه میخواستم تا ببینم چند مطلب یا دیدگاه در کل شبکه منتظر میشه با این ها هم نشد بازم تشکر

  3. سلام

     

    این قالبی که الان دارید استفاده می کنید قالبی هست که من منتشر کردم و الان ایراداتی دیدم تو سایت و قالب تون اگه مایل بودید قالب سالم رو بهتون بدم البته همونی هم که تو اینترنت هست سالم هستش فقط کد ثبت نامش رو باید عوض بکنید و کد ثبت نام خود وردپرس بذارید تا بی مشکل بیاد بالا

  4. سلام من وردپرس شبکه دارم و وقتی قالب ریمال رو نصب میکنم خودم میتونم به تنظیمات قالب دسترسی داشته باشم ولی کاربرانم نمیتونن

    و به کاربر میگه

    شما مجوز کافی برای دسترسی به‌این صفحه را ندارید.

    ایا کدی چیزی هست که جلوش رو میگیره یا ؟

    تشکر

    این فانکشن

    functions.php

  5. افزونه مطالب اخیر شبکه Recent Network posts

    یا

    Network Latest Posts

    یا

    WP Recent Network Posts

    و یا

    https://premium.wpmudev.org/project/recent-posts/

    این افزونه ها به شما این امکان رو میدهد که آخرین مطالب منتشر شده در وبلاگ های شبکه تان را در سایت اصلی تان منتشر کنید. شما همچنین میتوانید تعداد پست ها، سایز آواتار و تعداد کاراکتر های قابل نمایش رو تعیین کنید.

    زیادن فقط انگلیسی جستجو کن

    یا علی

    post-352-0-86539300-1414578691_thumb.png

    • امتیاز 1
  6. سلام منظورتون کدوم بخش از اسپم ها هستش اگه منظورتون وبلاگهای اسپمی که ساخته میشه

    لینک زیر رو مطالعه و افزونه اش رو نصب کنید.

    http://forum.wp-parsi.com/tutorials/article/574-%D8%AC%D9%84%D9%88%DA%AF%DB%8C%D8%B1%DB%8C-%D8%A7%D8%B2-%D8%B3%D8%A7%DB%8C%D8%AA-%D9%87%D8%A7%DB%8C-%D8%A7%D8%B3%D9%BE%D9%85-%D8%AF%D8%B1-%D9%88%D8%B1%D8%AF%D9%BE%D8%B1%D8%B3-%D8%B4%D8%A8%DA%A9%D9%87/

    یا علی

    • امتیاز 2
  7. سلام

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

    هرکاری کردم متوجه اشکالش نشدم

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

    و سایتهایی که تازه درست شدن تو سیستم این مشکل رو ندارند

    صفحه با پس زمینه

    http://upload7.ir/imgs/2014-04/14382852537574421895.png

    پیشخوان

    http://upload7.ir/imgs/2014-04/80295092326130621011.png

    فانکشن قالب :


    <?php
    if ( function_exists('register_sidebar') )
    register_sidebar(array(
    'name' => 'سایدبار یک',
    'description' => 'سایدبار یک در آرشیو و برگه قرار می گیرد',
    'before_widget' => '<div class="one-fourth last"><div class="nav-top"></div>',
    'after_widget' => '</li></ul><div class="nav-bottom"></div></div>',
    'before_title' => '<h2 class="sidebar-title">',
    'after_title' => '             </h2><ul class="content-navigation"><li>',
    ));
    if ( function_exists('register_sidebar') )
    register_sidebar(array(
    'name' => 'سایدبار دو',
    'description' => 'سایدبار دو که فقط در تک نوشته قرار می گیرد',
    'before_widget' => '<div class="one-fourth last"><div class="nav-top"></div>',
    'after_widget' => '</li></ul><div class="nav-bottom"></div></div>',
    'before_title' => '<h2 class="sidebar-title">',
    'after_title' => '             </h2><ul class="content-navigation"><li>',
    ));

    if ( function_exists( 'add_them
    e_support' ) ) { // Added in 2.9
    add_theme_support( 'post-thumbnails' );
    }
    // Widgett Sidebar
    add_filter( 'wp_title', 'filter_wp_title' );
    /**
    * Filters the page title appropriately depending on the current page
    *
    * This function is attached to the 'wp_title' fiilter hook.
    *
    * @uses get_bloginfo()
    * @uses is_home()
    * @uses is_front_page()
    */
    function filter_wp_title( $title ) {
    global $page, $paged;
    if ( is_feed() )
    return $title;
    $site_description = get_bloginfo( 'description' );
    $filtered_title = $title . get_bloginfo( 'name' );
    $filtered_title .= ( ! empty( $site_description ) && ( is_home() || is_front_page() ) ) ? ' | ' . $site_description: '';
    $filtered_title .= ( 2 <= $paged || 2 <= $page ) ? ' | ' . sprintf( __( 'Page %s' ), max( $paged, $page ) ) : '';
    return $filtered_title;
    }
    // Themes Settings
    // Actions
    add_action('admin_menu', 'qoraniha_menu');
    add_action( 'admin_init', 'qoraniha_register');
    // Adding Menu
    function qoraniha_menu() {
    add_theme_page('تنظيمات قالب', 'تنظيمات قالب', 'manage_options', 'qoraniha', 'qoraniha_options');
    }
    function qoraniha_options() {
    if (!current_user_can('manage_options')) {
    wp_die('شما مجوز کافی برای مشاهده این برگه را ندارید.');
    } ?>
    <div class="wrap">
    <h2>تنظيمات قالب</h2>
    <form method="post" action="options.php">
    <?php settings_fields('qoraniha_settings'); ?>
    <h3>بخش آخرین خبرهای سایت</h3>
    <select name="bllog_news">
    <option value="">انتخاب يک دسته بندي</option>
    <?php
    $args=array(
    'hide_empty' => 0,
    'order' => 'ASC'
    );
    $categories= get_categories($args);
    $slide= get_option('bllog_news');
    foreach ($categories as $category) {
    if($slide == $category->cat_ID){ $select='selected="selected"';}else{$select="";}
    $option = '<option value="'.$category->cat_ID.'"'. $select .'>';
    $option .= $category->cat_name;
    $option .= ' ('.$category->category_count.')';
    $option .= '</option>';
    echo $option;
    }
    ?>
    </select>
    <h3>بخش دیدگاههای کابران</h3>
    <select name="bllog_userpoints">
    <option value="">انتخاب يک دسته بندي</option>
    <?php
    $args=array(
    'hide_empty' => 0,
    'order' => 'ASC'
    );
    $categories= get_categories($args);
    $slide= get_option('bllog_userpoints');
    foreach ($categories as $category) {
    if($slide == $category->cat_ID){ $select='selected="selected"';}else{$select="";}
    $option = '<option value="'.$category->cat_ID.'"'. $select .'>';
    $option .= $category->cat_name;
    $option .= ' ('.$category->category_count.')';
    $option .= '</option>';
    echo $option;
    }
    ?>
    </select>
    <h3>بخش با آسمانیان</h3>
    <select name="bllog_asemanian">
    <option value="">انتخاب يک دسته بندي</option>
    <?php
    $args=array(
    'hide_empty' => 0,
    'order' => 'ASC'
    );
    $categories= get_categories($args);
    $slide= get_option('bllog_asemanian');
    foreach ($categories as $category) {
    if($slide == $category->cat_ID){ $select='selected="selected"';}else{$select="";}
    $option = '<option value="'.$category->cat_ID.'"'. $select .'>';
    $option .= $category->cat_name;
    $option .= ' ('.$category->category_count.')';
    $option .= '</option>';
    echo $option;
    }
    ?>
    </select>

    <h3>بخش آسمانی آینده</h3>
    <select name="bllog_asemani">
    <option value="">انتخاب يک دسته بندي</option>
    <?php
    $args=array(
    'hide_empty' => 0,
    'order' => 'ASC'
    );
    $categories= get_categories($args);
    $slide= get_option('bllog_asemani');
    foreach ($categories as $category) {
    if($slide == $category->cat_ID){ $select='selected="selected"';}else{$select="";}
    $option = '<option value="'.$category->cat_ID.'"'. $select .'>';
    $option .= $category->cat_name;
    $option .= ' ('.$category->category_count.')';
    $option .= '</option>';
    echo $option;
    }
    ?>
    </select>

    <p class="submit">
    <input type="submit" class="button-primary" value="ذخیره‌ی تغییرات" />
    </p>
    </form>
    </div>
    <?php }
    //Register our settings
    function qoraniha_register() {
    register_setting('qoraniha_settings', 'bllog_news');
    register_setting('qoraniha_settings', 'bllog_userpoints');
    register_setting('qoraniha_settings', 'bllog_asemanian');
    register_setting('qoraniha_settings', 'bllog_asemani');
    }
    function wpe_excerptlength_teaser( $length ) {

    return 48;
    }
    function wpe_excerptlength_asemanian( $length ) {

    return 240;
    }
    function wpe_excerptlength_asemani( $length ) {

    return 40;
    }
    function wpe_excerptlength_index( $length ) {

    return 22;
    }
    function wpe_excerptmore( $more ) {

    return '...';
    }
    function wpe_excerpt( $length_callback = '', $more_callback = '' ) {

    if ( function_exists( $length_callback ) )
    add_filter( 'excerpt_length', $length_callback );

    if ( function_exists( $more_callback ) )
    add_filter( 'excerpt_more', $more_callback );

    $output = get_the_excerpt();
    $output = apply_filters( 'wptexturize', $output );
    $output = apply_filters( 'convert_chars', $output );
    $output = '<p>' . $output . '</p>'; // maybe wpautop( $foo, $br )
    echo $output;
    }
    function dimox_breadcrumbs() {
    $delimiter = '»';
    $home = 'صفحه اصلی'; // text for the 'Home' link
    $before = '<span>'; // tag before the current crumb
    $after = '</span>'; // tag after the current crumb
    if ( !is_home() && !is_front_page() || is_paged() ) {
    echo '<div id="crumbs">';
    global $post;
    $homeLink = get_bloginfo('url');
    echo '<a href="' . $homeLink . '">' . $home . '</a> ' . $delimiter . ' ';
    if ( is_category() ) {
    global $wp_query;
    $cat_obj = $wp_query->get_queried_object();
    $thisCat = $cat_obj->term_id;
    $thisCat = get_category($thisCat);
    $parentCat = get_category($thisCat->parent);
    if ($thisCat->parent != 0) echo(get_category_parents($parentCat, TRUE, ' ' . $delimiter . ' '));
    echo $before . 'Archive by category "' . single_cat_title('', false) . '"' . $after;
    } elseif ( is_day() ) {
    echo '<a href="' . get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a> ' . $delimiter . ' ';
    echo '<a href="' . get_month_link(get_the_time('Y'),get_the_time('m')) . '">' . get_the_time('F') . '</a> ' . $delimiter . ' ';
    echo $before . get_the_time('d') . $after;
    } elseif ( is_month() ) {
    echo '<a href="' . get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a> ' . $delimiter . ' ';
    echo $before . get_the_time('F') . $after;
    } elseif ( is_year() ) {
    echo $before . get_the_time('Y') . $after;
    } elseif ( is_single() && !is_attachment() ) {
    if ( get_post_type() != 'post' ) {
    $post_type = get_post_type_object(get_post_type());
    $slug = $post_type->rewrite;
    echo '<a href="' . $homeLink . '/' . $slug['slug'] . '/">' . $post_type->labels->singular_name . '</a> ' . $delimiter . ' ';
    echo $before . get_the_title() . $after;
    } else {
    $cat = get_the_category(); $cat = $cat[0];
    echo get_category_parents($cat, TRUE, ' ' . $delimiter . ' ');
    echo $before . get_the_title() . $after;
    }
    } elseif ( !is_single() && !is_page() && get_post_type() != 'post' ) {
    $post_type = get_post_type_object(get_post_type());
    echo $before . $post_type->labels->singular_name . $after;
    } elseif ( is_attachment() ) {
    $parent = get_post($post->post_parent);
    $cat = get_the_category($parent->ID); $cat = $cat[0];
    echo get_category_parents($cat, TRUE, ' ' . $delimiter . ' ');
    echo '<a href="' . get_permalink($parent) . '">' . $parent->post_title . '</a> ' . $delimiter . ' ';
    echo $before . get_the_title() . $after;
    } elseif ( is_page() && !$post->post_parent ) {
    echo $before . get_the_title() . $after;
    } elseif ( is_page() && $post->post_parent ) {
    $parent_id = $post->post_parent;
    $breadcrumbs = array();
    while ($parent_id) {
    $page = get_page($parent_id);
    $breadcrumbs[] = '<a href="' . get_permalink($page->ID) . '">' . get_the_title($page->ID) . '</a>';
    $parent_id = $page->post_parent;
    }
    $breadcrumbs = array_reverse($breadcrumbs);
    foreach ($breadcrumbs as $crumb) echo $crumb . ' ' . $delimiter . ' ';
    echo $before . get_the_title() . $after;
    } elseif ( is_search() ) {
    echo $before . 'Search results for "' . get_search_query() . '"' . $after;
    } elseif ( is_tag() ) {
    echo $before . 'Posts tagged "' . single_tag_title('', false) . '"' . $after;
    } elseif ( is_author() ) {
    global $author;
    $userdata = get_userdata($author);
    echo $before . 'Articles posted by ' . $userdata->display_name . $after;
    } elseif ( is_404() ) {
    echo $before . 'Error 404' . $after;
    }
    if ( get_query_var('paged') ) {
    if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) echo ' (';
    echo __('Page') . ' ' . get_query_var('paged');
    if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) echo ')';
    }
    echo '</div>';
    }
    }
    function mytheme_comment($comment, $args, $depth) {
    $GLOBALS['comment'] = $comment; ?>
    <li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>">
    <div id="comment-<?php comment_ID(); ?>">
    <div class="comment-author vcard">
    <?php echo get_avatar($comment,$size='48',$default='<path_to_url>' ); ?>

    <?php printf(__('<cite class="fn">%s</cite> <span class="says">says:</span>'), get_comment_author_link()) ?>
    </div>
    <?php if ($comment->comment_approved == '0') : ?>
    <em><?php _e('Your comment is awaiting moderation.') ?></em>
    <br />
    <?php endif; ?>

    <div class="comment-meta commentmetadata">
    <a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>">
    <?php printf(__('%1$s at %2$s'), get_comment_date(), get_comment_time()) ?>
    </a>
    <?php edit_comment_link(__('(Edit)'),' ','') ?>
    </div>

    <?php comment_text() ?>

    <div class="reply">
    <?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>
    </div>
    </div>
    <?php
    }
    ?>

    • امتیاز 1
  8. سلام

    پارسی ساز رو جایگزین وردپرس فارسی کردم در مرحله نخست و نسخه 1.0 مشکلی نیود ولی با بروزرسانی به نسخه 1.1 مشکل جدی واسه سایت پیش میاره و تمام برگه و عکس ها و ... رو بعنوان پیش نویس خیره میکنه و بطور خودکار هر نیم ساعت یه پیش نویس اضافه میکنه به سایت

    لطفا بررسی کنید با پاک کردنش مشکلم حل شد

    جایی که نوشته

    به‌تازگی منتشرشده

    بالاش یه چیز دیگه میارود در اینده منتشر خواهند شد

    مشکلش برای من دردسر اورد بقیه رو نمیدونم

    برای من هم مشکل بالا (تصاویر و رسانه )پیش اومده بود ولی الان با برگشت به نسخه قبل درست شده

    تشکر

    • امتیاز 3
  9. بله تاثیر دارند که باعث بزرگ شدن دیتابیس میشوند و هر وبلاگ بیاد و ساخته بشه چندین تیبل ساخته میشه اگه کاربر بیاد و افزونه و چیزهای دیگه رو هم تست کنه نیبل های بیشتری ساخته میشه و بعضی اوقات هم بازدید اگه بهش بخوره که باعث استفاده پهنای باند رم و ...

    دیگه میشه

    سعی کنید هر یکماه یکبار وبلاگ های الکی رو پاک کنید

    • امتیاز 2
×
×
  • اضافه کردن...