Re: Weird login thing
Posted by
Pedro on
URL: https://support.nabble.com/Can-t-log-out-or-be-invisible-tp7587784p7589431.html
You can hide your profile using this code:
<override_macro name="online_users_table" dot_parameter="columns" requires="node_page">
<n.online_users. include_invisible_users="[n.visitor.is_site_admin/]">
<n.filter_by.current_user.can_view.page_node/>
<n.filter_by.not.equal value1="[n.current_user.id/]" value2="Your_id" />
<n.sort_by_node_count_desc/>
<n.people_table.>
<n.columns/>
</n.people_table.>
</n.online_users.>
<div class="weak-color" style="margin-top:1em">
<n.one_or_many.online_anonymous_users_count>
<one_text><t>anonymous user</t></one_text>
<many_text><t>anonymous users</t></many_text>
</n.one_or_many.online_anonymous_users_count>
<br/>
<n.one_or_many.online_invisible_users_count>
<one_text><t>invisible user</t></one_text>
<many_text><t>invisible users</t></many_text>
</n.one_or_many.online_invisible_users_count>
</div>
</override_macro>
You must replace "Your_id" with your id number, that is
83631.
To get an user's id number you have to go into his profile page -> permalink. You are going to see something like this:
http://forum.nyskiblog.com/template/NamlServlet.jtp?macro=user_nodes&user=83631
the id number of this user is
83631.
You can also create a macro to "save" your id and make the code easier to understand. For example, if you create:
<macro name="harvey_id">
83631
</macro>
Then, that previous override could be like this:
<override_macro name="online_users_table" dot_parameter="columns" requires="node_page">
<n.online_users. include_invisible_users="[n.visitor.is_site_admin/]">
<n.filter_by.current_user.can_view.page_node/>
<n.filter_by.not.equal value1="[n.current_user.id/]" value2="[n.harvey_id]" />
<n.sort_by_node_count_desc/>
<n.people_table.>
<n.columns/>
</n.people_table.>
</n.online_users.>
<div class="weak-color" style="margin-top:1em">
<n.one_or_many.online_anonymous_users_count>
<one_text><t>anonymous user</t></one_text>
<many_text><t>anonymous users</t></many_text>
</n.one_or_many.online_anonymous_users_count>
<br/>
<n.one_or_many.online_invisible_users_count>
<one_text><t>invisible user</t></one_text>
<many_text><t>invisible users</t></many_text>
</n.one_or_many.online_invisible_users_count>
</div>
</override_macro>