The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

How can i disable forum pages for my members

View previous topic View next topic Go down

Solved How can i disable forum pages for my members

Post by J0k3R^ on 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 ishttp://myplanet.forumgreek.com/ and if someone for example will try to writehttp://myplanet.forumgreek.com/memberlist (this code im asking for,) will transfer him tohttp://myplanet.forumgreek.com/forum
how can i do that? thanks a lot Smile:rose:

J0k3R^
Forumember

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

http://fmplanet.forumgreek.com

Back to top Go down

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

Post by SLGray on 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


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


SLGray
Administrator
Administrator

Male Posts : 35661
Reputation : 2375
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

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

Post by J0k3R^ on 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

J0k3R^
Forumember

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

http://fmplanet.forumgreek.com

Back to top Go down

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

Post by Ange Tuteur on 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';

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2683
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

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

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

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

J0k3R^
Forumember

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

http://fmplanet.forumgreek.com

Back to top Go down

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

Post by Ange Tuteur on 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';

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2683
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

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

Post by J0k3R^ on 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) ?

J0k3R^
Forumember

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

http://fmplanet.forumgreek.com

Back to top Go down

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

Post by Ange Tuteur on 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

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2683
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

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

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

*Solved*

J0k3R^
Forumember

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

http://fmplanet.forumgreek.com

Back to top Go down

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

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

You're welcome :rose:

Topic solved and archived

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2683
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum