묻고답하기

며칠 전부터 해결 못한 새글 아이콘 넣기와 총 게시물, 하부 메뉴 총 게시물수 표현하기 입니다.
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 남기남
쿤. 링크 클릭시 글씨가 작아져요.. 대체 왜이런걸까요.. [4] 2008.12.18 by 이슬나라
tkfkdql 제로보드XE에 BGM적용시 오류 [1] 2008.12.18 by 팔공산
Sonamu 권한에 따라 페이지를 다르게 설정할 수 있나요? [1] 2008.12.18 by 팔공산
나상현 XE 메뉴가 좀 이상합니다. [2] file 2008.12.18 by 나상현
글쓴이 도와주세요 [1] file 2008.12.18 by 애치티
소우리 분양용 홈페이지 다시 질문 드릴게요~ [2] file 2008.12.18 by 소우리
Jiyoung540 새글 아이콘,총게시물 관련 자바스크립트와 PHP 고수님의 도움이 절실합니다! [3] file 2008.12.18 by Jiyoung540
꿀과메기 xe php파일 한글 깨짐에 관해서. [3] 2008.12.18 by 궁금이
루이제린저 메뉴 관리기능 에서요 .. ( 초보질문 ) [2] file 2008.12.18 by 루이제린저
[武]적토마 게시판의 기능 관련되어서.. [2] 2008.12.17 by [武]적토마
애치티 module_srl 값으로 module_srl 의 명칭가져오기 [6] 2008.12.17 by 애치티
꺼먼고무신 IIS5.0+PHP5.2.6+Mysql6.0.7로 XE1.1.1 설치시 오류가 뜹니다. [1] 2008.12.17 by 백성찬
찬이250 꼬리표가 작동 안하네요. [2] 2008.12.17 by 찬이250
소장 홈페이지 수정및명의이전 문의! [1] 2008.12.17 by 백성찬
열공 게시판 링크 관련  
장뚱이 로그인 폼 스킨 올리는 위치좀 알려주세요.^^* [2] 2008.12.17 by 장뚱이
조영철 저혹시 홈페이지 날리고 로고찾는방법아시는분?  
햇내기 XE에서 상대경로 질문드립나다. [3] 2008.12.17 by 햇내기
소우리 새로운위젯 적용 하려면 ../zbxe/widgets 디렉토리 안에 넣기만 하면되죠?? [2] file 2008.12.17 by 소우리
조영철 제로보드xe 게시판연결안돼는것좀..ㅠ,.ㅠ [4] 2008.12.17 by 백성찬
서피현 관리자만 접속 가능하게 하는법? [1] 2008.12.17 by guny
문응경 정말 급합니다. 이런기능 방법 아시는 분 [1] file 2008.12.17 by 느까끼
CandyZone 첨에들어가면 이상한게떠요. [3] 2008.12.17 by CandyZone
스카라초 메뉴에 이메일 바로 연결하기 질문^^ [2] 2008.12.17 by 스카라초
Crazyhouse.cn 버그 신고 합니다. [4] 2008.12.17 by Crazyhouse.cn
도주하우스 게시판 권한을 이렇게 설정했는데도 권한이 없다 나옵니다...... [3] file 2008.12.17 by Crazyhouse.cn
용각산 가끔 메인이 아래와 같이 내려가네요 [1] file 2008.12.17 by 비나무
청춘개똥 xe의 레이아웃 안에서 다른 사이트를 보여주기..... 어떻게 하나요? [1] 2008.12.17 by 비나무
aflatoxin 동영상 파일 업로드시 스크린샷은 어떻게 뜨게 하나요? [4] file 2008.12.17 by aflatoxin
루이제린저 드림위버에서 작업한 파일 올리는 방법 [5] 2008.12.17 by 루이제린저