Announcement

Collapse
No announcement yet.

which variable??

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

  • Veev
    replied
    I am trying to use Lynne's top post to implement a hook of my own. I am using the hooks_vbulletin.xml file as recommended here, but I am not sure how to set it up. I would like for anyone in usergroup id 11, 12, 13, 14, or 15 to be made true for my custom show variable...

    Code:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <hooks>
        <hooktype type="My Custom Hooks">
            <hook>if (is_member_of($vbulletin->userinfo, 11,12,13,14,15)) $show['can_view_apps'] = true;</hook>
        </hooktype>
    </hooks>
    But I'm not sure where to use "load_show_variables"... should I put it in place of "My Custom Hooks"?

    Leave a comment:


  • tonmo
    replied
    Perfect, thanks

    Leave a comment:


  • Lynne
    replied
    Then use load_show_variables

    Leave a comment:


  • tonmo
    replied
    This doesn't seem to work if you use your CMS as your homepage... i.e., it only shows up when I'm in the /forums/ directory, but my CMS is at my root, and this hook doesn't seem to load when content.php loads.

    Leave a comment:


  • Bounce
    replied
    Originally posted by Lynne View Post
    Right now that field only takes the $show variable. I believe there is a suggestion to also allow users to pick usergroups so you may want to look for it and vote for it.
    I created a hook, added your code, put in my usergroups and put my_show into text area, works a treat, have even tested removing the id 6 admins to test and i dont see it no more so know it works

    Leave a comment:


  • Lynne
    replied
    Originally posted by Bounce View Post
    easy when you know how brilliance lynne, thank you, thank you
    Well, I had a little bit of help from Paul when I first started to look at the navigation manager and the ins and outs of permissions for the tabs.

    Leave a comment:


  • Bounce
    replied
    easy when you know how brilliance lynne, thank you, thank you

    Leave a comment:


  • Lynne
    replied
    Right now that field only takes the $show variable. I believe there is a suggestion to also allow users to pick usergroups so you may want to look for it and vote for it.

    Leave a comment:


  • Bounce
    replied
    Originally posted by Lynne View Post
    hook location: load_forum_show_variables
    PHP Code:
    if (is_member_of($vbulletin->userinfox,y,z)) $show['my_show'] = true
    And then enter "my_show" in the "Show Permission Name" textarea of the Navtab.
    thanks but still dont follow sorry lynne, i was under the impression that all I added was name or usergroup id to that show permission name text area

    - - - Updated - - -

    cancel that, sussed ya ty lynne

    Leave a comment:


  • Lynne
    replied
    hook location: load_forum_show_variables
    PHP Code:
    if (is_member_of($vbulletin->userinfox,y,z)) $show['my_show'] = true
    And then enter "my_show" in the "Show Permission Name" textarea of the Navtab.

    Leave a comment:


  • Bounce
    started a topic [Forum] which variable??

    which variable??

    I'm trying to set up a menu with links only available to certain usergroups. what do i add to the Show Permission Name ?

    Show Permission Name:Administrators.Donators doesnt work, it says put a full stop? or have i got the variable wrong?

Related Topics

Collapse

Working...
X