How to make portal visible only to certain group members?
2 posters
Page 1 of 1
How to make portal visible only to certain group members?
Hi guys, I would like to know if it's possible to make the portal visible only to a certain group?
My Forum: http://thelosteden.com/forum
My Portal Page: http://thelosteden.com
Forum Version: Invision
Also, I have been wondering about my forum URL. After I added a portal to my forum, the domain name directs me straight to the portal instead of the forum itself. I know that at some point it wasn't like this. The portal page used to have something like '/portal' after the domain name and that the domain name would link to actual the forum. Can I change it back to this perhaps?
Thank you, appreciate it!
My Forum: http://thelosteden.com/forum
My Portal Page: http://thelosteden.com
Forum Version: Invision
Also, I have been wondering about my forum URL. After I added a portal to my forum, the domain name directs me straight to the portal instead of the forum itself. I know that at some point it wasn't like this. The portal page used to have something like '/portal' after the domain name and that the domain name would link to actual the forum. Can I change it back to this perhaps?
Thank you, appreciate it!
yayayes- Forumember
- Posts : 49
Reputation : 1
Language : Thai
Location : Bangkok, London & Hong Kong
Re: How to make portal visible only to certain group members?
Hello yayayes,
You can choose where the forum redirects here :
Administration Panel > Display > Generalities > Your forum redirects to
The only thing I could come up with for allowing only certain people to view the portal would be this :
Go to Administration Panel > Modules > JavaScript codes management > Create a new script
Title : Your choice
Placement : In the portal
Paste the code below :
There's two things you can edit :
allowed : this is the list of users allowed to view the portal. You should use their user id which is visible by their profile URL. Each user id should be separated by a comma. example :
redirect : this is the pathname that members who are not allowed are redirected to. Currently it is set to /forum
Now, members can get past this by disabling JavaScript. So, if you want to combat that you can create a new widget with the following content, and place it on your portal.
Title : Your choice
Use a table type : No
You can choose where the forum redirects here :
Administration Panel > Display > Generalities > Your forum redirects to
The only thing I could come up with for allowing only certain people to view the portal would be this :
Go to Administration Panel > Modules > JavaScript codes management > Create a new script
Title : Your choice
Placement : In the portal
Paste the code below :
- Code:
$(function() {
var allowed = [1,2,3], redirect = '/forum';
document.body.style.display = 'none';
for (i=0; i<allowed.length; i++) {
if (_userdata.user_id == allowed[i]) document.body.style.display = '';
else if (i == allowed.length - 1) checkState();
}
function checkState() { if (/none/.test(document.body.style.display)) window.location.pathname = redirect };
});
There's two things you can edit :
allowed : this is the list of users allowed to view the portal. You should use their user id which is visible by their profile URL. Each user id should be separated by a comma. example :
- Code:
allowed = [1,2,3, 6, 13, 100, 6001, 2003, 452]
redirect : this is the pathname that members who are not allowed are redirected to. Currently it is set to /forum
Now, members can get past this by disabling JavaScript. So, if you want to combat that you can create a new widget with the following content, and place it on your portal.
Title : Your choice
Use a table type : No
- Code:
<noscript><meta http-equiv="refresh" content="0;/forum"/></noscript>
Re: How to make portal visible only to certain group members?
Thank you for your kind advice, Ange Tuteur!
yayayes- Forumember
- Posts : 49
Reputation : 1
Language : Thai
Location : Bangkok, London & Hong Kong
Similar topics
» Buttons visible only by members logged in
» Group Legends, Groups Not Visible
» Forum visible to members only
» How to restrict members viewing which members are in a group?
» Links are not visible for guests and members
» Group Legends, Groups Not Visible
» Forum visible to members only
» How to restrict members viewing which members are in a group?
» Links are not visible for guests and members
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum