Project Tools Link not Visible in NavBar with Customized Style

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • NashChristian
    Senior Member
    • May 2008
    • 187
    • 4.0.0

    Project Tools Link not Visible in NavBar with Customized Style

    Hello.

    I have a couple of customized styles that I'm using on my website, which place the navbar code in the header. For some reason on those styles, the Project Tools link does not show up at all. I'm sure that you have run accross this. How do I "fix" it to show the Project Tools link in those styles?

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

    #2
    Your customized navbar is missing the necessary template hooks for additional things to be inserted. You'd have to revert and recustomize that template.

    Comment

    • NashChristian
      Senior Member
      • May 2008
      • 187
      • 4.0.0

      #3
      These two styles were created by another designer, and it is beyond my ability to code to rewrite their styles to place the navigation back in the navbar.

      Is there another work-around? Can I add some snippet of code to the header (where the rest of my navbar code currently is) which would trigger the hook that calls up the Project Tools link? Or is there some snippet of code that I could create a plug-in with that would redirect these efforts and call up the Project Tools link?

      Surely there is some way that I can still use these styles and Project Tools...?

      Thanks.
      Jeff

      Comment

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

        #4
        The project tools insert into the following template hooks, which are variables present in the default navbar template:

        $template_hook[navbar_search_menu]
        $template_hook[navbar_buttons_left]

        You would need to put them in appropriate places in your navbar (you can view the default version for ideas of where they go). If you have trouble with this, I'd have to recommend contacting your designer.

        Comment

        • NashChristian
          Senior Member
          • May 2008
          • 187
          • 4.0.0

          #5
          Ok.

          I'll see if I can figure this out.

          Thanks.
          Jeff

          Comment

          • 1QuickSI
            Senior Member
            • Oct 2001
            • 881
            • 4.2.5

            #6
            Or you can hard code it in to the template. Not the best solution but will get you up and running if you have trouble with the hooks and their locaitons.
            -----------------------------------------------------------
            Running custom version of vBulletin based on v4.2.5
            PHP 7.4.14 :: MariaDB 10.5.8

            Comment

            • NashChristian
              Senior Member
              • May 2008
              • 187
              • 4.0.0

              #7
              Originally posted by Mike Sullivan
              The project tools insert into the following template hooks, which are variables present in the default navbar template:

              $template_hook[navbar_search_menu]
              $template_hook[navbar_buttons_left]

              You would need to put them in appropriate places in your navbar (you can view the default version for ideas of where they go). If you have trouble with this, I'd have to recommend contacting your designer.
              The custom style which I'm using by Miner, uses these same variables, he just puts them in the Header instead of the Navbar. Why, since the variables are being used, is it not creating the Project Tools link or the Project Tools search box?

              I wonder if it could be because he is using a different TD Class? Miner is using <td class="alt5"> instead of the vB default of <td class="vbmenu_control">. Do you think that this may have something to do with the problem?

              Thanks.
              Jeff
              Last edited by NashChristian; Fri 30 May '08, 9:04pm.

              Comment

              • NashChristian
                Senior Member
                • May 2008
                • 187
                • 4.0.0

                #8
                Originally posted by 1QuickSI
                Or you can hard code it in to the template. Not the best solution but will get you up and running if you have trouble with the hooks and their locaitons.
                Hello.

                How would I hard code it to only appear for the ONE user group which has access to Project Tools?

                Thanks for the help!
                Jeff

                Comment

                • lkmad
                  New Member
                  • Aug 2007
                  • 10
                  • 3.6.x

                  #9
                  Originally posted by NashChristian
                  The custom style which I'm using by Miner, uses these same variables, he just puts them in the Header instead of the Navbar. Why, since the variables are being used, is it not creating the Project Tools link or the Project Tools search box?

                  I wonder if it could be because he is using a different TD Class? Miner is using <td class="alt5"> instead of the vB default of <td class="vbmenu_control">. Do you think that this may have something to do with the problem?

                  Thanks.
                  Jeff
                  Did you find a solution for this??? I'm having same problem, but my custom style creator did not use the hooks at all... is it possible for you to share an example of how the hooks are used in the header??

                  Comment

                  • pank
                    Senior Member
                    • Mar 2001
                    • 466

                    #10
                    Originally posted by lkmad
                    Did you find a solution for this??? I'm having same problem, but my custom style creator did not use the hooks at all... is it possible for you to share an example of how the hooks are used in the header??
                    I "think" I found the solution for you. Check out your thread at our forum...

                    The problem is it appears you can only use those hooks in the actual navbar. If you try to use them in the header template they do not work (at least I cannot get them to work so I assume they are specific to the navbar template only).

                    Since this seems to be a question multiple people have I'll go ahead and share the code I am using. I hope it may be useful to people looking to add the project tools link to the header vs. the navbar.

                    Code:
                    <!-- Load project Link-->
                    <if condition="$vbulletin->products['vbprojecttools'] AND $vbulletin->userinfo['permissions']['ptpermissions'] & $vbulletin->bf_ugp_ptpermissions['canviewprojecttools']">
                    <td width="67" height="25" align="left" valign="top"><a href="project.php$session[sessionurl_q]"><img src="$stylevar[imgdir_misc]/ambience_nav_projects.gif" alt="" width="69" height="25" border="0"  /></a></td>
                    </if>
                    <!-- End project Link-->
                    The code will only show the link to those with permissions to view the project tools and it all seems to work fine.

                    If any of the vB staff sees this and has a better <if statement by all means please let me know
                    Bob- (pank)
                    pankpages.com / http://twitter.com/_pank

                    Comment

                    • NashChristian
                      Senior Member
                      • May 2008
                      • 187
                      • 4.0.0

                      #11
                      Originally posted by pank
                      I "think" I found the solution for you. Check out your thread at our forum...

                      Code:
                      <!-- Load project Link-->
                      <if condition="$vbulletin->products['vbprojecttools'] AND $vbulletin->userinfo['permissions']['ptpermissions'] & $vbulletin->bf_ugp_ptpermissions['canviewprojecttools']">
                      <td width="67" height="25" align="left" valign="top"><a href="project.php$session[sessionurl_q]"><img src="$stylevar[imgdir_misc]/ambience_nav_projects.gif" alt="" width="69" height="25" border="0"  /></a></td>
                      </if>
                      <!-- End project Link-->
                      The code will only show the link to those with permissions to view the project tools and it all seems to work fine.

                      If any of the vB staff sees this and has a better <if statement by all means please let me know
                      Hello Pank!

                      You must be using a graphic for the link, instead of a text link. Can you please tell us what the code would be, when using a typical text link?

                      The solution that I implemented, was a bit simpler, but not as thorough as yours. I only have 3 user groups that are allowed to view Project Tools, so I just included their User Group ID's in the IF condition:

                      Code:
                      [LEFT] <if condition="is_member_of($bbuserinfo, 5, 6, 16)"><td class="alt5"><a href="$vboptions[bburl]/project.php$session[sessionurl_q]" rel="nofollow">$vbphrase[projects]</a></td></if>[/LEFT]
                      I don't know if the [rel="nofollow"] was necessary or not, but I don't want spiders to crawl my project tools, so I included it. Also, I'm running vBa on my site, so I provided the full URL.

                      Your solution does seem more complete though, since you don't have to hard code which user groups are allowed to view the link, and which are not.

                      Thanks for sharing!
                      Jeff

                      Comment

                      • lkmad
                        New Member
                        • Aug 2007
                        • 10
                        • 3.6.x

                        #12
                        Originally posted by pank
                        I "think" I found the solution for you. Check out your thread at our forum...

                        The problem is it appears you can only use those hooks in the actual navbar. If you try to use them in the header template they do not work (at least I cannot get them to work so I assume they are specific to the navbar template only).

                        Since this seems to be a question multiple people have I'll go ahead and share the code I am using. I hope it may be useful to people looking to add the project tools link to the header vs. the navbar.

                        Code:
                        <!-- Load project Link-->
                        <if condition="$vbulletin->products['vbprojecttools'] AND $vbulletin->userinfo['permissions']['ptpermissions'] & $vbulletin->bf_ugp_ptpermissions['canviewprojecttools']">
                        <td width="67" height="25" align="left" valign="top"><a href="project.php$session[sessionurl_q]"><img src="$stylevar[imgdir_misc]/ambience_nav_projects.gif" alt="" width="69" height="25" border="0"  /></a></td>
                        </if>
                        <!-- End project Link-->
                        The code will only show the link to those with permissions to view the project tools and it all seems to work fine.

                        If any of the vB staff sees this and has a better <if statement by all means please let me know

                        thank you once again!!

                        this worked perfectly!

                        Comment

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