XF 2.2 How can Hide a forum from visitors and make it available when visiting via the link

King1984

Member
Hi
I have a forum, I want to hide the forum rating from visitors so that it is public, but when a visitor enters via the link to the forum, it works with him naturally

for example
I do not want this section to appear to visitors as "Closed suggestions"

But I want it to work when I access it directly via the link "https://xenforo.com/community/forums/closed-suggestions.15/"

The current situation after modifications to the forum's permits. Unfortunately, visitors are required to log in. I do not want to be obligated to log in

Is there a solution?

1652717522460.webp
 
As I posted in the other thread.

Add this to the extra.less template.
Change the ID as required.

Less:
[data-logged-in="false"]
{
    .block--category1,
    .node--id1
    {
        display: none;
    }
}
 
If I understand correctly, you could untick "Display in the node list", in the node's properties in the Admin CP. That way, it's not shown anywhere on your site, but you can still access it using its URL.

1652725911908.webp
 
^ It's been so long since I've used the ACP, I completely forgot about that option being added at some point.

Although that will remove it for everyone, not just guests (which is what the OP seemed to be asking for in the other thread).
 
Although that will remove it for everyone, not just guests (which is what the OP seemed to be asking for in the other thread).
Oh yeah, you're right! Just took a quick look at the other thread. It would hide it from everyone indeed. Guests and members. That's definitely something to consider depending on the desired behavior.
 
The OP wants everyone to be able to access the forum and read the threads.

They just want it hidden from the forum index/node list for guests.
He said "I want it to work when I access" so I decided he wants to hide it from everyone but him. But my English is rusty, so...
 
If I understand correctly, you could untick "Display in the node list", in the node's properties in the Admin CP. That way, it's not shown anywhere on your site, but you can still access it using its URL.

View attachment 268307
We are using that solution by combining it with a link forum entry:
  • The link forum node replaces the original node / stands directly beside it in the ACP node list.
  • The link forum points to the non-displayed node.
  • The link forum has a special permission set to be displayed only to selected user groups. :)
Two downsides of this approach:
  • Link forums do not show the content of the linked sub forum (but may be able to do with a little addon magic by @Xon).
  • Non-displayed forums still deliver search hits to every user having at least read/view access rights.
 
Top Bottom