رفتن به مطلب

نمایش دیدگاه به صورت comment


پست های پیشنهاد شده

با سلام

بنده از افزونه parsidate استفاده می کنم نمیدونم چرا وقتی یک پست دیدگاه داره تعداد دیدگاه رو به صورت انگلیسی نمایش میده مثلا comment 1

همچنین کنار نام نویسنده می نویسه by ممنون میشم اگر راهنمائیم کنید

لینک به ارسال

سلام

دوست عزیز انجمن سرکاری نیست

شما سوال قبلیتون رودر بخش آزاد پرسیدید در صورتیکه سوال شما باید در بخش مربوط به وردپرس پرسیده میشد. برای همین شاید دوستانی که به بخشهای وردپرس جواب میدن اونجا ندیده باشن.

در مورد این سوالتون

شما پوسته اختصاصی دارید؟ و اینکه بعد از نصب افزونه، در فایل کانفیگ وردپرس fa_IR رو ست کردید؟

لینک به ارسال

رفتم نگاه کردم فایل کانفیگ روی fa_IR رو ست شده لطفا راهنمائی کنید (اگر این طوری نبود که زبان کل سایت انگلیسی میشد که :huh: )

لینک به ارسال

این محتوای فایله comments.php هستش

<?php

/**

* The template for displaying Comments.

*

* The area of the page that contains both current comments

* and the comment form. The actual display of comments is

* handled by a callback to graphene_comment which is

* located in the functions.php file.

*

* @package Graphene

* @since Graphene 1.0

*/

global $graphene_settings;

?>

<?php

/* Only show comments depending on the theme setting */

if ( ! graphene_should_show_comments() ) :

return;

endif;

?>

<?php if ( post_password_required() && ( comments_open() || have_comments() ) ) : ?>

<div id="comments">

<p class="nopassword message-block notice_block"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'graphene' ); ?></p>

<?php do_action( 'graphene_protected_comment' ); ?>

</div><!-- #comments -->

<?php

/* Stop the rest of comments.php from being processed,

* but don't kill the script entirely -- we still have

* to fully load the template.

*/

return;

endif;

?>

<?php do_action( 'graphene_before_comment_template' ); ?>

<?php /* Lists all the comments for the current post */ ?>

<?php if ( have_comments() ) : ?>

<?php /* Get the comments and pings count */

global $graphene_tabbed_comment;

$comments_num = graphene_get_comment_count();

// to also show comments awaiting approval

$allcomments_num = graphene_get_comment_count( 'comments', false );

$pings_num = graphene_get_comment_count( 'pings' );

if ( $comments_num )

$comment_count = sprintf( _n( '%s comment', '%s comments', $comments_num, 'graphene' ), number_format_i18n( $comments_num ) );

if ( $pings_num )

$ping_count = sprintf( _n( '%s ping', '%s pings', $pings_num, 'graphene' ), number_format_i18n( $pings_num ) );

$graphene_tabbed_comment = ( $comments_num && $pings_num ) ? true : false;

$class = 'clearfix';

if ( ! $comments_num ) $class .= ' no-comment';

if ( ! $pings_num ) $class .= ' no-ping';

global $is_paginated;

$is_paginated = get_option( 'page_comments' );

?>

<div id="comments" class="<?php echo $class; ?>">

<?php if ( $comments_num ) : ?>

<h4 class="comments current"><?php if ($graphene_tabbed_comment) {echo '<a href="#">'.$comment_count.'</a>';} else {echo $comment_count;}?></h4>

<?php endif; ?>

<?php if ( $pings_num ) : ?>

<h4 class="pings"><?php if ($graphene_tabbed_comment) {echo '<a href="#">'.$ping_count.'</a>';} else {echo $ping_count;}?></h4>

<?php endif; ?>

<?php if ( ( ( $is_paginated && get_option( 'comments_per_page' ) > 3 ) || ! $is_paginated ) && ( $comments_num > 3 || $pings_num > 6 ) ) : ?>

<p class="comment-form-jump"><a href="#respond"><?php _e( 'Skip to comment form', 'graphene' ); ?></a> ↓</p>

<?php endif; ?>

<?php do_action( 'graphene_before_comments' ); ?>

<?php if ( $comments_num || $allcomments_num ) : ?>

<div class="comments-list-wrapper">

<ol class="clearfix" id="comments_list">

<?php

/* Loop through and list the comments. Tell wp_list_comments()

* to use graphene_comment() to format the comments.

* If you want to overload this in a child theme then you can

* define graphene_comment() and that will be used instead.

* See graphene_comment() in functions.php for more.

*/

