What am I missing here?
in the section for echoing out the notification, I am wanting to place effectively a Mark As Read icon, that a person can click or tap, to mark the individual notification as read. I'd really like to add in a delete notification so that users can delete useless notifications, such as "like comments" etc. to save on space... but...
The problem is that $params['notifications'] in the foreach statement doesn't have anything in 'guid', 'subject-guid' or 'item-guid'. How do I reference the individual notification to get the id number to pass to 'notifications/read/' or to the 'notifications/delete/' when I make the link using ossn-site-url(...)?
Thank you for your help!
-Michieal.
EDIT: replaced the _'s with -'s because it was doing weird italics.
Oh. Well... oops. lol.
@Arsalan, I made a github repository and added you to it as a contributor. Will that work?
-M.
This is not my email address. Just upload the file to https://gist.github.com/
@Arsalan,
I sent it to [email protected], attn to you. I hope that works, as the ticket system kept erroring out on me.
-M.
@Arsalan,
Can I send you it, through the ticket system? Or?
-M.
Cant say anything without seeing full code
@Arsalan
The following breaks the insert custom html function.
In the init() I have the register action, in the insert custom html function, I have the $link = siteurl(... , true); to make the link into an action link. (I snagged how to do it from another paid component.)
See Code:
ossn_register_action('mark/read', __MARKNOTIFICATION__ . 'actions/marknread.php');
...
$nguid = $params->guid;
$link = ossn_site_url("action/mark/read?guid={$nguid}", true);
$frag->appendXml("<a href='{$link}' ... ");
When I test it, and I use the true parameter with the ossnsiteurl(); it doesn't put in the fragment. but, if I don't use the true parameter, it shows it again, but when you click it to mark the notification, the site responds with:
"The action you requested is invalid."
So, I don't know what I am doing wrong here. Any ideas?
-Michieal.
Okay, I can see my way through this now. Wootness!
Thank you!
-M.
You need to register action https://www.opensource-socialnetwork.org/references/ossn_8lib_8actions_8php.html#a8d047b3c703bd9fd33c1208c48bf89c5
and call it yourwebsite.com/action/nameof/action/ similar to https://github.com/opensource-socialnetwork/opensource-socialnetwork/blob/v5.x/components/OssnAds/ossn_com.php#L22
Have to say - rather happy here... I get a few small kinks worked out, and I will not only have this component in my arsenal, but a fully functional reply component too. :D
does a happy dance
btw - thank you so much for all of the help!
@Arsalan,
Can I ask a related question? I've tried routing the click of the url to both an action and to a page (both registered by the system) but neither want to redirect(REF);
or redirect("home")
properly.
Is there any issues with having a page that has code in it to do a task, but doesn't display anything, and then just redirect to either home or REF?
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)