Please Log in or Create an account to join the conversation.
You can condition with the [lastvisitdate] substitution. CB Auto Actions supports a number of inline PHP functions for conditions, especially date handling. See "Format Functions" on the Conditions tab of your action at the bottom. You could take the last visit date, add 1 day using strtotime then compare it to todays strtotime date using [cb:date format="Y-m-d H:i:s" /]. Example as follows.1) I setup Auto-Action "Field" for add 1 point each time user login. Points are stored inside integer field cb_points. Now I would like add some restriction for allow 1 point to be addedd but only every 24h. I suppose I must set conditions for check last visit date/time value (a Joomla field?) user was connected AGAINST actual date/time when user login.
You could use a Code action to echo this on the users profile with the before profile display trigger or to add a message queue using the $_CB_framework->enqueueMessage( MSG, TYPE ) function. Another option is to do a redirect on the after login trigger and add your message as the redirect message. You could also output the message using a Custom HTML field and substitution IF statements. Basically you've a lot of options; pick which best fits your needs.2) I would like also display a kind of alert message such "Congratulation, you won 10 points" when action is fired. Fields action do not permit that, so I suppose I must try something with Code action ?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.