olahypes 3 years ago |
please how to hide text for user with sytanx
code
example like
:IFLOG(%username%).THEN
(<a href="/delete-post">delete</a>|<a href="/edit-post/%id%/%title%">edit article</a>);
please i need something like this to display for loggin user help palz
comment |
Recent Comments (1)
francisco | 3 years ago |
Try this in Post Lister code:
:VAR(USER_ROLE).IFMATCH(Admin).THEN.VALUE(true).SET(can_edit).NULL.ELSE.NULL;
:VAR(USER_NAME).IFEQ.VALUE(%username%).THEN.VALUE(true).SET(can_edit).NULL.ELSE.NULL;
:VAR(can_edit).IFEQ(true).THEN(<a href="/delete-post">Delete</a> | <a href="/edit-post/%id%/%title%">Edit article</a>).ELSE.NULL;
It will allow only Admins and the user who created the post to edit or delete it.
reply |