묻고답하기

며칠 전부터 해결 못한 새글 아이콘 넣기와 총 게시물, 하부 메뉴 총 게시물수 표현하기 입니다.
jjong님의 레이아웃이 자바스크립트를 이용한 트리구조를 쓰고 있는데
http://enjoyitaewon.com/zbxe/?mid=itaewonguide_sent_inbox

보통 쓰이는 총 게시물 수랑 다르게 해야할 것 같은데 어떻게 하는지 모르겠습니다.
쫑득이님이 올린 레이아웃 링크
http://www.zeroboard.com/zbxe_layout_skin/16560220/page/6
jjong.zip

새글 표시 아이콘, 총게시물수, 트리메뉴의 하부 메뉴 총 게시물 수
예를 들어 요렇게 아래처럼 구현되면 좋겠습니다!
모든 메뉴 옆에 총 게시물 수가 나와야겠죠~



쫑득이님의 자바스크립트 소스를 첨부할테니...고수님들의 도움 부탁드립니다.emoticon

아래가 보통 XE에서 쓰이는 방식인데요...그리곤 [{$val->document_count}] 식으로 넣어주잖아요~

    <div class="{$class}" id="category_parent_{$val->category_srl}">
        <div class="item <!--@if($val->selected)-->selected<!--@end-->">
            <a href="{getUrl('','mid'+ '+ ',$widget_info->mid, 'category',$val->category_srl)}">{$val->text}</a>
            <!--@if($val->document_count)--><strong>[{$val->document_count}]</strong><!--@end-->
        </div>
    </div>

제가 사용하려는 건...자바 스크립트 부분이 대략 아래와 같은 상황입니다.

// Creates the tree structure

dTree.prototype.addNode = function(pNode) {

 var str = '';

 var n=0;

 if (this.config.inOrder) n = pNode._ai;

 for (n; n<this.aNodes.length; n++) {

  if (this.aNodes[n].pid == pNode.id) {

   var cn = this.aNodes[n];

   cn._p = pNode;

   cn._ai = n;

   this.setCS(cn);

   if (!cn.target && this.config.target) cn.target = this.config.target;

   if (cn._hc && !cn._io && this.config.useCookies) cn._io = this.isOpen(cn.id);

   if (!this.config.folderLinks && cn._hc) cn.url = null;

   if (this.config.useSelection && cn.id == this.selectedNode && !this.selectedFound) {

     cn._is = true;

     this.selectedNode = n;

     this.selectedFound = true;

   }

   str += this.node(cn, n);

   if (cn._ls) break;

  }

 }

 return str;

};

 

// Creates the node icon, url and text

dTree.prototype.node = function(node, nodeId) {

 var str = '<div class="dTreeNode">' + this.indent(node, nodeId);

 if (this.config.useIcons) {

  if (!node.icon) node.icon = (this.root.id == node.pid) ? this.icon.root : ((node._hc) ? this.icon.folder : this.icon.node);

  if (!node.iconOpen) node.iconOpen = (node._hc) ? this.icon.folderOpen : this.icon.node;

  if (this.root.id == node.pid) {

   node.icon = this.icon.root;

   node.iconOpen = this.icon.root;

  }

  str += '<img id="i' + this.obj + nodeId + '" src="' + ((node._io) ? node.iconOpen : node.icon) + '" alt="" />';

 }

 if (node.url) {

  str += '<a id="s' + this.obj + nodeId + '" class="' + ((this.config.useSelection) ? ((node._is ? 'nodeSel' : 'node')) : 'node') + '" href="' + node.url + '"';

  if (node.title) str += '+ ' title="' + node.title + '"';

  if (node.target) str += ' target="' + node.target + '"';

  if (this.config.useStatusText) str += ' onmouseover="window.status=\'' + node.name + '\';return true;" onmouseout="window.status=\'\';return true;" ';

  if (this.config.useSelection && ((node._hc && this.config.folderLinks) || !node._hc))

   str += ' onclick="javascript: ' + this.obj + '+ '.s('+ ' + nodeId + ');"';

  str += '>';

 }

 else if ((!this.config.folderLinks || !node.url) && node._hc && node.pid != this.root.id)

  str += '<a href="javascript: ' + this.obj + '.o('+ ' + nodeId + ');" class="node">';

 str += node.name;

 if (node.url || ((!this.config.folderLinks || !node.url) && node._hc)) str += '</a>';

 str += '</div>';

 if (node._hc) {

  str += '<div id="d' + this.obj + nodeId + '" class="clip" style="display:' + ((this.root.id == node.pid || node._io) ? 'block' : 'none') + ';">';

  str += this.addNode(node);

  str += '</div>';

 }

 this.aIndent.pop();

 return str;

};

