1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. This forum is for release discussion only. Discussions that do not relate specifically to the resource release should be discussed in another, more appropriate forum.
    Dismiss Notice
  3. This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

SubCategories in Columns

Discussion in 'Template Modifications [Archive]' started by CyberAP, Mar 20, 2011.

  1. CyberAP

    CyberAP Well-Known Member

    1. Open template: node_forum_level_2
      Find
      PHP:
      <xen:if is="{$renderedChildren} AND {$level} == 2">
           <
      div class="Popup subForumsPopup">
               <
      a href="{xen:link forums, $forum}" rel="Menu" class="cloaked" data-closemenu="true"><span class="dt">{xen:phrase sub_forums}:</span> {xen:number $forum.childCount}</a>
       
               <
      div class="Menu JsOnly subForumsMenu">
                   <
      div class="primaryContent menuHeader">
                       <
      h3>{$forum.title}</h3>
                       <
      div class="muted">{xen:phrase sub_forums}</div>
                   </
      div>
                   <
      ol class="secondaryContent blockLinksList">
                   <
      xen:foreach loop="$renderedChildrenvalue="$child">
                       {
      xen:raw $child}
                   </
      xen:foreach>
                   </
      ol>
               </
      div>
           </
      div>
       </
      xen:if>
    2. Replace with:
      PHP:
      <xen:if is="{$renderedChildren} AND {$level} == 2">
           <
      div class="subForumsPopup">
               <
      div class="subForumsMenu">
                   <
      ol class="secondaryContent blockLinksList">
                   <
      xen:foreach loop="$renderedChildrenvalue="$child">
                       {
      xen:raw $child}
                   </
      xen:foreach>
                   </
      ol>
               </
      div>
           </
      div>
       </
      xen:if>
    3. Open template node_category_level_2
      Find there:

      PHP:
      <xen:if is="{$renderedChildren} AND {$level} == 2">
           <
      div class="Popup subForumsPopup">
               <
      a href="{xen:link categories, $category}" rel="Menu" class="concealed" data-closemenu="true"><span class="dt">{xen:phrase sub_forums}:</span> {xen:number $category.childCount}</a>
       
               <
      div class="Menu JsOnly subForumsMenu">
                   <
      div class="primaryContent menuHeader">
                       <
      h3>{$category.title}</h3>
                       <
      div class="muted">{xen:phrase sub_forums}</div>
                   </
      div>
                   <
      ol class="secondaryContent blockLinksList">
                       <
      xen:foreach loop="$renderedChildrenvalue="$child">
                           {
      xen:raw $child}
                       </
      xen:foreach>
                   </
      ol>
               </
      div>
           </
      div>
       </
      xen:if>
    4. Replace with:

      PHP:
      <xen:if is="{$renderedChildren} AND {$level} == 2">
           <
      div class="subForumsPopup">
       
               <
      div class="subForumsMenu">
                   <
      ol class="secondaryContent blockLinksList">
                   <
      xen:foreach loop="$renderedChildrenvalue="$child">
                       {
      xen:raw $child}
                   </
      xen:foreach>
                   </
      ol>
               </
      div>
           </
      div>
       </
      xen:if>
    5. Open template node_forum_level_n
      Replace all content with:
      PHP:
      <li class="node forum level-n node_{$forum.node_id}">
           <
      span class="dot"><span></span></span>
           <
      div {xen:if $forum.hasNew'class="unread"'}>
               <
      h4 class="nodeTitle"><a href="{xen:link forums, $forum}" class="menuRow">{$forum.title}</a></h4>
           </
      div>
           <
      xen:if is="{$renderedChildren}">
               <
      ol>
                   <
      xen:foreach loop="$renderedChildrenvalue="$child">
                       {
      xen:raw $child}
                   </
      xen:foreach>
               </
      ol>
           </
      xen:if>
       </
      li>
    6. Open node_category_level_n
      Replace all content with:
      PHP:
      <li class="node category level-n node_{$category.node_id}">
           <
      span class="dot"><span></span></span>
           <
      div {xen:if $category.hasNew'class="unread"'}>
               <
      h4 class="nodeTitle"><a href="{xen:link categories, $category}" class="menuRow">{$category.title}</a></h4>
           </
      div>
           <
      xen:if is="{$renderedChildren}">
               <
      ol>
                   <
      xen:foreach loop="$renderedChildrenvalue="$child">
                       {
      xen:raw $child}
                   </
      xen:foreach>
               </
      ol>
           </
      xen:if>
       </
      li>
    7. Open template EXTRA.css.
      Add there:

      Code:
      .subForumsPopup,
      .subForumsPopup .blockLinksList,
      .subForumsPopup ol,
      .subForumsMenu ol li ol li
      {
          width: 100%;
      }
      
      .subForumsPopup .blockLinksList
      {
          float: left;
      }
      
      .subForumsPopup .dot
      {
          position: relative;
          float: left; /* firefox fix */
      }
      .subForumsPopup .dot span
      {
          height: 0px;
          left: 6px;
          top: 10px !important;
          position: absolute;
          width: 0px;
          border: 2px solid @primaryLight;
          border-radius: 6px;
      }
      
      .subForumsMenu ol li
      {
          width: 25%;
          float: left;
      }
      
      .subForumsMenu .node .nodeTitle a
      {
          padding-left: 16px;
      }
      
      .subForumsMenu .node .node.level-n
      {
          display: none;
      }
    Screenshot:

    screenshot.PNG 
     
  2. Peggy

    Peggy Well-Known Member

    Aw c'mon CAP. This is too much of a major modification to not be able to see it before we use it.
    Screenie puleeaase?
     
    erich37 likes this.
  3. Allan

    Allan Well-Known Member

    Screen please :)
     
  4. DieselMinded

    DieselMinded Active Member

    is this still a pop up or will it show the sub forums on forum home ?
     
  5. giorgino

    giorgino Well-Known Member

    Screeeeeennnnnn :D
     
  6. CyberAP

    CyberAP Well-Known Member

    Alrighty, look at first post.
     
  7. DieselMinded

    DieselMinded Active Member

    how about some mini new/old posts icons
     
  8. CyberAP

    CyberAP Well-Known Member

    I don't really know how to determine if the node is read/unread. But I know how to insert a small dot.
     
  9. yavuz

    yavuz Well-Known Member

    I've tried it with flexile, metalic and the feault theme but can't get it properly working.

    [​IMG]
     
  10. CyberAP

    CyberAP Well-Known Member

    That's strange. Unfortunately I can't help you at this moment but will try to on the next week.
     
    laztrix likes this.
  11. CFodder

    CFodder Well-Known Member

    Can't seem to get the sub-forums to display in 2 columns, suspect it may be a template I've edited but I've reverted all the ones I thought it might be. Any help would be appreciated.

    oldrsubforums.jpg

    Cheers.
     
  12. Jaxel

    Jaxel Well-Known Member

  13. CyberAP

    CyberAP Well-Known Member

    2 columns.
     
  14. Markos

    Markos Well-Known Member

    Great! I hope to see a tutorial for have forums (with subforums associated) in columns.
     
  15. Jaxel

    Jaxel Well-Known Member

    And mine isn't?
    Code:
    .subForumsGrid .node { width: 20%; float: left; }
    20% = 5 columns... change it to 25% for 4, 33% for 3, or even 50% for 2 columns.
     
  16. CyberAP

    CyberAP Well-Known Member

    Instructions have been updated.
     

Share This Page