예제 #1
0
파일: events.php 프로젝트: Jougito/DynWeb
 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');
 }
예제 #2
0
 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');
 }
예제 #3
0
 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');
 }
예제 #4
0
 public function ajaxTogglePublish($id, $type, $viewName = false)
 {
     return parent::ajaxTogglePublish($id, $type, 'groupcategories');
 }
예제 #5
0
 public function ajaxTogglePublish($id, $type)
 {
     return parent::ajaxTogglePublish($id, $type, 'videoscategories');
 }
예제 #6
0
파일: photos.php 프로젝트: Jougito/DynWeb
 public function ajaxTogglePublish($id, $type, $viewName = false)
 {
     $video = JTable::getInstance('Photo', 'CTable');
     $video->load($id);
     return parent::ajaxTogglePublish($id, $type, 'photos');
 }
예제 #7
0
 public function ajaxTogglePublish($id, $field, $viewName = false)
 {
     return parent::ajaxTogglePublish($id, $field, 'userpoints');
 }
예제 #8
0
 public function ajaxTogglePublish($id, $type)
 {
     return parent::ajaxTogglePublish($id, $type, 'events');
 }
예제 #9
0
 function ajaxTogglePublish($id, $type)
 {
     return parent::ajaxTogglePublish($id, $type, 'groupcategories');
 }
예제 #10
0
파일: badges.php 프로젝트: Jougito/DynWeb
 public function ajaxTogglePublish($id, $type, $viewName = false)
 {
     CommunityLicenseHelper::_();
     return parent::ajaxTogglePublish($id, $type, 'badges');
 }
예제 #11
0
 public function ajaxTogglePublish($id, $field)
 {
     return parent::ajaxTogglePublish($id, $field, 'userpoints');
 }