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
3 posters

    How can i disable forum pages for my members

    J0k3R^
    J0k3R^
    Forumember


    Male Posts : 742
    Reputation : 28
    Language : Greek > English > Russian > Spanish
    Location : C:\>r00t

    Solved How can i disable forum pages for my members

    Post by J0k3R^ April 29th 2014, 3:49 pm

    Hi, i want to disable some pages on my forum.
    for example if someone is going to use the address bar to access a page, i want him to be transfered to the home page.
    my forum is http://myplanet.forumgreek.com/ and if someone for example will try to write http://myplanet.forumgreek.com/memberlist (this code im asking for,) will transfer him to http://myplanet.forumgreek.com/forum
    how can i do that? thanks a lot Smile  :rose:
    SLGray
    SLGray
    Administrator
    Administrator


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

    Solved Re: How can i disable forum pages for my members

    Post by SLGray April 29th 2014, 9:28 pm

    Are you referring to members or guests?   You can set which groups can see the memberlist.

    Administration Panel > Users & Usergroups > Special Rights



    How can i disable forum pages for my members Slgray10

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


    Male Posts : 742
    Reputation : 28
    Language : Greek > English > Russian > Spanish
    Location : C:\>r00t

    Solved Re: How can i disable forum pages for my members

    Post by J0k3R^ April 30th 2014, 6:40 am

    yeah i know that but i want to be transfered to homepage instead of going there and saying 'u dont have the rights to view the page.." 
    and im reffering to both guests and members Smile
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Solved Re: How can i disable forum pages for my members

    Post by Ange Tuteur April 30th 2014, 1:59 pm

    Hello,

    You will have to do these redirections manually through javascript. Even then, if someone disable javascript they can still view the page if it is open.

    Ex :
    Code:
    if (location.pathname == '/memberlist') location.pathname == '/forum';
    J0k3R^
    J0k3R^
    Forumember


    Male Posts : 742
    Reputation : 28
    Language : Greek > English > Russian > Spanish
    Location : C:\>r00t

    Solved Re: How can i disable forum pages for my members

    Post by J0k3R^ April 30th 2014, 2:20 pm

    didnt work :/ 
    tried with both FF and GC browsers xD
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Solved Re: How can i disable forum pages for my members

    Post by Ange Tuteur April 30th 2014, 2:37 pm

    Whoopsie I wrote an extra equal sign when assigning the new pathname  Lol 

    try now :
    Code:
    if (location.pathname == '/memberlist') location.pathname = '/forum';
    J0k3R^
    J0k3R^
    Forumember


    Male Posts : 742
    Reputation : 28
    Language : Greek > English > Russian > Spanish
    Location : C:\>r00t

    Solved Re: How can i disable forum pages for my members

    Post by J0k3R^ April 30th 2014, 2:44 pm

    very nice, thank u
    its solved, just an extra thing if this possible.
    is it possible to make this redirection only to guests and simple members (no rank) ?
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Solved Re: How can i disable forum pages for my members

    Post by Ange Tuteur April 30th 2014, 2:55 pm

    For guests and members you'll have to use userdata :
    Code:
    $(function() {
     Â   if (_userdata.user_level == 0) {
     Â      if (location.pathname == '/memberlist') location.pathname = '/forum';
     Â   }
    });

    _userdata.user_level = 0 : guest / member
    _userdata.user_level = 1 : administrator
    _userdata.user_level = 2 : moderator
    J0k3R^
    J0k3R^
    Forumember


    Male Posts : 742
    Reputation : 28
    Language : Greek > English > Russian > Spanish
    Location : C:\>r00t

    Solved Re: How can i disable forum pages for my members

    Post by J0k3R^ April 30th 2014, 4:14 pm

    *Solved*
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Solved Re: How can i disable forum pages for my members

    Post by Ange Tuteur April 30th 2014, 4:19 pm

    You're welcome :rose:

    Topic solved and archived

      Current date/time is September 23rd 2024, 3:27 am