태그: 

5 글 보임 - 1 에서 5 까지 (총 5 중에서)
  • 글쓴이
  • #5183
    mimoon
    키 마스터

      the worldview의 경우
      loop-single-topic.php의 해당 부분을 아래와 같이 수정

      <li class="bbp-topic-freshness">
         <div class="bbp-topic-meta">
      	<?php do_action( 'bbp_theme_before_topic_freshness_author' ); ?>
      	<span class="bbp-topic-freshness-author"><?php bbp_author_link( array( 'post_id' => bbp_get_topic_last_active_id(), 'size' => 48 , 'type' => 'avatar' ) ); ?></span>
         /** 이부분의 bbp_theme_after_topic_author는 없어도 되나? **/
      	<?php do_action( 'bbp_theme_before_topic_freshness_link' ); ?>
      	<?php bbp_topic_freshness_link(); ?>
      	<?php do_action( 'bbp_theme_after_topic_freshness_link' ); ?>
          </div>
      </li>

      loop-single-forum.php는 다음과 같이 수정
      /**아바타 부분을 상단으로 올리고, p를 div로 대체**/

      <li class="bbp-forum-freshness">
          <div class="bbp-topic-meta">
      	<?php do_action( 'bbp_theme_before_topic_author' ); ?>
      	<span class="bbp-topic-freshness-author"><?php bbp_author_link( array( 'post_id' => bbp_get_forum_last_active_id(), 'size' => 48 ) ); ?></span>
      	<?php do_action( 'bbp_theme_after_topic_author' ); ?>
      	<?php do_action( 'bbp_theme_before_forum_freshness_link' ); ?>
      	<?php bbp_forum_freshness_link(); ?>
      	<?php do_action( 'bbp_theme_after_forum_freshness_link' ); ?>
         </div>
      </li>

      Mimoonchurch의 경우는
      loop-single-topic.php의 해당 부분을 아래와 같이 수정

      <li class="bbp-topic-freshness">
         <span class="bbp-topic-freshness-author-av"><?php bbp_author_link( array( 'post_id' => bbp_get_topic_last_active_id(), 'size' => 48 , 'type' => 'avatar' ) ); ?></span>
         <div class="bbp-topic-meta">
            <?php do_action( 'bbp_theme_before_topic_freshness_author' ); ?>
            <span class="bbp-topic-freshness-author"><?php printf( __('%1$s', 'bbpress' ), bbp_get_author_link( array( 'post_id' => bbp_get_topic_last_active_id(), 'size' => 14 ,  'type' => 'name' ) ) ); ?></span>
           <?php do_action( 'bbp_theme_before_topic_freshness_link' ); ?>
           <?php bbp_topic_freshness_link(); ?>
           <?php do_action( 'bbp_theme_after_topic_freshness_link' ); ?>
         </div>
      </li>

      loop-single-forum.php는 다음과 같이 수정

      <li class="bbp-forum-freshness">
          <div class="bbp-topic-meta">
            <?php do_action( 'bbp_theme_before_topic_author' ); ?>
            <span class="bbp-topic-freshness-author"><?php bbp_author_link( array( 'post_id' => bbp_get_forum_last_active_id(), 'size' => 48 ) ); ?></span>
            <?php do_action( 'bbp_theme_after_topic_author' ); ?>
            <?php do_action( 'bbp_theme_before_forum_freshness_link' ); ?>
            <?php bbp_forum_freshness_link(); ?>
            <?php do_action( 'bbp_theme_after_forum_freshness_link' ); ?>
           </div>
      </li>

      그외 css에서

      
      /* 게시판 아바타 원형*/
      img.avatar {
      -webkit-border-radius: 50%;
      -moz-border-radius: 50%;
      -ms-border-radius: 50%;
      -o-border-radius: 50%;
      border-radius: 50%;
      -webkit-box-shadow: 0 1px 0 #fff;
      -moz-box-shadow: 0 1px 0 #fff;
      box-shadow: 0 1px 0 #fff;
      }
      
      /* forum 내 freshness 수정*/
      /* freshness name-avatar 세로*/
      /* except forum description info 고려*/
      li.bbp-forum-freshness a.bbp-author-name, a.bbp-author-avatar, span.bbp-topic-freshness-author {
      	display: block;
      	margin: 0;
      	padding:0;
      }
      
      /* original writer align */
      /* 같은 공간이지만 다른 객체로 하는 기법 유념*/
      span.bbp-topic-started-by
      a.bbp-author-name, a.bbp-author-avatar {
          display: inline-block;
      }
      /* freshness font size */
      li.bbp-forum-freshness, div.bbp-topic-meta, p.bbp-topic-meta {
      line-height: 170% !important;
      font-size:12px;
      }

      Q. theworldview의 소스와 mimoonchurch의 소스가 왜 상이해야 하는가?

      #5184
      mimoon
      키 마스터

        Mimoonchurch의
        loop-single-topic.php과 같이 작성하면
        theWorldview에서는 Avatar가 두 개 뜨는 것을 유의 –
        <span class="bbp-topic-freshness-author-av"><?php bbp_author_link( array( 'post_id' => bbp_get_topic_last_active_id(), 'size' => 48 , 'type' => 'avatar' ) ); ?></span>

        <span class="bbp-topic-freshness-author"><?php printf( __('%1$s', 'bbpress' ), bbp_get_author_link( array( 'post_id' => bbp_get_topic_last_active_id(), 'size' => 14 , 'type' => 'name' ) ) ); ?></span>
        에 대한 당연한 결과?
        bbp-topic-freshness-author-av와 bbp-topic-freshness-author는 어떻게 다른 지 분석
        그래서 상단의 span은 제거 하고 아래와 같이 하되
        p대신 div로 교체하고 전체 freshness를 감싸주다.

        <div class="bbp-topic-meta">
        	<?php do_action( 'bbp_theme_before_topic_freshness_author' ); ?>
        	<span class="bbp-topic-freshness-author"><?php bbp_author_link( array( 'post_id' => bbp_get_topic_last_active_id(), 'size' => 48 , 'type' => 'avatar' ) ); ?></span>
           /** 이부분의 bbp_theme_after_topic_author는 없어도 되나? **/
        	<?php do_action( 'bbp_theme_before_topic_freshness_link' ); ?>
        	<?php bbp_topic_freshness_link(); ?>
        	<?php do_action( 'bbp_theme_after_topic_freshness_link' ); ?>
            </div>
        #6819
        mimoon
        키 마스터

          Forum Index Page에서 Freshness 좌측 정열 실패 후,
          loop-single-topic.php에 있는 것을 가져와서
          loop-single-forum.php의 내용을 다음과 같이 수정

          
          <li class="bbp-forum-freshness">
              <div class="bbp-topic-meta">
                <?php do_action( 'bbp_theme_before_topic_author' ); ?>
                <span class="bbp-topic-freshness-author"><?php bbp_author_link( array( 'post_id' => bbp_get_forum_last_active_id(), 'size' => 48, 'type' => 'avatar'  ) ); ?></span>
          	  <span class="bbp-topic-freshness-author"><?php bbp_author_link( array( 'post_id' => bbp_get_forum_last_active_id(), 'size' => 14, 'type' => 'name'  ) ); ?></span>
                <?php do_action( 'bbp_theme_after_topic_author' ); ?>
                <?php do_action( 'bbp_theme_before_forum_freshness_link' ); ?>
                <p class="floatleft"><?php bbp_forum_freshness_link(); ?>
                <?php do_action( 'bbp_theme_after_forum_freshness_link' ); ?></p>
               </div>
          </li>

          타입 변수는 아바타가 ‘type’ => ‘avatar’ 이름/아이디 변수는 ‘type’ => ‘name’ 임을 유념
          시작할 때 forum page는
          <li class="bbp-forum-freshness">
          으로 시작하고
          topic 페이지는
          <li class="bbp-forum-freshness">
          으로 li의 시작이 다르다는 것도 유념할 것

          #6820
          YOUNG JIN LEE
          키 마스터

            아바타 표현에 대한 다음 두 개의 차이 유념
            forum page에서는

            
            <span class="bbp-topic-freshness-author"><?php bbp_author_link( array( 'post_id' => bbp_get_forum_last_active_id(), 'size' => 48 ) ); ?></span>
            

            topic page에서는

            
            <span class="bbp-topic-freshness-author-av"><?php bbp_author_link( array( 'post_id' => bbp_get_topic_last_active_id(), 'size' => 48 , 'type' => 'avatar' ) ); ?></span>
            

            아울러 topic page에서 name만 추출할 때 사이즈 매개 변수 활용 등 유념

             
            <span class="bbp-topic-freshness-author"><?php printf( __('%1$s', 'bbpress' ), bbp_get_author_link( array( 'post_id' => bbp_get_topic_last_active_id(), 'size' => 14 ,  'type' => 'name' ) ) ); ?></span>
            
            #8344
            mimoon
            키 마스터

              loop-single-topic.php와 loop-single-forum.php에서
              avatar및 name 설정하는 것과 bbp style pack에서 설정하는 것과 상충되는 문제가 새로 발생.
              아래 css를 통해 조절할 것.

              span.bbp-author-avatar {
              //display: block; //name을 아래로내림
              margin: auto;
              padding: 0;
              }
              span.bbp-author-name, {
              line-height: 150% !important;
              display: inline;
              margin: auto;
              }
              li.bbp-forum-freshness, li.bbp-topic-freshness {
              text-align: left;
              float: left;
              width: 22%;
              padding-left: 20px;
              }

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