Many Thanks Arsalan for assisting me in tagging friends in wall post. Iam trying to make notifications work for tagged friend in wall post . Heres the link . https://github.com/nikhilvinnakoti/MyTruckerPro/blob/main/MentionNotifications/ossn_com.php. So I am trying to make changes in mention notifications for wall post. Please have a look at the functions at lines 25,88,107,115,136,155. Please tell me whats wrong here. I implemented the same logic u suggested earlier for wall mentions. I think in function present at line 136 I need to make changes. Iam not clear about annotations. Also I need to add a switch case for wall in function present at line 37.
Hello Z-Man . Iam afraid I already mentioned in my previous comment (Second point is meant for debugging of $params).Iam not getting anything after debugging $params in wallpost . But if I debug $params for comments Iam getting array at the function present in this line https://github.com/nikhilvinnakoti/MyTruckerPro/blob/c31797c4a86420e629af3e628bd616398e8c7538/MentionNotifications/ossn_com.php#L103 . So I think I should get array for $params in wallpost too . Am I correct?
Why don't you simply follow Arsalan's advice?
Arsalan said: 'better debug this $params
variable in errorlog and see what does it actually contain'
But you debugged $params['value']
instead.
Hello Arasalan . I have debugged the first point using errorlog(printr($params['value'],true)) for wallpost and its just empty after posting in errorlog file like this [18-Jul-2021 00:38:13 America/LosAngeles] . But when I use same errorlog(printr($params['value'],true)) for comments its coming like this [18-Jul-2021 00:39:19 America/Los_Angeles]@nikhil. So in comments its working . Iam getting username after commenting . But Iam not getting after posting if I use same logic. So I realised $params['value'] doesnt work for wallpost. Plz tell me what to use here instead of $params['value']. Thanks for telling me to debug. Second point is also empty when debugged. For second point we should get array right?
Please check my previous comments. I have debugged first point . $params['value'] is just empty. I found out and pasted the errors. Will debug second point now.
Ya good luck. That is what i said before. I can't repeat what i said in my previous comment.
So next question is what does $param have? Did you made bit of efforts to find out?
Iam already past the deadline for this task given by company . Please help me here Arsalan -_-.
Hello Arasalan . I have debugged the first point using errorlog(printr($params['value'],true)) for wallpost and its just empty after posting in errorlog file like this [18-Jul-2021 00:38:13 America/LosAngeles] . But when I use same errorlog(printr($params['value'],true)) for comments its coming like this [18-Jul-2021 00:39:19 America/Los_Angeles]@nikhil. So in comments its working . Iam getting username after commenting . But Iam not getting after posting if I use same logic. So I realised $params['value'] doesnt work for wallpost. Plz tell me what to use here instead of $params['value']. Thanks for telling me to debug.
$return = $params;
its of no use and making problem.You should debug the variables and see if returns what you are expecting? do step by step.
Until now forgot about the notification not appearing in the users topbar.
Debug the functions of 1st point and tell me if your loop is working or not.
Hello Arsalan . As u suggested I have made changes. Seems Iam missing something . Please have a look at these 2 functions . https://github.com/nikhilvinnakoti/MyTruckerPro/blob/c31797c4a86420e629af3e628bd616398e8c7538/MentionNotifications/ossn_com.php#L132
https://github.com/nikhilvinnakoti/MyTruckerPro/blob/c31797c4a86420e629af3e628bd616398e8c7538/MentionNotifications/ossn_com.php#L148
What is confidential here? I just don't have time to look into it. I can only guide you not to write a component this time for you just look here https://github.com/opensource-socialnetwork/opensource-socialnetwork/blob/v5.x/components/OssnNotifications/ossn_com.php#L33 this is exactly doing what you looking. You need to look what hook returns in $params variable. Then you can use that variable to do your comparison.
Due to the many requests in the past for additonal features and components we have decided to develope a premium version. Features like Hashtags, Videos, Polls, Events, Stories, Link Preview, etc included in it.
$199 (Life Time)