HomeHome  
  • WelcomeWelcome  
  • Events  
  • PublicationsPublications  
  • FAQFAQ  
  • SearchSearch  
  • MemberlistMemberlist  
  • UsergroupsUsergroups  
  • RegisterRegister  
  • Log inLog in  
  • You are not connected. Please login or register


    Completely remove a button from the navigation bar

    avatar
    • Veteran staff member

        Reputation : 8
        Registered on : 2012-03-24
        Posts : 30
      Completely remove a button from the navbar

      Description


      This tutorial will show you how to completly remove a useless button (text or/and image) from the navigation bar with Javascript.

      Set up


      In first, you need to know the ID (#) of the button that you want to remove. To help you, here is a table with buttons, descriptions and ids:

      ID (#)DescriptionID (#)Description
      #i_icon_mini_indexID of the image Index#i_icon_mini_calendarID of the image Calendar
      #i_icon_mini_portalID of the image Portal#i_icon_mini_faqID of the image FAQ
      #i_icon_mini_searchID of the image Search#i_icon_mini_membersID of the image Members
      #i_icon_mini_groupsID of the image Groups#i_icon_mini_profileID of the image Profile
      #i_icon_mini_messageID of the image PM#i_icon_mini_new_messageID of the image New PM
      #i_icon_mini_logoutID of the image Log out#i_icon_mini_loginID of the image Log in
      #i_icon_mini_registerID of the image Register

      Once you have found the ID of the image you want to remove, create a new Javascript code by going in your administration panel like this:
      > ACP | Modules | HTML & JAVASCRIPT | Javascript codes management | Create a new Javascript

      Insert this code in all the pages:
      Code:
      <!--- Subject: "Remove buttons on pages" - Copyright 2012 by www.fmcodes.com. All Rights Reserved. Use and/or modification of this script is allowed, provided this entire copyright notice remains in the original or modified code. Distribution is not allowed without written consent from FMCodes---!>
      $(document).ready(function(){$('#ID).parent().hide();});

      You have to remplace #ID by the ID of the image that you want to remove.

      After this, a space will probably be created instead of the button. To remove it, insert this code in your CSS:
      Code:
      #ID {
      margin-left: -9px;
      }

      Here, you need to rempalce #ID by the ID of the image who is at the left of the button that you removed.

      Demonstration



      As you can see, the image "Groups" and the text are removed.

      Technical problems


      The code was tested on all versions and works with all browsers; If you notice that the tutorial doesn't work for a browser or for a version of forum (PhpBB2, PhpBB3, PunBB, Invision) contact an administrator and we will fill this field with your segnalation.

      Thanks, the staff

      For every problem or question please, contact us in the section Support for the tutorials, The staff will answer you as soon as it is possible...


      Friendly,
      The team of the Forum of Codes.

      avatar
      • Veteran staff member

          Reputation : 14
          Registered on : 2012-02-25
          Posts : 98
        Very useful: D. You are great!

        avatar
        • ***


            Reputation : 5
            Registered on : 2012-03-23
            Posts : 36
          Useless. Why use javascript to remove the icons, when you can delete them from image administration?

          avatar
          • Administrator

              Reputation : 315
              Registered on : 2012-02-22
              Posts : 2362
              School of codes courses: coming soon
            FastCode wrote:Useless. Why use javascript to remove the icons, when you can delete them from image administration?
            Ahahah you're right... But it is a good tutorial (:



            Niko wants you in the team Guest

            Community manager and Administrator at Forumattivo.com

            avatar
            • ***


                Reputation : 0
                Registered on : 2012-03-26
                Posts : 49
              Yes, useless for remove only icons. This script help to change the navbar text.

              Code:
              document.getElementById('i_icon_mini_groups').parentNode.innerHTML="Groups";
              document.getElementById('i_icon_mini_members').parentNode.innerHTML="Members";

              avatar
              • Manager

                  Reputation : 20
                  Registered on : 2012-04-01
                  Posts : 407
                Yes, I assume it's pretty neat. :)



                avatar
                • Veteran staff member

                    Reputation : 8
                    Registered on : 2012-03-24
                    Posts : 30
                  Hi,

                  This tutorial allows to to COMPLETLY remove the button. You can't to this in the administration control panel. ;)

                  avatar
                  • ***


                      Reputation : 5
                      Registered on : 2012-03-23
                      Posts : 36
                    Redge wrote:Hi,

                    This tutorial allows to to COMPLETLY remove the button. You can't to this in the administration control panel. ;)
                    You can do his with css. ;)

                    avatar
                    • ***


                        Reputation : 5
                        Registered on : 2012-04-07
                        Posts : 43
                      not working

                      avatar
                      • Manager

                          Reputation : 20
                          Registered on : 2012-04-01
                          Posts : 407
                        @BlackNight - This tutorial does work, please have another go at this. Don't forget to add the ID's.



                        avatar
                        • ***


                            Reputation : 5
                            Registered on : 2012-04-07
                            Posts : 43
                          I try and try but still the same result.

                          avatar
                          • ****


                              Reputation : 3
                              Registered on : 2012-03-22
                              Posts : 54
                            hihiihi


                            YOUR BANNER HERE
                            728x90
                            DMCA.com Protection Status
                            © PunBB | Contact | Report an abuse