레이아웃에서 뿌려줄 땐
   <div id="dtree">
    <script type="text/javascript">

     d = new dTree('d');

     var x,y,z,cnt;
     x=0;
     y=10;
     z=100;
     cnt=0;

     d.add(0,-1,'Home','','','');

     <!--@foreach($main_menu->list as $key => $val)--><!--@if($val['text'])-->
      x=x+1;d.add(x,0,"{$val['link']}","{$val['href']}",'+ ''<!--@if($val['open_window']=='Y')-->,true<!--@end-->);
      <!--@if($val['selected']) -->
       cnt=x;
      <!--@end-->
      <!--@foreach($val['list'] as $key1 => $val1)--><!--@if($val1['text'])-->
       y=y+1;d.add(y,x,"{$val1['+ 'link']}","{$val1['href']}",''<!--@if($val1['open_window']=='Y')-->,true<!--@end-->);
       <!--@foreach($val1['list'] as $key2 => $val2)--><!--@if($val2['text'])-->
        z=z+1;d.add(z,y,"{$val2['link']}","{$val2['href']}",''<!--@if($val2['open_window']=='Y')-->,true<!--@end-->);
       <!--@end--><!--@end-->
      <!--@end--><!--@end-->
     <!--@end--><!--@end-->

     document.write(d);

     d.openTo(cnt, true);

    </script>
    <p><a href="javascript: d.openAll();">open all</a> | <a href="javascript: d.closeAll();">close all</a></p>
   </div>

이런식이구요.

쫑득이님의 자바스크립트 소스를 첨부할테니...고수님들의 도움 부탁드립니다.
새글 표시 아이콘, 총게시물수, 트리메뉴의 하부 메뉴 총 게시물 수
예를 들어 요렇게 아래처럼 구현되면 좋겠습니다!
모든 메뉴 옆에 총 게시물 수가 나와야겠죠~



요것만 더 넣고 싶은데...부탁드려요!
쫑득이님이 올린 레이아웃 링크
http://www.zeroboard.com/zbxe_layout_skin/16560220/page/6
jjong.zip

글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
산들바람88 최근 게시물 아이콘 여백 (데체 어디를 수정을 해야할지 모르겠음.) [4] 2007.12.14 by 산들바람88
김선생™ 즐겨찾기 아이콘 <link rel="shortcut icon" href="/images/fav.ico"> [3] file 2008.07.03 by kcglib
elmtree 위지윅 에디터 아이콘이 없어집니다. [4] 2008.12.01 by elmtree
Jiyoung540 새글 아이콘,총게시물 관련 자바스크립트와 PHP 고수님의 도움이 절실합니다! [3] file 2008.12.18 by Jiyoung540
토니박스 첨부파일 아이콘 없애는 방법 [2] file 2009.07.16 by 토니박스
으아악. 아이콘샵 모듈 어떻게 생성하나요? [1] file 2010.11.15 by 공듀
100억 고수님만 봐주세용 ㅜㅜ(__) 닉네임옆 성별아이콘 넣기 [1] file 2010.12.06 by 괴적인격
freeism 모바일(아이폰)용 아이콘넣기 [1] 2011.03.24 by 월하선향
akfwhkldsfhkld 아이콘샵 오류  
Sunt 게시판목록에 특정 날짜(기념일)에만 아이콘 넣고싶은데요 [1] 2011.09.06 by 송동우
세죠위그이 모바일 레이아웃에서 헤더 스크립트 작성 문제  
Sunt 다음 레벨 아이콘 표시 어떻게 할까요?  
Sunt newest_document 위젯에 레벨 아이콘 추가 하는 방법  
Sunt (수정) 특정 날짜에 말머리를 여러개 [1] file 2012.02.02 by 송동우
얼라리여 그룹아이콘, 레벨아이콘 동시 출력하는 문제 질문드려요~  
도메인8295 캐쉬 모듈과 아이콘샵 모듈 연동하고 싶습니다.  
xe초보자 네이버 이모티콘(아이콘) 사용해도되나요 [1] 2014.04.09 by teguh100
XE모듈 지금 ilbe.com 에서 사용하는 레벨 아이콘 [1] 2015.06.06 by Podongi
류망스 아이콘이 이상하게 출력됩니다. ㅠ.ㅠ 고수님들... [6] file 2015.06.22 by qkrcjfgus33
우유 방명록에 글 쓸때 아이콘, 이미지 리스트에서 선택해서 글을 쓰게 하고 싶어요. [3] 2016.12.09 by 라자루스