If ( there is an alert)
How do I know if there is an alert to initiate an action ?
Re: If ( there is an alert)
Reply #2 –
Or, should I have to replace $txt with $context['notification_set'] ?
Re: If ( there is an alert)
Reply #3 –
Txt only contains strings, so I wouldn't check if it's empty.
Re: If ( there is an alert)
Reply #4 –
What should I check to see whether there is a notification or not ?
Re: If ( there is an alert)
Reply #6 –
So, I would need to check 2. If there is like , if there is mention. Then I can display notification.
Re: If ( there is an alert)
Reply #7 –
You check is there is a "mention" (i.e. notification, yeah, same name for two things), a mention includes likes, @ mentions, and some other stuff.
Re: If ( there is an alert)
Reply #8 –
Yes. Is it possible that I can have the code to check both ? I am not good in php.
Some other stuff includes what all ? At the moment, I am concentrating on presence of like and @ mention
PS: I mean, compare if > 0 inclusive
Re: If ( there is an alert)
Reply #9 –
Use what CrimeS suggested. It is for both.
Re: If ( there is an alert)
Reply #11 –
Yes and no.
If you mean "is the ElkArte way?" then the answer is: yes there is something wrong.
If you mean "is the code syntactically correct?" Then the answer is: no, nothing wrong.