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.

Restrict access to HTML page based on custom group

View previous topic View next topic Go down

In progress Restrict access to HTML page based on custom group

Post by Simpleman on April 16th 2013, 4:46 pm

Hi I've got a custom HTML page that can be accessed via the menu. I can restrict access to those menu items via the control panel but it doesn't allow me to restrict access to a custom group. So I was wondering whether there's any JavaScript code that redirect the user to the main forum if they don't belong to a specific group.

Ideally I wouldn't want the menu item available if the user isn't part of this specific group. However if this not achievable I'd like it to work like the code below, but instead of checking if the user is logged in, check if they belong to a specific user group.

Code:
<script type="text/javascript">
if (!document.getElementById('logout')) window.location.pathname = "/forum";</script>

Thanks.

Simpleman
New Member

Posts : 10
Reputation : 1
Language : English

Back to top Go down

In progress Re: Restrict access to HTML page based on custom group

Post by Simpleman on April 27th 2013, 5:18 pm

I'm guessing by the lack of response but high number of reads that I write a good yarn but I'm not going to get any help with the ending. Sad

Simpleman
New Member

Posts : 10
Reputation : 1
Language : English

Back to top Go down

In progress Re: Restrict access to HTML page based on custom group

Post by Sir Chivas™ on January 12th 2014, 5:46 pm

Hi,

As far as I know, you can only restrict someone by using php, however, php isn't supported here at FM.

JQuery/JavaScript: would maybe do the trick, all though, someone can just disable it on the browser and simply access it.

Regards,
Sir Chivas.

Sir Chivas™
Support Moderator
Support Moderator

Male Posts : 6783
Reputation : 430
Language : EN, FR, ES
Location : || CSS || HTML || Graphics Designs || Support ||

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