Announcement

Collapse
No announcement yet.

collapsing forums not being remembered

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • collapsing forums not being remembered

    I made a small change to the templates so that I can have the level2 forums collapsing on my front page.

    It works great except that it doesn't remember the collapsed selection of the user. I've reviewed my template changes and it seems very straightforward.

    You can see my site with a test template here: http://rcgroups.com/forums3/index.php?s=&styleid=7
    Visit R/C Groups at www.rcgroups.com

  • #2
    R/C Groups is down for software upgrade.

    Comment


    • #3
      To reproduce the problem, simply collapse the "Airplanes - Electric" section and then refresh.

      Contrast that with collapsing "Boats". It remembers that one.

      Jim
      Visit R/C Groups at www.rcgroups.com

      Comment


      • #4
        Your board is CLOSED

        Hence this message

        R/C Groups is down for software upgrade.

        Comment


        • #5
          I'll bring it up for you to test.
          Visit R/C Groups at www.rcgroups.com

          Comment


          • #6
            Zachery, you are crazy fast! This is my first time using vb support and I am really impressed that you've responded so quickly. I didn't anticipate it.

            Jim
            Visit R/C Groups at www.rcgroups.com

            Comment


            • #7
              Well, as a guest, i collasped the forum, and after i refreshed i notice it still wasnt closed, Im going to guess your either going to need to fiddle with the template code abit more, or its going to require hacking, Would you mind posting the modifed code in a txt file so i can have a look at it.

              Comment


              • #8
                forumhome_forumbit_level1_nopost:
                HTML Code:
                <tbody>
                 <tr>
                  <td class="tcat" colspan="<if condition="$vboptions[showmoderatorcolumn]">6<else />5</if>">
                <if condition="in_array($forumid,array(54,45))">
                   <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumbit_$forumid')"><img id="collapseimg_forumbit_$forumid" src="$stylevar[imgdir_button]/collapse_tcat{$collapseimg_forumid}.gif" alt="" border="0" /></a>
                </if>
                   <a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a>
                   <if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>
                   <if condition="$show['subforums']"><div class="smallfont"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>
                  </td>
                 </tr>
                </tbody>
                <if condition="$childforumbits">
                <tbody id="collapseobj_forumbit_$forumid" style="{$collapseobj_forumid}">
                $childforumbits
                </tbody>
                </if>

                forumhome_forumbit_level2_nopost:
                HTML Code:
                <tbody>
                <tr>
                 <td class="tcat"><span class="smallfont">&nbsp;</span></td>
                 <td class="tcat" colspan="<if condition="$vboptions['showmoderatorcolumn']">5<else />4</if>">
                   <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumbit_$forumid')"><img id="collapseimg_forumbit_$forumid" src="$stylevar[imgdir_button]/collapse_tcat{$collapseimg_forumid}.gif" alt="" border="0" /></a>
                  <a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a>
                  <if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>
                  <if condition="$show['subforums']"><div class="smallfont"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>
                 </td>
                </tr>
                </tbody>
                <tbody id="collapseobj_forumbit_$forumid" style="{$collapseobj_forumid}">
                $childforumbits
                </tbody>

                forumhome_forumbit_level3_nopost:
                HTML Code:
                <tr>
                 <td class="tcat"><span class="smallfont">&nbsp;</span></td>
                 <td class="tcat" colspan="<if condition="$vboptions['showmoderatorcolumn']">5<else />4</if>">
                  <a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a>
                  <if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>
                  <if condition="$show['subforums']"><div class="smallfont"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>
                 </td>
                </tr>
                $childforumbits
                forumhome_forumbit_level3_post:
                HTML Code:
                <tr align="center">
                 <td class="alt2"><img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" /></td>
                 <td class="alt1Active" align="$stylevar[left]" id="f$forum[forumid]">
                  <div>
                   <a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><strong>$forum[title]</strong></a>
                   <if condition="$show['browsers']"><span class="smallfont">(<phrase 1="$forum[browsers]">$vbphrase[x_viewing]</phrase>)</span></if>
                  </div>
                  <if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>
                  <if condition="$show['forumsubscription']"><div class="smallfont"><strong><a href="subscription.php?$session[sessionurl]do=removesubscription&amp;f=$forum[forumid]">$vbphrase[unsubscribe_from_this_forum]</a></strong></div></if>
                  <if condition="$show['subforums']"><div class="smallfont" style="margin-top:$stylevar[cellpadding]px"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>
                 </td>
                 <td class="alt2" nowrap="nowrap">$forum[lastpostinfo]</td>
                 <td class="alt1">$forum[threadcount]</td>
                 <td class="alt2">$forum[replycount]</td>
                 <if condition="$vboptions['showmoderatorcolumn']">
                 <td class="alt1"><div class="smallfont">$forum[moderators]&nbsp;</div></td>
                 </if>
                </tr>
                $childforumbits
                Visit R/C Groups at www.rcgroups.com

                Comment


                • #9
                  I'm not sure if it was clear what I was trying to do, so let me explain.

                  I first wanted the level 2 no post forums to be collapsable. But when I added that to the template I noticed that the level 1 no post forums wouldn't collapse anymore.

                  If there was a way to make it a tree such that the level 1 forums could collapse and the level 2 could as well that would be ideal.

                  Since I couldn't make that happen I decided to just use a conditional to keep the level 1 forums from showing the collapse link unless they had no sub-categories.

                  I've reviewed it again and I don't see my error. I'm happy with it the way it is as long as I can get the sub-forum collapse selection to be remembered by the browser. It would be ideal if I could have collapsability at any point in the hierarchy.

                  Jim
                  Visit R/C Groups at www.rcgroups.com

                  Comment


                  • #10
                    Because your using the same id more than once

                    id="collapseobj_forumbit_$forumid" Since this would get defined more than once its going to cause some problems. Im not sure if its possible to accomplish what you want to do.

                    Comment


                    • #11
                      I don't agree that I'm using the same id more than once. The $forumid is different every time the id is printed.

                      Do a view source on the page and you'll see that no id is repeated.

                      Jim
                      Visit R/C Groups at www.rcgroups.com

                      Comment


                      • #12
                        Well then im abit lost and im not sure why it wont do it correctly, ill see if someone else knows.

                        Comment


                        • #13
                          Thanks. I might end up reverting a few of the changes since we haven't solved the problem yet, so you might not be able to use my forum as a place to reproduce the problem.

                          Jim
                          Visit R/C Groups at www.rcgroups.com

                          Comment


                          • #14
                            Any luck?

                            Jim
                            Visit R/C Groups at www.rcgroups.com

                            Comment


                            • #15
                              Bug in my own bug-tracker: http://rcgroups.com/forums/bugs.php?...wdetails&id=40
                              Visit R/C Groups at www.rcgroups.com

                              Comment

                              Loading...
                              Working...
                              X