[SOLVED]How to create an error message if user is not logged in?

Status
Not open for further replies.

Camee

Member
Hello, I'd like to create an error message on a thumbs element, which is limited only to registered users. Now the rating simply fails if the access level of the user for editing is not correct. It's not clear for the visitor, that he has to be logged in. I would like to show the message "You must be logged in to rate this entry". How can I achieve this? The "userexist" validation is not right for me, because it just checks whether the row is his own or not.
 
Looking at this one now. We should indeed provide some indication. I'm looking at the code right now, and am starting out by at least disabling the AJAX call to the server if the user doesn't have access. Once that is done, I'll probably add a simple popup alert if they do click on a thumb, with a configurable message.

-- hugh
 
OK, should be fixed as of this commit:

https://github.com/Fabrik/fabrik/commit/6832072432f0d7458727f12d2a1ec72f54bb50f4

... which adds a new 'no access msg' setting. If they don't have access to use the thumbs, it'll pop up that msg in an alert if they click on a thumb.

If you just want it to "do nothing", put a space as the msg. It should just be "leave the msg blank", but for gory reasons I can't seem to get it to save without the default message, and I can't seem to get the default msg to translate. But I kinda ran out of time.

It should however run whatever the msg you do use through J!'s translation, so you can use a custom translatable phrase if you want.

-- hugh
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top