묻고답하기

지금 사용중인 위젯 스킨이 doorweb 최신글 ,댓글 위젯 스킨 ver. 1.1 을 사용 중입니다.

아주 좋은 위젯이라 사용을 하는데...약간의 추가사항은 새글이나 댓글이 등록되면 글 앞이나 뒤에 NEW 아이콘을 넣고 싶습니다.

소스를 보아도, 워낙 프로그램에 지식이 없어서...고수분들의 도움이 필요합니다.

감사합니다.

tab.jpg   이렇게요...아래 소스 있습니다.

*만약 프로그램 원작자에게 저작원 영향이 있는 문의라면 삭제하겠습니다. 

----------------------------------------------------------------------------------------------

<load target="smart_popular.css" />

{@
 $tabc=count($widget_info->tab_view_arr);
 $optc=count($widget_info->option_view_arr);
 $li_width = $widget_info->widget_widths/$tabc;
 $img_width = $widget_info->thumbnail_width-2;
 $img_height = $widget_info->thumbnail_height-2;
}

<!--@if(!$global['popsid'])-->{@ $__Context->global['popsid'] = 1}<!--@endif-->{@ $__Context->global['popsid']++}

<div id="popular{$global['popsid']}" class="doorweb-popular newClear">
 <!--// TAB Start -->
 <div class="tabs_items newClear" >
  <ul>
   <block loop="$i=0; $i<$tabc; $i++">
    <!--@if($widget_info->tab_view_arr[$i]=='popular')-->
     <li><a id="pd_link_s{$global['popsid']}" class="tabs_active"|cond="$widget_info->tab_view_arr[0]=='popular'" href="#">{$lang->ip_popular_documents}</a></li>
    <!--@elseif($widget_info->tab_view_arr[$i]=='newestd')-->
     <li><a id="nd_link_s{$global['popsid']}" class="tabs_active"|cond="$widget_info->tab_view_arr[0]=='newestd'" href="#">{$lang->ip_newest_documents}</a></li>
    <!--@elseif($widget_info->tab_view_arr[$i]=='newestc')-->
     <li><a id="nc_link_s{$global['popsid']}" class="tabs_active"|cond="$widget_info->tab_view_arr[0]=='newestc'" href="#">{$lang->ip_newest_comments}</a></li>
                   
    <!--@end-->
   </block>
  </ul>
 </div>
 <!--// TAB End -->
 
 <div class="tabs_inner newClear" >
  <!--// Popular Documents Start -->
  <div id="popular_documents_s{$global['popsid']}" class="tabs_content<!--@if($widget_info->tab_view_arr[0]=='popular')--> tabs_active<!--@endif-->">
   <ul cond="$widget_info->popular_documents">
    <li loop="$widget_info->popular_documents=>$key,$val" class="newClear">
     <a href="{$val->getPermanentUrl()}">
      <block loop="$i=0; $i<$optc; $i++">
      <!--@if($widget_info->option_view_arr[$i]=='image')-->
       
      <!--@elseif($widget_info->option_view_arr[$i]=='title')-->
       <div class="text_title">{$val->getTitle($widget_info->subject_cut_size)} <span class="replyNum" title="Replies" cond="$val->getCommentCount() > 0">({$val->getCommentCount()})</span></div>
      <!--@elseif($widget_info->option_view_arr[$i]=='content')-->
       
      <!--@elseif($widget_info->option_view_arr[$i]=='regdate')-->
       
      <!--@endif-->
      </block>
     </a>
    </li>
   </ul>
  </div>
  <!--// Popular Documents End -->
  
  <!--// Newest Documents Start -->
  <div id="newest_documents_s{$global['popsid']}" class="tabs_content<!--@if($widget_info->tab_view_arr[0]=='newestd')--> tabs_active<!--@endif-->">
   <ul>
    <li loop="$widget_info->newest_documents=>$key,$val" class="newClear">
     <a href="{$val->getPermanentUrl()}">
      <block loop="$i=0; $i<$optc; $i++">
      <!--@if($widget_info->option_view_arr[$i]=='image')-->
       
      <!--@elseif($widget_info->option_view_arr[$i]=='title')-->
       <div class="text_title">{$val->getTitle($widget_info->subject_cut_size)} <span class="replyNum" title="Replies" cond="$val->getCommentCount() > 0"> ({$val->getCommentCount()})</span></div>
      <!--@elseif($widget_info->option_view_arr[$i]=='content')-->
       
      <!--@elseif($widget_info->option_view_arr[$i]=='regdate')-->
       
      <!--@endif-->
      </block>
     </a>
    </li>
   </ul>
  </div>
  <!--// Newest Documents End -->
  
  <!--// Newest Comments Start -->
   
  <div id="newest_comments_s{$global['popsid']}" class="tabs_content<!--@if($widget_info->tab_view_arr[0]=='newestc')--> tabs_active<!--@endif-->">
   <ul>
    <li loop="$widget_info->newest_comments=>$key,$val" class="newClear">
     <a href="{$val->getPermanentUrl()}">
    
       <span class="tabs_content2">{$val->getSummary($widget_info->comment_cut_size)}</span>
   
     </a>

    </li>
   </ul>
  </div>
  <!--// Newest Comments End -->
 </div>
