@pichalite Terrific! Thanks for looking into it.
Hide links from guests / Filter post content based on user group
@Telokis don't think it's an issue. Use the filter
@Telokis Yes, we attempted to use CLS to plumb req, res, etc. data into hooks, but we found that it was often unreliable and wasn't available when you needed it.
We're waiting to try it again in the future because it has potential!
@julian Ok thanks for the answer. Is there any workaround available or is it a current lack in the software?
I'd like to get the user uid from a specific hook. (Get teasers)
@Telokis I added the
uidto that hook. On the master branch, and in the next version of NodeBB, you'll be good.
@PitaJ Yes, I know you did and thanks for that. However, I was hoping to be able to do it in another way in v1.4.5.
@Telokis there is no way besides maybe cherry picking that specific commit or changing the code yourself
@Annihil said in Hide links from guests / Filter post content based on user group:
I'd like a plugin that display links to registered users only, is there any plugins that allows this?
From the point of view of a guest, he would see something like [Link available to registered users only] instead of the links.
Actually, it would be even nicer to be able to filter all types of content and replace it with another one according to the group of the user.
I know that it's possible
You'd want to create a plugin that acts on the
filter:parse.posthook, and removes private information (of your choosing) based on whether the user is an admin or not.
but haven't find any plugins actually doing it yet
you could simply use the widgets, as they have restrictions on who can or cant see them
True, but that's a not very convenient workaround, I was talking about the content of posts actually
@Annihil Oh, I see. ( ;-; I got downvoted)
What's up with the plugin?
shmuel4 last edited by
please! Anyone managed to make this extension?
I really want it!