Custom collapsible element cookie problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Miko
    Senior Member
    • May 2002
    • 136
    • 4.0.x

    Custom collapsible element cookie problem

    Edit: Thank you for the great support and for fixing my probem
    Last edited by Miko; Sun 27 Feb '05, 9:37pm.
  • Jake Bunce
    Senior Member
    • Dec 2000
    • 46598
    • 3.6.x

    #2
    Try this:

    Code:
    <div id="collapseobj_alpha_$forumid" style="{$vbcollapse['collapseobj_alpha_$forumid']}">

    Comment

    • Jake Bunce
      Senior Member
      • Dec 2000
      • 46598
      • 3.6.x

      #3
      I know this works. Consult with that thread.

      Comment

      • Jake Bunce
        Senior Member
        • Dec 2000
        • 46598
        • 3.6.x

        #4
        I don't see any other problems off hand. Does that code from that thread not work? It should.

        Comment

        • Jake Bunce
          Senior Member
          • Dec 2000
          • 46598
          • 3.6.x

          #5
          Originally posted by Mone'
          ...

          now the problem is that i can't add $forumid to:
          style="$vbcollapse[collapseobj_my_table_$forumid[color=Black]]"
          out getting a parse error for the 2 "$"

          ...
          Try the code I posted:

          Code:
          <div id="collapseobj_alpha_$forumid" [color=red]style="{$vbcollapse['collapseobj_alpha_$forumid']}"[/color]>
          I think that will work.

          Comment

          • Jake Bunce
            Senior Member
            • Dec 2000
            • 46598
            • 3.6.x

            #6
            It appears there is a problem with indexing into $vbcollapse[] when the index contains a variable itself. I have the same problem when I apply it to my own code.

            I have been unable to find a fix.

            Comment

            • Miko
              Senior Member
              • May 2002
              • 136
              • 4.0.x

              #7
              I'm glad that you have the same problem, because i have tested so many different conditionals and 1 of then should have worked in first place.
              Do you know where i can add the conditional in the php files to fix this?
              or are you going to send me to >>>vbulletin.org :P

              Comment

              • Jake Bunce
                Senior Member
                • Dec 2000
                • 46598
                • 3.6.x

                #8
                Yes, for file mods you would go to www.vbulletin.org.

                I am asking the others about a solution using templates.

                Comment

                • Jake Bunce
                  Senior Member
                  • Dec 2000
                  • 46598
                  • 3.6.x

                  #9
                  It is probably too early to post it as a bug. We don't know if we are doing it right.

                  Comment

                  • Mike Sullivan
                    Former vBulletin Developer
                    • Apr 2000
                    • 13327
                    • 3.6.x

                    #10
                    I stand corrected from my response in the bug. You should use:

                    {$vbcollapse['collapseobj_alpha_' . $forumid]}

                    Comment

                    • Mike Sullivan
                      Former vBulletin Developer
                      • Apr 2000
                      • 13327
                      • 3.6.x

                      #11
                      Corrected again. This one works. I checked it:

                      {$GLOBALS['vbcollapse']['collapseobj_my_table_' . $forumid]}

                      $vbcollapse wasn't in the scope of the function.

                      Comment

                      • Miko
                        Senior Member
                        • May 2002
                        • 136
                        • 4.0.x

                        #12
                        Originally posted by Mike Sullivan
                        Corrected again. This one works. I checked it:

                        {$GLOBALS['vbcollapse']['collapseobj_my_table_' . $forumid]}

                        $vbcollapse wasn't in the scope of the function.
                        you are the man!
                        thank you , finally working

                        Comment

                        • Jake Bunce
                          Senior Member
                          • Dec 2000
                          • 46598
                          • 3.6.x

                          #13
                          Ah, the scope never occurred to me.

                          I have updated the 'how to' thread:

                          Comment

                          • TundraSoul
                            Senior Member
                            • Jun 2001
                            • 215
                            • 4.2.X

                            #14
                            Curious, is it possible to make the table collapse from the left to right?

                            Comment

                            • Jake Bunce
                              Senior Member
                              • Dec 2000
                              • 46598
                              • 3.6.x

                              #15
                              Yes. You would need to apply these attributes to something on the right:

                              Code:
                              [color=purple]id="collapseobj_[color=red]my_table[/color]" style="$vbcollapse[collapseobj_[color=red]my_table[/color]]"[/color]

                              Comment

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