I need your help please

Handle problems or report system bug
Post Reply
Hariph
Posts: 45
Joined: Tue May 23, 2023 9:33 pm

I need your help please

Post by Hariph »

I set my forum post to pending, so basically when anyone creates a post it automatically stays pending, but I want to hide the pending posts from users until it has been published by admin, I tried alot of code none of them worked both pending and published posts keeps on showing.. Please any ideas or help

Code: Select all

 {{(VALUE(%status%)@IFEQ() @THEN(pending)@ELSE@NULL)}} 
This is what I was using before, but wasn't working
User avatar
francisco
Posts: 62
Joined: Tue Mar 07, 2023 1:48 pm
Location: Brazil
Contact:

Re: I need your help please

Post by francisco »

In Post Lister you have a really cool setting called STATUS, but don't ask me why it's not documented hahaha
To accomplish what you want use the following in Enter Config:

Code: Select all

<STATUS>{{VAR(USER_ROLE)@IFMATCH(Admin)@THEN(All)@ELSE(Published)}}</STATUS>
With this, only posts with Published status will be displayed to common users and visitors.


However, if you wanted to continue using your own version of the code, the correct syntax would be:

Code: Select all

{{(VALUE(%status%)@IFEQ(Published)@THEN(%title% - %content% etc)@ELSE@NULL)}}
😴
Hariph
Posts: 45
Joined: Tue May 23, 2023 9:33 pm

Re: I need your help please

Post by Hariph »

Wow thanks so much
Hariph
Posts: 45
Joined: Tue May 23, 2023 9:33 pm

Re: I need your help please

Post by Hariph »

francisco wrote: Fri Feb 23, 2024 9:09 pm In Post Lister you have a really cool setting called STATUS, but don't ask me why it's not documented hahaha
To accomplish what you want use the following in Enter Config:

Code: Select all

<STATUS>{{VAR(USER_ROLE)@IFMATCH(Admin)@THEN(All)@ELSE(Published)}}</STATUS>
With this, only posts with Published status will be displayed to common users and visitors.


However, if you wanted to continue using your own version of the code, the correct syntax would be:

Code: Select all

{{(VALUE(%status%)@IFEQ(Published)@THEN(%title% - %content% etc)@ELSE@NULL)}}
Is there also anyway or code show the total number of forum posts a user has made
Post Reply