/** * Send out social shares * * @param array TopicData */ public function sendSocialShares(array $topicData) { $forumData = $this->getForumData(); $services = array(); /* Check for share strip */ if ($forumData['disable_sharelinks']) { return; } /* Check permission */ if (!$this->registry->getClass('class_forums')->checkEmailAccess(array_merge($this->memberData, $forumData, $topicData))) { return; } /* What are we sharing? */ foreach ($this->request as $k => $v) { if (stristr($k, 'share_x_') and !empty($v)) { $services[] = str_ireplace('share_x_', '', $k); } } if (count($services)) { $data = array('title' => $topicData['title'], 'url' => $this->registry->output->buildSEOUrl('showtopic=' . $topicData['tid'] . '&view=getnewpost', 'publicNoSession', $topicData['title_seo'], 'showtopic')); IPSMember::sendSocialShares($data, $services); } }