$args = array( 'callback' => 'graphene_comment', 'style' => 'ol', 'type' => 'comment' );

wp_list_comments( apply_filters( 'graphene_comments_list_args', $args ) ); ?>

</ol>

<?php graphene_comments_nav(); ?>

</div>

<?php endif; ?>

<?php if ( $pings_num ) : ?>

<ol class="clearfix<?php if (!$comments_num) echo ' display-block'; ?>" id="pings_list">

<?php

/* Loop through and list the pings. Use the same callback function as

* listing comments above, graphene_comment() to format the pings.

*/

$args = array( 'callback' => 'graphene_comment', 'style' => 'ol', 'type' => 'pings', 'per_page' => 0 );

wp_list_comments( apply_filters( 'graphene_pings_list_args', $args ) ); ?>

</ol>

<?php endif; ?>

<?php do_action( 'graphene_after_comments' ); ?>

</div>

<?php endif; // Ends the comment listing ?>

<?php /* Display comments disabled message if there's already comments, but commenting is disabled */ ?>

<?php if ( ! comments_open() && have_comments() ) : ?>

<div id="respond">

<h3 id="reply-title"><?php _e( 'Comments have been disabled.', 'graphene' ); ?></h3>

<?php do_action( 'graphene_comments_disabled' ); ?>

</div>

<?php endif; ?>

<?php /* Display the comment form if comment is open */ ?>

<?php if ( comments_open() ) : ?>

<div id="comment-form-wrap" class="clearfix">

<?php do_action( 'graphene_before_commentform' );

/* Get the comment form. */

$allowedtags = '';

