Announcement

Collapse
No announcement yet.

Finding menu_open.gif

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

  • Finding menu_open.gif

    I am trying to design a new style in preparation for my 2nd anniversary and the upgrade to vB 3.7.0. I can't seem to find the template or file where menu_open.gif is used - specifically, where the size is set to 11x7px. I have designed a new icon that is 11x12px, but only a small part of it is visible when I replace the original GIF. I have searched all my files and templates with no luck.

    Thanks for any help locating the code for that graphic.

    Jim
    If my post was helpful to you, please take the time to register at my forum and ask a question you've always wanted to know about floors.
    www.TheFloorPro.com

  • #2
    I was finally able to locate the file and code for menu_open.gif. It is called up in the vbulletin_menu.js file. I've never messed with JavaScript files before. I did notice that the part of the .js file that deals with this icon uses code for the border, title and alt attribute and each of those uses the same format:
    Code:
    var img = document.createElement('img');
    img.src = IMGDIR_MISC + '/menu_open.gif';
    img.border = 0;
    img.title = '';
    img.alt = '';
    So, I figured I could do a little editing that could be reversed if it didn't work:
    Code:
    var img = document.createElement('img');
    img.src = IMGDIR_MISC + '/menu_open.gif';
    img.width = 11;
    img.height = 12;
    img.border = 0;
    img.title = '';
    img.alt = '';
    It works fine with one caveat. Changing that, changes it in all styles. I still don't know what sets the size to 11x7px, but changing it to 11x12px changes it everywhere. Since I have and will continue to offer only one style to my members, this isn't a problem for me. However, I will have to edit that .js file every time I do an upgrade.

    Here's what it looks like on the unfinished new style:



    Oh yeah, for any of you code validation freeks (like me), it validates.

    Jim
    If my post was helpful to you, please take the time to register at my forum and ask a question you've always wanted to know about floors.
    www.TheFloorPro.com

    Comment


    • #3
      I personally haven't had this problem and have seen various sized menu_open.gif images used without js edits. Perhaps one of your css selectors is changing the image when you didn't mean it to?
      vbStartup.com: vBulletin 3.7 Styles | vBulletin Tutorials

      Comment


      • #4
        It would have to be one of vBulletin's CSS selectors then. The only thing I changed about it is the background.

        Anyway, I don't understand why vB would have used a design element that was stashed away in a .js file.

        Jim
        If my post was helpful to you, please take the time to register at my forum and ask a question you've always wanted to know about floors.
        www.TheFloorPro.com

        Comment


        • #5
          It's easier to have them dynamically added than having them scattered throughout the templates. They do the same sort of thing with the multi-quote button... I have to include a js file with a couple of my styles so that I can use a text link for the multiquote /shrug

          In any event, I can't find anything affecting the height and width of the menu_open.gif image

          http://www.grabup.com/uploads/2b779e...d3902dc86a.png
          vbStartup.com: vBulletin 3.7 Styles | vBulletin Tutorials

          Comment


          • #6
            Having the same problem here. VB3.X is really annoying. The tables for example are no fun at all.

            But anyway, adding an image via javascript is not cool. I will have to see if I can change that javascript to add a character instead of an image.

            EDIT: Awww, ****. So the js files are compressed. Incredible. VB 3.X has some of the worst templates I've ever come across. Compressing the js files will hardly bring performance improvements if there's useless tables all over the templates...

            Comment


            • #7
              Download the uncompressed version. It's an option when you download.
              My Live vB5 Site - NZEating.com
              vBulletin Hosting | vBulletin Services - Need hosting for your vB? Need it installed? Something else? Let me take that hassle off your hands.

              Comment

              Loading...
              Working...
              X