forum home template question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jonsimmonds
    Member
    • Sep 2005
    • 52
    • 3.5.x

    forum home template question

    Right, what I want to achieve is for a small selection of forums within my forum to be represented differently in the forum home template, before the main forum listing. To get around the forums being listed in the main $forumbits, I would make them to "invisible" so they wouldnt be included in $forumbits but still visible if the url is known.

    So what I would have had in forum home would have been:

    Code:
    <!-- main -->
    MY CUSTOM CODE FOR MY SELECTED FORUMS HERE
    <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
    <thead>
        <tr align="center">
          <td class="thead">&nbsp;</td>
          <td class="thead" width="100%" align="$stylevar[left]">$vbphrase[forum]</td>
          <td class="thead" width="175">$vbphrase[last_post]</td>
          <td class="thead">$vbphrase[threads]</td>
          <td class="thead">$vbphrase[posts]</td>
          <if condition="$vboptions['showmoderatorcolumn']">
          <td class="thead">$vbphrase[moderator]</td>
          </if>
        </tr>
    </thead>
    $forumbits
    <tbody>
        <tr>
            <td class="tfoot" align="center" colspan="<if condition="$vboptions['showmoderatorcolumn']">6<else />5</if>">
    Now when I looked at the template forumhome_forumbit_level1_post I find the values for the number of threads and posts are $forum[threadcount] and $forum[postcont] - how can I return the value of these for a specific forum?

    And somethign more advanced, but not something I need at the moment, but can some forum of conditionals be used to achieve the following?
    Code:
    while forumdisplayorder <=10
    $forumbits - just for forum id's 1 to 10
    my special code for forum with display order of 11
    while forumdisplayorder >=12
    $forumbits - just for forums id's above 12
    Hope that all made sense, sorry for the waffling but thought it was needed to show what I was trying to achieve

    off to get a drink as my brains starting to hurt!

    Jon
  • DelphiVillage
    Senior Member
    • Apr 2002
    • 1051
    • 4.1.x

    #2
    i think you can use

    HTML Code:
    <if condition="$forum[forumid] >10"> 
    for id's bigger then 10 (for example) but i'm not sure through

    Comment

    • jonsimmonds
      Member
      • Sep 2005
      • 52
      • 3.5.x

      #3
      Originally posted by DelphiVillage
      i think you can use

      HTML Code:
      <if condition="$forum[forumid] >10"> 
      for id's bigger then 10 (for example) but i'm not sure through
      That does work - thanks - guess it could be adapted for some advert spaces etc to

      Its the returning of the number of posts/topics for a given forumid that I need to figure out
      Last edited by jonsimmonds; Sun 5 Aug '07, 1:16am.

      Comment

      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
      Working...