if ( ! $graphene_settings['hide_allowedtags'] ){

$allowedtags .= '<p class="form-allowed-tags">';

$allowedtags .= sprintf( __( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: %s', 'graphene' ), '<code>' . allowed_tags() . '</code>' );

$allowedtags .= '</p>';

}

$args = array(

'comment_notes_after' => apply_filters( 'graphene_comment_allowedtags', $allowedtags ),

'id_form' => 'commentform',

'label_submit' => __( 'Submit Comment', 'graphene' ),

);

comment_form( apply_filters( 'graphene_comment_form_args', $args ) );

do_action( 'graphene_after_commentform' ); ?>

</div>

<?php endif; // Ends the comment status ?>

ویرایش شده توسط Morteza
لینک به ارسال

روش اصلاح اصولی:

1. پوشه ی قالب را دانلود کنید روی سیستمتون

2. نرم افزار poedit را دانلود و نصب کنید

3. فایل زبان قالب (fa_IR.po) را در نرم افزار باز کنید

4. کلیدهای alt و enter را با هم بگیرید

5. در پنجره باز شده به شاخه source paths رفته و نشانی پوشه ی قالب را روی سیستم خودتان در فیلد بالا وارد کنید و همینطور در لاین اول زیر فیلد (مانند تصویر) post-336-0-04120600-1407404198_thumb.jpg

6. به تب sources keyword برید و آندرلاین n را به مقادیر آن اضافه کنید مانند تصویر

post-336-0-89130900-1407404328_thumb.jpg

7. بر روی ok کلیک کنید و در پنجره اصلی برنامه روی آیکون update بزنید و منتظر شید تا بخش های انگلیسی مورد نظر را پیدا کنه و در نهایت ترجمه هر عبارت را در کادری که زیر آن عبارت قابل نوشتن است وارد کنید

8. بعد از ذخیره سازی فایل fa_IR.po از پوشه زبان قالب دو فایل fa_IR.po و fa_IR.mo را به پوشه مشابه در قالب روی هاست منتقل کنید

روش ساده:

فایل نظرات را در یک ویرایشگر متنی مثل notepade.exe باز کنید

این کدها را جایگزین کنید

<?php

/**

* The template for displaying Comments.

*

* The area of the page that contains both current comments

* and the comment form. The actual display of comments is

* handled by a callback to graphene_comment which is

* located in the functions.php file.

*

* @package Graphene

* @since Graphene 1.0

*/

global $graphene_settings;

?>

<?php

/* Only show comments depending on the theme setting */

if ( ! graphene_should_show_comments() ) :

return;

endif;

?>

<?php if ( post_password_required() && ( comments_open() || have_comments() ) ) : ?>

<div id="comments">

<p class="nopassword message-block notice_block"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'graphene' ); ?></p>

<?php do_action( 'graphene_protected_comment' ); ?>

</div><!-- #comments -->

<?php

/* Stop the rest of comments.php from being processed,

* but don't kill the script entirely -- we still have

* to fully load the template.

*/

return;

endif;

?>

<?php do_action( 'graphene_before_comment_template' ); ?>

<?php /* Lists all the comments for the current post */ ?>

<?php if ( have_comments() ) : ?>

<?php /* Get the comments and pings count */

global $graphene_tabbed_comment;

$comments_num = graphene_get_comment_count();

// to also show comments awaiting approval

$allcomments_num = graphene_get_comment_count( 'comments', false );

$pings_num = graphene_get_comment_count( 'pings' );

if ( $comments_num )

$comment_count = sprintf( _n( '%s دیدگاه', '%s دیدگاه', $comments_num, 'graphene' ), number_format_i18n( $comments_num ) );

if ( $pings_num )

$ping_count = sprintf( _n( '%s پینگ', '%s پینگ', $pings_num, 'graphene' ), number_format_i18n( $pings_num ) );

$graphene_tabbed_comment = ( $comments_num && $pings_num ) ? true : false;

$class = 'clearfix';

if ( ! $comments_num ) $class .= ' no-comment';

if ( ! $pings_num ) $class .= ' no-ping';

global $is_paginated;

$is_paginated = get_option( 'page_comments' );

?>

<div id="comments" class="<?php echo $class; ?>">

<?php if ( $comments_num ) : ?>

<h4 class="comments current"><?php if ($graphene_tabbed_comment) {echo '<a href="#">'.$comment_count.'</a>';} else {echo $comment_count;}?></h4>

<?php endif; ?>

<?php if ( $pings_num ) : ?>

<h4 class="pings"><?php if ($graphene_tabbed_comment) {echo '<a href="#">'.$ping_count.'</a>';} else {echo $ping_count;}?></h4>

<?php endif; ?>

<?php if ( ( ( $is_paginated && get_option( 'comments_per_page' ) > 3 ) || ! $is_paginated ) && ( $comments_num > 3 || $pings_num > 6 ) ) : ?>

<p class="comment-form-jump"><a href="#respond"><?php _e( 'Skip to comment form', 'graphene' ); ?></a> ↓</p>

<?php endif; ?>

<?php do_action( 'graphene_before_comments' ); ?>

<?php if ( $comments_num || $allcomments_num ) : ?>

<div class="comments-list-wrapper">

<ol class="clearfix" id="comments_list">

<?php

/* Loop through and list the comments. Tell wp_list_comments()

* to use graphene_comment() to format the comments.

* If you want to overload this in a child theme then you can

* define graphene_comment() and that will be used instead.

* See graphene_comment() in functions.php for more.

*/

$args = array( 'callback' => 'graphene_comment', 'style' => 'ol', 'type' => 'comment' );

wp_list_comments( apply_filters( 'graphene_comments_list_args', $args ) ); ?>

</ol>

<?php graphene_comments_nav(); ?>

</div>

<?php endif; ?>

<?php if ( $pings_num ) : ?>

<ol class="clearfix<?php if (!$comments_num) echo ' display-block'; ?>" id="pings_list">

<?php

/* Loop through and list the pings. Use the same callback function as

* listing comments above, graphene_comment() to format the pings.

*/

$args = array( 'callback' => 'graphene_comment', 'style' => 'ol', 'type' => 'pings', 'per_page' => 0 );

wp_list_comments( apply_filters( 'graphene_pings_list_args', $args ) ); ?>

</ol>

<?php endif; ?>

<?php do_action( 'graphene_after_comments' ); ?>

</div>

<?php endif; // Ends the comment listing ?>

<?php /* Display comments disabled message if there's already comments, but commenting is disabled */ ?>

<?php if ( ! comments_open() && have_comments() ) : ?>

<div id="respond">

<h3 id="reply-title"><?php _e( 'Comments have been disabled.', 'graphene' ); ?></h3>

<?php do_action( 'graphene_comments_disabled' ); ?>

</div>

<?php endif; ?>

<?php /* Display the comment form if comment is open */ ?>

<?php if ( comments_open() ) : ?>

<div id="comment-form-wrap" class="clearfix">

<?php do_action( 'graphene_before_commentform' );

/* Get the comment form. */

$allowedtags = '';

if ( ! $graphene_settings['hide_allowedtags'] ){

$allowedtags .= '<p class="form-allowed-tags">';

$allowedtags .= sprintf( __( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: %s', 'graphene' ), '<code>' . allowed_tags() . '</code>' );

$allowedtags .= '</p>';

}

$args = array(

'comment_notes_after' => apply_filters( 'graphene_comment_allowedtags', $allowedtags ),

'id_form' => 'commentform',

'label_submit' => __( 'Submit Comment', 'graphene' ),

);

comment_form( apply_filters( 'graphene_comment_form_args', $args ) );

do_action( 'graphene_after_commentform' ); ?>

</div>

<?php endif; // Ends the comment status ?>

صفحه را save-as کنید و در هنگام ذخیره از زیر فیلد نام گزینه ANSI را به UTF-8 تبدیل کنید

برای تبدیل by با فارسی هم فایل functions.php را بگذارید اینجا (از ویرایشگر پیشرفته فایل را آپلود کنید)

لینک به ارسال

از راهنماییتون متشکرم بنده کد بالا رو جایگذین کردم و مشکل در خود پست ها برطرف شد ولی در صفحه اول هنوز برای نمایش تعداد نظرات از عنوان انگلیسی استفاده می کنه functions.php رو هم در پایین گذاشتم

<?php
/**
* Graphene WordPress Theme, Copyright 2010-2013 Syahir Hakim
* Graphene is distributed under the terms of the GNU GPL version 3
*
* Graphene functions and definitions
*
* @package Graphene
* @since Graphene 1.0
*/
define( 'GRAPHENE_ROOTDIR', dirname( __FILE__ ) );
define( 'GRAPHENE_ROOTURI', get_template_directory_uri() );

/**
* Before we do anything, let's get the mobile extension's init file if it exists
*/
$mobile_path = dirname( dirname( __FILE__ ) ) . '/graphene-mobile/includes/theme-plugin.php';
if ( file_exists( $mobile_path ) ) { include( $mobile_path ); }

/**
* Load the various theme files
*/
global $graphene_settings;
require( GRAPHENE_ROOTDIR . '/admin/options-init.php' ); // Theme options and admin interface setup
require( GRAPHENE_ROOTDIR . '/includes/theme-scripts.php' ); // Theme stylesheets and scripts
require( GRAPHENE_ROOTDIR . '/includes/theme-utils.php' ); // Theme utilities
require( GRAPHENE_ROOTDIR . '/includes/theme-head.php' ); // Functions for output into the HTML <head> element
require( GRAPHENE_ROOTDIR . '/includes/theme-menu.php' ); // Functions for navigation menus
require( GRAPHENE_ROOTDIR . '/includes/theme-loop.php' ); // Functions for posts/pages loops
require( GRAPHENE_ROOTDIR . '/includes/theme-comments.php' ); // Functions for comments
require( GRAPHENE_ROOTDIR . '/includes/theme-slider.php' ); // Functions for the slider
require( GRAPHENE_ROOTDIR . '/includes/theme-panes.php' ); // Functions for the homepage panes
require( GRAPHENE_ROOTDIR . '/includes/theme-plugins.php' ); // Native plugins support
require( GRAPHENE_ROOTDIR . '/includes/theme-shortcodes.php' ); // Theme shortcodes
require( GRAPHENE_ROOTDIR . '/includes/theme-webfonts.php' ); // Theme webfonts
require( GRAPHENE_ROOTDIR . '/includes/theme-compat.php' ); // For backward compatibility
require( GRAPHENE_ROOTDIR . '/includes/theme-functions.php' ); // Other functions that are not categorised above
require( GRAPHENE_ROOTDIR . '/includes/theme-setup.php' ); // Theme setup

لینک به ارسال

توی این فایل


/includes/theme-comments.php

بگردید کلمه by را پیدا کنید و جابجا کنید

برای صفحه ی اصلی هم باید فایل index.php و یا content.php ویرایش بشه به تغییرات فایل comments.php دقت کنید و باقی ویرایش ها را خودتون انجام بدید

لینک به ارسال

به گفتگو بپیوندید

هم اکنون می توانید مطلب خود را ارسال نمایید و بعداً ثبت نام کنید. اگر حساب کاربری دارید، برای ارسال با حساب کاربری خود اکنون وارد شوید .

مهمان
ارسال پاسخ به این موضوع ...

×   شما در حال چسباندن محتوایی با قالب بندی هستید.   حذف قالب بندی

  تنها استفاده از 75 اموجی مجاز می باشد.

×   لینک شما به صورت اتوماتیک جای گذاری شد.   نمایش به صورت لینک

×   محتوای قبلی شما بازگردانی شد.   پاک کردن محتوای ویرایشگر

×   شما مستقیما نمی توانید تصویر خود را قرار دهید. یا آن را اینجا بارگذاری کنید یا از یک URL قرار دهید.

×
×
  • اضافه کردن...