I am customizing Oxwall notification plugin.
I am using Oxwall 1.7.0
I am trying to display notifications in User's dashboard page.
Currently the notification showing in top right bar with name as "Notifications".
I found out which file is responsible for displaying the content.
ow_plugins/notifications/classes/console_bridge.php
I commented the below code in this file to hide the notification from top right bar.
public function collectItems( BASE_CLASS_ConsoleItemCollector $event )
{
if ( !OW::getUser()->isAuthenticated() )
{
return;
}
/* Commented this code to hide the notification.
$item = new NOTIFICATIONS_CMP_ConsoleItem();
$event->addItem($item, 3);
*/
}
But when we call the component in user's dashboard using the below code, It gives me error.
$widgetService = BOL_ComponentAdminService::getInstance();
$widget = $widgetService->addWidget('NOTIFICATIONS_CMP_ConsoleItem', false);
$widgetPlace = $widgetService->addWidgetToPlace($widget, BOL_ComponentService::PLACE_DASHBOARD);
$widgetService->addWidgetToPosition($widgetPlace, BOL_ComponentService::SECTION_LEFT);
Error Screenshot:
How to display the notifications in user-dashboard?
To display user's notification in user's dashboard page, follow the below code in Widget's construct.
On Oxwall widget's view, add the below code