The forum of the forums

Would you like to react to this message? Create an account in a few clicks or log in to continue.
The forum of the forums
4 posters

    How can I hide an Admin Link from Guests and Members?

    Van-Helsing
    Van-Helsing
    Hyperactive


    Male Posts : 2431
    Reputation : 116
    Language : English, Greek

    Solved How can I hide an Admin Link from Guests and Members?

    Post by Van-Helsing May 31st 2014, 12:50 am

    Hi dear all,
    I want to ask you about these html tags:
    Code:

    <!-- BEGIN switch_auth_user -->

    Code:

    <!-- END switch_auth_user -->
    I want to place a link between those tags in overall_header template because I want to have a link on my navbar hidden from members and guests and it be available only for moderators and administrators, I have try it but it isn't working.
    Can you help me please? My forum version is PunBB and I am using a customized navbar menu.

    With Best Regards,
    Dark-Avenger


    Last edited by Dark-Avenger on June 2nd 2014, 12:04 am; edited 2 times in total
    RadioHead
    RadioHead
    Forumember


    Posts : 336
    Reputation : 23
    Language : English (der?)

    Solved Re: How can I hide an Admin Link from Guests and Members?

    Post by RadioHead May 31st 2014, 5:18 am

    Hi,

    May I suggest you check the navigation  part of the admin panel?

    PA > Display > Headers & Navigation > Add a customised menu > Select only Admin & Moderators.
    Van-Helsing
    Van-Helsing
    Hyperactive


    Male Posts : 2431
    Reputation : 116
    Language : English, Greek

    Solved Re: How can I hide an Admin Link from Guests and Members?

    Post by Van-Helsing May 31st 2014, 8:11 pm

    RadioHead wrote:Hi,

    May I suggest you check the navigation  part of the admin panel?

    PA > Display > Headers & Navigation > Add a customised menu > Select only Admin & Moderators.

    I have try it as you can see here http://prntscr.com/3oe1hp but it isn't display on the my custom navbar http://prntscr.com/3oe1st .
    Van-Helsing
    Van-Helsing
    Hyperactive


    Male Posts : 2431
    Reputation : 116
    Language : English, Greek

    Solved Re: How can I hide an Admin Link from Guests and Members?

    Post by Van-Helsing June 1st 2014, 9:54 pm

    Bump
    Paulostge
    Paulostge
    Forumember


    Male Posts : 129
    Reputation : 17
    Language : Greek
    Location : Greece

    Solved Re: How can I hide an Admin Link from Guests and Members?

    Post by Paulostge June 1st 2014, 10:42 pm

    Code:
     <!-- BEGIN switch_user_logged_in -->

    element

    <!-- END switch_user_logged_in -->
    Van-Helsing
    Van-Helsing
    Hyperactive


    Male Posts : 2431
    Reputation : 116
    Language : English, Greek

    Solved Re: How can I hide an Admin Link from Guests and Members?

    Post by Van-Helsing June 1st 2014, 11:08 pm

    Paulostge wrote:
    Code:
     <!-- BEGIN switch_user_logged_in -->

    element

    <!-- END switch_user_logged_in -->

    Hi Paulos,
    I have already try it I put the element in this tags but its visible to members too. I am looking for other tags to be visible only for admins. Furthermore I tried this code

    Code:

    <!-- BEGIN switch_auth_user -->
    <li><a href="URL" title="Admin Control Panel">Admin CP</a></li>
    <!-- END switch_auth_user -->

    and this code
    Code:

     Â           <!-- BEGIN switch_user_level -->
     Â                     <li><a href="URL" title="Admin Control Panel">Admin CP</a></li>
     Â           <!-- END switch_user_level -->

    but the codes when published the template are ignoring and I dont know why. When I am removing those tags the link is visible to all members, mods, admins etc.

    I am thinking it needs a javascript to control the userdata level.
    Paulostge
    Paulostge
    Forumember


    Male Posts : 129
    Reputation : 17
    Language : Greek
    Location : Greece

    Solved Re: How can I hide an Admin Link from Guests and Members?

    Post by Paulostge June 1st 2014, 11:37 pm

    You can put a widget and choose...

    How can I hide an Admin Link from Guests and Members? 110
    Van-Helsing
    Van-Helsing
    Hyperactive


    Male Posts : 2431
    Reputation : 116
    Language : English, Greek

    Solved Re: How can I hide an Admin Link from Guests and Members?

    Post by Van-Helsing June 2nd 2014, 12:03 am

    Thanks Paulos that's a nice idea. I have make and the css and now working perfect.
    Problem is solved.

    Best Regards,
    Dark-Avenger
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51498
    Reputation : 3523
    Language : English
    Location : United States

    Solved Re: How can I hide an Admin Link from Guests and Members?

    Post by SLGray June 2nd 2014, 3:39 am

    Topic Solved & Archived



    How can I hide an Admin Link from Guests and Members? Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.

      Current date/time is September 22nd 2024, 6:31 pm