public function ajaxTogglePublish($id, $type, $eventName = false) { // Send email notification to owner when a group is published. $config = CFactory::getConfig(); $event = JTable::getInstance('Event', 'CTable'); $event->load($id); // Added published = 2 for new created event under moderation. if ($type == 'published' && $event->published == 2) { $lang = JFactory::getLanguage(); $lang->load('com_community', JPATH_ROOT); $my = CFactory::getUser(); // Add notification //CFactory::load('libraries', 'notification'); //CFactory::load('helpers', 'event'); if ($event->type == CEventHelper::GROUP_TYPE && $event->contentid != 0) { $url = 'index.php?option=com_community&view=events&task=viewevent&eventid=' . $event->id . '&groupid=' . $event->contentid; } else { $url = 'index.php?option=com_community&view=events&task=viewevent&eventid=' . $event->id; } //Send notification email to owner $params = new CParameter(''); $params->set('url', 'index.php?option=com_community&view=events&task=viewevent&eventid=' . $event->id); $params->set('event', $event->title); $params->set('event_url', 'index.php?option=com_community&view=events&task=viewevent&eventid=' . $event->id); CNotificationLibrary::add('events_notify_creator', $my->id, $event->creator, JText::_('COM_COMMUNITY_EVENTS_PUBLISHED_MAIL_SUBJECT'), '', 'events.notifycreator', $params); //CFactory::load('libraries', 'events'); // Add activity stream for new created event. $event->published = 1; // by pass published checking. CEvents::addEventStream($event); // send notification email to group's member for new created event. CEvents::addGroupNotification($event); } return parent::ajaxTogglePublish($id, $type, 'events'); }
public function ajaxTogglePublish($id, $type, $viewName = false) { // Send email notification to owner when a group is published. $config = CFactory::getConfig(); $group = JTable::getInstance('Group', 'CTable'); $group->load($id); if ($type == 'published' && $group->published == 0 && $config->get('moderategroupcreation')) { $this->notificationApproval($group); } return parent::ajaxTogglePublish($id, $type, 'groups'); }
public function ajaxTogglePublish($id, $type) { // Send email notification to owner when a group is published. $config =& CFactory::getConfig(); $group =& JTable::getInstance('Group', 'CTable'); $group->load($id); if ($type == 'published' && $group->published == 0 && $config->get('moderategroupcreation')) { $lang =& JFactory::getLanguage(); $lang->load('com_community', JPATH_ROOT); $my =& CFactory::getUser(); // Add notification CFactory::load('libraries', 'notification'); //Send notification email to owner $params = new CParameter(''); $params->set('url', 'index.php?option=com_community&view=groups&task=viewgroup&groupid=' . $group->id); $params->set('groupName', $group->name); CNotificationLibrary::add('etype_groups_notify_creator', $my->id, $group->ownerid, JText::sprintf('COM_COMMUNITY_GROUPS_PUBLISHED_MAIL_SUBJECT', $group->name), '', 'groups.notifycreator', $params); } return parent::ajaxTogglePublish($id, $type, 'groups'); }
public function ajaxTogglePublish($id, $type, $viewName = false) { return parent::ajaxTogglePublish($id, $type, 'groupcategories'); }
public function ajaxTogglePublish($id, $type) { return parent::ajaxTogglePublish($id, $type, 'videoscategories'); }
public function ajaxTogglePublish($id, $type, $viewName = false) { $video = JTable::getInstance('Photo', 'CTable'); $video->load($id); return parent::ajaxTogglePublish($id, $type, 'photos'); }
public function ajaxTogglePublish($id, $field, $viewName = false) { return parent::ajaxTogglePublish($id, $field, 'userpoints'); }
public function ajaxTogglePublish($id, $type) { return parent::ajaxTogglePublish($id, $type, 'events'); }
function ajaxTogglePublish($id, $type) { return parent::ajaxTogglePublish($id, $type, 'groupcategories'); }
public function ajaxTogglePublish($id, $type, $viewName = false) { CommunityLicenseHelper::_(); return parent::ajaxTogglePublish($id, $type, 'badges'); }
public function ajaxTogglePublish($id, $field) { return parent::ajaxTogglePublish($id, $field, 'userpoints'); }