Home 게시판 커뮤니티 Q&A 플러그인 구동시 한글 깨짐 ㅜㅜ

2개 답변, 0 voices Last updated by 익명 18 years, 2 months 전
  • 익명
    손님
    @
    #828

    플러그인을 설치하지 않고,
    index.php에 관련 코드를 삽입하고, 코드를 좀 조절해 주니 해결이 되었습니다.
    아래는 해당 내용입니다.
    1. site admin->Presentation->Theme Editor->Main Index Template(: index.php)
    의 49줄의 다음과 같은 문맥
    <?php edit_post_link(‘Edit’,”,'<strong>|</strong>’); ?>
    <?php comments_popup_link(‘No Comments’, ‘1 Comment’, ‘% Comments’); ?>
    밑에 다음을 추가합니다.

    <?php
    global $wpdb, $tablecomments, $post;
    $comments = $wpdb->get_results(“SELECT * FROM $tablecomments WHERE comment_post_ID = ‘$post->ID’ AND comment_content NOT LIKE ‘%<trackback />%’ AND comment_content NOT LIKE ‘%<pingback />%’ AND comment_approved = ‘1’”);
    include(TEMPLATEPATH . ‘/comments_main.php’); // Display comments
    ?>

    2. site admin->Presentation->Theme Editor->style.php
    의 235 줄의 .center-widget-title {…}
    설정 이후에 다음을 추가합니다.
    .center-widget-title-main {
    color:<?php tiga_widgetTitleFontColor(CENTER); ?>;
    background-color:<?php tiga_widgetTitleBgColor(CENTER); ?>;
    border-color:<?php tiga_widgetBorderColor(CENTER); ?>;
    margin-left: 0 px;
    margin-right: 0 px;
    border-width:1px 1px 0px 1px;
    border-style:solid;
    font-size:9pt;
    font-weight: bold;
    padding:5px;
    }

    .center-widget-main {
    border-color:<?php tiga_widgetBorderColor(CENTER); ?>;
    margin-left: 0 px;
    margin-right: 0 px;
    color:#000000;
    background-color:#FFFFFF;
    border-width: 1px;
    border-style:solid;
    padding:1em;
    margin-bottom:5px;
    font-size:10pt;
    }
    3. 콘솔모드에서 다음 파일을 생성(: /WEDI1/blog.ebiz/wordpress/wp-content/themes/tiga>comments_main.php)
    <?php // Do not delete these lines
    if (‘comments.php’ == basename($_SERVER[‘SCRIPT_FILENAME’]))
    die (‘Please do not load this page directly. Thanks!’);

    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
    ?>

    <p class=”nocomments”>This post is password protected. Enter the password to view comments.<p>

    <?php
    return;
    }
    }

    /* This variable is for alternating comment background */
    $oddcomment = ‘alt’;
    ?>

    <!– You can start editing here. –>
    <?php if ($comments) : ?>

    <div class=”center-widget-title-main”><?php comments_number(‘No Responses’, ‘One Response’,

    ‘% Responses’); ?> </div>
    <div class=”center-widget-main”>
    <div class=”comment-list”>
    <?php
    $comment_num = 1;
    foreach ($comments as $comment) :
    ?>
    <div class=”<?php if ($oddcomment) echo “odd-comment”; else echo “even-comment”; ?>” id=”comment-<?php comment_ID() ?>”>
    <div class=”comment-header”>
    <div class=”clearfix”>
    <!– gravatar plugin – http://www.gravatar.com/plugins/wp_gravatar.zip –>
    <?php if (function_exists(‘gravatar’)) { ?>
    <a target=”_blank” href=”http://www.gravatar.com&#8221; title=”Add your own user icon”>
    <img class=”gravatar” src=”<?php gravatar(‘G’, 36, get_bloginfo(‘template_url’). ‘/images/anon.jpg’); ?>” alt=”” height=”36″ width=”36″/>
    </a>
    <?php } ?>
    <!– gravatar plugin – end –>
    <div class=”comment-meta”>
    <cite><?php comment_author_link() ?></cite> says:
    <?php if ($comment->comment_approved == ‘0’) : ?>
    <em>Your comment is awaiting moderation.</em>
    <?php endif; ?>

    <span class=”comment-date”>
    <?php comment_date(‘`y m/j’) ?> at <?php comment_time() ?>
    </span> <!– comment-date –>

    <span class=”comment-edit-link”>
    <?php edit_comment_link(‘edit’,”,”); ?>
    </span> <!– comment-edit-link –>
    </div> <!– comment-meta –>
    </div> <!– clear-fix –>
    </div> <!– comment-header –>
    <div class=”comment-text”><?php comment_text() ?></div>
    </div>

    <?php /* Changes every other comment to a different class */
    if (‘alt’ == $oddcomment) $oddcomment = ”;
    else $oddcomment = ‘alt’;
    ?>

    <?php
    $comment_num++;
    endforeach; /* end for each comment */
    ?>

    </div> <!– comment-list –>
    </div> <!– center-widget –>
    <?php else : // this is displayed if there are no comments so far ?>
    <?php if (‘open’ == $post->comment_status) : ?>
    <!– If comments are open, but there are no comments. –>
    <?php else : // comments are closed ?>
    <!– If comments are closed. –>
    <?php endif; ?>
    <?php endif; ?>
    <?php if (‘open’ == $post->comment_status) : ?>
    <?php endif; // if you delete this the sky will fall on your head ?>

    익명
    손님
    @
    #829

    main list에서 comment가 보이게 하기 위해
    MW Comments/Trackbacks 1.0.1 라는 플러그인을 설치하니
    이전에는 잘 보이던 한글이 갑자기 깨집니다.(영어는 보임)

    플러그인의 코드는
    <?php
    /*
    Plugin Name: MW Comments/Trackbacks
    Plugin URI: http://www.meyerweb.com/eric/tools/wordpress/mw_comments_trackbacks.html
    Description: This plugin contains two functions. The first, <code>mw_comments</code>, returns the comments for a given post, or else a count of how many there are, depending on the parameter you pass it. The second function, <code>mw_trackbacks</code>, does the same for trackbacks and pingbacks. The counting capability makes it easy to do MT-style comment/trackback counts on a post (i.e., “C:1 T:3”).
    Version: 1.0.1
    Date: 24 July 2004
    Author: Eric A. Meyer
    Author URI: http://meyerweb.com/
    */

    /*
    Version history:
    1.0.1 (24 July 2004)
    – Added ‘comment_approved’ check to prevent unapproved comments from being counted/returned.
    1.0 (10 May 2004)
    – Initial release.
    */

    function mw_comments($param = ”) {
    global $wpdb, $tablecomments, $post;
    $comments = $wpdb->get_results(“SELECT * FROM $tablecomments WHERE comment_post_ID = ‘$post->ID’ AND comment_content NOT LIKE ‘%<trackback />%’ AND comment_content NOT LIKE ‘%<pingback />%’ AND comment_approved = ‘1’”);
    if (‘count’ == $param) {
    echo count($comments);
    } else {
    return $comments;
    }
    }

    function mw_trackbacks($param = ”) {
    global $wpdb, $tablecomments;
    $trackbacks = $wpdb->get_results(“SELECT * FROM $tablecomments WHERE comment_content LIKE (‘%<trackback />%’) AND comment_approved = ‘1’”);
    if (‘count’ == $param) {
    echo count($trackbacks);
    } else {
    return $trackbacks;
    }
    }
    ?>

    이고요

    테마의 index.php에는
    <?php
    $comments = mw_comments();
    include(TEMPLATEPATH . ‘/comments.php’); // Display comments
    ?>
    를 추가했습니다.

    현재 저의 상태는
    wordpress 2.0
    mysql 4.1
    테마 tiga
    입니다.

    간단히 해결될 듯 하면서도 해결이 안 되네요.
    답변 부탁드립니다.

    익명
    손님
    @
    #830

    main list에서 comment가 보이게 하기 위해
    MW Comments/Trackbacks 1.0.1 라는 플러그인을 설치하니
    이전에는 잘 보이던 한글이 갑자기 깨집니다.(영어는 보임)

    플러그인의 코드는
    <?php
    /*
    Plugin Name: MW Comments/Trackbacks
    Plugin URI: http://www.meyerweb.com/eric/tools/wordpress/mw_comments_trackbacks.html
    Description: This plugin contains two functions. The first, <code>mw_comments</code>, returns the comments for a given post, or else a count of how many there are, depending on the parameter you pass it. The second function, <code>mw_trackbacks</code>, does the same for trackbacks and pingbacks. The counting capability makes it easy to do MT-style comment/trackback counts on a post (i.e., “C:1 T:3”).
    Version: 1.0.1
    Date: 24 July 2004
    Author: Eric A. Meyer
    Author URI: http://meyerweb.com/
    */

    /*
    Version history:
    1.0.1 (24 July 2004)
    – Added ‘comment_approved’ check to prevent unapproved comments from being counted/returned.
    1.0 (10 May 2004)
    – Initial release.
    */

    function mw_comments($param = ”) {
    global $wpdb, $tablecomments, $post;
    $comments = $wpdb->get_results(“SELECT * FROM $tablecomments WHERE comment_post_ID = ‘$post->ID’ AND comment_content NOT LIKE ‘%<trackback />%’ AND comment_content NOT LIKE ‘%<pingback />%’ AND comment_approved = ‘1’”);
    if (‘count’ == $param) {
    echo count($comments);
    } else {
    return $comments;
    }
    }

    function mw_trackbacks($param = ”) {
    global $wpdb, $tablecomments;
    $trackbacks = $wpdb->get_results(“SELECT * FROM $tablecomments WHERE comment_content LIKE (‘%<trackback />%’) AND comment_approved = ‘1’”);
    if (‘count’ == $param) {
    echo count($trackbacks);
    } else {
    return $trackbacks;
    }
    }
    ?>

    이고요

    테마의 index.php에는
    <?php
    $comments = mw_comments();
    include(TEMPLATEPATH . ‘/comments.php’); // Display comments
    ?>
    를 추가했습니다.

    현재 저의 상태는
    wordpress 2.0
    mysql 4.1
    테마 tiga
    입니다.

    간단히 해결될 듯 하면서도 해결이 안 되네요.
    답변 부탁드립니다.

3 글 보임 - 1에서 3 까지 (총 3 중에서)
  • 답변은 로그인 후 가능합니다.