Skip to content

Instantly share code, notes, and snippets.

@skipjac
Created January 26, 2011 21:49
Show Gist options
  • Save skipjac/797549 to your computer and use it in GitHub Desktop.
Save skipjac/797549 to your computer and use it in GitHub Desktop.
This hides a pinned if the user is logged but displays it if it's a Anonymous user
<div id="userNamewidget">
</div>
<script>
$j(document).ready(function() {
if('{{current_user.name}}' == 'Anonymous user'){ $j('div#pinned-entry-57062').show();}
else
{ $j('div#pinned-entry-57062').hide(); }
});
</script>
@skipjac
Copy link
Author

skipjac commented Jan 26, 2011

create a custom widget and add the code changing the number to the number of the forum topic id

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment