NodeBB-Community / nodebb-plugin-custom-pages

Allows you to add as many new pages as you like to your NodeBB forum
BSD 2-Clause "Simplified" License
39 stars 24 forks source link

Is it possible to add a Properties , only display to non-login users ? #39

Closed ralic closed 7 years ago

ralic commented 8 years ago

As Subject

phit commented 8 years ago

as workaround: just set all widgets with content to be only visible for logged in users make one widget with an error saying this page is only visible for logged in users and make that one visible for guests only

ralic commented 8 years ago

Good idea.

Thanks !

On Monday, September 12, 2016, phit notifications@github.com wrote:

as workaround: just set all widgets with content to be only visible for logged in users make one widget with an error saying this page is only visible for logged in users and make that one visible for guests only

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/psychobunny/nodebb-plugin-custom-pages/issues/39#issuecomment-246516439, or mute the thread https://github.com/notifications/unsubscribe-auth/AGbukiSyIvKBVe0WNo-IAxH2kX4TTkuvks5qpdLpgaJpZM4J7Aiv .

------------------------------------------------------------------------ --- Phone: 408-609-7628 Email: RalicLo@gmail.com ------------------------------------------------------------------------ ---

--

gnimmelf commented 8 years ago

How about a JS-snippet redirecting to login-page for non-registered users? Any experience with that, anyone?

phit commented 8 years ago

if you don't want to automatically redirect:

you can use something like this in a html widget only visible for guests, after they login users will automatically return to the page they were on

<div class="alert alert-danger">This page is for members only, please <a component="topic/reply/guest" href="/login">login</a> to access this page.</div>

example: https://forums.stonebound.net/shoutbox

automatic redirect: again in a html widget visible only for guests

<div class="alert alert-warning">
Page only visible for members redirecting to login page...
<script>window.location = "/login";</script>
</div>

example: https://forums.stonebound.net/faq