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.
Perfect!
But before investigating what's wrong with $post
,
let's first advance a few lines down to
$notifications->add('mention:post:created', ....
Please locate the class file with the add
method
Hello Z Man . First parameter is regex search pattern in wall textarea. Second parameter should be content of text area...in my case @nikhil(but this parameter($post) is wrong thats why I need help here). If Iam not mistaken third parameter is basically array of possible matches that are obtained when iterated through second parameter(@nikhil) using regex search pattern(first parameter).
Okay,
please explain what are you trying to achieve with this line?
preg_match_all('/@(\w+)/', $post, $matches);
Hello Arsalan . I have added the code in callback function and debugged args. Iam attaching image for reference. Iam able to get content of textarea(i.e @nikhil). Seems I need to modify callback function a little bit. Please have a look at the function.">https://github.com/nikhilvinnakoti/MyTruckerPro/blob/da3231736ee6c4b732283e039987f5a4c0dd6dcc/MentionNotifications/ossn_com.php#L133
Now you can add following in you callback and debug $args
$wall = new OssnWall;
$post = $wall->GetPost($params['guid']);
$args = ossn_wallpost_to_item($post);
See what exactly the $args
contains if it contain anything useful for you tell us
Iam extremely sorry Arsalan. I misunderstood it . Heres the screenshot for debugging params
See what ~Z~ Man said, I never told you to debug $params['value'] read his reply again please. Learn how to debug arrays in php. Again we can not help here to improve programming skills. One you find out what exactly $params contain please we can talk that time.
Hello Arsalan . Iam sorry. I did what u told me . Firstly u told me to debug $params['value'] right? Iam attaching image for reference. Its empty.
I am sorry teaching debugging of simple variables and why its not showing anything in error log is outside scope of our forum. I can not help you any further Nikhil. https://stackoverflow.com/a/19487475 I won't look your changes either as you are jumping behind not going step by step.
Hello Z-Man and Arsalan . Regarding second point @Arsalan u told me to remove $return = $params(mentionswallcreated why you added $return = $params; its of no use and making problem.)since its causing problem I removed it and modified function . Please have a look at this function . https://github.com/nikhilvinnakoti/MyTruckerPro/blob/14aa9b3f239e9843f5888f3a5fc8a176b55a0583/MentionNotifications/ossn_com.php#L149 .Guess its correct because its not making any sense($return=$params is not making any sense). Regarding firstpoint what should I use to fetch value of textarea(Instead of $params['value'] what should I use). Please help me guys
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)