/** * Class entry point * * @param object Registry reference * @return @e void [Outputs to screen/redirects] */ public function doExecute(ipsRegistry $registry) { /* Disabled? */ if (!$this->settings['sl_enable']) { $this->registry->output->showError('no_permission', 100234.1, false, null, 403); } $url = IPSText::base64_decode_urlSafe($this->request['url']); $title = IPSText::base64_decode_urlSafe($this->request['title']); $key = trim($this->request['key']); /* Get the lib */ $classToLoad = IPSLib::loadLibrary(IPS_ROOT_PATH . 'sources/classes/share/links.php', 'share_links'); $share = new $classToLoad($registry, $key); /* Share! */ $share->share($title, $url); }
function shareLinks($links, $title = '', $url = '', $cssClass = 'topic_share left') { $IPBHTML = ""; if (IPSLib::locationHasHooks('skin_global', $this->_funcHooks['shareLinks'])) { $count_f978eae4844f7c661c0cd9f78bf733df = is_array($this->functionData['shareLinks']) ? count($this->functionData['shareLinks']) : 0; $this->functionData['shareLinks'][$count_f978eae4844f7c661c0cd9f78bf733df]['links'] = $links; $this->functionData['shareLinks'][$count_f978eae4844f7c661c0cd9f78bf733df]['title'] = $title; $this->functionData['shareLinks'][$count_f978eae4844f7c661c0cd9f78bf733df]['url'] = $url; $this->functionData['shareLinks'][$count_f978eae4844f7c661c0cd9f78bf733df]['cssClass'] = $cssClass; } $IPBHTML .= "" . $this->registry->getClass('output')->addJSModule("sharelinks", "0") . "\n" . (is_array($links) ? "\n\t<ul class='{$cssClass} shareButtons ipsList_inline'>\n\t" . $this->__f__cdf08cf85f92ef8ef4013206021a0615($links, $title, $url, $cssClass) . "\t</ul>\n\t<script type=\"text/javascript\">\n\t\tipb.sharelinks.url = \"" . IPSText::base64_decode_urlSafe($url) . "\";\n\t\tipb.sharelinks.title = \"" . IPSText::base64_decode_urlSafe(IPSText::htmlspecialchars($title)) . "\";\n\t\tipb.sharelinks.bname = \"" . trim(addslashes($this->settings['board_name'])) . "\";\n\t</script>\n" : "") . ""; return $IPBHTML; }
/** * Action: Delete */ protected function delete() { /* Rebuild Cache */ $cache = ips_CacheRegistry::instance()->getCache('meta_tags'); unset($cache[$this->request['page']]); ips_CacheRegistry::instance()->setCache('meta_tags', serialize($cache)); /* Delete any DB entries for this page */ $page = IPSText::base64_decode_urlSafe($this->request['page']); $escapedPage = $this->DB->addSlashes($page); $this->DB->delete('seo_meta', "url='{$escapedPage}'"); /* Rebuild Cache */ $this->rebuildMetaTagCache(); /* Boink */ $this->registry->output->silentRedirect(ipsRegistry::$settings['base_url'] . "module=templates§ion=meta"); }
/** * Class entry point * * @param object Registry reference * @return @e void [Outputs to screen/redirects] */ public function doExecute(ipsRegistry $registry) { /* Disabled? */ if (!$this->settings['sl_enable']) { $this->registry->output->showError('forward_turned_off', 103240.1); } /* Permission Check */ $cache = isset($this->caches['sharelinks']) ? $this->caches['sharelinks'] : ipsRegistry::cache()->getCache('sharelinks'); if ($cache['email']['share_groups'] != '*' and !IPSMember::isInGroup($this->memberData, explode(',', $cache['email']['share_groups']))) { $this->registry->output->showError('forward_turned_off', 103240.2); } //----------------------------------------- // Grab skin and lang stuff //----------------------------------------- ipsRegistry::getClass('class_localization')->loadLanguageFile(array('public_emails'), 'core'); /* Via URL and topic title? */ if ($this->request['url'] and $this->request['title']) { $this->page['url'] = IPSText::parseCleanValue(IPSText::base64_decode_urlSafe($this->request['url'])); $this->page['title'] = IPSText::parseCleanValue(urldecode($this->request['title'])); } else { //----------------------------------------- // Check the input //----------------------------------------- $this->request['t'] = intval($this->request['t']); $this->request['f'] = intval($this->request['f']); if (!$this->request['t']) { $this->registry->output->showError('forward_no_tid', 10321); } //----------------------------------------- // Get the topic details //----------------------------------------- $this->topic = $this->DB->buildAndFetch(array('select' => '*', 'from' => 'topics', 'where' => "tid=" . $this->request['t'])); $this->forum = ipsRegistry::getClass('class_forums')->forum_by_id[$this->topic['forum_id']]; //----------------------------------------- // Error out if we can not find the forum //----------------------------------------- if (!$this->forum['id']) { $this->registry->output->showError('forward_no_fid', 10322); } //----------------------------------------- // Error out if we can not find the topic //----------------------------------------- if (!$this->topic['tid']) { $this->registry->output->showError('forward_no_tid', 10323); } //----------------------------------------- // Check viewing permissions, private forums, // password forums, etc //----------------------------------------- if (!$this->memberData['member_id']) { $this->registry->output->showError('forward_only_members', 10324); } ipsRegistry::getClass('class_forums')->forumsCheckAccess($this->forum['id']); } /* last check */ if (!$this->topic['tid'] and !$this->page['url']) { $this->registry->output->showError('forward_no_tid', 10323.2); } /* Ok, I lied. Is this share entry enabled? */ $cache = ipsRegistry::cache()->getCache('sharelinks'); if (!is_array($cache['email']) or !$cache['email']['share_enabled']) { $this->registry->output->showError('forward_turned_off', 103240); } //----------------------------------------- // What to do? //----------------------------------------- if ($this->request['do'] == '01') { $this->_sendEmail(); } else { $this->_showForm(); } }
function shareLinks($links, $title = '', $url = '', $cssClass = 'topic_share left') { $IPBHTML = ""; if (IPSLib::locationHasHooks('skin_global', $this->_funcHooks['shareLinks'])) { $count_cccb47f6ed30fca85816f8724a57a2d0 = is_array($this->functionData['shareLinks']) ? count($this->functionData['shareLinks']) : 0; $this->functionData['shareLinks'][$count_cccb47f6ed30fca85816f8724a57a2d0]['links'] = $links; $this->functionData['shareLinks'][$count_cccb47f6ed30fca85816f8724a57a2d0]['title'] = $title; $this->functionData['shareLinks'][$count_cccb47f6ed30fca85816f8724a57a2d0]['url'] = $url; $this->functionData['shareLinks'][$count_cccb47f6ed30fca85816f8724a57a2d0]['cssClass'] = $cssClass; } $IPBHTML .= "" . $this->registry->getClass('output')->addJSModule("sharelinks", "0") . "\n" . (is_array($links) ? "\n\t<ul class='{$cssClass} shareButtons ipsList_inline'>\n\t" . $this->__f__3304d1545a10bd4a48423d531d1b38d6($links, $title, $url, $cssClass) . "\t</ul>\n\t<script type=\"text/javascript\">\n\t\tipb.sharelinks.url = \"" . IPSText::base64_decode_urlSafe($url) . "\";\n\t\tipb.sharelinks.title = \"" . IPSText::base64_decode_urlSafe(IPSText::htmlspecialchars($title)) . "\";\n\t\tipb.sharelinks.bname = \"" . trim(addslashes($this->settings['board_name'])) . "\";\n\t</script>\n" : "") . ""; return $IPBHTML; }
/** * Show unsubscribe dialogue * * @return @e void */ protected function _unsubscribe() { /* Fetch data */ $key = trim(IPSText::base64_decode_urlSafe($this->request['key'])); list($app, $area, $relId, $likeMemberId, $memberId, $email) = explode(';', $key); /* Sanitize */ $relId = intval($relId); $likeMemberId = intval($likeMemberId); $memberId = intval($memberId); $app = IPSText::alphanumericalClean($app); $area = IPSText::alphanumericalClean($area); /* Member? */ if (!$this->memberData['member_id']) { $this->registry->output->showError('no_permission', 'pcgl-1'); } if (!$app || !$area || !$relId) { $this->registry->output->showError('no_permission', 'pcgl-1'); } if ($memberId != $likeMemberId || $memberId != $this->memberData['member_id']) { $this->registry->output->showError('no_unfollow', 'pcgl-2'); } if ($email != $this->memberData['email']) { $this->registry->output->showError('no_unfollow', 'pcgl-3'); } /* Think we're safe... */ try { $this->_like = classes_like::bootstrap($app, $area); } catch (Exception $ex) { $this->registry->output->showError('no_permission', 'pcgl-4'); } /* Get data */ $data = $this->_like->getDataByRelationshipId($relId, false); if (!is_array($data[$this->memberData['member_id']])) { $this->registry->output->showError($this->lang->words['pg_no_longer_following'], 'pcgl-4'); } /* Get meta */ $meta = $this->_like->getMeta($relId); /* Display box, then */ $this->registry->output->setTitle($this->lang->words['pg_unfollow_title'] . ' - ' . ipsRegistry::$settings['board_name']); $this->registry->output->addNavigation($this->lang->words['pg_unfollow_title'], ''); return $this->registry->output->getTemplate('global_other')->followUnsubscribe($data, $meta); }
function shareLinks($links, $title = '', $url = '', $cssClass = 'topic_share left') { $IPBHTML = ""; if (IPSLib::locationHasHooks('skin_global', $this->_funcHooks['shareLinks'])) { $count_7099cfdbbceb94d76b8a8b1a664a76a5 = is_array($this->functionData['shareLinks']) ? count($this->functionData['shareLinks']) : 0; $this->functionData['shareLinks'][$count_7099cfdbbceb94d76b8a8b1a664a76a5]['links'] = $links; $this->functionData['shareLinks'][$count_7099cfdbbceb94d76b8a8b1a664a76a5]['title'] = $title; $this->functionData['shareLinks'][$count_7099cfdbbceb94d76b8a8b1a664a76a5]['url'] = $url; $this->functionData['shareLinks'][$count_7099cfdbbceb94d76b8a8b1a664a76a5]['cssClass'] = $cssClass; } $IPBHTML .= "" . $this->registry->getClass('output')->addJSModule("sharelinks", "0") . "\n" . (is_array($links) ? "\n\t<ul class='{$cssClass} shareButtons ipsList_inline'>\n\t" . $this->__f__757c354f5bcc816c5aa23d3248d46dd2($links, $title, $url, $cssClass) . "\t</ul>\n\t<script type=\"text/javascript\">\n\t\tipb.sharelinks.url = \"" . IPSText::base64_decode_urlSafe($url) . "\";\n\t\tipb.sharelinks.title = \"" . IPSText::base64_decode_urlSafe(IPSText::htmlspecialchars($title)) . "\";\n\t\tipb.sharelinks.bname = \"" . trim(addslashes($this->settings['board_name'])) . "\";\n\t</script>\n" : "") . ""; return $IPBHTML; }
function shareLinks($links, $title = '', $url = '', $cssClass = 'topic_share left') { $IPBHTML = ""; if (IPSLib::locationHasHooks('skin_global', $this->_funcHooks['shareLinks'])) { $count_b08612dc628b75b8e061149ab7743cfe = is_array($this->functionData['shareLinks']) ? count($this->functionData['shareLinks']) : 0; $this->functionData['shareLinks'][$count_b08612dc628b75b8e061149ab7743cfe]['links'] = $links; $this->functionData['shareLinks'][$count_b08612dc628b75b8e061149ab7743cfe]['title'] = $title; $this->functionData['shareLinks'][$count_b08612dc628b75b8e061149ab7743cfe]['url'] = $url; $this->functionData['shareLinks'][$count_b08612dc628b75b8e061149ab7743cfe]['cssClass'] = $cssClass; } $IPBHTML .= "" . $this->registry->getClass('output')->addJSModule("sharelinks", "0") . "\n" . (is_array($links) ? "\n\t<ul class='{$cssClass} shareButtons ipsList_inline'>\n\t" . $this->__f__f8af6b00261221fff6391dc980fc9ed7($links, $title, $url, $cssClass) . "\t</ul>\n\t<script type=\"text/javascript\">\n\t\tipb.sharelinks.url = \"" . IPSText::base64_decode_urlSafe($url) . "\";\n\t\tipb.sharelinks.title = \"" . IPSText::base64_decode_urlSafe(IPSText::htmlspecialchars($title)) . "\";\n\t\tipb.sharelinks.bname = \"" . trim(addslashes($this->settings['board_name'])) . "\";\n\t</script>\n" : "") . ""; return $IPBHTML; }