</div>

<script>
jQuery(function($){
 var $popular = $("#popular{$global['popsid']}"),
  $tabs_items = $popular.find(".tabs_items"),
  $tabs_itema = $tabs_items.find("a"),
  $tabs_inner = $popular.find(".tabs_inner");

 var $pds = $("#popular_documents_s{$global['popsid']}"),
  $nds = $("#newest_documents_s{$global['popsid']}"),
  $ncs = $("#newest_comments_s{$global['popsid']}");

 function actTab($tid){
  $tabs_itema.removeClass("tabs_active");
  $tid.addClass("tabs_active");
 }

 function actItem($sid){
  $tabs_inner.find(".tabs_active").removeClass("tabs_active");
  $sid.addClass("tabs_active");
 }

 $tabs_itema.on("mouseover click",function(e){
  e.preventDefault();
  var $tid = $(this);
  actTab($tid);
 });

 $("#pd_link_s{$global['popsid']}").on("mouseover click",function(e){
  e.preventDefault();
  actItem($pds);
 });
 $("#nd_link_s{$global['popsid']}").on("mouseover click",function(e){
  e.preventDefault();
  actItem($nds);
 });
 $("#nc_link_s{$global['popsid']}").on("mouseover click",function(e){
  e.preventDefault();
  actItem($ncs);
 });
});
</script>

 

 

글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
dnjswn**** Xpress engine사용 관련. file  
살려줘용 검색 관련 질문있습니다. [2] 2017.02.10 by 살려줘용
haupt [질문] XE 로그인 과정/자동 로그인 방법 이 궁급합니다. [2] 2017.02.10 by haupt
난다여~ 1.8.20 이상 url:포트 설정시 포트 빠지는 문제 [2] 2017.02.10 by 난다여~
살려줘용 확장변수 입력못하게 막기 질문 [5] 2017.02.10 by 살려줘용
파도. 스케치북 최근게시물 상단 탭 오른쪽 여백 없애기 file  
f**** 회원가입 후 가입환영메일 발송  
정예 메인의 레이아웃을 조금 수정한 뒤로 모바일에서 문제가 생겼습니다 [1] 2017.02.10 by 정예
ds376 에디터 컴포넌트 리스트 이미지갤러리를 가로로 나오게하기 file  
redclip Simplestrap 메뉴 수정 문제  
진독 관리자페이지 문제 도움주실분을 찾습니다 [1] 2017.02.10 by sejin7940
redclip 지도 에디터 컴포넌트 마크 문제  
킼킼킼 헤더 상단의 배너부분 [2] file 2017.02.09 by 킼킼킼
lark007 황당한 frameset 질문입니다^^;; [1] 2017.02.09 by XE카오스
공대생 에디터 본문기능만 삭제하려고 합니다. [1] 2017.02.09 by YJSoft
JackPARK Xenon 모바일 화면상에 게시판(Board)의 내용 Update 및 수정 메뉴 추가건 file  
jaba 기본 url 설정만 하면 xe를 재설치 하라고 합니다. [1] 2017.02.09 by 펭구
robert 게시판 관리만 있지 수정은 없나요? [3] file 2017.02.09 by 난다여~
fai**** 초보입니다. 질문드립니다. [6] file 2017.02.08 by fai****
팀파워o권대훈 홈페이지 초기화하려고 합니다 [1] 2017.02.08 by 제이와이엔소프트
hshshsss 다국어 게시판 제작 시 문의입니다ㅠㅠ [1] 2017.02.08 by sejin7940
xe초보 로그인 폼을 감추고 싶습니다. [5] 2017.02.08 by xe초보
공대생 엑셀출력 질문있습니다~ [2] file 2017.02.08 by 공대생
가을하늘드림 FAQ 자바 스크립트 위젯에서 적용이 안되네요(XEDITION 김타조 버전)  
열심히살자 네이버 웹마스터 도구 태그 질문드립니다. 선배님들...!! [2] 2017.02.08 by 펭구
초보중초보 관리자로그인이 안됩니다.도와주세요. [2] 2017.02.08 by 초보중초보
vinecgp 회원정보페이지 권한 질문드립니다. [1] 2017.02.07 by vinecgp
열심히살자 모바일 XE 게시판 기본스킨 목록 나오게하기, 구글 광고 file  
사회적기업가 회원가입 버튼을 넣고 싶어요 file  
호야등 갤러리 외부게시판 연동방법 문의 드립니다 [1] 2017.02.07 by sejin7940