I wish that the ListUsers module would give us an attribute to allow content to be displayed to anonymous users:
| Attribute | Values | Default | Description |
|---|---|---|---|
| anonymous | true, false | false | Displays content even if no user is logged in |
The variables for anonymous could be:
| Variable | Value |
|---|---|
| %%name%% | anonymous |
| %%title%% | Anonymous |
| %%number%% | 0 |
In this way, we can greet users on our sites:
[[module ListUsers users="." anonymous="true"]]
**Hello, %%title%%!**
[[/module]]Hello, Anonymous!
An advanced usage of this feature is that it could be combined with my SUO design, to give messages like:
Hello! You are currently logged out… would you like to log in?
Currently, the syntax for showing content to the current user is this:
So perhaps the best solution would just be to accept a different value for the 'users' attribute, rather than creating a new special-purpose attribute for this?
Keeping in mind of course, that the main purpose behind the unfinished ListUsers module is to list users. Being able to control who can view content is only a side-effect, rather than the main purpose of the module.
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server
Well the issue here is that users="." is supposed to display the current user. When no user is logged in, it displays nothing. Logically it should display "Anonymous", because that is the user at that moment… An anonymous person is using Wikidot, so it should display Anonymous user.
Do you see my point?
I should be able to create code that only Anonymous users can see with SUO, but I can't, because of this "feature".
It would be cool if you could select a certain amount of users by a data form value they have filled out on their profile (for sites that have data forms in their custom profiles on their site). I know this wish was accepted with ListPages, but to be able to do it with the ListUsers module would be amazing. I just wish there was more options for the ListUsers module in general.
CEO of Icon Deposit
Take a look at me via Twitter, Dribbble, and Google +
Selecting by dataform values was accepted for development by Wikidot just a few days short of a year ago. But frustratingly they refuse to make any comment about it or other accepted wishes, give any sort of indicative timescale or even say whether it is being worked on.
Rob Elliott - Strathpeffer, Scotland - Wikidot first line support & community admin team.
Indeed that is frustrating. I am also waiting for action or comments on that wish.
A - S I M P L E - P L A N by ARTiZEN a startingpoint for simple wikidot solutions.
I wonder if ListUsers is even being worked on at all -.-
Timothy Foster - @tfAuroratide
Auroratide.com - Go here if you're nerdy like me
The wish above would be really effective tho, because I would be able to use this in the top bar instead of just having it for per site members.
CEO of Icon Deposit
Take a look at me via Twitter, Dribbble, and Google +
Here's how I'd like to use this module: signed in users can see important parts of the page, while anonymous users, instead, see an image that shows them the benefits of signing in. Simple.
WikiWealth.com - Stock, Fund, Commodity & Currency Research | SWOT Analysis, WACC
Hi, I'm Nath. I'm from the collaborative fantasy writing community AGIAT and I discovered this.
It's not what you're looking for, and I'm 14 years late. But I found out that simple CSS can do the trick.
[[include component:not-logged]] Only if you want to have it accessible as a component. Create a page called 'component:not-logged', paste the CSS into it, and then you can call it whenever you use that code. You may already know this, but I'm posting this for people like me who came looking for solutions to that problem.
[[module ListUsers users="."]]
[[div class="user-logged-in"]]
[[div class="if-logged-in"]]
✅ You are logged in %%title%%1. This is content A.
[[/div]]
[[/div]]
[[/module]]
[[div class="if-not-logged-in"]]
❌ You are not logged in. This is content B.
[[/div]]
It’s the solution I found to show content exclusively to anonymous users, without 'affecting' logged-in users.
Sending greetings from the Spanish community.
"No hay idea que no pueda ser escrita, solo ideas que tardan más en fluír."