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.

Making a forum section only viewable by guests

View previous topic View next topic Go down

Solved Making a forum section only viewable by guests

Post by Yous000 on August 1st 2016, 2:31 am

I want to make a category and forum within that category that only guests can see. A "How to Join" forum section and upon clicking the name of that forum it directly takes you to a thread explaining how to join.

When I try to do this in forum permissions it forces me to check off everyone when I check guests. How can I bypass this?

Cheers


Last edited by Yous000 on August 2nd 2016, 2:37 am; edited 1 time in total

Yous000
Forumember

Posts : 240
Reputation : 4
Language : English

Back to top Go down

Solved Re: Making a forum section only viewable by guests

Post by SLGray on August 1st 2016, 3:10 am

Sorry, but that is how the permissions work. Check guests will check all groups.


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


SLGray
Administrator
Administrator

Male Posts : 35641
Reputation : 2374
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

Solved Re: Making a forum section only viewable by guests

Post by Yous000 on August 1st 2016, 3:40 am

@SLGray wrote:Sorry, but that is how the permissions work. Check guests will check all groups.

I appreciate the quick reply.

But I know there is a workaround. There is always a work around lol

Yous000
Forumember

Posts : 240
Reputation : 4
Language : English

Back to top Go down

Solved Re: Making a forum section only viewable by guests

Post by SLGray on August 1st 2016, 7:07 am

Create a group called guests and set the permissions that way. You can set the group to auto-subscribe (0 posts). Even members who have 1 post will still appear in the guest group. If you have a member group that is listed above the guest group, the members group permissions will override the guests group's permissions.


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


SLGray
Administrator
Administrator

Male Posts : 35641
Reputation : 2374
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

Solved Re: Making a forum section only viewable by guests

Post by Yous000 on August 1st 2016, 10:20 pm

@SLGray wrote:Create a group called guests and set the permissions that way. You can set the group to auto-subscribe (0 posts). Even members who have 1 post will still appear in the guest group. If you have a member group that is listed above the guest group, the members group permissions will override the guests group's permissions.

This did not work because it still will display the thread for everyone. It subscribes everyone to the group automatically.

Is there a way using code to simply say

If user is signed in or registered do not display category 'x'

Appreciate the support

Yous000
Forumember

Posts : 240
Reputation : 4
Language : English

Back to top Go down

Solved Re: Making a forum section only viewable by guests

Post by Ace 1 on August 1st 2016, 10:24 pm

@Yous000

Post your forum URL.

Ace 1
Forumember

Male Posts : 692
Reputation : 38
Language : my css ready java yo scripts boi
Location : Druid Hill Park smoking indo

http://genocideclan.forumotion.com

Back to top Go down

Solved Re: Making a forum section only viewable by guests

Post by Yous000 on August 1st 2016, 11:27 pm

@Ace 1 wrote:@Yous000

Post your forum URL.

wolfpackforum.com

Yous000
Forumember

Posts : 240
Reputation : 4
Language : English

Back to top Go down

Solved Re: Making a forum section only viewable by guests

Post by Ace 1 on August 1st 2016, 11:36 pm

@Yous000 If you were to place this "How to Join" forum, I have two questions.

1 - Above which forum would it be?

2 - Would the title be "How to Join"?

Ace 1
Forumember

Male Posts : 692
Reputation : 38
Language : my css ready java yo scripts boi
Location : Druid Hill Park smoking indo

http://genocideclan.forumotion.com

Back to top Go down

Solved Re: Making a forum section only viewable by guests

Post by Yous000 on August 1st 2016, 11:39 pm

It will be a new category.

Yous000
Forumember

Posts : 240
Reputation : 4
Language : English

Back to top Go down

Solved Re: Making a forum section only viewable by guests

Post by Ace 1 on August 1st 2016, 11:48 pm

@Yous000

Administration Panel >> Modules >> HTML & Javascript >> JS codes management >> Create a new javascript

Title: How to Join
Placement: In the homepage

Code:
for ( var i = 0, titles = document.getElementsByClassName('secondarytitle'); i < titles.length; i++ ) {
  var heading = titles[i].childNodes[1];
  (heading.innerHTML == 'How to Join The Wolf Pack' && _userdata.session_logged_in) ? titles[i].parentNode.parentNode.parentNode.style.display = 'none' : '';
}

Ace 1
Forumember

Male Posts : 692
Reputation : 38
Language : my css ready java yo scripts boi
Location : Druid Hill Park smoking indo

http://genocideclan.forumotion.com

Back to top Go down

Solved Re: Making a forum section only viewable by guests

Post by Yous000 on August 1st 2016, 11:56 pm

@Ace 1 wrote:@Yous000

Administration Panel >> Modules >> HTML & Javascript >> JS codes management >> Create a new javascript

Title: How to Join
Placement: In the homepage

Code:
for ( var i = 0, titles = document.getElementsByClassName('secondarytitle'); i < titles.length; i++ ) {
  var heading = titles[i].childNodes[1];
  (heading.innerHTML == 'How to Join The Wolf Pack' && _userdata.session_logged_in) ? titles[i].parentNode.parentNode.parentNode.style.display = 'none' : '';
}


Thanks for the quick reply.

Added it all in and that it is still displaying the category haha

Yous000
Forumember

Posts : 240
Reputation : 4
Language : English

Back to top Go down

Solved Re: Making a forum section only viewable by guests

Post by Ace 1 on August 2nd 2016, 12:08 am

I'm a fool lol.

Replace your code with this:

Code:
$(function() {
 for(vari=0,titles=document.getElementsByClassName('secondarytitle');i< titles.length;i++){
varheading=titles[i].childNodes[1];
(heading.innerHTML=='How to Join The Wolf Pack'&&_userdata.session_logged_in)
? titles[i].parentNode.parentNode.parentNode.style.display='none'
:'';
}
});


Last edited by Ace 1 on August 2nd 2016, 2:45 am; edited 1 time in total

Ace 1
Forumember

Male Posts : 692
Reputation : 38
Language : my css ready java yo scripts boi
Location : Druid Hill Park smoking indo

http://genocideclan.forumotion.com

Back to top Go down

Solved Re: Making a forum section only viewable by guests

Post by Yous000 on August 2nd 2016, 1:49 am

@Ace 1 wrote:I'm a fool lol.

Replace your code with this:

Code:
$(function() {
  for(vari=0,titles=document.getElementsByClassName('secondarytitle');i<titles.length;i++){
varheading=titles[i].childNodes[1];
(heading.innerHTML=='How to Join The Wolf Pack'&&_userdata.session_logged_in)
? titles[i].parentNode.parentNode.parentNode.style.display='none'
:'';
}
});

Works like a charm.

Yous000
Forumember

Posts : 240
Reputation : 4
Language : English

Back to top Go down

Solved Re: Making a forum section only viewable by guests

Post by Ace 1 on August 2nd 2016, 2:47 am

No problem. thumleft

Ace 1
Forumember

Male Posts : 692
Reputation : 38
Language : my css ready java yo scripts boi
Location : Druid Hill Park smoking indo

http://genocideclan.forumotion.com

Back to top Go down

Solved Re: Making a forum section only viewable by guests

Post by SLGray on August 2nd 2016, 4:59 am

Problem solved & topic archived.
Please read our forum rules: ESF General Rules


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


SLGray
Administrator
Administrator

Male Posts : 35641
Reputation : 2374
Language : English
Location : United States

http://fmthemes.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