Announcement

Collapse
No announcement yet.

Problem with Dropdown-Menus and CSS-Layout

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

  • #16
    If it has not been reported in the bug tracker then it will be unlikely to be picked up on by the developers. In addition, we do not support modifications and this is an issue only with modified templates. Therefore, you should post at vBulletin.org for help with this.
    Kerry-Anne :)

    Twitter Blog

    www.peterska2.com www.worldnewszone.com www.popularusenetgroups.com www.superclickers.co.uk www.forumsforchrist.com www.browsergameplanet.com

    Comment


    • #17
      Originally posted by Kerry-Anne View Post
      If it has not been reported in the bug tracker then it will be unlikely to be picked up on by the developers. In addition, we do not support modifications and this is an issue only with modified templates. Therefore, you should post at vBulletin.org for help with this.
      It has been posted in the bug tracker a long time ago (link).

      @cscgal: If you are sure that a line works properly, but it causes a js error, the way to go is the try...catch construct

      Comment


      • #18
        Can you provide a copy of this updated file? I cannot seem to edit the file correctly, it's not separated in line numbers.

        Comment


        • #19
          Hi, either you search this file for the right place, or you download the uncompressed version in your members area, then editing should be easier

          Comment


          • #20
            Perfect! Works like a charm. Need to make sure I keep a copy of this file for future upgrades.

            Thanks!

            Comment


            • #21
              I fixed the last bug of this code! Yay!! Look in the Vbulletin_menu.js, and replace the function: vB_Popup_Menu.prototype.set_menu_position = function(obj)
              With:
              Code:
              vB_Popup_Menu.prototype.set_menu_position = function(obj)
              {
               this.pos = this.fetch_offset(obj);
               this.leftpx = this.pos['left'];
               this.toppx = this.pos['top'] + obj.offsetHeight;
               
               var left_offset = obj.offsetLeft;
               var obj_orig = obj;
               var i = 0;
               while ((obj = obj.offsetParent) != null) i++;
               obj = obj_orig;
               while(i > 0)
               {
                obj = obj.offsetParent;
                left_offset += obj.offsetLeft;
                i--;
               }
                    obj = obj_orig;
               
               if ((left_offset + this.menuobj.offsetWidth) >= document.body.clientWidth && (this.leftpx + obj.offsetWidth - this.menuobj.offsetWidth) > 0)
               {
                this.leftpx = this.leftpx + obj.offsetWidth - this.menuobj.offsetWidth;
                this.direction = 'right';
               }
               else
               {
                this.direction = 'left';
               }
               // move the pagenav menu to the calling object, so it appears to be styled like where it's displayed
               if (this.controlkey.match(/^pagenav\.\d+$/))
               {
                obj.appendChild(this.menuobj);
               }
               this.menuobj.style.left = this.leftpx + 'px';
               this.menuobj.style.top  = this.toppx + 'px';
              };

              Comment


              • #22
                The "search this forum" dropdown does not work on subforums. Would that have anything to do with this .js file? It works with the stock one but it floats like the others.

                Comment


                • #23
                  I am afraid it does not help when it is called for div's with position declared differently as vB allows us to use
                  I have the very same problem and I cannot agree to such behaviour of vB. Most of sites using external adservers must comply with RELATIVE positioning as well as z-index to avoid abnormal flash viewing.

                  Thus, changing positioning of the main layer to relative makes vB menu to show off the expected position.

                  It clearly does not look like a proper customer treatment here. Disappointing, I must say.

                  Comment


                  • #24
                    ...got the same problem here.

                    Comment


                    • #25
                      Doesn't work for me neither - i have div-driven style sheets ....

                      AndyN

                      Comment


                      • #26
                        same problem in 3.8.x
                        I opened a thread in the 3.8.x forum => here

                        Comment


                        • #27
                          Hey StGaensler! I WOULD BUY YOU A BEER RIGHT NOW IF I COULD! THIS CODE WORKS GREAT. THANK YOU VERY MUCH!!!!

                          Originally posted by StGaensler View Post
                          Yes I have another solution

                          Edit clientscript/vbulletin_menu.js and replace function vB_Popup_Menu.prototype.fetch_offset (line 472 in vB 3.6.4) with following function:
                          Code:
                          vB_Popup_Menu.prototype.fetch_offset = function(obj)
                          {
                              var left_offset = obj.offsetLeft;
                              var top_offset = obj.offsetTop;
                              var obj_orig = obj;
                              var obj_menu = document.getElementById(obj.id + '_menu');
                              var i = 0;
                          
                              while ((obj = obj.offsetParent) != null) i++;
                              while ((obj_menu = obj_menu.offsetParent) != null) i--;
                          
                              obj = obj_orig;
                          
                              while(i > 0)
                              {
                                  obj = obj.offsetParent;
                                  left_offset += obj.offsetLeft;
                                  top_offset += obj.offsetTop;
                                  i--;
                              }
                          
                              return { 'left' : left_offset, 'top' : top_offset };
                          };
                          Would be fine if somebody could respond if it works with his style.

                          Comment


                          • #28
                            The only issue with code above is that the page-nav dropdown errors out... all others work.

                            Comment


                            • #29
                              FIXED!!! I found the solution on jfusion forum, credit to the original poster

                              In the CSS I replaced "position:relative" with "position:inherit" for the DIVs that wrap the forum and now it works great!

                              The only problem is that adding code to Extra CSS Attributes (like that post say) didn't work for me so I had to edit the vbulletin CSS. Maybe I don't know how Extra CSS Attributes box works.

                              Comment


                              • #30
                                Thanks for posting that it helped me solve a few issues with our forums
                                ■█► WireNine.com Web Hosting 8+ years in business!
                                ■█► Shared Hosting, Reseller Hosting and VPS Hosting 24/7 Support 99.9% Uptime 60 Day Money Back Guarantee
                                ■█► cPanel, Litespeed, CloudFlare, Softaculous, Attracta SEO, Site Builder
                                ■█► Find us on Facebook and follow us @wirenine

                                Comment

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