uawdijnntqw1x1x1
IP : 216.73.216.219
Hostname : webm015.cluster127.gra.hosting.ovh.net
Kernel : Linux webm015.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
OS : Linux
PATH:
/
home
/
pteabiscqq
/
www
/
188ee
/
..
/
includes
/
..
/
d528d
/
content.tar
/
/
vote/index.html000064400000000037152235327350007525 0ustar00<!DOCTYPE html><title></title> vote/vote.php000064400000007152152235327350007223 0ustar00<?php /** * @package Joomla.Plugin * @subpackage Content.vote * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Vote plugin. * * @since 1.5 */ class PlgContentVote extends JPlugin { /** * Application object * * @var JApplicationCms * @since 3.7.0 */ protected $app; /** * The position the voting data is displayed in relative to the article. * * @var string * @since 3.7.0 */ protected $votingPosition; /** * Constructor. * * @param object &$subject The object to observe * @param array $config An optional associative array of configuration settings. * * @since 3.7.0 */ public function __construct(&$subject, $config) { parent::__construct($subject, $config); $this->votingPosition = $this->params->get('position', 'top'); } /** * Displays the voting area when viewing an article and the voting section is displayed before the article * * @param string $context The context of the content being passed to the plugin * @param object &$row The article object * @param object &$params The article params * @param integer $page The 'page' number * * @return string|boolean HTML string containing code for the votes if in com_content else boolean false * * @since 1.6 */ public function onContentBeforeDisplay($context, &$row, &$params, $page = 0) { if ($this->votingPosition !== 'top') { return ''; } return $this->displayVotingData($context, $row, $params, $page); } /** * Displays the voting area when viewing an article and the voting section is displayed after the article * * @param string $context The context of the content being passed to the plugin * @param object &$row The article object * @param object &$params The article params * @param integer $page The 'page' number * * @return string|boolean HTML string containing code for the votes if in com_content else boolean false * * @since 3.7.0 */ public function onContentAfterDisplay($context, &$row, &$params, $page = 0) { if ($this->votingPosition !== 'bottom') { return ''; } return $this->displayVotingData($context, $row, $params, $page); } /** * Displays the voting area * * @param string $context The context of the content being passed to the plugin * @param object &$row The article object * @param object &$params The article params * @param integer $page The 'page' number * * @return string|boolean HTML string containing code for the votes if in com_content else boolean false * * @since 3.7.0 */ private function displayVotingData($context, &$row, &$params, $page) { $parts = explode('.', $context); if ($parts[0] !== 'com_content') { return false; } if (empty($params) || !$params->get('show_vote', null)) { return ''; } // Load plugin language files only when needed (ex: they are not needed if show_vote is not active). $this->loadLanguage(); // Get the path for the rating summary layout file $path = JPluginHelper::getLayoutPath('content', 'vote', 'rating'); // Render the layout ob_start(); include $path; $html = ob_get_clean(); if ($this->app->input->getString('view', '') === 'article' && $row->state == 1) { // Get the path for the voting form layout file $path = JPluginHelper::getLayoutPath('content', 'vote', 'vote'); // Render the layout ob_start(); include $path; $html .= ob_get_clean(); } return $html; } } vote/vote.xml000064400000002176152235327350007235 0ustar00<?xml version="1.0" encoding="utf-8"?> <extension version="3.1" type="plugin" group="content" method="upgrade"> <name>plg_content_vote</name> <author>Joomla! Project</author> <creationDate>November 2005</creationDate> <copyright>(C) 2005 Open Source Matters, Inc.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>3.0.0</version> <description>PLG_VOTE_XML_DESCRIPTION</description> <files> <filename plugin="vote">vote.php</filename> <folder>tmpl</folder> </files> <languages> <language tag="en-GB">en-GB.plg_content_vote.ini</language> <language tag="en-GB">en-GB.plg_content_vote.sys.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic"> <field name="position" type="list" label="PLG_VOTE_POSITION_LABEL" description="PLG_VOTE_POSITION_DESC" default="top" > <option value="top">PLG_VOTE_TOP</option> <option value="bottom">PLG_VOTE_BOTTOM</option> </field> </fieldset> </fields> </config> </extension> vote/tmpl/rating.php000064400000003167152235327350010510 0ustar00<?php /** * @package Joomla.Plugin * @subpackage Content.vote * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Layout variables * ----------------- * @var string $context The context of the content being passed to the plugin * @var object &$row The article object * @var object &$params The article params * @var integer $page The 'page' number * @var array $parts The context segments * @var string $path Path to this file */ if ($context == 'com_content.categories') { return; } $rating = (int) $row->rating; $rcount = (int) $row->rating_count; // Look for images in template if available $starImageOn = JHtml::_('image', 'system/rating_star.png', JText::_('PLG_VOTE_STAR_ACTIVE'), null, true); $starImageOff = JHtml::_('image', 'system/rating_star_blank.png', JText::_('PLG_VOTE_STAR_INACTIVE'), null, true); $img = ''; for ($i = 0; $i < $rating; $i++) { $img .= $starImageOn; } for ($i = $rating; $i < 5; $i++) { $img .= $starImageOff; } ?> <div class="content_rating"> <?php if ($rcount) : ?> <p class="unseen element-invisible" itemprop="aggregateRating" itemscope itemtype="https://schema.org/AggregateRating"> <?php echo JText::sprintf('PLG_VOTE_USER_RATING', '<span itemprop="ratingValue">' . $rating . '</span>', '<span itemprop="bestRating">5</span>'); ?> <meta itemprop="ratingCount" content="<?php echo $rcount; ?>" /> <meta itemprop="worstRating" content="1" /> </p> <?php endif; ?> <?php echo $img; ?> </div> vote/tmpl/vote.php000064400000003257152235327350010201 0ustar00<?php /** * @package Joomla.Plugin * @subpackage Content.vote * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Layout variables * ----------------- * @var string $context The context of the content being passed to the plugin * @var object &$row The article object * @var object &$params The article params * @var integer $page The 'page' number * @var array $parts The context segments * @var string $path Path to this file */ $uri = clone JUri::getInstance(); $uri->setVar('hitcount', '0'); // Create option list for voting select box $options = array(); for ($i = 1; $i < 6; $i++) { $options[] = JHtml::_('select.option', $i, JText::sprintf('PLG_VOTE_VOTE', $i)); } ?> <form method="post" action="<?php echo htmlspecialchars($uri->toString(), ENT_COMPAT, 'UTF-8'); ?>" class="form-inline"> <span class="content_vote"> <label class="unseen element-invisible" for="content_vote_<?php echo (int) $row->id; ?>"><?php echo JText::_('PLG_VOTE_LABEL'); ?></label> <?php echo JHtml::_('select.genericlist', $options, 'user_rating', null, 'value', 'text', '5', 'content_vote_' . (int) $row->id); ?>  <input class="btn btn-mini" type="submit" name="submit_vote" value="<?php echo JText::_('PLG_VOTE_RATE'); ?>" /> <input type="hidden" name="task" value="article.vote" /> <input type="hidden" name="hitcount" value="0" /> <input type="hidden" name="url" value="<?php echo htmlspecialchars($uri->toString(), ENT_COMPAT, 'UTF-8'); ?>" /> <?php echo JHtml::_('form.token'); ?> </span> </form> index.html000064400000000037152235327350006550 0ustar00<!DOCTYPE html><title></title> emailcloak/emailcloak.php000064400000042375152235327350011501 0ustar00<?php /** * @package Joomla.Plugin * @subpackage Content.emailcloak * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\String\StringHelper; /** * Email cloack plugin class. * * @since 1.5 */ class PlgContentEmailcloak extends JPlugin { /** * Plugin that cloaks all emails in content from spambots via Javascript. * * @param string $context The context of the content being passed to the plugin. * @param mixed &$row An object with a "text" property or the string to be cloaked. * @param mixed &$params Additional parameters. See {@see PlgContentEmailcloak()}. * @param integer $page Optional page number. Unused. Defaults to zero. * * @return boolean True on success. */ public function onContentPrepare($context, &$row, &$params, $page = 0) { // Don't run this plugin when the content is being indexed if ($context === 'com_finder.indexer') { return true; } if (is_object($row)) { return $this->_cloak($row->text, $params); } return $this->_cloak($row, $params); } /** * Generate a search pattern based on link and text. * * @param string $link The target of an email link. * @param string $text The text enclosed by the link. * * @return string A regular expression that matches a link containing the parameters. */ protected function _getPattern ($link, $text) { $pattern = '~(?:<a ([^>]*)href\s*=\s*"mailto:' . $link . '"([^>]*))>' . $text . '</a>~i'; return $pattern; } /** * Adds an attributes to the js cloaked email. * * @param string $jsEmail Js cloaked email. * @param string $before Attributes before email. * @param string $after Attributes after email. * * @return string Js cloaked email with attributes. */ protected function _addAttributesToEmail($jsEmail, $before, $after) { if ($before !== '') { $before = str_replace("'", "\'", $before); $jsEmail = str_replace(".innerHTML += '<a '", ".innerHTML += '<a {$before}'", $jsEmail); } if ($after !== '') { $after = str_replace("'", "\'", $after); $jsEmail = str_replace("'\'>'", "'\'{$after}>'", $jsEmail); } return $jsEmail; } /** * Cloak all emails in text from spambots via Javascript. * * @param string &$text The string to be cloaked. * @param mixed &$params Additional parameters. Parameter "mode" (integer, default 1) * replaces addresses with "mailto:" links if nonzero. * * @return boolean True on success. */ protected function _cloak(&$text, &$params) { /* * Check for presence of {emailcloak=off} which is explicits disables this * bot for the item. */ if (StringHelper::strpos($text, '{emailcloak=off}') !== false) { $text = StringHelper::str_ireplace('{emailcloak=off}', '', $text); return true; } // Simple performance check to determine whether bot should process further. if (StringHelper::strpos($text, '@') === false) { return true; } $mode = $this->params->def('mode', 1); // Example: any@example.org $searchEmail = '([\w\.\'\-\+]+\@(?:[a-z0-9\.\-]+\.)+(?:[a-zA-Z0-9\-]{2,24}))'; // Example: any@example.org?subject=anyText $searchEmailLink = $searchEmail . '([?&][\x20-\x7f][^"<>]+)'; // Any Text $searchText = '((?:[\x20-\x7f]|[\xA1-\xFF]|[\xC2-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF4][\x80-\xBF]{3})[^<>]+)'; // Any Image link $searchImage = '(<img[^>]+>)'; // Any Text with <span or <strong $searchTextSpan = '(<span[^>]+>|<span>|<strong>|<strong><span[^>]+>|<strong><span>)' . $searchText . '(</span>|</strong>|</span></strong>)'; // Any address with <span or <strong $searchEmailSpan = '(<span[^>]+>|<span>|<strong>|<strong><span[^>]+>|<strong><span>)' . $searchEmail . '(</span>|</strong>|</span></strong>)'; /* * Search and fix derivatives of link code <a href="http://mce_host/ourdirectory/email@example.org" * >email@example.org</a>. This happens when inserting an email in TinyMCE, cancelling its suggestion to add * the mailto: prefix... */ $pattern = $this->_getPattern($searchEmail, $searchEmail); $pattern = str_replace('"mailto:', '"http://mce_host([\x20-\x7f][^<>]+/)', $pattern); while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE)) { $mail = $regs[3][0]; $mailText = $regs[5][0]; // Check to see if mail text is different from mail addy $replacement = JHtml::_('email.cloak', $mail, $mode, $mailText); // Ensure that attributes is not stripped out by email cloaking $replacement = $this->_addAttributesToEmail($replacement, $regs[1][0], $regs[4][0]); // Replace the found address with the js cloaked email $text = substr_replace($text, $replacement, $regs[0][1], strlen($regs[0][0])); } /* * Search and fix derivatives of link code <a href="http://mce_host/ourdirectory/email@example.org" * >anytext</a>. This happens when inserting an email in TinyMCE, cancelling its suggestion to add * the mailto: prefix... */ $pattern = $this->_getPattern($searchEmail, $searchText); $pattern = str_replace('"mailto:', '"http://mce_host([\x20-\x7f][^<>]+/)', $pattern); while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE)) { $mail = $regs[3][0]; $mailText = $regs[5][0]; // Check to see if mail text is different from mail addy $replacement = JHtml::_('email.cloak', $mail, $mode, $mailText, 0); // Ensure that attributes is not stripped out by email cloaking $replacement = $this->_addAttributesToEmail($replacement, $regs[1][0], $regs[4][0]); // Replace the found address with the js cloaked email $text = substr_replace($text, $replacement, $regs[0][1], strlen($regs[0][0])); } /* * Search for derivatives of link code <a href="mailto:email@example.org" * >email@example.org</a> */ $pattern = $this->_getPattern($searchEmail, $searchEmail); while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE)) { $mail = $regs[2][0]; $mailText = $regs[4][0]; // Check to see if mail text is different from mail addy $replacement = JHtml::_('email.cloak', $mail, $mode, $mailText); // Ensure that attributes is not stripped out by email cloaking $replacement = $this->_addAttributesToEmail($replacement, $regs[1][0], $regs[3][0]); // Replace the found address with the js cloaked email $text = substr_replace($text, $replacement, $regs[0][1], strlen($regs[0][0])); } /* * Search for derivatives of link code <a href="mailto:email@amail.com" * ><anyspan >email@amail.com</anyspan></a> */ $pattern = $this->_getPattern($searchEmail, $searchEmailSpan); while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE)) { $mail = $regs[2][0]; $mailText = $regs[4][0] . $regs[5][0] . $regs[6][0]; // Check to see if mail text is different from mail addy $replacement = JHtml::_('email.cloak', $mail, $mode, $mailText); // Ensure that attributes is not stripped out by email cloaking $replacement = html_entity_decode($this->_addAttributesToEmail($replacement, $regs[1][0], $regs[3][0])); // Replace the found address with the js cloaked email $text = substr_replace($text, $replacement, $regs[0][1], strlen($regs[0][0])); } /* * Search for derivatives of link code <a href="mailto:email@amail.com"> * <anyspan >anytext</anyspan></a> */ $pattern = $this->_getPattern($searchEmail, $searchTextSpan); while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE)) { $mail = $regs[2][0]; $mailText = $regs[4][0] . addslashes($regs[5][0]) . $regs[6][0]; $replacement = JHtml::_('email.cloak', $mail, $mode, $mailText, 0); // Ensure that attributes is not stripped out by email cloaking $replacement = html_entity_decode($this->_addAttributesToEmail($replacement, $regs[1][0], $regs[3][0])); // Replace the found address with the js cloaked email $text = substr_replace($text, $replacement, $regs[0][1], strlen($regs[0][0])); } /* * Search for derivatives of link code <a href="mailto:email@example.org"> * anytext</a> */ $pattern = $this->_getPattern($searchEmail, $searchText); while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE)) { $mail = $regs[2][0]; $mailText = addslashes($regs[4][0]); $replacement = JHtml::_('email.cloak', $mail, $mode, $mailText, 0); // Ensure that attributes is not stripped out by email cloaking $replacement = $this->_addAttributesToEmail($replacement, $regs[1][0], $regs[3][0]); // Replace the found address with the js cloaked email $text = substr_replace($text, $replacement, $regs[0][1], strlen($regs[0][0])); } /* * Search for derivatives of link code <a href="mailto:email@example.org"> * <img anything></a> */ $pattern = $this->_getPattern($searchEmail, $searchImage); while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE)) { $mail = $regs[2][0]; $mailText = $regs[4][0]; $replacement = JHtml::_('email.cloak', $mail, $mode, $mailText, 0); // Ensure that attributes is not stripped out by email cloaking $replacement = html_entity_decode($this->_addAttributesToEmail($replacement, $regs[1][0], $regs[3][0])); // Replace the found address with the js cloaked email $text = substr_replace($text, $replacement, $regs[0][1], strlen($regs[0][0])); } /* * Search for derivatives of link code <a href="mailto:email@example.org"> * <img anything>email@example.org</a> */ $pattern = $this->_getPattern($searchEmail, $searchImage . $searchEmail); while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE)) { $mail = $regs[2][0]; $mailText = $regs[4][0] . $regs[5][0]; $replacement = JHtml::_('email.cloak', $mail, $mode, $mailText); // Ensure that attributes is not stripped out by email cloaking $replacement = html_entity_decode($this->_addAttributesToEmail($replacement, $regs[1][0], $regs[3][0])); // Replace the found address with the js cloaked email $text = substr_replace($text, $replacement, $regs[0][1], strlen($regs[0][0])); } /* * Search for derivatives of link code <a href="mailto:email@example.org"> * <img anything>any text</a> */ $pattern = $this->_getPattern($searchEmail, $searchImage . $searchText); while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE)) { $mail = $regs[2][0]; $mailText = $regs[4][0] . addslashes($regs[5][0]); $replacement = JHtml::_('email.cloak', $mail, $mode, $mailText, 0); // Ensure that attributes is not stripped out by email cloaking $replacement = html_entity_decode($this->_addAttributesToEmail($replacement, $regs[1][0], $regs[3][0])); // Replace the found address with the js cloaked email $text = substr_replace($text, $replacement, $regs[0][1], strlen($regs[0][0])); } /* * Search for derivatives of link code <a href="mailto:email@example.org? * subject=Text">email@example.org</a> */ $pattern = $this->_getPattern($searchEmailLink, $searchEmail); while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE)) { $mail = $regs[2][0] . $regs[3][0]; $mailText = $regs[5][0]; // Needed for handling of Body parameter $mail = str_replace('&', '&', $mail); // Check to see if mail text is different from mail addy $replacement = JHtml::_('email.cloak', $mail, $mode, $mailText); // Ensure that attributes is not stripped out by email cloaking $replacement = $this->_addAttributesToEmail($replacement, $regs[1][0], $regs[4][0]); // Replace the found address with the js cloaked email $text = substr_replace($text, $replacement, $regs[0][1], strlen($regs[0][0])); } /* * Search for derivatives of link code <a href="mailto:email@example.org? * subject=Text">anytext</a> */ $pattern = $this->_getPattern($searchEmailLink, $searchText); while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE)) { $mail = $regs[2][0] . $regs[3][0]; $mailText = addslashes($regs[5][0]); // Needed for handling of Body parameter $mail = str_replace('&', '&', $mail); $replacement = JHtml::_('email.cloak', $mail, $mode, $mailText, 0); // Ensure that attributes is not stripped out by email cloaking $replacement = $this->_addAttributesToEmail($replacement, $regs[1][0], $regs[4][0]); // Replace the found address with the js cloaked email $text = substr_replace($text, $replacement, $regs[0][1], strlen($regs[0][0])); } /* * Search for derivatives of link code <a href="mailto:email@amail.com?subject= Text" * ><anyspan >email@amail.com</anyspan></a> */ $pattern = $this->_getPattern($searchEmailLink, $searchEmailSpan); while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE)) { $mail = $regs[2][0] . $regs[3][0]; $mailText = $regs[5][0] . $regs[6][0] . $regs[7][0]; // Check to see if mail text is different from mail addy $replacement = JHtml::_('email.cloak', $mail, $mode, $mailText); // Ensure that attributes is not stripped out by email cloaking $replacement = html_entity_decode($this->_addAttributesToEmail($replacement, $regs[1][0], $regs[4][0])); // Replace the found address with the js cloaked email $text = substr_replace($text, $replacement, $regs[0][1], strlen($regs[0][0])); } /* * Search for derivatives of link code <a href="mailto:email@amail.com?subject= Text"> * <anyspan >anytext</anyspan></a> */ $pattern = $this->_getPattern($searchEmailLink, $searchTextSpan); while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE)) { $mail = $regs[2][0] . $regs[3][0]; $mailText = $regs[5][0] . addslashes($regs[6][0]) . $regs[7][0]; $replacement = JHtml::_('email.cloak', $mail, $mode, $mailText, 0); // Ensure that attributes is not stripped out by email cloaking $replacement = html_entity_decode($this->_addAttributesToEmail($replacement, $regs[1][0], $regs[4][0])); // Replace the found address with the js cloaked email $text = substr_replace($text, $replacement, $regs[0][1], strlen($regs[0][0])); } /* * Search for derivatives of link code * <a href="mailto:email@amail.com?subject=Text"><img anything></a> */ $pattern = $this->_getPattern($searchEmailLink, $searchImage); while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE)) { $mail = $regs[1][0] . $regs[2][0] . $regs[3][0]; $mailText = $regs[5][0]; // Needed for handling of Body parameter $mail = str_replace('&', '&', $mail); // Check to see if mail text is different from mail addy $replacement = JHtml::_('email.cloak', $mail, $mode, $mailText, 0); // Ensure that attributes is not stripped out by email cloaking $replacement = html_entity_decode($this->_addAttributesToEmail($replacement, $regs[1][0], $regs[4][0])); // Replace the found address with the js cloaked email $text = substr_replace($text, $replacement, $regs[0][1], strlen($regs[0][0])); } /* * Search for derivatives of link code * <a href="mailto:email@amail.com?subject=Text"><img anything>email@amail.com</a> */ $pattern = $this->_getPattern($searchEmailLink, $searchImage . $searchEmail); while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE)) { $mail = $regs[1][0] . $regs[2][0] . $regs[3][0]; $mailText = $regs[4][0] . $regs[5][0] . $regs[6][0]; // Needed for handling of Body parameter $mail = str_replace('&', '&', $mail); // Check to see if mail text is different from mail addy $replacement = JHtml::_('email.cloak', $mail, $mode, $mailText); // Ensure that attributes is not stripped out by email cloaking $replacement = html_entity_decode($this->_addAttributesToEmail($replacement, $regs[1][0], $regs[4][0])); // Replace the found address with the js cloaked email $text = substr_replace($text, $replacement, $regs[0][1], strlen($regs[0][0])); } /* * Search for derivatives of link code * <a href="mailto:email@amail.com?subject=Text"><img anything>any text</a> */ $pattern = $this->_getPattern($searchEmailLink, $searchImage . $searchText); while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE)) { $mail = $regs[1][0] . $regs[2][0] . $regs[3][0]; $mailText = $regs[4][0] . $regs[5][0] . addslashes($regs[6][0]); // Needed for handling of Body parameter $mail = str_replace('&', '&', $mail); // Check to see if mail text is different from mail addy $replacement = JHtml::_('email.cloak', $mail, $mode, $mailText, 0); // Ensure that attributes is not stripped out by email cloaking $replacement = html_entity_decode($this->_addAttributesToEmail($replacement, $regs[1][0], $regs[4][0])); // Replace the found address with the js cloaked email $text = substr_replace($text, $replacement, $regs[0][1], strlen($regs[0][0])); } /* * Search for plain text email addresses, such as email@example.org but not within HTML tags: * <img src="..." title="email@example.org"> or <input type="text" placeholder="email@example.org"> * The '<[^<]*>(*SKIP)(*F)|' trick is used to exclude this kind of occurrences */ $pattern = '~<[^<]*>(*SKIP)(*F)|' . $searchEmail . '~i'; while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE)) { $mail = $regs[1][0]; $replacement = JHtml::_('email.cloak', $mail, $mode); // Replace the found address with the js cloaked email $text = substr_replace($text, $replacement, $regs[1][1], strlen($mail)); } return true; } } emailcloak/emailcloak.xml000064400000002325152235327350011501 0ustar00<?xml version="1.0" encoding="utf-8"?> <extension version="3.1" type="plugin" group="content" method="upgrade"> <name>plg_content_emailcloak</name> <author>Joomla! Project</author> <creationDate>November 2005</creationDate> <copyright>(C) 2005 Open Source Matters, Inc.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>3.0.0</version> <description>PLG_CONTENT_EMAILCLOAK_XML_DESCRIPTION</description> <files> <filename plugin="emailcloak">emailcloak.php</filename> </files> <languages> <language tag="en-GB">en-GB.plg_content_emailcloak.ini</language> <language tag="en-GB">en-GB.plg_content_emailcloak.sys.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic"> <field name="mode" type="list" label="PLG_CONTENT_EMAILCLOAK_MODE_LABEL" description="PLG_CONTENT_EMAILCLOAK_MODE_DESC" default="1" filter="integer" > <option value="0">PLG_CONTENT_EMAILCLOAK_NONLINKABLE</option> <option value="1">PLG_CONTENT_EMAILCLOAK_LINKABLE</option> </field> </fieldset> </fields> </config> </extension> emailcloak/index.html000064400000000037152235327350010651 0ustar00<!DOCTYPE html><title></title> quix/quix.php000064400000015164152235327350007247 0ustar00<?php /** * @package Quix * @author ThemeXpert http://www.themexpert.com * @copyright Copyright (c) 2010-2015 ThemeXpert. All rights reserved. * @license GNU General Public License version 3 or later; see LICENSE.txt * @since 1.0.0 */ defined('_JEXEC') or die; use Joomla\Registry\Registry; use ThemeXpert\Shortcode\Shortcode; JLoader::discover('QuixSiteHelper', JPATH_SITE . '/components/com_quix/helpers/'); class plgContentQuix extends JPlugin { /** * Load the language file on instantiation. * * @var boolean * @since 3.1 */ protected $autoloadLanguage = true; public $configs = null; public $allowed_contexts = array(); protected $quixImported = false; /** * Constructor. * * @param object &$subject The object to observe * @param array $config An optional associative array of configuration settings. * * @since 1.6 */ public function __construct(&$subject, $config) { parent::__construct($subject, $config); $this->configs = $this->getConfigs(); $this->allowed_contexts[] = 'text'; // Common context for prepare content // Article if($this->configs->get('enable_com_content', 1)){ $this->allowed_contexts[] = 'com_content.article'; $this->allowed_contexts[] = 'com_content.featured'; $this->allowed_contexts[] = 'com_content.category'; } // Module if($this->configs->get('enable_mod_custom', 1)){ $this->allowed_contexts[] = 'mod_custom.content'; } // K2 if($this->configs->get('enable_com_k2', 0)){ $this->allowed_contexts[] = 'com_k2.item'; } // EasyBlog if($this->configs->get('enable_com_easyblog', 0)){ $this->allowed_contexts[] = 'easyblog.blog'; } // Digicom if($this->configs->get('enable_com_digicom', 0)){ $this->allowed_contexts[] = 'com_digicom.product'; $this->allowed_contexts[] = 'com_digicom.category'; $this->allowed_contexts[] = 'com_digicom.categories'; } // Virtuemart if($this->configs->get('enable_com_virtuemart', 0)){ $this->allowed_contexts[] = 'com_virtuemart.category'; $this->allowed_contexts[] = 'com_virtuemart.productdetails'; } // ZOO // require special permission // if($this->configs->get('enable_com_zoo', 0)){ // $this->allowed_contexts[] = 'com_zoo'; // } // HikaShop // Common context allowed by default // if($this->configs->get('enable_com_hikashop', 0)){ // $this->allowed_contexts[] = 'com_virtuemart.category'; // $this->allowed_contexts[] = 'com_virtuemart.productdetails'; // } // J2Store if($this->configs->get('enable_com_j2store', 0)){ $this->allowed_contexts[] = 'com_content.article.productlist'; $this->allowed_contexts[] = 'com_content.featured.productlist'; $this->allowed_contexts[] = 'com_content.category.productlist'; } // JU Directory if($this->configs->get('enable_com_judirectory', 0)){ $this->allowed_contexts[] = 'com_judirectory.field'; $this->allowed_contexts[] = 'com_judirectory.fieldgroup'; $this->allowed_contexts[] = 'com_judirectory.category'; $this->allowed_contexts[] = 'com_judirectory.categories'; $this->allowed_contexts[] = 'com_judirectory.comment'; $this->allowed_contexts[] = 'com_judirectory.criteria'; $this->allowed_contexts[] = 'com_judirectory.criteriagroup'; $this->allowed_contexts[] = 'com_judirectory.listing'; $this->allowed_contexts[] = 'com_judirectory.listing_list'; $this->allowed_contexts[] = 'com_judirectory.plugin'; $this->allowed_contexts[] = 'com_judirectory.style'; $this->allowed_contexts[] = 'com_judirectory.tag'; } // Custom Context if( $this->configs->get('enable_custom_context', 0) && !empty($this->configs->get('custom_context', '')) ){ $custom_context = $this->configs->get('custom_context', ''); $custom_context = explode(',', $custom_context); foreach ($custom_context as $key => $value) { $this->allowed_contexts[] = $value; } } } /** * Plugin that retrieves contact information for contact * * @param string $context The context of the content being passed to the plugin. * @param $article * @param mixed $params Additional parameters. See {@see PlgContentContent()}. * @param integer $page Optional page number. Unused. Defaults to zero. * @return bool True on success. * @internal param mixed $row An object with a 'text' property */ public function onContentPrepare( $context, &$article, &$params, $page = 0 ) { // Match context if ( !in_array( $context, $this->allowed_contexts ) ) { // no match, check if zoo enabled if(!$this->configs->get('enable_com_zoo', 0)){ return true; } // has zoo context if(strpos($context, 'com_zoo.') === false){ return true; } // continue } // Simple performance check to determine whether bot should process further if (strpos($article->text, 'quix') === false) { return true; } // Include dependencies jimport('quix.vendor.autoload'); $shortcodeParser = new Shortcode(); $content = $shortcodeParser->parse( "quix", $article->text, [ $this, 'renderShortcode' ] ); // $content = JHtml::_('content.prepare', $content, '', 'com_quix.collection'); $article->text = $content; return true; } /** * collection $id might not exist * so load bootstrap after we are sure that $id exists * and we should not call jimport multiple times * it will remember if we already imported * @param $attributes * @return string */ public function renderShortCode($attributes) { $id = array_key_exists('id', $attributes) ? $attributes['id'] : false; if (!$id) { return '<p>invalid quix shortcode!</p >'; } if (!$this->quixImported) { jimport('quix.app.bootstrap'); jimport('quix.app.init'); $this->quixImported = true; } $collection = qxGetCollectionInfoById($id); if (!$collection) { return '<p>invalid quix collection shortcode!</p >'; } // reset after loaded Assets::resetObject(); // load common assets quixRenderhead(); // rander main item $html = quixRenderItem($collection); // load output assets Assets::load(); // load quixtrap from system plugin plgSystemQuix::addQuixTrapCSS(); return $html; } public function getConfigs() { if (!$this->configs) { $config = JComponentHelper::getComponent('com_quix'); $this->configs = $config->params; } return $this->configs; } } quix/quix.xml000064400000001542152235327350007253 0ustar00<?xml version="1.0" encoding="utf-8"?> <extension version="3.0" type="plugin" group="content" method="upgrade"> <name>Content - Quix Content Plugin</name> <author>ThemeXpert</author> <creationDate>2017-07-16</creationDate> <copyright>Copyright (C) 2013 themexpert.com. All rights reserved.</copyright> <license>GNU/GPL</license> <authorEmail>info@themexpert.com</authorEmail> <authorUrl>www.themexpert.com</authorUrl> <version>1.9.2</version> <description>Thank you for installing Quix Content Plugin.</description> <scriptfile>installer.php</scriptfile> <files> <filename plugin="quix">quix.php</filename> </files> <languages folder="language"> <language tag="en-GB">en-GB/en-GB.plg_content_quix.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic"> </fieldset> </fields> </config> </extension> quix/installer.php000064400000001515152235327350010251 0ustar00<?php /** * @package Quix * @author ThemeXpert http://www.themexpert.com * @copyright Copyright (c) 2010-2015 ThemeXpert. All rights reserved. * @license GNU General Public License version 3 or later; see LICENSE.txt * @since 1.0.0 */ defined('_JEXEC') or die; class plgContentQuixInstallerScript { public function postflight($type, $parent) { $db = JFactory::getDbo(); $query = $db->getQuery(true); $fields = array( $db->quoteName('enabled') . ' = ' . (int) 1, $db->quoteName('ordering') . ' = ' . (int) 9999 ); $conditions = array( $db->quoteName('element') . ' = ' . $db->quote('quix'), $db->quoteName('type') . ' = ' . $db->quote('plugin') ); $query->update($db->quoteName('#__extensions'))->set($fields)->where($conditions); $db->setQuery($query); $db->execute(); return true; } } pagebreak/pagebreak.xml000064400000005427152235327350011147 0ustar00<?xml version="1.0" encoding="utf-8"?> <extension version="3.1" type="plugin" group="content" method="upgrade"> <name>plg_content_pagebreak</name> <author>Joomla! Project</author> <creationDate>November 2005</creationDate> <copyright>(C) 2005 Open Source Matters, Inc.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>3.0.0</version> <description>PLG_CONTENT_PAGEBREAK_XML_DESCRIPTION</description> <files> <filename plugin="pagebreak">pagebreak.php</filename> </files> <languages> <language tag="en-GB">en-GB.plg_content_pagebreak.ini</language> <language tag="en-GB">en-GB.plg_content_pagebreak.sys.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic"> <field name="title" type="radio" label="PLG_CONTENT_PAGEBREAK_SITE_TITLE_LABEL" description="PLG_CONTENT_PAGEBREAK_SITE_TITLE_DESC" class="btn-group btn-group-yesno" default="1" filter="integer" > <option value="1">JSHOW</option> <option value="0">JHIDE</option> </field> <field name="article_index" type="radio" label="PLG_CONTENT_PAGEBREAK_SITE_ARTICLEINDEX_LABEL" description="PLG_CONTENT_PAGEBREAK_SITE_ARTICLEINDEX_DESC" class="btn-group btn-group-yesno" default="1" filter="integer" > <option value="1">JSHOW</option> <option value="0">JHIDE</option> </field> <field name="article_index_text" type="text" label="PLG_CONTENT_PAGEBREAK_SITE_ARTICLEINDEXTEXT" description="PLG_CONTENT_PAGEBREAK_SITE_ARTICLEINDEXTEXT_DESC" showon="article_index:1" /> <field name="multipage_toc" type="radio" label="PLG_CONTENT_PAGEBREAK_TOC_LABEL" description="PLG_CONTENT_PAGEBREAK_TOC_DESC" class="btn-group btn-group-yesno" default="1" filter="integer" > <option value="1">JSHOW</option> <option value="0">JHIDE</option> </field> <field name="showall" type="radio" label="PLG_CONTENT_PAGEBREAK_SHOW_ALL_LABEL" description="PLG_CONTENT_PAGEBREAK_SHOW_ALL_DESC" class="btn-group btn-group-yesno" default="1" filter="integer" > <option value="1">JSHOW</option> <option value="0">JHIDE</option> </field> <field name="style" type="list" label="PLG_CONTENT_PAGEBREAK_STYLE_LABEL" description="PLG_CONTENT_PAGEBREAK_STYLE_DESC" default="pages" > <option value="pages">PLG_CONTENT_PAGEBREAK_PAGES</option> <option value="sliders">PLG_CONTENT_PAGEBREAK_SLIDERS</option> <option value="tabs">PLG_CONTENT_PAGEBREAK_TABS</option> </field> </fieldset> </fields> </config> </extension> pagebreak/pagebreak.php000064400000022765152235327350011142 0ustar00<?php /** * @package Joomla.Plugin * @subpackage Content.pagebreak * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\String\StringHelper; jimport('joomla.utilities.utility'); JLoader::register('ContentHelperRoute', JPATH_SITE . '/components/com_content/helpers/route.php'); /** * Page break plugin * * <b>Usage:</b> * <code><hr class="system-pagebreak" /></code> * <code><hr class="system-pagebreak" title="The page title" /></code> * or * <code><hr class="system-pagebreak" alt="The first page" /></code> * or * <code><hr class="system-pagebreak" title="The page title" alt="The first page" /></code> * or * <code><hr class="system-pagebreak" alt="The first page" title="The page title" /></code> * * @since 1.6 */ class PlgContentPagebreak extends JPlugin { /** * The navigation list with all page objects if parameter 'multipage_toc' is active. * * @var array * @since 3.9.2 */ protected $list = array(); /** * Plugin that adds a pagebreak into the text and truncates text at that point * * @param string $context The context of the content being passed to the plugin. * @param object &$row The article object. Note $article->text is also available * @param mixed &$params The article params * @param integer $page The 'page' number * * @return mixed Always returns void or true * * @since 1.6 */ public function onContentPrepare($context, &$row, &$params, $page = 0) { $canProceed = $context === 'com_content.article'; if (!$canProceed) { return; } $style = $this->params->get('style', 'pages'); // Expression to search for. $regex = '#<hr(.*)class="system-pagebreak"(.*)\/>#iU'; $input = JFactory::getApplication()->input; $print = $input->getBool('print'); $showall = $input->getBool('showall'); if (!$this->params->get('enabled', 1)) { $print = true; } if ($print) { $row->text = preg_replace($regex, '<br />', $row->text); return true; } // Simple performance check to determine whether bot should process further. if (StringHelper::strpos($row->text, 'class="system-pagebreak') === false) { if ($page > 0) { throw new Exception(JText::_('JERROR_PAGE_NOT_FOUND'), 404); } return true; } $view = $input->getString('view'); $full = $input->getBool('fullview'); if (!$page) { $page = 0; } if ($full || $view !== 'article' || $params->get('intro_only') || $params->get('popup')) { $row->text = preg_replace($regex, '', $row->text); return; } // Load plugin language files only when needed (ex: not needed if no system-pagebreak class exists). $this->loadLanguage(); // Find all instances of plugin and put in $matches. $matches = array(); preg_match_all($regex, $row->text, $matches, PREG_SET_ORDER); if ($showall && $this->params->get('showall', 1)) { $hasToc = $this->params->get('multipage_toc', 1); if ($hasToc) { // Display TOC. $page = 1; $this->_createToc($row, $matches, $page); } else { $row->toc = ''; } $row->text = preg_replace($regex, '<br />', $row->text); return true; } // Split the text around the plugin. $text = preg_split($regex, $row->text); if (!isset($text[$page])) { throw new Exception(JText::_('JERROR_PAGE_NOT_FOUND'), 404); } // Count the number of pages. $n = count($text); // We have found at least one plugin, therefore at least 2 pages. if ($n > 1) { $title = $this->params->get('title', 1); $hasToc = $this->params->get('multipage_toc', 1); // Adds heading or title to <site> Title. if ($title && $page && isset($matches[$page - 1][0])) { $attrs = JUtility::parseAttributes($matches[$page - 1][0]); if (isset($attrs['title'])) { $row->page_title = $attrs['title']; } } // Reset the text, we already hold it in the $text array. $row->text = ''; if ($style === 'pages') { // Display TOC. if ($hasToc) { $this->_createToc($row, $matches, $page); } else { $row->toc = ''; } // Traditional mos page navigation $pageNav = new JPagination($n, $page, 1); // Flag indicates to not add limitstart=0 to URL $pageNav->hideEmptyLimitstart = true; // Page counter. $row->text .= '<div class="pagenavcounter">'; $row->text .= $pageNav->getPagesCounter(); $row->text .= '</div>'; // Page text. $text[$page] = str_replace('<hr id="system-readmore" />', '', $text[$page]); $row->text .= $text[$page]; // $row->text .= '<br />'; $row->text .= '<div class="pager">'; // Adds navigation between pages to bottom of text. if ($hasToc) { $this->_createNavigation($row, $page, $n); } // Page links shown at bottom of page if TOC disabled. if (!$hasToc) { $row->text .= $pageNav->getPagesLinks(); } $row->text .= '</div>'; } else { $t[] = $text[0]; $t[] = (string) JHtml::_($style . '.start', 'article' . $row->id . '-' . $style); foreach ($text as $key => $subtext) { if ($key >= 1) { $match = $matches[$key - 1]; $match = (array) JUtility::parseAttributes($match[0]); if (isset($match['alt'])) { $title = stripslashes($match['alt']); } elseif (isset($match['title'])) { $title = stripslashes($match['title']); } else { $title = JText::sprintf('PLG_CONTENT_PAGEBREAK_PAGE_NUM', $key + 1); } $t[] = (string) JHtml::_($style . '.panel', $title, 'article' . $row->id . '-' . $style . $key); } $t[] = (string) $subtext; } $t[] = (string) JHtml::_($style . '.end'); $row->text = implode(' ', $t); } } return true; } /** * Creates a Table of Contents for the pagebreak * * @param object &$row The article object. Note $article->text is also available * @param array &$matches Array of matches of a regex in onContentPrepare * @param integer &$page The 'page' number * * @return void * * @since 1.6 */ protected function _createToc(&$row, &$matches, &$page) { $heading = isset($row->title) ? $row->title : JText::_('PLG_CONTENT_PAGEBREAK_NO_TITLE'); $input = JFactory::getApplication()->input; $limitstart = $input->getUInt('limitstart', 0); $showall = $input->getInt('showall', 0); $headingtext = ''; if ($this->params->get('article_index', 1) == 1) { $headingtext = JText::_('PLG_CONTENT_PAGEBREAK_ARTICLE_INDEX'); if ($this->params->get('article_index_text')) { $headingtext = htmlspecialchars($this->params->get('article_index_text'), ENT_QUOTES, 'UTF-8'); } } // TOC first Page link. $this->list[1] = new stdClass; $this->list[1]->liClass = ($limitstart === 0 && $showall === 0) ? 'toclink active' : 'toclink'; $this->list[1]->class = $this->list[1]->liClass; $this->list[1]->link = JRoute::_(ContentHelperRoute::getArticleRoute($row->slug, $row->catid, $row->language)); $this->list[1]->title = $heading; $i = 2; foreach ($matches as $bot) { if (@$bot[0]) { $attrs2 = JUtility::parseAttributes($bot[0]); if (@$attrs2['alt']) { $title = stripslashes($attrs2['alt']); } elseif (@$attrs2['title']) { $title = stripslashes($attrs2['title']); } else { $title = JText::sprintf('PLG_CONTENT_PAGEBREAK_PAGE_NUM', $i); } } else { $title = JText::sprintf('PLG_CONTENT_PAGEBREAK_PAGE_NUM', $i); } $this->list[$i] = new stdClass; $this->list[$i]->link = JRoute::_(ContentHelperRoute::getArticleRoute($row->slug, $row->catid, $row->language) . '&limitstart=' . ($i - 1)); $this->list[$i]->title = $title; $this->list[$i]->liClass = ($limitstart === $i - 1) ? 'active' : ''; $this->list[$i]->class = ($limitstart === $i - 1) ? 'toclink active' : 'toclink'; $i++; } if ($this->params->get('showall')) { $this->list[$i] = new stdClass; $this->list[$i]->link = JRoute::_(ContentHelperRoute::getArticleRoute($row->slug, $row->catid, $row->language) . '&showall=1'); $this->list[$i]->liClass = ($showall === 1) ? 'active' : ''; $this->list[$i]->class = ($showall === 1) ? 'toclink active' : 'toclink'; $this->list[$i]->title = JText::_('PLG_CONTENT_PAGEBREAK_ALL_PAGES'); } $list = $this->list; $path = JPluginHelper::getLayoutPath('content', 'pagebreak', 'toc'); ob_start(); include $path; $row->toc = ob_get_clean(); } /** * Creates the navigation for the item * * @param object &$row The article object. Note $article->text is also available * @param int $page The page number * @param int $n The total number of pages * * @return void * * @since 1.6 */ protected function _createNavigation(&$row, $page, $n) { $links = array( 'next' => '', 'previous' => '' ); if ($page < $n - 1) { $links['next'] = JRoute::_(ContentHelperRoute::getArticleRoute($row->slug, $row->catid, $row->language) . '&limitstart=' . ($page + 1)); } if ($page > 0) { $links['previous'] = ContentHelperRoute::getArticleRoute($row->slug, $row->catid, $row->language); if ($page > 1) { $links['previous'] .= '&limitstart=' . ($page - 1); } $links['previous'] = JRoute::_($links['previous']); } $path = JPluginHelper::getLayoutPath('content', 'pagebreak', 'navigation'); ob_start(); include $path; $row->text .= ob_get_clean(); } } pagebreak/tmpl/toc.php000064400000001366152235327350010754 0ustar00<?php /** * @package Joomla.Plugin * @subpackage Content.pagebreak * * @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; ?> <div class="pull-right article-index"> <?php if ($headingtext) : ?> <h3><?php echo $headingtext; ?></h3> <?php endif; ?> <ul class="nav nav-tabs nav-stacked"> <?php foreach ($list as $listItem) : ?> <?php $class = $listItem->liClass ? ' class="' . $listItem->liClass . '"' : ''; ?> <li<?php echo $class; ?>> <a href="<?php echo $listItem->link; ?>" class="<?php echo $listItem->class; ?>"> <?php echo $listItem->title; ?> </a> </li> <?php endforeach; ?> </ul> </div> pagebreak/tmpl/navigation.php000064400000002663152235327350012327 0ustar00<?php /** * @package Joomla.Plugin * @subpackage Content.pagebreak * * @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; $lang = JFactory::getLanguage(); ?> <ul> <li> <?php if ($links['previous']) : $direction = $lang->isRtl() ? 'right' : 'left'; $title = htmlspecialchars($this->list[$page]->title, ENT_QUOTES, 'UTF-8'); $ariaLabel = JText::_('JPREVIOUS') . ': ' . $title . ' (' . JText::sprintf('JLIB_HTML_PAGE_CURRENT_OF_TOTAL', $page, $n) . ')'; ?> <a href="<?php echo $links['previous']; ?>" title="<?php echo $title; ?>" aria-label="<?php echo $ariaLabel; ?>" rel="prev"> <?php echo '<span class="icon-chevron-' . $direction . '" aria-hidden="true"></span> ' . JText::_('JPREV'); ?> </a> <?php endif; ?> </li> <li> <?php if ($links['next']) : $direction = $lang->isRtl() ? 'left' : 'right'; $title = htmlspecialchars($this->list[$page + 2]->title, ENT_QUOTES, 'UTF-8'); $ariaLabel = JText::_('JNEXT') . ': ' . $title . ' (' . JText::sprintf('JLIB_HTML_PAGE_CURRENT_OF_TOTAL', ($page + 2), $n) . ')'; ?> <a href="<?php echo $links['next']; ?>" title="<?php echo $title; ?>" aria-label="<?php echo $ariaLabel; ?>" rel="next"> <?php echo JText::_('JNEXT') . ' <span class="icon-chevron-' . $direction . '" aria-hidden="true"></span>'; ?> </a> <?php endif; ?> </li> </ul> pagebreak/index.html000064400000000037152235327350010471 0ustar00<!DOCTYPE html><title></title> fields/fields.php000064400000010140152235327350007774 0ustar00<?php /** * @package Joomla.Plugin * @subpackage Content.Fields * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die(); /** * Plug-in to show a custom field in eg an article * This uses the {fields ID} syntax * * @since 3.7.0 */ class PlgContentFields extends JPlugin { /** * Plugin that shows a custom field * * @param string $context The context of the content being passed to the plugin. * @param object &$item The item object. Note $article->text is also available * @param object &$params The article params * @param int $page The 'page' number * * @return void * * @since 3.7.0 */ public function onContentPrepare($context, &$item, &$params, $page = 0) { // If the item has a context, overwrite the existing one if ($context == 'com_finder.indexer' && !empty($item->context)) { $context = $item->context; } elseif ($context == 'com_finder.indexer') { // Don't run this plugin when the content is being indexed and we have no real context return; } // Don't run if there is no text property (in case of bad calls) or it is empty if (empty($item->text)) { return; } // Simple performance check to determine whether bot should process further if (strpos($item->text, 'field') === false) { return; } // Register FieldsHelper JLoader::register('FieldsHelper', JPATH_ADMINISTRATOR . '/components/com_fields/helpers/fields.php'); // Prepare the text if (isset($item->text)) { $item->text = $this->prepare($item->text, $context, $item); } // Prepare the intro text if (isset($item->introtext)) { $item->introtext = $this->prepare($item->introtext, $context, $item); } } /** * Prepares the given string by parsing {field} and {fieldgroup} groups and replacing them. * * @param string $string The text to prepare * @param string $context The context of the content * @param object $item The item object * * @return string * * @since 3.8.1 */ private function prepare($string, $context, $item) { // Search for {field ID} or {fieldgroup ID} tags and put the results into $matches. $regex = '/{(field|fieldgroup)\s+(.*?)}/i'; preg_match_all($regex, $string, $matches, PREG_SET_ORDER); if (!$matches) { return $string; } $parts = FieldsHelper::extract($context); if (count($parts) < 2) { return $string; } $context = $parts[0] . '.' . $parts[1]; $fields = FieldsHelper::getFields($context, $item, true); $fieldsById = array(); $groups = array(); // Rearranging fields in arrays for easier lookup later. foreach ($fields as $field) { $fieldsById[$field->id] = $field; $groups[$field->group_id][] = $field; } foreach ($matches as $i => $match) { // $match[0] is the full pattern match, $match[1] is the type (field or fieldgroup) and $match[2] the ID and optional the layout $explode = explode(',', $match[2]); $id = (int) $explode[0]; $output = ''; if ($match[1] == 'field' && $id) { if (isset($fieldsById[$id])) { $layout = !empty($explode[1]) ? trim($explode[1]) : $fieldsById[$id]->params->get('layout', 'render'); $output = FieldsHelper::render( $context, 'field.' . $layout, array( 'item' => $item, 'context' => $context, 'field' => $fieldsById[$id] ) ); } } else { if ($match[2] === '*') { $match[0] = str_replace('*', '\*', $match[0]); $renderFields = $fields; } else { $renderFields = isset($groups[$id]) ? $groups[$id] : ''; } if ($renderFields) { $layout = !empty($explode[1]) ? trim($explode[1]) : 'render'; $output = FieldsHelper::render( $context, 'fields.' . $layout, array( 'item' => $item, 'context' => $context, 'fields' => $renderFields ) ); } } $string = preg_replace("|$match[0]|", addcslashes($output, '\\$'), $string, 1); } return $string; } } fields/fields.xml000064400000001561152235327350010014 0ustar00<?xml version="1.0" encoding="utf-8"?> <extension version="3.7.0" type="plugin" group="content" method="upgrade"> <name>plg_content_fields</name> <author>Joomla! Project</author> <creationDate>February 2017</creationDate> <copyright>(C) 2017 Open Source Matters, Inc.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>3.7.0</version> <description>PLG_CONTENT_FIELDS_XML_DESCRIPTION</description> <files> <filename plugin="fields">fields.php</filename> </files> <languages> <language tag="en-GB">en-GB.plg_content_fields.ini</language> <language tag="en-GB">en-GB.plg_content_fields.sys.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic"> </fieldset> </fields> </config> </extension> confirmconsent/fields/consentbox.php000064400000015164152235327350013752 0ustar00<?php /** * @package Joomla.Plugin * @subpackage Content.confirmconsent * * @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('JPATH_PLATFORM') or die; use Joomla\CMS\Factory; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Associations; use Joomla\CMS\Language\Text; use Joomla\CMS\Router\Route; JFormHelper::loadFieldClass('Checkboxes'); /** * Consentbox Field class for the Confirm Consent Plugin. * * @since 3.9.1 */ class JFormFieldConsentBox extends JFormFieldCheckboxes { /** * The form field type. * * @var string * @since 3.9.1 */ protected $type = 'ConsentBox'; /** * Flag to tell the field to always be in multiple values mode. * * @var boolean * @since 3.9.1 */ protected $forceMultiple = false; /** * The article ID. * * @var integer * @since 3.9.1 */ protected $articleid; /** * Method to set certain otherwise inaccessible properties of the form field object. * * @param string $name The property name for which to set the value. * @param mixed $value The value of the property. * * @return void * * @since 3.9.1 */ public function __set($name, $value) { switch ($name) { case 'articleid': $this->articleid = (int) $value; break; default: parent::__set($name, $value); } } /** * Method to get certain otherwise inaccessible properties from the form field object. * * @param string $name The property name for which to get the value. * * @return mixed The property value or null. * * @since 3.9.1 */ public function __get($name) { switch ($name) { case 'articleid': return $this->$name; } return parent::__get($name); } /** * Method to attach a JForm object to the field. * * @param SimpleXMLElement $element The SimpleXMLElement object representing the `<field>` tag for the form field object. * @param mixed $value The form field value to validate. * @param string $group The field name group control value. This acts as an array container for the field. * For example if the field has name="foo" and the group value is set to "bar" then the * full field name would end up being "bar[foo]". * * @return boolean True on success. * * @see JFormField::setup() * @since 3.9.1 */ public function setup(SimpleXMLElement $element, $value, $group = null) { $return = parent::setup($element, $value, $group); if ($return) { $this->articleid = (int) $this->element['articleid']; } return $return; } /** * Method to get the field label markup. * * @return string The field label markup. * * @since 3.9.1 */ protected function getLabel() { if ($this->hidden) { return ''; } $data = $this->getLayoutData(); // Forcing the Alias field to display the tip below $position = $this->element['name'] == 'alias' ? ' data-placement="bottom" ' : ''; // When we have an article let's add the modal and make the title clickable if ($data['articleid']) { $attribs['data-toggle'] = 'modal'; $data['label'] = HTMLHelper::_( 'link', '#modal-' . $this->id, $data['label'], $attribs ); } // Here mainly for B/C with old layouts. This can be done in the layouts directly $extraData = array( 'text' => $data['label'], 'for' => $this->id, 'classes' => explode(' ', $data['labelclass']), 'position' => $position, ); return $this->getRenderer($this->renderLabelLayout)->render(array_merge($data, $extraData)); } /** * Method to get the field input markup. * * @return string The field input markup. * * @since 3.9.2 */ protected function getInput() { $modalHtml = ''; $layoutData = $this->getLayoutData(); if ($this->articleid) { $modalParams['title'] = $layoutData['label']; $modalParams['url'] = $this->getAssignedArticleUrl(); $modalParams['height'] = 800; $modalParams['width'] = '100%'; $modalHtml = HTMLHelper::_('bootstrap.renderModal', 'modal-' . $this->id, $modalParams); } return $modalHtml . parent::getInput(); } /** * Method to get the data to be passed to the layout for rendering. * * @return array * * @since 3.9.1 */ protected function getLayoutData() { $data = parent::getLayoutData(); $extraData = array( 'articleid' => (integer) $this->articleid, ); return array_merge($data, $extraData); } /** * Return the url of the assigned article based on the current user language * * @return string Returns the link to the article * * @since 3.9.1 */ private function getAssignedArticleUrl() { $db = Factory::getDbo(); // Get the info from the article $query = $db->getQuery(true) ->select($db->quoteName(array('id', 'catid', 'language'))) ->from($db->quoteName('#__content')) ->where($db->quoteName('id') . ' = ' . (int) $this->articleid); $db->setQuery($query); try { $article = $db->loadObject(); } catch (JDatabaseExceptionExecuting $e) { // Something at the database layer went wrong return Route::_( 'index.php?option=com_content&view=article&id=' . $this->articleid . '&tmpl=component' ); } if (!is_object($article)) { // We have not found the article object lets show a 404 to the user return Route::_( 'index.php?option=com_content&view=article&id=' . $this->articleid . '&tmpl=component' ); } // Register ContentHelperRoute JLoader::register('ContentHelperRoute', JPATH_BASE . '/components/com_content/helpers/route.php'); if (!Associations::isEnabled()) { return Route::_( ContentHelperRoute::getArticleRoute( $article->id, $article->catid, $article->language ) . '&tmpl=component' ); } $associatedArticles = Associations::getAssociations('com_content', '#__content', 'com_content.item', $article->id); $currentLang = Factory::getLanguage()->getTag(); if (isset($associatedArticles) && $currentLang !== $article->language && array_key_exists($currentLang, $associatedArticles)) { return Route::_( ContentHelperRoute::getArticleRoute( $associatedArticles[$currentLang]->id, $associatedArticles[$currentLang]->catid, $associatedArticles[$currentLang]->language ) . '&tmpl=component' ); } // Association is enabled but this article is not associated return Route::_( 'index.php?option=com_content&view=article&id=' . $article->id . '&catid=' . $article->catid . '&tmpl=component&lang=' . $article->language ); } } confirmconsent/confirmconsent.php000064400000003746152235327350013354 0ustar00<?php /** * @package Joomla.Plugin * @subpackage Content.confirmconsent * * @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Language\Text; use Joomla\CMS\Plugin\CMSPlugin; /** * The Joomla Core confirm consent plugin * * @since 3.9.0 */ class PlgContentConfirmConsent extends CMSPlugin { /** * The Application object * * @var JApplicationSite * @since 3.9.0 */ protected $app; /** * Load the language file on instantiation. * * @var boolean * @since 3.9.0 */ protected $autoloadLanguage = true; /** * The supported form contexts * * @var array * @since 3.9.0 */ protected $supportedContext = array( 'com_contact.contact', 'com_mailto.mailto', 'com_privacy.request', ); /** * Add additional fields to the supported forms * * @param JForm $form The form to be altered. * @param mixed $data The associated data for the form. * * @return boolean * * @since 3.9.0 */ public function onContentPrepareForm(JForm $form, $data) { if ($this->app->isClient('administrator') || !in_array($form->getName(), $this->supportedContext)) { return true; } // Get the consent box Text & the selected privacyarticle $consentboxText = (string) $this->params->get('consentbox_text', Text::_('PLG_CONTENT_CONFIRMCONSENT_FIELD_NOTE_DEFAULT')); $privacyArticle = $this->params->get('privacy_article', false); $form->load(' <form> <fieldset name="default" addfieldpath="/plugins/content/confirmconsent/fields"> <field name="consentbox" type="consentbox" articleid="' . $privacyArticle . '" label="PLG_CONTENT_CONFIRMCONSENT_CONSENTBOX_LABEL" required="true" > <option value="0">' . htmlspecialchars($consentboxText, ENT_COMPAT, 'UTF-8') . '</option> </field> </fieldset> </form>' ); return true; } } confirmconsent/confirmconsent.xml000064400000003067152235327350013361 0ustar00<?xml version="1.0" encoding="utf-8"?> <extension version="3.9" type="plugin" group="content" method="upgrade"> <name>plg_content_confirmconsent</name> <author>Joomla! Project</author> <creationDate>May 2018</creationDate> <copyright>(C) 2018 Open Source Matters, Inc.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>3.9.0</version> <description>PLG_CONTENT_CONFIRMCONSENT_XML_DESCRIPTION</description> <files> <filename plugin="confirmconsent">confirmconsent.php</filename> </files> <languages> <language tag="en-GB">en-GB.plg_content_confirmconsent.ini</language> <language tag="en-GB">en-GB.plg_content_confirmconsent.sys.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic" addfieldpath="/administrator/components/com_content/models/fields"> <field name="consentbox_text" type="textarea" label="PLG_CONTENT_CONFIRMCONSENT_FIELD_NOTE_LABEL" description="PLG_CONTENT_CONFIRMCONSENT_FIELD_NOTE_DESC" hint="PLG_CONTENT_CONFIRMCONSENT_FIELD_NOTE_DEFAULT" class="span12" rows="7" cols="20" filter="html" /> <field name="privacy_article" type="modal_article" label="PLG_CONTENT_CONFIRMCONSENT_FIELD_ARTICLE_LABEL" description="PLG_CONTENT_CONFIRMCONSENT_FIELD_ARTICLE_DESC" select="true" new="true" edit="true" clear="true" filter="integer" /> </fieldset> </fields> </config> </extension> joomla/index.html000064400000000037152235327350010031 0ustar00<!DOCTYPE html><title></title> joomla/joomla.xml000064400000003056152235327350010043 0ustar00<?xml version="1.0" encoding="utf-8"?> <extension version="3.1" type="plugin" group="content" method="upgrade"> <name>plg_content_joomla</name> <author>Joomla! Project</author> <creationDate>November 2010</creationDate> <copyright>(C) 2010 Open Source Matters, Inc.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>3.0.0</version> <description>PLG_CONTENT_JOOMLA_XML_DESCRIPTION</description> <files> <filename plugin="joomla">joomla.php</filename> </files> <languages> <language tag="en-GB">en-GB.plg_content_joomla.ini</language> <language tag="en-GB">en-GB.plg_content_joomla.sys.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic"> <field name="check_categories" type="radio" label="PLG_CONTENT_JOOMLA_FIELD_CHECK_CATEGORIES_LABEL" description="PLG_CONTENT_JOOMLA_FIELD_CHECK_CATEGORIES_DESC" class="btn-group btn-group-yesno" default="1" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="email_new_fe" type="radio" label="PLG_CONTENT_JOOMLA_FIELD_EMAIL_NEW_FE_LABEL" description="PLG_CONTENT_JOOMLA_FIELD_EMAIL_NEW_FE_DESC" class="btn-group btn-group-yesno" default="1" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> </fieldset> </fields> </config> </extension> joomla/joomla.php000064400000021365152235327350010035 0ustar00<?php /** * @package Joomla.Plugin * @subpackage Content.joomla * * @copyright (C) 2010 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Example Content Plugin * * @since 1.6 */ class PlgContentJoomla extends JPlugin { /** * Example after save content method * Article is passed by reference, but after the save, so no changes will be saved. * Method is called right after the content is saved * * @param string $context The context of the content passed to the plugin (added in 1.6) * @param object $article A JTableContent object * @param boolean $isNew If the content is just about to be created * * @return boolean true if function not enabled, is in frontend or is new. Else true or * false depending on success of save function. * * @since 1.6 */ public function onContentAfterSave($context, $article, $isNew) { // Check we are handling the frontend edit form. if ($context !== 'com_content.form') { return true; } // Check if this function is enabled. if (!$this->params->def('email_new_fe', 1)) { return true; } // Check this is a new article. if (!$isNew) { return true; } $db = JFactory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName('id')) ->from($db->quoteName('#__users')) ->where($db->quoteName('sendEmail') . ' = 1') ->where($db->quoteName('block') . ' = 0'); $db->setQuery($query); $users = (array) $db->loadColumn(); if (empty($users)) { return true; } $user = JFactory::getUser(); // Messaging for new items JModelLegacy::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_messages/models', 'MessagesModel'); JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_messages/tables'); $default_language = JComponentHelper::getParams('com_languages')->get('administrator'); $debug = JFactory::getConfig()->get('debug_lang'); $result = true; foreach ($users as $user_id) { if ($user_id != $user->id) { // Load language for messaging $receiver = JUser::getInstance($user_id); $lang = JLanguage::getInstance($receiver->getParam('admin_language', $default_language), $debug); $lang->load('com_content'); $message = array( 'user_id_to' => $user_id, 'subject' => $lang->_('COM_CONTENT_NEW_ARTICLE'), 'message' => sprintf($lang->_('COM_CONTENT_ON_NEW_CONTENT'), $user->get('name'), $article->title) ); $model_message = JModelLegacy::getInstance('Message', 'MessagesModel'); $result = $model_message->save($message); } } return $result; } /** * Don't allow categories to be deleted if they contain items or subcategories with items * * @param string $context The context for the content passed to the plugin. * @param object $data The data relating to the content that was deleted. * * @return boolean * * @since 1.6 */ public function onContentBeforeDelete($context, $data) { // Skip plugin if we are deleting something other than categories if ($context !== 'com_categories.category') { return true; } // Check if this function is enabled. if (!$this->params->def('check_categories', 1)) { return true; } $extension = JFactory::getApplication()->input->getString('extension'); // Default to true if not a core extension $result = true; $tableInfo = array( 'com_banners' => array('table_name' => '#__banners'), 'com_contact' => array('table_name' => '#__contact_details'), 'com_content' => array('table_name' => '#__content'), 'com_newsfeeds' => array('table_name' => '#__newsfeeds'), 'com_weblinks' => array('table_name' => '#__weblinks') ); // Now check to see if this is a known core extension if (isset($tableInfo[$extension])) { // Get table name for known core extensions $table = $tableInfo[$extension]['table_name']; // See if this category has any content items $count = $this->_countItemsInCategory($table, $data->get('id')); // Return false if db error if ($count === false) { $result = false; } else { // Show error if items are found in the category if ($count > 0) { $msg = JText::sprintf('COM_CATEGORIES_DELETE_NOT_ALLOWED', $data->get('title')) . JText::plural('COM_CATEGORIES_N_ITEMS_ASSIGNED', $count); JError::raiseWarning(403, $msg); $result = false; } // Check for items in any child categories (if it is a leaf, there are no child categories) if (!$data->isLeaf()) { $count = $this->_countItemsInChildren($table, $data->get('id'), $data); if ($count === false) { $result = false; } elseif ($count > 0) { $msg = JText::sprintf('COM_CATEGORIES_DELETE_NOT_ALLOWED', $data->get('title')) . JText::plural('COM_CATEGORIES_HAS_SUBCATEGORY_ITEMS', $count); JError::raiseWarning(403, $msg); $result = false; } } } return $result; } } /** * Get count of items in a category * * @param string $table table name of component table (column is catid) * @param integer $catid id of the category to check * * @return mixed count of items found or false if db error * * @since 1.6 */ private function _countItemsInCategory($table, $catid) { $db = JFactory::getDbo(); $query = $db->getQuery(true); // Count the items in this category $query->select('COUNT(id)') ->from($table) ->where('catid = ' . $catid); $db->setQuery($query); try { $count = $db->loadResult(); } catch (RuntimeException $e) { JError::raiseWarning(500, $e->getMessage()); return false; } return $count; } /** * Get count of items in a category's child categories * * @param string $table table name of component table (column is catid) * @param integer $catid id of the category to check * @param object $data The data relating to the content that was deleted. * * @return mixed count of items found or false if db error * * @since 1.6 */ private function _countItemsInChildren($table, $catid, $data) { $db = JFactory::getDbo(); // Create subquery for list of child categories $childCategoryTree = $data->getTree(); // First element in tree is the current category, so we can skip that one unset($childCategoryTree[0]); $childCategoryIds = array(); foreach ($childCategoryTree as $node) { $childCategoryIds[] = $node->id; } // Make sure we only do the query if we have some categories to look in if (count($childCategoryIds)) { // Count the items in this category $query = $db->getQuery(true) ->select('COUNT(id)') ->from($table) ->where('catid IN (' . implode(',', $childCategoryIds) . ')'); $db->setQuery($query); try { $count = $db->loadResult(); } catch (RuntimeException $e) { JError::raiseWarning(500, $e->getMessage()); return false; } return $count; } else // If we didn't have any categories to check, return 0 { return 0; } } /** * Change the state in core_content if the state in a table is changed * * @param string $context The context for the content passed to the plugin. * @param array $pks A list of primary key ids of the content that has changed state. * @param integer $value The value of the state that the content has been changed to. * * @return boolean * * @since 3.1 */ public function onContentChangeState($context, $pks, $value) { $db = JFactory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName('core_content_id')) ->from($db->quoteName('#__ucm_content')) ->where($db->quoteName('core_type_alias') . ' = ' . $db->quote($context)) ->where($db->quoteName('core_content_item_id') . ' IN (' . $pksImploded = implode(',', $pks) . ')'); $db->setQuery($query); $ccIds = $db->loadColumn(); $cctable = new JTableCorecontent($db); $cctable->publish($ccIds, $value); return true; } /** * The save event. * * @param string $context The context * @param object $table The item * @param boolean $isNew Is new item * * @return void * * @since 3.9.12 */ public function onContentBeforeSave($context, $table, $isNew) { // Check we are handling the frontend edit form. if ($context !== 'com_menus.item') { return true; } // Special case for Create article menu item if ($table->link !== 'index.php?option=com_content&view=form&layout=edit') { return true; } // Display error if catid is not set when enable_category is enabled $params = json_decode($table->params, true); if ($params['enable_category'] == 1 && empty($params['catid'])) { $table->setError(JText::_('COM_CONTENT_CREATE_ARTICLE_ERROR')); return false; } } } loadmodule/index.html000064400000000037152235327350010675 0ustar00<!DOCTYPE html><title></title> loadmodule/loadmodule.php000064400000015306152235327350011543 0ustar00<?php /** * @package Joomla.Plugin * @subpackage Content.loadmodule * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Plugin to enable loading modules into content (e.g. articles) * This uses the {loadmodule} syntax * * @since 1.5 */ class PlgContentLoadmodule extends JPlugin { protected static $modules = array(); protected static $mods = array(); /** * Plugin that loads module positions within content * * @param string $context The context of the content being passed to the plugin. * @param object &$article The article object. Note $article->text is also available * @param mixed &$params The article params * @param integer $page The 'page' number * * @return mixed true if there is an error. Void otherwise. * * @since 1.6 */ public function onContentPrepare($context, &$article, &$params, $page = 0) { // Don't run this plugin when the content is being indexed if ($context === 'com_finder.indexer') { return true; } // Simple performance check to determine whether bot should process further if (strpos($article->text, 'loadposition') === false && strpos($article->text, 'loadmodule') === false) { return true; } // Expression to search for (positions) $regex = '/{loadposition\s(.*?)}/i'; $style = $this->params->def('style', 'none'); // Expression to search for(modules) $regexmod = '/{loadmodule\s(.*?)}/i'; $stylemod = $this->params->def('style', 'none'); // Expression to search for(id) $regexmodid = '/{loadmoduleid\s([1-9][0-9]*)}/i'; // Find all instances of plugin and put in $matches for loadposition // $matches[0] is full pattern match, $matches[1] is the position preg_match_all($regex, $article->text, $matches, PREG_SET_ORDER); // No matches, skip this if ($matches) { foreach ($matches as $match) { $matcheslist = explode(',', $match[1]); // We may not have a module style so fall back to the plugin default. if (!array_key_exists(1, $matcheslist)) { $matcheslist[1] = $style; } $position = trim($matcheslist[0]); $style = trim($matcheslist[1]); $output = $this->_load($position, $style); // We should replace only first occurrence in order to allow positions with the same name to regenerate their content: if (($start = strpos($article->text, $match[0])) !== false) { $article->text = substr_replace($article->text, $output, $start, strlen($match[0])); } $style = $this->params->def('style', 'none'); } } // Find all instances of plugin and put in $matchesmod for loadmodule preg_match_all($regexmod, $article->text, $matchesmod, PREG_SET_ORDER); // If no matches, skip this if ($matchesmod) { foreach ($matchesmod as $matchmod) { $matchesmodlist = explode(',', $matchmod[1]); // We may not have a specific module so set to null if (!array_key_exists(1, $matchesmodlist)) { $matchesmodlist[1] = null; } // We may not have a module style so fall back to the plugin default. if (!array_key_exists(2, $matchesmodlist)) { $matchesmodlist[2] = $stylemod; } $module = trim($matchesmodlist[0]); $name = htmlspecialchars_decode(trim($matchesmodlist[1])); $stylemod = trim($matchesmodlist[2]); // $match[0] is full pattern match, $match[1] is the module,$match[2] is the title $output = $this->_loadmod($module, $name, $stylemod); // We should replace only first occurrence in order to allow positions with the same name to regenerate their content: if (($start = strpos($article->text, $matchmod[0])) !== false) { $article->text = substr_replace($article->text, $output, $start, strlen($matchmod[0])); } $stylemod = $this->params->def('style', 'none'); } } // Find all instances of plugin and put in $matchesmodid for loadmoduleid preg_match_all($regexmodid, $article->text, $matchesmodid, PREG_SET_ORDER); // If no matches, skip this if ($matchesmodid) { foreach ($matchesmodid as $match) { $id = trim($match[1]); $output = $this->_loadid($id); // We should replace only first occurrence in order to allow positions with the same name to regenerate their content: if (($start = strpos($article->text, $match[0])) !== false) { $article->text = substr_replace($article->text, $output, $start, strlen($match[0])); } $style = $this->params->def('style', 'none'); } } } /** * Loads and renders the module * * @param string $position The position assigned to the module * @param string $style The style assigned to the module * * @return mixed * * @since 1.6 */ protected function _load($position, $style = 'none') { self::$modules[$position] = ''; $document = JFactory::getDocument(); $renderer = $document->loadRenderer('module'); $modules = JModuleHelper::getModules($position); $params = array('style' => $style); ob_start(); foreach ($modules as $module) { echo $renderer->render($module, $params); } self::$modules[$position] = ob_get_clean(); return self::$modules[$position]; } /** * This is always going to get the first instance of the module type unless * there is a title. * * @param string $module The module title * @param string $title The title of the module * @param string $style The style of the module * * @return mixed * * @since 1.6 */ protected function _loadmod($module, $title, $style = 'none') { self::$mods[$module] = ''; $document = JFactory::getDocument(); $renderer = $document->loadRenderer('module'); $mod = JModuleHelper::getModule($module, $title); // If the module without the mod_ isn't found, try it with mod_. // This allows people to enter it either way in the content if (!isset($mod)) { $name = 'mod_' . $module; $mod = JModuleHelper::getModule($name, $title); } $params = array('style' => $style); ob_start(); if ($mod->id) { echo $renderer->render($mod, $params); } self::$mods[$module] = ob_get_clean(); return self::$mods[$module]; } /** * Loads and renders the module * * @param string $id The id of the module * * @return mixed * * @since 3.9.0 */ protected function _loadid($id) { self::$modules[$id] = ''; $document = JFactory::getDocument(); $renderer = $document->loadRenderer('module'); $modules = JModuleHelper::getModuleById($id); $params = array('style' => 'none'); ob_start(); if ($modules->id > 0) { echo $renderer->render($modules, $params); } self::$modules[$id] = ob_get_clean(); return self::$modules[$id]; } } loadmodule/loadmodule.xml000064400000002631152235327350011551 0ustar00<?xml version="1.0" encoding="utf-8"?> <extension version="3.1" type="plugin" group="content" method="upgrade"> <name>plg_content_loadmodule</name> <author>Joomla! Project</author> <creationDate>November 2005</creationDate> <copyright>(C) 2005 Open Source Matters, Inc.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>3.0.0</version> <description>PLG_LOADMODULE_XML_DESCRIPTION</description> <files> <filename plugin="loadmodule">loadmodule.php</filename> </files> <languages> <language tag="en-GB">en-GB.plg_content_loadmodule.ini</language> <language tag="en-GB">en-GB.plg_content_loadmodule.sys.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic"> <field name="style" type="list" label="PLG_LOADMODULE_FIELD_STYLE_LABEL" description="PLG_LOADMODULE_FIELD_STYLE_DESC" default="table" > <option value="table">PLG_LOADMODULE_FIELD_VALUE_TABLE</option> <option value="horz">PLG_LOADMODULE_FIELD_VALUE_HORIZONTAL</option> <option value="xhtml">PLG_LOADMODULE_FIELD_VALUE_DIVS</option> <option value="rounded">PLG_LOADMODULE_FIELD_VALUE_MULTIPLEDIVS</option> <option value="none">PLG_LOADMODULE_FIELD_VALUE_RAW</option> </field> </fieldset> </fields> </config> </extension> finder/index.html000064400000000037152235327350010017 0ustar00<!DOCTYPE html><title></title> finder/finder.php000064400000007715152235327350010014 0ustar00<?php /** * @package Joomla.Plugin * @subpackage Content.finder * * @copyright (C) 2011 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Smart Search Content Plugin * * @since 2.5 */ class PlgContentFinder extends JPlugin { /** * Smart Search after save content method. * Content is passed by reference, but after the save, so no changes will be saved. * Method is called right after the content is saved. * * @param string $context The context of the content passed to the plugin (added in 1.6) * @param object $article A JTableContent object * @param bool $isNew If the content has just been created * * @return void * * @since 2.5 */ public function onContentAfterSave($context, $article, $isNew) { $dispatcher = JEventDispatcher::getInstance(); JPluginHelper::importPlugin('finder'); // Trigger the onFinderAfterSave event. $dispatcher->trigger('onFinderAfterSave', array($context, $article, $isNew)); } /** * Smart Search before save content method. * Content is passed by reference. Method is called before the content is saved. * * @param string $context The context of the content passed to the plugin (added in 1.6). * @param object $article A JTableContent object. * @param bool $isNew If the content is just about to be created. * * @return void * * @since 2.5 */ public function onContentBeforeSave($context, $article, $isNew) { $dispatcher = JEventDispatcher::getInstance(); JPluginHelper::importPlugin('finder'); // Trigger the onFinderBeforeSave event. $dispatcher->trigger('onFinderBeforeSave', array($context, $article, $isNew)); } /** * Smart Search after delete content method. * Content is passed by reference, but after the deletion. * * @param string $context The context of the content passed to the plugin (added in 1.6). * @param object $article A JTableContent object. * * @return void * * @since 2.5 */ public function onContentAfterDelete($context, $article) { $dispatcher = JEventDispatcher::getInstance(); JPluginHelper::importPlugin('finder'); // Trigger the onFinderAfterDelete event. $dispatcher->trigger('onFinderAfterDelete', array($context, $article)); } /** * Smart Search content state change method. * Method to update the link information for items that have been changed * from outside the edit screen. This is fired when the item is published, * unpublished, archived, or unarchived from the list view. * * @param string $context The context for the content passed to the plugin. * @param array $pks A list of primary key ids of the content that has changed state. * @param integer $value The value of the state that the content has been changed to. * * @return void * * @since 2.5 */ public function onContentChangeState($context, $pks, $value) { $dispatcher = JEventDispatcher::getInstance(); JPluginHelper::importPlugin('finder'); // Trigger the onFinderChangeState event. $dispatcher->trigger('onFinderChangeState', array($context, $pks, $value)); } /** * Smart Search change category state content method. * Method is called when the state of the category to which the * content item belongs is changed. * * @param string $extension The extension whose category has been updated. * @param array $pks A list of primary key ids of the content that has changed state. * @param integer $value The value of the state that the content has been changed to. * * @return void * * @since 2.5 */ public function onCategoryChangeState($extension, $pks, $value) { $dispatcher = JEventDispatcher::getInstance(); JPluginHelper::importPlugin('finder'); // Trigger the onFinderCategoryChangeState event. $dispatcher->trigger('onFinderCategoryChangeState', array($extension, $pks, $value)); } } finder/finder.xml000064400000001506152235327350010015 0ustar00<?xml version="1.0" encoding="utf-8"?> <extension version="3.1" type="plugin" group="content" method="upgrade"> <name>plg_content_finder</name> <author>Joomla! Project</author> <creationDate>December 2011</creationDate> <copyright>(C) 2011 Open Source Matters, Inc.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>3.0.0</version> <description>PLG_CONTENT_FINDER_XML_DESCRIPTION</description> <files> <filename plugin="finder">finder.php</filename> </files> <languages> <language tag="en-GB">en-GB.plg_content_finder.ini</language> <language tag="en-GB">en-GB.plg_content_finder.sys.ini</language> </languages> <config> <fields name="params"> </fields> </config> </extension> pagenavigation/tmpl/index.html000064400000000037152235327350012520 0ustar00<!DOCTYPE html><title></title> pagenavigation/tmpl/default.php000064400000002577152235327350012673 0ustar00<?php /** * @package Joomla.Plugin * @subpackage Content.pagenavigation * * @copyright (C) 2013 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; JHtml::_('bootstrap.tooltip'); $lang = JFactory::getLanguage(); ?> <ul class="pager pagenav"> <?php if ($row->prev) : $direction = $lang->isRtl() ? 'right' : 'left'; ?> <li class="previous"> <a class="hasTooltip" title="<?php echo htmlspecialchars($rows[$location-1]->title); ?>" aria-label="<?php echo JText::sprintf('JPREVIOUS_TITLE', htmlspecialchars($rows[$location-1]->title)); ?>" href="<?php echo $row->prev; ?>" rel="prev"> <?php echo '<span class="icon-chevron-' . $direction . '" aria-hidden="true"></span> <span aria-hidden="true">' . $row->prev_label . '</span>'; ?> </a> </li> <?php endif; ?> <?php if ($row->next) : $direction = $lang->isRtl() ? 'left' : 'right'; ?> <li class="next"> <a class="hasTooltip" title="<?php echo htmlspecialchars($rows[$location+1]->title); ?>" aria-label="<?php echo JText::sprintf('JNEXT_TITLE', htmlspecialchars($rows[$location+1]->title)); ?>" href="<?php echo $row->next; ?>" rel="next"> <?php echo '<span aria-hidden="true">' . $row->next_label . '</span> <span class="icon-chevron-' . $direction . '" aria-hidden="true"></span>'; ?> </a> </li> <?php endif; ?> </ul> pagenavigation/index.html000064400000000037152235327350011544 0ustar00<!DOCTYPE html><title></title> pagenavigation/pagenavigation.xml000064400000003742152235327350013273 0ustar00<?xml version="1.0" encoding="utf-8"?> <extension version="3.1" type="plugin" group="content" method="upgrade"> <name>plg_content_pagenavigation</name> <author>Joomla! Project</author> <creationDate>January 2006</creationDate> <copyright>(C) 2006 Open Source Matters, Inc.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>3.0.0</version> <description>PLG_PAGENAVIGATION_XML_DESCRIPTION</description> <files> <filename plugin="pagenavigation">pagenavigation.php</filename> <folder>tmpl</folder> </files> <languages> <language tag="en-GB">en-GB.plg_content_pagenavigation.ini</language> <language tag="en-GB">en-GB.plg_content_pagenavigation.sys.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic"> <field name="position" type="list" label="PLG_PAGENAVIGATION_FIELD_POSITION_LABEL" description="PLG_PAGENAVIGATION_FIELD_POSITION_DESC" default="1" filter="integer" > <option value="1">PLG_PAGENAVIGATION_FIELD_VALUE_BELOW</option> <option value="0">PLG_PAGENAVIGATION_FIELD_VALUE_ABOVE</option> </field> <field name="relative" type="list" label="PLG_PAGENAVIGATION_FIELD_RELATIVE_LABEL" description="PLG_PAGENAVIGATION_FIELD_RELATIVE_DESC" default="1" filter="integer" > <option value="1">PLG_PAGENAVIGATION_FIELD_VALUE_ARTICLE</option> <option value="0">PLG_PAGENAVIGATION_FIELD_VALUE_TEXT</option> </field> <field name="display" type="list" label="PLG_PAGENAVIGATION_FIELD_DISPLAY_LABEL" description="PLG_PAGENAVIGATION_FIELD_DISPLAY_DESC" default="0" filter="integer" > <option value="0">PLG_PAGENAVIGATION_FIELD_VALUE_NEXTPREV</option> <option value="1">PLG_PAGENAVIGATION_FIELD_VALUE_TITLE</option> </field> </fieldset> </fields> </config> </extension> pagenavigation/pagenavigation.php000064400000016421152235327350013260 0ustar00<?php /** * @package Joomla.Plugin * @subpackage Content.pagenavigation * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; JLoader::register('ContentHelperRoute', JPATH_SITE . '/components/com_content/helpers/route.php'); /** * Pagenavigation plugin class. * * @since 1.5 */ class PlgContentPagenavigation extends JPlugin { /** * If in the article view and the parameter is enabled shows the page navigation * * @param string $context The context of the content being passed to the plugin * @param object &$row The article object * @param mixed &$params The article params * @param integer $page The 'page' number * * @return mixed void or true * * @since 1.6 */ public function onContentBeforeDisplay($context, &$row, &$params, $page = 0) { $app = JFactory::getApplication(); $view = $app->input->get('view'); $print = $app->input->getBool('print'); if ($print) { return false; } if ($context === 'com_content.article' && $view === 'article' && $params->get('show_item_navigation')) { $db = JFactory::getDbo(); $user = JFactory::getUser(); $lang = JFactory::getLanguage(); $nullDate = $db->getNullDate(); $date = JFactory::getDate(); $now = $date->toSql(); $uid = $row->id; $option = 'com_content'; $canPublish = $user->authorise('core.edit.state', $option . '.article.' . $row->id); /** * The following is needed as different menu items types utilise a different param to control ordering. * For Blogs the `orderby_sec` param is the order controlling param. * For Table and List views it is the `orderby` param. **/ $params_list = $params->toArray(); if (array_key_exists('orderby_sec', $params_list)) { $order_method = $params->get('orderby_sec', ''); } else { $order_method = $params->get('orderby', ''); } // Additional check for invalid sort ordering. if ($order_method === 'front') { $order_method = ''; } // Get the order code $orderDate = $params->get('order_date'); $queryDate = $this->getQueryDate($orderDate); // Determine sort order. switch ($order_method) { case 'date' : $orderby = $queryDate; break; case 'rdate' : $orderby = $queryDate . ' DESC '; break; case 'alpha' : $orderby = 'a.title'; break; case 'ralpha' : $orderby = 'a.title DESC'; break; case 'hits' : $orderby = 'a.hits'; break; case 'rhits' : $orderby = 'a.hits DESC'; break; case 'order' : $orderby = 'a.ordering'; break; case 'author' : $orderby = 'a.created_by_alias, u.name'; break; case 'rauthor' : $orderby = 'a.created_by_alias DESC, u.name DESC'; break; case 'front' : $orderby = 'f.ordering'; break; default : $orderby = 'a.ordering'; break; } $xwhere = ' AND (a.state = 1 OR a.state = -1)' . ' AND (publish_up = ' . $db->quote($nullDate) . ' OR publish_up <= ' . $db->quote($now) . ')' . ' AND (publish_down = ' . $db->quote($nullDate) . ' OR publish_down >= ' . $db->quote($now) . ')'; // Array of articles in same category correctly ordered. $query = $db->getQuery(true); // Sqlsrv changes $case_when = ' CASE WHEN ' . $query->charLength('a.alias', '!=', '0'); $a_id = $query->castAsChar('a.id'); $case_when .= ' THEN ' . $query->concatenate(array($a_id, 'a.alias'), ':'); $case_when .= ' ELSE ' . $a_id . ' END as slug'; $case_when1 = ' CASE WHEN ' . $query->charLength('cc.alias', '!=', '0'); $c_id = $query->castAsChar('cc.id'); $case_when1 .= ' THEN ' . $query->concatenate(array($c_id, 'cc.alias'), ':'); $case_when1 .= ' ELSE ' . $c_id . ' END as catslug'; $query->select('a.id, a.title, a.catid, a.language,' . $case_when . ',' . $case_when1) ->from('#__content AS a') ->join('LEFT', '#__categories AS cc ON cc.id = a.catid'); if ($order_method === 'author' || $order_method === 'rauthor') { $query->select('a.created_by, u.name'); $query->join('LEFT', '#__users AS u ON u.id = a.created_by'); } $query->where( 'a.catid = ' . (int) $row->catid . ' AND a.state = ' . (int) $row->state . ($canPublish ? '' : ' AND a.access IN (' . implode(',', JAccess::getAuthorisedViewLevels($user->id)) . ') ') . $xwhere ); $query->order($orderby); if ($app->isClient('site') && $app->getLanguageFilter()) { $query->where('a.language in (' . $db->quote($lang->getTag()) . ',' . $db->quote('*') . ')'); } $db->setQuery($query); $list = $db->loadObjectList('id'); // This check needed if incorrect Itemid is given resulting in an incorrect result. if (!is_array($list)) { $list = array(); } reset($list); // Location of current content item in array list. $location = array_search($uid, array_keys($list)); $rows = array_values($list); $row->prev = null; $row->next = null; if ($location - 1 >= 0) { // The previous content item cannot be in the array position -1. $row->prev = $rows[$location - 1]; } if (($location + 1) < count($rows)) { // The next content item cannot be in an array position greater than the number of array postions. $row->next = $rows[$location + 1]; } if ($row->prev) { $row->prev_label = ($this->params->get('display', 0) == 0) ? JText::_('JPREV') : $row->prev->title; $row->prev = JRoute::_(ContentHelperRoute::getArticleRoute($row->prev->slug, $row->prev->catid, $row->prev->language)); } else { $row->prev_label = ''; $row->prev = ''; } if ($row->next) { $row->next_label = ($this->params->get('display', 0) == 0) ? JText::_('JNEXT') : $row->next->title; $row->next = JRoute::_(ContentHelperRoute::getArticleRoute($row->next->slug, $row->next->catid, $row->next->language)); } else { $row->next_label = ''; $row->next = ''; } // Output. if ($row->prev || $row->next) { // Get the path for the layout file $path = JPluginHelper::getLayoutPath('content', 'pagenavigation'); // Render the pagenav ob_start(); include $path; $row->pagination = ob_get_clean(); $row->paginationposition = $this->params->get('position', 1); // This will default to the 1.5 and 1.6-1.7 behavior. $row->paginationrelative = $this->params->get('relative', 0); } } } /** * Translate an order code to a field for primary ordering. * * @param string $orderDate The ordering code. * * @return string The SQL field(s) to order by. * * @since 3.3 */ private static function getQueryDate($orderDate) { $db = JFactory::getDbo(); switch ($orderDate) { // Use created if modified is not set case 'modified' : $queryDate = ' CASE WHEN a.modified = ' . $db->quote($db->getNullDate()) . ' THEN a.created ELSE a.modified END'; break; // Use created if publish_up is not set case 'published' : $queryDate = ' CASE WHEN a.publish_up = ' . $db->quote($db->getNullDate()) . ' THEN a.created ELSE a.publish_up END '; break; // Use created as default case 'created' : default : $queryDate = ' a.created '; break; } return $queryDate; } } jce/jce.xml000064400000001605152235327350006601 0ustar00<?xml version="1.0" encoding="utf-8"?> <extension version="1.6" type="plugin" group="content" method="upgrade"> <name>plg_content_jce</name> <version>2.9.22</version> <creationDate>31-03-2022</creationDate> <author>Ryan Demmer</author> <authorEmail>info@joomlacontenteditor.net</authorEmail> <authorUrl>http://www.joomlacontenteditor.net</authorUrl> <copyright>Copyright (C) 2006 - 2022 Ryan Demmer. All rights reserved</copyright> <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license> <description>PLG_CONTENT_JCE_XML_DESCRIPTION</description> <files folder="plugins/content/jce"> <file plugin="jce">jce.php</file> </files> <languages folder="administrator/language/en-GB"> <language tag="en-GB">en-GB.plg_content_jce.ini</language> <language tag="en-GB">en-GB.plg_content_jce.sys.ini</language> </languages> </extension> jce/jce.php000064400000001010152235327350006556 0ustar00<?php /** * @copyright Copyright (C) 2015 Ryan Demmer. All rights reserved * @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved * @license GNU General Public License version 2 or later */ defined('JPATH_BASE') or die; /** * JCE. * * @since 2.5.20 */ class PlgContentJce extends JPlugin { public function onContentPrepareForm($form, $data) { JFactory::getApplication()->triggerEvent('onPlgSystemJceContentPrepareForm', array($form, $data)); } } contact/contact.php000064400000006370152235327350010360 0ustar00<?php /** * @package Joomla.Plugin * @subpackage Content.Contact * * @copyright (C) 2014 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\Registry\Registry; /** * Contact Plugin * * @since 3.2 */ class PlgContentContact extends JPlugin { /** * Database object * * @var JDatabaseDriver * @since 3.3 */ protected $db; /** * Plugin that retrieves contact information for contact * * @param string $context The context of the content being passed to the plugin. * @param mixed &$row An object with a "text" property * @param mixed $params Additional parameters. See {@see PlgContentContent()}. * @param integer $page Optional page number. Unused. Defaults to zero. * * @return boolean True on success. */ public function onContentPrepare($context, &$row, $params, $page = 0) { $allowed_contexts = array('com_content.category', 'com_content.article', 'com_content.featured'); if (!in_array($context, $allowed_contexts)) { return true; } // Return if we don't have valid params or don't link the author if (!($params instanceof Registry) || !$params->get('link_author')) { return true; } // Return if an alias is used if ((int) $this->params->get('link_to_alias', 0) === 0 && $row->created_by_alias != '') { return true; } // Return if we don't have a valid article id if (!isset($row->id) || !(int) $row->id) { return true; } $contact = $this->getContactData($row->created_by); $row->contactid = $contact->contactid; $row->webpage = $contact->webpage; $row->email = $contact->email_to; $url = $this->params->get('url', 'url'); if ($row->contactid && $url === 'url') { JLoader::register('ContactHelperRoute', JPATH_SITE . '/components/com_contact/helpers/route.php'); $row->contact_link = JRoute::_(ContactHelperRoute::getContactRoute($contact->contactid . ':' . $contact->alias, $contact->catid)); } elseif ($row->webpage && $url === 'webpage') { $row->contact_link = $row->webpage; } elseif ($row->email && $url === 'email') { $row->contact_link = 'mailto:' . $row->email; } else { $row->contact_link = ''; } return true; } /** * Retrieve Contact * * @param int $userId Id of the user who created the article * * @return mixed|null|integer */ protected function getContactData($userId) { static $contacts = array(); if (isset($contacts[$userId])) { return $contacts[$userId]; } $query = $this->db->getQuery(true); $query->select('MAX(contact.id) AS contactid, contact.alias, contact.catid, contact.webpage, contact.email_to'); $query->from($this->db->quoteName('#__contact_details', 'contact')); $query->where('contact.published = 1'); $query->where('contact.user_id = ' . (int) $userId); if (JLanguageMultilang::isEnabled() === true) { $query->where('(contact.language in ' . '(' . $this->db->quote(JFactory::getLanguage()->getTag()) . ',' . $this->db->quote('*') . ') ' . ' OR contact.language IS NULL)'); } $this->db->setQuery($query); $contacts[$userId] = $this->db->loadObject(); return $contacts[$userId]; } } contact/index.html000064400000000037152235327350010203 0ustar00<!DOCTYPE html><title></title> contact/contact.xml000064400000003142152235327350010363 0ustar00<?xml version="1.0" encoding="utf-8"?> <extension version="3.2" type="plugin" group="content" method="upgrade"> <name>plg_content_contact</name> <author>Joomla! Project</author> <creationDate>January 2014</creationDate> <copyright>(C) 2014 Open Source Matters, Inc.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>3.2.2</version> <description>PLG_CONTENT_CONTACT_XML_DESCRIPTION</description> <files> <filename plugin="contact">contact.php</filename> </files> <languages> <language tag="en-GB">en-GB.plg_content_contact.ini</language> <language tag="en-GB">en-GB.plg_content_contact.sys.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic"> <field name="url" type="list" label="PLG_CONTENT_CONTACT_PARAM_URL_LABEL" description="PLG_CONTENT_CONTACT_PARAM_URL_DESCRIPTION" default="url" > <option value="url">PLG_CONTENT_CONTACT_PARAM_URL_URL</option> <option value="webpage">PLG_CONTENT_CONTACT_PARAM_URL_WEBPAGE</option> <option value="email">PLG_CONTENT_CONTACT_PARAM_URL_EMAIL</option> </field> <field name="link_to_alias" type="radio" label="PLG_CONTENT_CONTACT_PARAM_ALIAS_LABEL" description="PLG_CONTENT_CONTACT_PARAM_ALIAS_DESCRIPTION" default="0" class="btn-group btn-group-yesno" filter="integer" > <option value="0">JNO</option> <option value="1">JYES</option> </field> </fieldset> </fields> </config> </extension>
/home/pteabiscqq/www/188ee/../includes/../d528d/content.tar