Sidebar widgets don't show up to anonymous users?
-
I'm anon, and I see widgets. Perhaps this has already been fixed but users are cached?
Nice site btw
-
Check out ye old footer. See any widgets? I don't when anon, but who knows. When logged in, got two widgets down there.
-
Yup, when logged in I see shoutbox and forum stat widgets. So these are unchecked for
anonymous
as well? Your original issue was:But this only only applies to sidebar widgets, not header or content widgets.
So I'm wondering what's up, because I saw the
Ask
widget on the sidebar. My guess is that - perhaps - anything that has been set for anonymous at some point in the past is unable to revert? -
Interesting theory...but I've checked and unchecked all the widgets and only the ask widget shows up. I don't remember if I meant "footer widget doesn't show up" in the original question, or if I was just high.
I'm glad that the ask widget remains visible though, so no big deal. Although I'd like for people to click on the ask button and get a message "log in ya dummy".
-
Add this in:
if (!app.uid) { app.alertError('Log in ya dummy'); }
-
Cool! Except it pops up without clicking the button, and doesn't pop up when clicking the button. I stuck the code before
</script>
. Do I put it somewhere else? -
I don't remember how the code looks like, but you'd have to stick that inside something that looks like:
someButton.on('click', function() { <--- put it here });
If you're stuck just paste the whole thing and I'll write the proper way
-
Close, now it shows the error plus the composition window at the same time. Here's the code, is there an "else" type statement I need?
<script> $('#new-topic-button-widget').on('click', function() { if (!app.uid) { app.alertError('Log in ya dummy'); } require(['composer'], function(composer) { composer.newTopic(2); }); }); </script>
-
Yup. Final code is:
<button id="new-topic-button-widget" class="btn btn-primary">Post</button> <script> $('#new-topic-button-widget').on('click', function() { if (!app.uid) { app.alertError('Log in ya dummy'); } else { require(['composer'], function(composer) { composer.newTopic(2); }); } }); </script>
Now you're learning JS too next stop, build your own plugins
-
Yay!
It's been a while with programming. In 1995 I made a Connect 4 game using Turbo Pascal, and apparently that took so much out of me I couldn't program ever again. But if anything would make me get back to learning, it's NodeBB