Closed ralic closed 7 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
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 ------------------------------------------------------------------------ ---
--
How about a JS-snippet redirecting to login-page for non-registered users? Any experience with that, anyone?
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
As Subject