묻고답하기

1.7.3.4 최신 버전이고 아무리해도 레벨아이콘이랑 아이콘샵 아이콘이랑 둘다 나와서 게시판 목록이 깨져 보여요ㅠㅠ

 

그래서 사용팁에 가보니까 두가지 사용팁이 있던데 어떻게 적용할지 몰라서 묻습니다.

 

소렌트님 팁

http://www.xpressengine.com/index.php?mid=tip&search_keyword=%EB%A0%88%EB%B2%A8&search_target=title&document_srl=21382087

 

하은이아빠 팁

http://www.xpressengine.com/index.php?mid=tip&search_keyword=%EB%A0%88%EB%B2%A8&search_target=title&document_srl=21223407

 

point_level_icon.lib.php를 열어보면 전체소스가 아래와 같은데 정확히 어느부분에 소스를 넣어야할지 모르겠어요...

하은이아빠팁을 보면 9번째줄에 넣으라고 하길래 

 

<?php

/**
 * @brief Function to change point icon.
 */
function pointLevelIconTrans($matches)
{
 $member_srl = $matches[3];
 if($member_srl < 1)
 { <-9번째줄이라서 여기 뒤에 넣었는데 변화가 없어요ㅠㅠ 제가 잘못넣은걸까요?
  return $matches[0];
 }

 $orig_text = preg_replace('/' . preg_quote($matches[5], '/') . '<\/' . $matches[6] . '>$/', '', $matches[0]);

 // Check Group Image Mark
 $oMemberModel = getModel('member');
 if($oMemberModel->getGroupImageMark($member_srl))
 {
  return $orig_text . $matches[5] . '</' . $matches[6] . '>'; <-소렌트님팁은 여기뒤에 추가하라길래 바로 붙여넣었는데 변화가 없구요ㅠㅠ
 }
 if(!isset($GLOBALS['_pointLevelIcon'][$member_srl]))
 {
  // Get point configuration
  if(!$GLOBALS['_pointConfig'])
  {
   $oModuleModel = getModel('module');
   $GLOBALS['_pointConfig'] = $oModuleModel->getModuleConfig('point');
  }
  $config = $GLOBALS['_pointConfig'];

  // Get point model
  if(!$GLOBALS['_pointModel'])
  {
   $GLOBALS['_pointModel'] = getModel('point');
  }
  $oPointModel = &$GLOBALS['_pointModel'];

  // Get points
  if(!$oPointModel->isExistsPoint($member_srl))
  {
   return $matches[0];
  }

  $point = $oPointModel->getPoint($member_srl);

  // Get level
  $level = $oPointModel->getLevel($point, $config->level_step);
  $text = $matches[5];

  // Get a path where level icon is
  $level_icon = sprintf('%smodules/point/icons/%s/%d.gif', Context::getRequestUri(), $config->level_icon, $level);

  // Get per to go to the next level if not a top level
  if($level < $config->max_level)
  {
   $next_point = $config->level_step[$level + 1];
   $present_point = $config->level_step[$level];
   if($next_point > 0)
   {
    $per = (int) (($point - $present_point) / ($next_point - $present_point) * 100);
    $per = $per . '%';
   }
  }

  $title = sprintf('%s:%s%s%s, %s:%s/%s', Context::getLang('point'), $point, $config->point_name, $per ? ' (' . $per . ')' : '', Context::getLang('level'), $level, $config->max_level);
  $alt = sprintf('[%s:%s]', Context::getLang('level'), $level);

  $GLOBALS['_pointLevelIcon'][$member_srl] = sprintf('<img src="%s" alt="%s" title="%s" style="vertical-align:middle; margin-right:3px;" />', $level_icon, $alt, $title);
 }
 $text = $GLOBALS['_pointLevelIcon'][$member_srl];

 return $orig_text . $text . $matches[5] . '</' . $matches[6] . '>';
}

/* End of file point_level_icon.lib.php */
/* Location: ./addons/point_level_icon/point_level_icon.lib.php */

 

글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
최광희 게시물 등록시 이메일로 받아보기 문의  
마늘방구 전체 펼침메뉴 구현 방법좀알려주세요  
용초딩 회원가입폼 밑에 간단한 설명구를 넣고 싶은데 file  
씸슨 XEgrid 컨텐츠위젯 적용시 하단 여백 버그 file  
davidcho64 게시판 관리에서 문제점이 발생했네요.  
앤드별 회원가입 폼 수정이 안됩니다~도와주세요  
마늘방구 간단한 구문사용법 질문.  
XE카오스 게시판dx 검색옵션 설정/수정 문의...  
wyun13043 xe 첨부파일 안보이게 하는 방법을 알려주세요! [2] 2013.10.02 by wyun13043
쥬은 대표 이미지마크 있으면 레벨 아이콘 안나오게 하는법  
강군군군 포인트 부족시 페이지 이동이 아닌 팝업으로 file  
veam 에디터 첨부 이미지 본문 강제 삽입  
오락실주인 phpmyadmin 쿼리 질문 ~  
원숭이짱 xe 버전 1.5 에서 statics 라는  
EnvyStn 첨부파일 등록 문제 file  
김틴 사이트 내에서 닉네임 제외 레벨 아이콘만 출력하기 file  
다빈맘 관리자페이지의 목록 갯수 수정방법 [1] 2013.10.02 by sejin7940
맛이간넘 업데이트후 오류납니다  
姜.燦.熙 관리자모드에서 회원정보 수정이 안되는현상 [2] file 2013.10.02 by Bryan!
sdkfj24 분류 관하여 질문요 [1] file 2013.10.02 by sejin7940
alsldj 한국타운 스킨 로그인문제  
qqwqqw1212 게시판 자료 링크질문 [1] 2013.10.02 by sejin7940
거인의어깨 안녕하세요. 나눔 고딕, 글꼴 설치에 대해서 여쭤봅니다. [1] 2013.10.02 by sejin7940
김심판 질문드립니다. xe 설치에러 [2] 2013.10.02 by 김심판
DJ쿤타 댓글을 달아야 다운로드 가능할 수 있게 하려는데요... 스케치북5  
미르마법사 xe 최선패치하고 나서 나오는 에러.. [1] 2013.10.01 by misol
똑디 윈도우 mysql4 -> mysql5로 디비 이전 [1] 2013.10.01 by 똑디
아이구머리 바로가기 메뉴클릭시 팝업배너창을 띄우고 싶습니다.  
함삐까 xe getNextPage() 함수에 관한...  
액스맨 제로보드4 위치가 밑으로 내려가버렸습니다.