Hidden Content

From Foundation
Jump to navigation Jump to search

Hidden Content

In many situations keeping the entire wiki or certain sections private is a must. For this reason we've created a special extension that hides content to any person not logged in. To accomplish this it's important to set up permissions correctly.

In the settings below users and administrator can create and edit content, and everyone else (*) cannot.

$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['user']['edit'] = true;
$wgGroupPermissions['sysop']['edit'] = true;

And the following setting stops random strangers from registering. Instead, the wiki administrator/s can create new accounts.

$wgGroupPermissions['*']['createaccount'] = false;

Hiding Content

Now we have 2 distinctive user groups, people logged in and people who cannot login, we can can hide content to those not logged in and hide content from them with ease.

If you view the top of the page, below the login button, there are 3 menu items. These will be invisible to you as you aren't logged in, further more you can't login to view them as you cannot register.

The same is true for the content shown below, using the shortcode found in the toolbar we add;

<div id="login">Look at me, I'm only visible to people logged in!</div> // you should see nothing below
Look at me, I'm only visible to people logged in!

We now have two options? Option 1, add the hidden id to every page (using the PageNotice Extension) or option 2, add the hidden id to specific sections of content as an when required.


Support

Please use the discussion page to ask questions.



TOP

Retrieved from ‘https://foundationextension.com/index.php?title=Hidden_Content&oldid=1004