mod_easybloglist/mod_easybloglist.xml000064400000006265152163637060014210 0ustar00 EasyBlog - Posts List Stack Ideas Sdn Bhd 26th April 2022 Copyright 2009 - 2015 Stack Ideas Sdn Bhd. All rights reserved. GPL License v2 support@stackideas.com http://stackideas.com 6.0.5 en-GB.mod_easybloglist.ini tmpl helper.php mod_easybloglist.php mod_easybloglist.xml
https://stackideas.com/joomla4compat.xml
mod_easybloglist/mod_easybloglist.php000064400000002260152163637060014166 0ustar00config; $posts = $helper->getPosts($params); $selected = null; if ($modules->input->get('option') == 'com_easyblog' && $modules->input->get('view') == 'entry') { $selected = $modules->input->get('id', 0, 'int'); } // Generate a unique id $uid = uniqid(); require($modules->getLayout()); mod_easybloglist/tmpl/default.php000064400000002564152163637060013235 0ustar00
mod_easybloglist/helper.php000064400000004225152163637060012110 0ustar00lib = $modules; $this->params = $this->lib->params; } public function getPosts() { // Get the default sorting and ordering $sort = $this->normalizeSorting($this->params->get('sorting', 'desc')); $order = $this->normalizeOrdering($this->params->get('ordering', 'created')); // Get the total number of posts to display $limit = (int) trim($this->params->get('count', 0)); // Determines if the user wants to filter items by specific ategories $categories = $this->params->get('catid', array(), 'array'); $includeAuthors = $this->params->get('inclusion_authors', array()); $excludeAuthors = $this->params->get('exclusion_authors', array()); $options = array( 'sort' => $sort, 'ordering' => $order ); $model = EB::model('Category'); $result = $model->getPosts($categories, $limit, $includeAuthors, $excludeAuthors, $options); $posts = array(); if (!$result) { return $posts; } $posts = EB::formatter('list', $result); return $posts; } /** * Fix ordering value that was reversed on 5.0 * * @since 5.1 * @access public */ public function normalizeOrdering($ordering) { if ($ordering == 'asc' || $ordering == 'desc') { return 'created'; } return $ordering; } /** * Fix sorting value that was reversed on 5.0 * * @since 5.1 * @access public */ public function normalizeSorting($sorting) { if ($sorting == 'latest' || $sorting == 'alphabet' || $sorting == 'popular') { return 'desc'; } return $sorting; } }mod_jchat/mod_jchat.php000064400000000650152163637060011147 0ustar00 JChatSocial Module Joomla! Extensions Store 2022-08-16 Copyright (C) 2015 - Joomla! Extensions Store. All Rights Reserved. http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL info@storejextensions.org http://storejextensions.org 2.49 JChatSocial Module tmpl index.html mod_jchat.php mod_jchat/tmpl/default.php000064400000000603152163637060011615 0ustar00
mod_jchat/tmpl/index.html000064400000000054152163637060011455 0ustar00mod_jchat/index.html000064400000000054152163637060010501 0ustar00mod_igallery/mod_igallery.php000064400000011075152163637060012410 0ustar00get('type') == 'tags_cloud') { include_once(JPATH_SITE.'/components/com_igallery/helpers/utility.php'); $db = JFactory::getDBO(); $query = $db->getQuery(true); $query->select('i.*'); $query->from('#__igallery_img AS i'); $query->join('INNER', '`#__igallery` AS c ON c.id = i.gallery_id'); $query->where('c.published = 1'); $db->setQuery($query); $images = $db->loadObjectList(); if(empty($images)) { echo 'no published images found'; return; } $tagsViewCountArray = array(); foreach($images as $image) { $tags = explode(',',$image->tags); foreach($tags as $tag) { if(empty($tag)){continue;} if(!isset($tagsViewCountArray[$tag])) { $tagsViewCountArray[$tag] = $image->hits; } else { $tagsViewCountArray[$tag] = $tagsViewCountArray[$tag] + $image->hits; } } } if(empty($tagsViewCountArray)) { echo 'no image tags found'; return; } $maxViews = (int)max($tagsViewCountArray); $minViews = (int)min($tagsViewCountArray); $factor = 10/$maxViews; $tagsWeighting = array(); foreach($tagsViewCountArray as $tagName => $tagViews) { $tagsWeighting[$tagName] = round($factor*$tagViews); } ?>
$tagWeight): ?>
input; if($igInput->get('format','html') == 'json') { echo 'Gallery Module '.$module->id; return; } $igInput->set('igsource', 'module'); $igInput->set('iguniqueid', 'M'.$module->id); if(is_array($params->get('category_id'))) { $igInput->set('igid', implode(',',$params->get('category_id'))); } else { $igInput->set('igid', $params->get('category_id')); } $igInput->set('igtype', $params->get('type')); $igInput->set('igchild', $params->get('children')); $igInput->set('igpid', $params->get('profile_id')); $igInput->set('igtags', $params->get('tag')); $igInput->set('igaddlinks', $params->get('add_links')); $photoLimit = $params->get('photo_limit') == 0 ? 150 : $params->get('photo_limit'); $igInput->set('iglimit', $photoLimit); $view = $igInput->get('view',null); $layout= $igInput->get('layout',null); $igInput->set('view', 'category'); $igInput->set('layout', 'default'); $lang = JFactory::getLanguage(); $lang->load('com_igallery', JPATH_ADMINISTRATOR); require_once(JPATH_ADMINISTRATOR.'/components/com_igallery/defines.php'); require_once(IG_COMPONENT.'/controller.php'); $controller = new IgalleryController(); $controller->execute('display'); if($view != null) { $igInput->set('view', $view); } if($layout != null) { $igInput->set('layout', $layout); } } ?>mod_igallery/mod_igallery.xml000064400000006443152163637060012424 0ustar00 Ignite Gallery Module Matthew Thomson October 2022 (C) 2021 Matthew Thomson. All rights reserved. GPL v2 www.ignitegallery.com 4.8.2 Puts gallery images or menu images into a module position. mod_igallery.php
http://www.ignitegallery.com/update/xml/module-update.xml
mod_jbusinesscategories/assets/js/script.js000064400000000075152163637060015251 0ustar00function goToLink(link){ document.location.href=link; }mod_jbusinesscategories/assets/js/index.html000064400000000040152163637060015374 0ustar00 mod_jbusinesscategories/assets/index.html000064400000000037152163637060014766 0ustar00 mod_jbusinesscategories/assets/style.css000064400000010226152163637060014644 0ustar00#category-holder ul.main-categories { width: 100%; } .main-categories [class^="la la-"] {} .main-categories .la.la-menu-arrow { float: right; line-height: 19px; font-size: 16px; line-height: 26px; } .main-categories .active> a >.la.la-menu-arrow::before { content: "\f110"; } .main-categories .la.la-menu-arrow::before { content: "\f111"; } /* Slide Image */ .business-categories-slider .categories-slider-item .categories-slide-image { margin: 0 auto; width: 111px; height: 111px; border-radius: 50%; margin-bottom: 10px; border: 1px solid #dfdfdf; background-repeat: no-repeat; background-position: center center; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; } /* Slide Title */ .business-categories-slider .categories-slider-item p { color: #333; font-size: 13px; line-height: 1.2; text-align: center; } .main-categories-simple { display: flex; text-align: center; width: 100%; -webkit-justify-content: center; justify-content: center; } .main-categories-simple a { background: rgba(0, 0, 0, 0.7); border-radius: 2px; color: #ffff; display: -webkit-flex; display: -ms-flexbox; display: flex; -ms-flex-align: center; -webkit-flex-direction: column; -ms-flex-direction: column; flex-direction: column; -ms-flex-pack: end; font-size: 0.875rem; margin-right: 1px; max-width: 80px; padding: 15px 6px 14px; -webkit-align-items: center; align-items: center; -webkit-flex: 0 1 80px; -ms-flex: 0 1 80px; flex: 0 1 80px; -webkit-justify-content: flex-end; justify-content: flex-end; } .main-categories-simple a:hover { background: rgba(0, 0, 0, 0.5); } .main-categories-simple a i { font-size: 27px; } .main-categories-simple a span { color: #ffffff; line-height: 14px; } .main-categories-simple .cta-text { display: none; } /*---------------slider 2 ----------------*/ .ctg-slider-wrapper .slick-list { padding-top: 3rem; width: 180%; } .ctg-slider-wrapper .slick-arrow { position: absolute; top: -2.2rem; cursor: pointer; width: 2.3rem; height: 2.3rem; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-transition: all .2s ease; -o-transition: all .2s ease; transition: all .2s ease; border: 2px solid #000; border-radius: 0.5rem; z-index: 3; } .ctg-slider-wrapper .slick-slider .controller-prev i, .ctg-slider-wrapper .slick-slider .controller-next i { background: none; color:rgba(0, 0, 0, 0.8); display: inline-block; margin-top: 0px; position: relative; font-size: 20px; width: 35px; height: 35px; line-height: initial; padding: 7px; } .ctg-slider-wrapper .slick-slider .controller-prev i:hover, .ctg-slider-wrapper .slick-slider .controller-next i:hover { background: #000; color: #fff; } .ctg-slider-wrapper .controller-prev { right: 4.5rem; } .ctg-slider-wrapper .controller-next { right: 1.8rem; } .ctg-slider-wrapper .slick-slide{ width: 19rem; } .ctg-slider-wrapper .ctg-slider-item { padding: 0 1rem; display: block; color: #1E2E42; } .ctg-slider-wrapper .ctg-slider-img-wrap { background-repeat: no-repeat; background-position: center center; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; overflow: hidden; border-radius: 0.5rem; width: 100%; height: 20rem; position: relative; -webkit-transition: all .2s ease; -o-transition: all .2s ease; transition: all .2s ease; top: 0; } .ctg-slider-wrapper .ctg-slider-img-wrap:hover { -webkit-box-shadow: 0px 0px 2rem rgba(0, 0, 0, 0.8); box-shadow: 0px 0px 2rem rgba(0, 0, 0, 0.8); top: -0.3rem; } .ctg-slider-wrapper .ctg-slider-img-wrap img{ widht: 100%; } .ctg-slider-wrapper .ctg-slider-item-text { font-style: normal; font-weight: 500; font-size: 1rem; line-height: 1rem; text-transform: capitalize; margin-top: 1rem; }mod_jbusinesscategories/mod_jbusinesscategories.xml000064400000014674152163637060017137 0ustar00 JBusinessCategories January 2012 CMSJunkie (C) CMSJunkie. All rights reserved. http://www.gnu.org/copyleft/gpl.html info@cmsjunkie.com www.cmsjunkie.com 1.1.0 JBusinessCategories mod_jbusinesscategories.xml mod_jbusinesscategories.php index.html helper.php tmpl assets language/de-DE/de-DE.mod_jbusinesscategories.ini language/de-DE/de-DE.mod_jbusinesscategories.sys.ini language/en-GB/en-GB.mod_jbusinesscategories.ini language/en-GB/en-GB.mod_jbusinesscategories.sys.ini language/es-ES/es-ES.mod_jbusinesscategories.ini language/es-ES/es-ES.mod_jbusinesscategories.sys.ini language/fr-FR/fr-FR.mod_jbusinesscategories.ini language/fr-FR/fr-FR.mod_jbusinesscategories.sys.ini language/nl-NL/nl-NL.mod_jbusinesscategories.ini language/nl-NL/nl-NL.mod_jbusinesscategories.sys.ini language/pt-PT/pt-PT.mod_jbusinesscategories.ini language/pt-PT/pt-PT.mod_jbusinesscategories.sys.ini
mod_jbusinesscategories/mod_jbusinesscategories.php000064400000006514152163637060017120 0ustar00isProfile = 1; if (!defined('JBD_UTILS_LOADED')) { $document = JFactory::getDocument(); $document->addScriptDeclaration(' window.addEventListener("load",function() { jbdUtils.setProperties(' . json_encode($jsSettings) . '); }); '); define('JBD_UTILS_LOADED', 1); } if (strpos($params->get('viewtype'), 'slider')!==false) { JBusinessUtil::enqueueStyle('libraries/slick/slick.css'); JBusinessUtil::enqueueScript('libraries/slick/slick.js'); } else { JBusinessUtil::enqueueStyle('libraries/metis-menu/metisMenu.css'); JBusinessUtil::enqueueScript('libraries/metis-menu/metisMenu.js'); } $moduleclass_sfx = htmlspecialchars((string)$params->get('moduleclass_sfx')); JBusinessUtil::includeCSSLibraries(); JBusinessUtil::loadSiteLanguage(); JBusinessUtil::includeValidation(); $helper = new modJBusinessCategoriesHelper(); $categoriesIds = $params->get('categoryIds'); if (!JBusinessUtil::isAppInstalled(JBD_APP_QUOTE_REQUESTS)) { $params->set('linkquoterequests', 0); } if (strpos($params->get('viewtype'), 'slider')!==false) { $categories = $helper->getCategoriesByIdsOnSlider($params, $categoriesIds); } elseif ($params->get('viewtype') == 'menu') { $categories = $helper->getCategoriesByIdsOnMenu($categoriesIds); } else { $categories = $helper->getCategories($params, $categoriesIds, true); } if ($appSettings->category_order == ORDER_ALPHABETICALLY && !empty($categories)) { require_once(HELPERS_PATH.'/category_lib.php'); $categoryService = new JBusinessDirectorCategoryLib(); $categories = $categoryService->sortCategoryView($categories); } if ($appSettings->enable_multilingual) { JBusinessDirectoryTranslations::updateCategoriesTranslation($categories); } $linkQuoteRequests = $params->get('linkquoterequests'); if ($linkQuoteRequests && JBusinessUtil::isAppInstalled(JBD_APP_QUOTE_REQUESTS)) { JBusinessUtil::enqueueStyle('libraries/modal/jquery.modal.css'); JBusinessUtil::enqueueScript('libraries/modal/jquery.modal.js'); echo QuoteService::initializeQuoteRequets(); } $showRelated = $params->get('related-categories'); $viewAllLink = JRoute::_('index.php?option=com_jbusinessdirectory&view=categories&categoryType='.CATEGORY_TYPE_BUSINESS); $span = $params->get('phoneGridOption', 'col-12').' '.$params->get('tabletGridOption', 'col-md-6').' '.$params->get('desktopGridOption', "col-lg-4"); require JModuleHelper::getLayoutPath('mod_jbusinesscategories', "default_".$params->get('viewtype')); mod_jbusinesscategories/tmpl/default_slider.php000064400000004441152163637060016145 0ustar00get('rtl'); $sliderId = rand(1000,10000); $sliderParams = array(); $sliderParams['sliderId'] = $sliderId; $sliderParams['autoplay'] = $params->get('autoplay') ? true : false; $sliderParams['autoplaySpeed'] = $params->get('autoplaySpeed'); $sliderParams['nrVisibleItems'] = $params->get('nrVisibleItems', 5); $sliderParams['nrItemsToScrool'] = $params->get('nrItemsToScrool', 2); $sliderParams['rtl'] = $dir ? true : false; ?>
published==0) continue; ?>
get('showviewall')){?>
mod_jbusinesscategories/tmpl/default_accordion.php000064400000000670152163637060016624 0ustar00
mod_jbusinesscategories/tmpl/default_simple.php000064400000002265152163637060016156 0ustar00
published==0) continue; ?> icon)){ ?> name; ?>
get('showviewall')){?>
mod_jbusinesscategories/tmpl/default_slider_2.php000064400000004300152163637060016360 0ustar00get('rtl'); $sliderId = rand(1000,10000); $sliderParams = array(); $sliderParams['sliderId'] = $sliderId; $sliderParams['autoplay'] = $params->get('autoplay') ? true : false; $sliderParams['autoplaySpeed'] = $params->get('autoplaySpeed'); $sliderParams['nrVisibleItems'] = $params->get('nrVisibleItems', 5); $sliderParams['nrItemsToScrool'] = $params->get('nrItemsToScrool', 2); $sliderParams['rtl'] = $dir ? true : false; $sliderParams['arrows'] = true; $sliderParams['variableWidth'] = true; ?>
published==0){ continue; } $image = BD_PICTURES_PATH.'/no_image.jpg'; if(!empty($category[0]->imageLocation)){ $image = BD_PICTURES_PATH.$category[0]->imageLocation; } ?>
name; ?>
get('showviewall')){?>
mod_jbusinesscategories/tmpl/default.php000064400000005317152163637060014606 0ustar00
get('showviewall')){?>
mod_jbusinesscategories/tmpl/default_grid.php000064400000000571152163637060015610 0ustar00mod_jbusinesscategories/tmpl/default_boxes.php000064400000000663152163637060016005 0ustar00
mod_jbusinesscategories/tmpl/default_grid_icons.php000064400000000570152163637060017002 0ustar00mod_jbusinesscategories/tmpl/index.html000064400000000037152163637060014440 0ustar00 mod_jbusinesscategories/tmpl/default_grid_image.php000064400000000600152163637060016743 0ustar00mod_jbusinesscategories/helper.php000064400000007762152163637060013473 0ustar00input; if (!empty($categoriesIds)) { $categoriesIds = implode(",", $categoriesIds); } else { $categoriesIds = null; } $categories = $categoryService->getCategories(CATEGORY_TYPE_BUSINESS, $categoriesIds); JTable::addIncludePath(JPATH_ROOT.'/administrator/components/com_jbusinessdirectory/tables'); $categoryTable = JTable::getInstance('Category', 'JBusinessTable'); $showRelated = $params->get('showrelated'); if($showRelated){ $categories = array(); $categoryId = $jinput->getId('categoryId'); if(empty($categoryId)){ $categoryId = $jinput->getId('categorySearch'); } $category = $categoryTable->getCategoryById($categoryId); if(!empty($category) && !empty($category->keywords)){ $keywords = explode(",",$category->keywords); $cats = $categoryTable->getRelatedCategories($categoryId, $keywords); if(!empty($cats)){ $catIds = array_map(function ($c) { return $c->id; }, $cats); $catIds = implode(',',$catIds); $categories = $categoryService->getCategories(CATEGORY_TYPE_BUSINESS, $catIds); } } } if (!empty($categories)) { if ($appSettings->show_total_business_count && $showListingsCount) { $details = array(); $details["enablePackages"] = $appSettings->enable_packages; $details["showPendingApproval"] = ($appSettings->enable_item_moderation=='0' || ($appSettings->enable_item_moderation=='1' && $appSettings->show_pending_approval == '1')); $listingsCount = $categoryTable->getCountPerCategory($details, CATEGORY_TYPE_BUSINESS); foreach ($categories as &$category) { if (isset($category[0]->id)) { $category[0]->nr_listings = isset($listingsCount[$category[0]->id]->nr_listings) ? $listingsCount[$category[0]->id]->nr_listings : '0'; } } } $linkQuoteRequests = $params->get('linkquoterequests'); foreach ($categories as &$category) { if (isset($category[0]->id)) { $catId = $category[0]->id; $category[0]->link = $linkQuoteRequests?"javascript:jbdQuoteRequest.init($catId)":JBusinessUtil::getCategoryLink($category[0]->id, $category[0]->alias); if (!empty($category["subCategories"])) { foreach ($category["subCategories"] as &$cat) { $cat[0]->link = JBusinessUtil::getCategoryLink($cat[0]->id, $cat[0]->alias); } } } } } return $categories; } public function getCategoriesByIdsOnMenu($categoriesIds) { $categoryService = new JBusinessDirectorCategoryLib(); if (!empty($categoriesIds)) { $categoriesIds = implode(",", $categoriesIds); } $categories = $categoryService->getCategories(CATEGORY_TYPE_BUSINESS, $categoriesIds); return $categories; } public function getCategoriesByIdsOnSlider($params, $categoriesIds) { $categoryService = new JBusinessDirectorCategoryLib(); if (!empty($categoriesIds)) { $categoriesIds = implode(",", $categoriesIds); } $categories = $categoryService->getAllCategories(CATEGORY_TYPE_BUSINESS, $categoriesIds); $newCategories = array(); $linkQuoteRequests = $params->get('linkquoterequests'); foreach ($categories as $category) { $newCategories[$category->id] = array($category,"subCategories"=>array()); if (isset($category->id)) { $catId = $category->id; $category->link = $linkQuoteRequests?"javascript:jbdQuoteRequest.init($catId)":JBusinessUtil::getCategoryLink($category->id, $category->alias); } } return $newCategories; } } mod_jbusinesscategories/index.html000064400000000037152163637060013464 0ustar00 mod_articles_popular/services/provider.php000064400000002245152163637060015155 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Extension\Service\Provider\HelperFactory; use Joomla\CMS\Extension\Service\Provider\Module; use Joomla\CMS\Extension\Service\Provider\ModuleDispatcherFactory; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; /** * The popular articles module service provider. * * @since 4.3.0 */ return new class () implements ServiceProviderInterface { /** * Registers the service provider with a DI container. * * @param Container $container The DI container. * * @return void * * @since 4.3.0 */ public function register(Container $container) { $container->registerServiceProvider(new ModuleDispatcherFactory('\\Joomla\\Module\\ArticlesPopular')); $container->registerServiceProvider(new HelperFactory('\\Joomla\\Module\\ArticlesPopular\\Site\\Helper')); $container->registerServiceProvider(new Module()); } }; mod_articles_popular/mod_articles_popular.xml000064400000010057152163637060015720 0ustar00 mod_articles_popular Joomla! Project 2006-07 (C) 2006 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.0.0 MOD_POPULAR_XML_DESCRIPTION Joomla\Module\ArticlesPopular services src tmpl language/en-GB/mod_articles_popular.ini language/en-GB/mod_articles_popular.sys.ini
mod_articles_popular/tmpl/default.php000064400000001317152163637060014077 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; if (!isset($list)) { if (isset($hitsDisabledMessage)) { echo $hitsDisabledMessage; } return; } ?> mod_articles_popular/src/Dispatcher/Dispatcher.php000064400000002547152163637060016450 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Module\ArticlesPopular\Site\Dispatcher; use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Dispatcher\AbstractModuleDispatcher; use Joomla\CMS\Helper\HelperFactoryAwareInterface; use Joomla\CMS\Helper\HelperFactoryAwareTrait; use Joomla\CMS\Language\Text; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Dispatcher class for mod_articles_popular * * @since 4.3.0 */ class Dispatcher extends AbstractModuleDispatcher implements HelperFactoryAwareInterface { use HelperFactoryAwareTrait; /** * Returns the layout data. * * @return array * * @since 4.3.0 */ protected function getLayoutData() { $data = parent::getLayoutData(); if (!ComponentHelper::getParams('com_content')->get('record_hits', 1)) { $data['hitsDisabledMessage'] = Text::_('JGLOBAL_RECORD_HITS_DISABLED'); } else { $data['list'] = $this->getHelperFactory()->getHelper('ArticlesPopularHelper', $data)->getArticles($data['params'], $data['app']); } return $data; } } mod_articles_popular/src/Helper/ArticlesPopularHelper.php000064400000014431152163637060017757 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Module\ArticlesPopular\Site\Helper; use Joomla\CMS\Access\Access; use Joomla\CMS\Application\SiteApplication; use Joomla\CMS\Cache\CacheControllerFactoryInterface; use Joomla\CMS\Cache\Controller\OutputController; use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Factory; use Joomla\CMS\Router\Route; use Joomla\Component\Content\Administrator\Extension\ContentComponent; use Joomla\Component\Content\Site\Helper\RouteHelper; use Joomla\Component\Content\Site\Model\ArticlesModel; use Joomla\Registry\Registry; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Helper for mod_articles_popular * * @since 4.3.0 */ class ArticlesPopularHelper { /** * The module instance * * @var \stdClass * * @since 4.3.0 */ protected $module; /** * Constructor. * * @param array $config An optional associative array of configuration settings. * * @since 4.3.0 */ public function __construct($config = []) { $this->module = $config['module']; } /** * Retrieve a list of months with archived articles * * @param Registry $params The module parameters. * @param SiteApplication $app The current application. * * @return object[] * * @since 4.3.0 */ public function getArticles(Registry $moduleParams, SiteApplication $app) { $cacheKey = md5(serialize([$moduleParams->toString(), $this->module->module, $this->module->id])); /** @var OutputController $cache */ $cache = Factory::getContainer()->get(CacheControllerFactoryInterface::class) ->createCacheController('output', ['defaultgroup' => 'mod_articles_popular']); if (!$cache->contains($cacheKey)) { $mvcContentFactory = $app->bootComponent('com_content')->getMVCFactory(); /** @var ArticlesModel $articlesModel */ $articlesModel = $mvcContentFactory->createModel('Articles', 'Site', ['ignore_request' => true]); // Set application parameters in model $appParams = $app->getParams(); $articlesModel->setState('params', $appParams); $articlesModel->setState('list.start', 0); $articlesModel->setState('filter.published', ContentComponent::CONDITION_PUBLISHED); // Set the filters based on the module params $articlesModel->setState('list.limit', (int) $moduleParams->get('count', 5)); $articlesModel->setState('filter.featured', $moduleParams->get('show_front', 1) == 1 ? 'show' : 'hide'); // This module does not use tags data $articlesModel->setState('load_tags', false); // Access filter $access = !ComponentHelper::getParams('com_content')->get('show_noauth'); $articlesModel->setState('filter.access', $access); // Category filter $articlesModel->setState('filter.category_id', $moduleParams->get('catid', [])); // Date filter $date_filtering = $moduleParams->get('date_filtering', 'off'); if ($date_filtering !== 'off') { $articlesModel->setState('filter.date_filtering', $date_filtering); $articlesModel->setState('filter.date_field', $moduleParams->get('date_field', 'a.created')); $articlesModel->setState('filter.start_date_range', $moduleParams->get('start_date_range', '1000-01-01 00:00:00')); $articlesModel->setState('filter.end_date_range', $moduleParams->get('end_date_range', '9999-12-31 23:59:59')); $articlesModel->setState('filter.relative_date', $moduleParams->get('relative_date', 30)); } // Filter by language $articlesModel->setState('filter.language', $app->getLanguageFilter()); // Ordering $articlesModel->setState('list.ordering', 'a.hits'); $articlesModel->setState('list.direction', 'DESC'); // Prepare the module output $items = []; $itemParams = new \stdClass(); $itemParams->authorised = Access::getAuthorisedViewLevels($app->getIdentity()->get('id')); $itemParams->access = $access; foreach ($articlesModel->getItems() as $item) { $items[] = $this->prepareItem($item, $itemParams); } // Cache the output and return $cache->store($items, $cacheKey); return $items; } // Return the cached output return $cache->get($cacheKey); } /** * Prepare the article before render. * * @param object $item The article to prepare * @param \stdClass $params The model item * * @return object * * @since 4.3.0 */ private function prepareItem($item, $params): object { $item->slug = $item->id . ':' . $item->alias; if ($params->access || \in_array($item->access, $params->authorised)) { // We know that user has the privilege to view the article $item->link = Route::_(RouteHelper::getArticleRoute($item->slug, $item->catid, $item->language)); } else { $item->link = Route::_('index.php?option=com_users&view=login'); } return $item; } /** * Get a list of popular articles from the articles model * * @param \Joomla\Registry\Registry &$params object holding the models parameters * * @return mixed * * @since 4.3.0 * * @deprecated 4.3 will be removed in 6.0 * Use the non-static method getArticles * Example: Factory::getApplication()->bootModule('mod_articles_popular', 'site') * ->getHelper('ArticlesPopularHelper') * ->getArticles($params, Factory::getApplication()) */ public static function getList(&$params) { return (new self())->getArticles($params, Factory::getApplication()); } } mod_jbusiness_offers/mod_jbusiness_offers.xml000064400000026702152163637060015726 0ustar00 JBusinessDirectory - Offers June 2014 CMSJunkie (C) CMSJunkie. All rights reserved. http://www.gnu.org/copyleft/gpl.html info@cmsjunkie.com www.cmsjunkie.com 3.0.0 Display the offers based on selected criterias mod_jbusiness_offers.php assets tmpl helper.php index.html mod_jbusiness_offers.xml language/de-DE/de-DE.mod_jbusiness_offers.ini language/de-DE/de-DE.mod_jbusiness_offers.sys.ini language/en-GB/en-GB.mod_jbusiness_offers.ini language/en-GB/en-GB.mod_jbusiness_offers.sys.ini language/es-ES/es-ES.mod_jbusiness_offers.ini language/es-ES/es-ES.mod_jbusiness_offers.sys.ini language/fr-FR/fr-FR.mod_jbusiness_offers.ini language/fr-FR/fr-FR.mod_jbusiness_offers.sys.ini language/nl-NL/nl-NL.mod_jbusiness_offers.ini language/nl-NL/nl-NL.mod_jbusiness_offers.sys.ini language/pt-PT/pt-PT.mod_jbusiness_offers.ini language/pt-PT/pt-PT.mod_jbusiness_offers.sys.ini
mod_jbusiness_offers/assets/js/script.js000064400000001064152163637060014546 0ustar00 function addCoordinatesToUrl(position){ var latitude = position.coords.latitude; var longitude = position.coords.longitude; var newURLString = window.location.href; newURLString += ((newURLString.indexOf('?') == -1) ? '?' : '&'); newURLString += "latitude="+latitude; newURLString += ((newURLString.indexOf('?') == -1) ? '?' : '&'); newURLString += "longitude="+longitude; window.location.href = newURLString; // The page will redirect instantly } function goToLink(link){ document.location.href=link; }mod_jbusiness_offers/assets/js/index.html000064400000000040152163637060014672 0ustar00 mod_jbusiness_offers/assets/index.html000064400000000037152163637060014264 0ustar00 mod_jbusiness_offers/assets/style.css000064400000005373152163637060014151 0ustar00/*-----------discount --------------*/ #latest-offers-discount { width: 100%; } #latest-offers-discount .offers-wrapper { display: inline-block; margin: 0 auto; text-align: left; } #latest-offers-discount .offer-item { background: #ffffff none repeat scroll 0 0; border-radius: 5px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); margin-bottom: 20px; margin-top: 5px; padding: 10px; position: relative; text-align: left; } #latest-offers-discount .offer-item a{ color: #111; } #latest-offers-discount .offer-discount { background-color: #c00074; color: #ffffff; font-size: 13px; font-weight: bold; padding: 7px; position: absolute; right: 0; text-align: center; top: 25px; width: auto; z-index: 11111; } #latest-offers-discount .offer-content { display: block; } #latest-offers-discount h3 { color: #555; font-size: 15px; margin: 10px 0 5px 0; } #latest-offers-discount h3 a { color: #555; } #latest-offers-discount .offer-image { margin: 0; padding: 0; } #latest-offers-discount .offer-image img { width: 100%; } #latest-offers-discount .offer-description { margin: 10px 0; } .latest-offers .view-all-items{ text-align: center; } .latest-offers .view-all-offers a{ background-color: white; border: 1px solid rgba(0, 0, 0, 0.075); border-radius: 3px; font-size: 14px; padding: 6px 18px; } .latest-offers .view-all-items a:hover{ background-color: #F0F0F0; } #latest-offers-discount .offer-price { display: block; margin: 5px 0; text-align: right; } .simple-view .offer-price{ text-align: center; } .offer-price .old-price { font-size: 13px; text-decoration: line-through; } #latest-offers-discount .offer-action { display: block; text-align: right; } /*-----------end discount --------------*/ .view-all-offers{ display: block; text-align: center; } .company-info{ padding: 10px 0; margin: 0; float: none; } .mod-items-list .list-item{ background-color: #fff; } .mod-items-list .price{ font-size: 16px; margin-bottom: 10px; } .mod-items-list .item-name{ font-size: 16px; } .mod-items-list .listing-name{ font-size: 15px; } .mod-items-list .btn{ text-transform: none !important; } .mod-items-list .jitem-img-wrap{ height: 100%; } .mod-items-list .jitem-img-wrap > a{ position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 2; cursor: pointer; } .mod-items-list .jitem-img-wrap > img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }mod_jbusiness_offers/mod_jbusiness_offers.php000064400000006613152163637060015714 0ustar00get('viewtype') == 'slider') { JBusinessUtil::enqueueStyle('libraries/slick/slick.css'); JBusinessUtil::enqueueScript('libraries/slick/slick.js'); } JBusinessUtil::enqueueStyle('libraries/modal/jquery.modal.css'); JBusinessUtil::enqueueScript('libraries/modal/jquery.modal.js'); if ($appSettings->enable_ratings) { JBusinessUtil::enqueueStyle('libraries/star-rating/star-rating.css'); JBusinessUtil::enqueueScript('libraries/star-rating/star-rating.js'); } JBusinessUtil::loadBaseScripts(); require_once HELPERS_PATH.'/translations.php'; // Include the syndicate functions only once require_once __DIR__ . '/helper.php'; JBusinessUtil::loadSiteLanguage(); JBusinessUtil::includeCSSLibraries(); JBusinessUtil::loadClasses(); //load items through cache mechanism $cache = Factory::getCache('mod_jbusiness_offers', ''); if ($cache->contains($module->id) && $params->get("cache")) { $items = $cache->get($module->id); } else { $items = modJBusinessOffersHelper::getList($params); $cache->store($items, $module->id, 'mod_jbusiness_offers'); } $showLocation = $params->get('showLocation'); $showListingName = $params->get('showlistingName'); $showFreeText = $params->get('showOfferFree'); $appSettings = JBusinessUtil::getApplicationSettings(); if ($appSettings->enable_multilingual) { JBusinessDirectoryTranslations::updateOffersTranslation($items); } $moduleclass_sfx = htmlspecialchars((string)$params->get('moduleclass_sfx')); $backgroundCss=""; if ($params->get('backgroundColor')) { $backgroundCss = "background-color:".$params->get('backgroundColor').";"; } $borderCss=""; if ($params->get('borderColor')) { $borderCss="border-color:".$params->get('borderColor').";"; } $categoryParam = ""; $categoriesIds = $params->get('categoryIds'); if (isset($categoriesIds) && count($categoriesIds)>0 && $categoriesIds[0]!= 0 && $categoriesIds[0]!= "") { $categoryParam="&categorySearch=".$categoriesIds[0]; } $itemType =""; if ($params->get('itemType')) { $itemType="&itemType=".$params->get('itemType'); } $menuItemId =""; if ($params->get('mItemId')) { $menuItemId="&Itemid=".$params->get('mItemId'); } $viewAllLink = JRoute::_('index.php?option=com_jbusinessdirectory&view=offers&resetSearch=1'.$menuItemId.$categoryParam.$itemType); $newTab = ($appSettings->open_listing_on_new_tab)?" target='_blank'":""; $span = $params->get('layout-type')=="vertical"?"col-12":$params->get('phoneGridOption', 'col-12').' '.$params->get('tabletGridOption', 'col-md-6').' '.$params->get('desktopGridOption', "col-lg-4"); // echo OfferSellingService::getCartModal(); require JModuleHelper::getLayoutPath('mod_jbusiness_offers', "default_".$params->get('viewtype')); mod_jbusiness_offers/tmpl/default_slider.php000064400000014251152163637060015443 0ustar00get('rtl'); $idnt = rand(500, 1500); $sliderId = rand(1000,10000); $sliderParams = array(); $sliderParams['sliderId'] = $sliderId; $sliderParams['autoplay'] = $params->get('autoplay') ? true : false; $sliderParams['autoplaySpeed'] = $params->get('autoplaySpeed'); $sliderParams['nrVisibleItems'] = $params->get('nrVisibleItems'); $sliderParams['nrItemsToScrool'] = $params->get('nrItemsToScrool'); $sliderParams['rtl'] = $dir ? true : false; $attributeConfig = JBusinessUtil::getAttributeConfiguration(DEFAULT_ATTRIBUTE_TYPE_OFFER); ?>
logoLocation) && $item->logoLocation!='') { ?> <?php echo $item->picture_info ?> <?php echo $item->subject ?>
subject ?>
phone)) { ?>
phone ?>
subject ?> company_id)){ ?> review_score) && $appSettings->enable_ratings){ ?>
price)){ ?> ">price, $item->currencyId) ?> specialPrice)){?> specialPrice, $item->currencyId); ?>
get('showviewall')){?>
mod_jbusiness_offers/tmpl/default.php000064400000012605152163637060014102 0ustar00
logoLocation) && $item->logoLocation!='') { ?> <?php echo $item->picture_info ?> <?php echo $item->subject ?>
price)){ ?> ">price, $item->currencyId) ?> specialPrice)){?> specialPrice, $item->currencyId); ?> price_text)) { ?>
price_text ?> price) && empty($item->specialPrice) && ($showFreeText)){ ?> company_id)){ ?>

href="company_id) ?>">company_name; ?>

$index){ ?>
get('showviewall')){?>
mod_jbusiness_offers/tmpl/default_discount.php000064400000012146152163637060016012 0ustar00
$item){ ?>
price) && $item->specialPrice>0){ $discount = round((($item->price -$item->specialPrice) * 100)/$item->price ,0); } ?>

%

logoLocation) && $item->logoLocation!='') { ?> <?php echo $item->picture_info ?> <?php echo $item->subject ?>
company_id)){ ?> href="company_id) ?>">company_name; ?>
price)){ ?> ">price, $item->currencyId) ?> specialPrice)){?> specialPrice, $item->currencyId); ?> price_text)) { ?>
price_text ?> price) && empty($item->specialPrice) && ($showFreeText)){ ?>
get('showviewall')){?>
mod_jbusiness_offers/tmpl/default_list.php000064400000012331152163637060015131 0ustar00
logoLocation) && $item->logoLocation!='') { ?> <?php echo $item->picture_info ?> <?php echo $item->subject ?>
price)){ ?>
">price, $item->currencyId) ?>
specialPrice)){?>
specialPrice, $item->currencyId); ?>
price_text)) { ?>
price_text ?>
price) && empty($item->specialPrice) && ($showFreeText)){ ?>
get('showviewall')){?>
mod_jbusiness_offers/tmpl/index.html000064400000000037152163637060013736 0ustar00 mod_jbusiness_offers/helper.php000064400000006653152163637060012767 0ustar00get('categoryIds'); if (isset($categoriesIds) && count($categoriesIds)>0 && $categoriesIds[0]!= 0 && $categoriesIds[0]!= "") { $searchDetails["categoriesIds"] = $categoriesIds; } $featured = $params->get('only_featured'); if (isset($featured)) { $searchDetails["featured"] = $featured; } $packages = $params->get('packages'); if (!empty($packages)) { $searchDetails["packages"] = $packages; } $ordering = $params->get('order'); if ($ordering == 1) { $orderBy ="co.created desc"; } elseif ($ordering == 2) { $orderBy ="co.id desc"; } elseif ($ordering == 3) { $orderBy ="co.subject asc"; } else { $orderBy = " rand() "; } if(isset($_REQUEST["offer-data"]) && $params->get('category_link')){ $offer = $_REQUEST["offer-data"]; $searchDetails["relatedCategoryId"] = $offer->main_subcategory; $searchDetails["offerId"] = $offer->id; } $nrResults = $params->get('count'); $searchDetails["enablePackages"] = $appSettings->enable_packages; $searchDetails["showPendingApproval"] = ($appSettings->enable_item_moderation=='0' || ($appSettings->enable_item_moderation=='1' && $appSettings->show_pending_approval == '1')); $searchDetails["orderBy"] = $orderBy; $searchDetails["citySearch"] = $params->get('citySearch'); $searchDetails["regionSearch"] = $params->get('regionSearch'); $searchDetails["featured"] = $params->get('only_featured'); $searchDetails["typeSearch"] = $params->get('type'); $searchDetails["item_type"] = $params->get('itemType'); $jinput = JFactory::getApplication()->input; $latitude = $jinput->get("latitude"); $longitude = $jinput->get("longitude"); $searchDetails["radius"] = $params->get('radius'); if ($params->get('geo_location')) { $searchDetails["latitude"] = $latitude; $searchDetails["longitude"] = $longitude; } JTable::addIncludePath(JPATH_ROOT.'/administrator/components/com_jbusinessdirectory/tables'); $offersTable = JTable::getInstance("Offer", "JTable"); $offers = $offersTable->getOffersByCategories($searchDetails, 0, $nrResults); foreach ($offers as $offer) { $offer->picture_path = str_replace(" ", "%20", $offer->picture_path); switch ($offer->view_type) { case 1: $offer->link = JBusinessUtil::getOfferLink($offer->id, $offer->alias); break; case 2: $itemId = $jinput->get('Itemid'); $offer->link = JRoute::_("index.php?option=com_content&view=article&Itemid=$itemId&id=".$offer->article_id); break; case 3: $offer->link = $offer->url; break; default: $offer->link = JBusinessUtil::getOfferLink($offer->id, $offer->alias); } $offer->logoLocation = $offer->picture_path; $offer->specialPrice = (float)$offer->specialPrice; $offer->price = (float)$offer->price; } if ($appSettings->enable_multilingual) { JBusinessDirectoryTranslations::updateOffersTranslation($offers); JBusinessDirectoryTranslations::updateOfferTypesTranslation($offers); } return $offers; } } mod_jbusiness_offers/index.html000064400000000037152163637060012762 0ustar00 mod_menu/mod_menu.xml000064400000010023152163637060010701 0ustar00 mod_menu Joomla! Project 2004-07 (C) 2005 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.0.0 MOD_MENU_XML_DESCRIPTION Joomla\Module\Menu mod_menu.php src tmpl language/en-GB/mod_menu.ini language/en-GB/mod_menu.sys.ini
mod_menu/tmpl/collapse-default.php000064400000001717152163637060013277 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; HTMLHelper::_('bootstrap.collapse'); ?> mod_menu/tmpl/default_component.php000064400000004163152163637060013557 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Filter\OutputFilter; use Joomla\CMS\HTML\HTMLHelper; $attributes = []; if ($item->anchor_title) { $attributes['title'] = $item->anchor_title; } if ($item->anchor_css) { $attributes['class'] = $item->anchor_css; } if ($item->anchor_rel) { $attributes['rel'] = $item->anchor_rel; } if ($item->id == $active_id) { $attributes['aria-current'] = 'location'; if ($item->current) { $attributes['aria-current'] = 'page'; } } $linktype = $item->title; if ($item->menu_icon) { // The link is an icon if ($itemParams->get('menu_text', 1)) { // If the link text is to be displayed, the icon is added with aria-hidden $linktype = '' . $item->title; } else { // If the icon itself is the link, it needs a visually hidden text $linktype = '' . $item->title . ''; } } elseif ($item->menu_image) { // The link is an image, maybe with its own class $image_attributes = []; if ($item->menu_image_css) { $image_attributes['class'] = $item->menu_image_css; } $linktype = HTMLHelper::_('image', $item->menu_image, $item->title, $image_attributes); if ($itemParams->get('menu_text', 1)) { $linktype .= '' . $item->title . ''; } } if ($item->browserNav == 1) { $attributes['target'] = '_blank'; } elseif ($item->browserNav == 2) { $options = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes'; $attributes['onclick'] = "window.open(this.href, 'targetWindow', '" . $options . "'); return false;"; } echo HTMLHelper::_('link', OutputFilter::ampReplace(htmlspecialchars($item->flink, ENT_COMPAT, 'UTF-8', false)), $linktype, $attributes); mod_menu/tmpl/default.php000064400000004730152163637060011475 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Helper\ModuleHelper; /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $app->getDocument()->getWebAssetManager(); $wa->registerAndUseScript('mod_menu', 'mod_menu/menu.min.js', [], ['type' => 'module']); $wa->registerAndUseScript('mod_menu', 'mod_menu/menu-es5.min.js', [], ['nomodule' => true, 'defer' => true]); $id = ''; if ($tagId = $params->get('tag_id', '')) { $id = ' id="' . $tagId . '"'; } // The menu class is deprecated. Use mod-menu instead ?> class="mod-menu mod-list nav "> &$item) { $itemParams = $item->getParams(); $class = 'nav-item item-' . $item->id; if ($item->id == $default_id) { $class .= ' default'; } if ($item->id == $active_id || ($item->type === 'alias' && $itemParams->get('aliasoptions') == $active_id)) { $class .= ' current'; } if (in_array($item->id, $path)) { $class .= ' active'; } elseif ($item->type === 'alias') { $aliasToId = $itemParams->get('aliasoptions'); if (count($path) > 0 && $aliasToId == $path[count($path) - 1]) { $class .= ' active'; } elseif (in_array($aliasToId, $path)) { $class .= ' alias-parent-active'; } } if ($item->type === 'separator') { $class .= ' divider'; } if ($item->deeper) { $class .= ' deeper'; } if ($item->parent) { $class .= ' parent'; } echo '
  • '; switch ($item->type) : case 'separator': case 'component': case 'heading': case 'url': require ModuleHelper::getLayoutPath('mod_menu', 'default_' . $item->type); break; default: require ModuleHelper::getLayoutPath('mod_menu', 'default_url'); break; endswitch; // The next item is deeper. if ($item->deeper) { echo '
  • ', $item->level_diff); } else { // The next item is on the same level. echo ''; } } ?> mod_menu/tmpl/default_heading.php000064400000002772152163637060013160 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\HTML\HTMLHelper; $title = $item->anchor_title ? ' title="' . $item->anchor_title . '"' : ''; $anchor_css = $item->anchor_css ?: ''; $linktype = $item->title; if ($item->menu_icon) { // The link is an icon if ($itemParams->get('menu_text', 1)) { // If the link text is to be displayed, the icon is added with aria-hidden $linktype = '' . $item->title; } else { // If the icon itself is the link, it needs a visually hidden text $linktype = '' . $item->title . ''; } } elseif ($item->menu_image) { // The link is an image, maybe with its own class $image_attributes = []; if ($item->menu_image_css) { $image_attributes['class'] = $item->menu_image_css; } $linktype = HTMLHelper::_('image', $item->menu_image, $item->title, $image_attributes); if ($itemParams->get('menu_text', 1)) { $linktype .= '' . $item->title . ''; } } ?> > mod_menu/tmpl/default_separator.php000064400000002773152163637060013562 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\HTML\HTMLHelper; $title = $item->anchor_title ? ' title="' . $item->anchor_title . '"' : ''; $anchor_css = $item->anchor_css ?: ''; $linktype = $item->title; if ($item->menu_icon) { // The link is an icon if ($itemParams->get('menu_text', 1)) { // If the link text is to be displayed, the icon is added with aria-hidden $linktype = '' . $item->title; } else { // If the icon itself is the link, it needs a visually hidden text $linktype = '' . $item->title . ''; } } elseif ($item->menu_image) { // The link is an image, maybe with its own class $image_attributes = []; if ($item->menu_image_css) { $image_attributes['class'] = $item->menu_image_css; } $linktype = HTMLHelper::_('image', $item->menu_image, $item->title, $image_attributes); if ($itemParams->get('menu_text', 1)) { $linktype .= '' . $item->title . ''; } } ?> > mod_menu/tmpl/default_url.php000064400000004177152163637060012364 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Filter\OutputFilter; use Joomla\CMS\HTML\HTMLHelper; $attributes = []; if ($item->anchor_title) { $attributes['title'] = $item->anchor_title; } if ($item->anchor_css) { $attributes['class'] = $item->anchor_css; } if ($item->anchor_rel) { $attributes['rel'] = $item->anchor_rel; } $linktype = $item->title; if ($item->menu_icon) { // The link is an icon if ($itemParams->get('menu_text', 1)) { // If the link text is to be displayed, the icon is added with aria-hidden $linktype = '' . $item->title; } else { // If the icon itself is the link, it needs a visually hidden text $linktype = '' . $item->title . ''; } } elseif ($item->menu_image) { // The link is an image, maybe with an own class $image_attributes = []; if ($item->menu_image_css) { $image_attributes['class'] = $item->menu_image_css; } $linktype = HTMLHelper::_('image', $item->menu_image, $item->title, $image_attributes); if ($itemParams->get('menu_text', 1)) { $linktype .= '' . $item->title . ''; } } if ($item->browserNav == 1) { $attributes['target'] = '_blank'; $attributes['rel'] = 'noopener noreferrer'; if ($item->anchor_rel == 'nofollow') { $attributes['rel'] .= ' nofollow'; } } elseif ($item->browserNav == 2) { $options = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,' . $params->get('window_open'); $attributes['onclick'] = "window.open(this.href, 'targetWindow', '" . $options . "'); return false;"; } echo HTMLHelper::_('link', OutputFilter::ampReplace(htmlspecialchars($item->flink, ENT_COMPAT, 'UTF-8', false)), $linktype, $attributes); mod_menu/src/Helper/MenuHelper.php000064400000021727152163637060013154 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Module\Menu\Site\Helper; use Joomla\CMS\Cache\CacheControllerFactoryInterface; use Joomla\CMS\Cache\Controller\OutputController; use Joomla\CMS\Factory; use Joomla\CMS\Language\Multilanguage; use Joomla\CMS\Router\Route; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Helper for mod_menu * * @since 1.5 */ class MenuHelper { /** * Get a list of the menu items. * * @param \Joomla\Registry\Registry &$params The module options. * * @return array * * @since 1.5 */ public static function getList(&$params) { $app = Factory::getApplication(); $menu = $app->getMenu(); // Get active menu item $base = self::getBase($params); $levels = Factory::getUser()->getAuthorisedViewLevels(); asort($levels); // Compose cache key $cacheKey = 'menu_items' . $params . implode(',', $levels) . '.' . $base->id; /** @var OutputController $cache */ $cache = Factory::getContainer()->get(CacheControllerFactoryInterface::class) ->createCacheController('output', ['defaultgroup' => 'mod_menu']); if ($cache->contains($cacheKey)) { $items = $cache->get($cacheKey); } else { $path = $base->tree; $start = (int) $params->get('startLevel', 1); $end = (int) $params->get('endLevel', 0); $showAll = $params->get('showAllChildren', 1); $items = $menu->getItems('menutype', $params->get('menutype')); $hidden_parents = []; $lastitem = 0; if ($items) { $inputVars = $app->getInput()->getArray(); foreach ($items as $i => $item) { $item->parent = false; $itemParams = $item->getParams(); if (isset($items[$lastitem]) && $items[$lastitem]->id == $item->parent_id && $itemParams->get('menu_show', 1) == 1) { $items[$lastitem]->parent = true; } if ( ($start && $start > $item->level) || ($end && $item->level > $end) || (!$showAll && $item->level > 1 && !\in_array($item->parent_id, $path)) || ($start > 1 && !\in_array($item->tree[$start - 2], $path)) ) { unset($items[$i]); continue; } // Exclude item with menu item option set to exclude from menu modules if (($itemParams->get('menu_show', 1) == 0) || \in_array($item->parent_id, $hidden_parents)) { $hidden_parents[] = $item->id; unset($items[$i]); continue; } $item->current = true; foreach ($item->query as $key => $value) { if (!isset($inputVars[$key]) || $inputVars[$key] !== $value) { $item->current = false; break; } } $item->deeper = false; $item->shallower = false; $item->level_diff = 0; if (isset($items[$lastitem])) { $items[$lastitem]->deeper = ($item->level > $items[$lastitem]->level); $items[$lastitem]->shallower = ($item->level < $items[$lastitem]->level); $items[$lastitem]->level_diff = ($items[$lastitem]->level - $item->level); } $lastitem = $i; $item->active = false; $item->flink = $item->link; // Reverted back for CMS version 2.5.6 switch ($item->type) { case 'separator': break; case 'heading': // No further action needed. break; case 'url': if ((strpos($item->link, 'index.php?') === 0) && (strpos($item->link, 'Itemid=') === false)) { // If this is an internal Joomla link, ensure the Itemid is set. $item->flink = $item->link . '&Itemid=' . $item->id; } break; case 'alias': $item->flink = 'index.php?Itemid=' . $itemParams->get('aliasoptions'); // Get the language of the target menu item when site is multilingual if (Multilanguage::isEnabled()) { $newItem = Factory::getApplication()->getMenu()->getItem((int) $itemParams->get('aliasoptions')); // Use language code if not set to ALL if ($newItem != null && $newItem->language && $newItem->language !== '*') { $item->flink .= '&lang=' . $newItem->language; } } break; default: $item->flink = 'index.php?Itemid=' . $item->id; break; } if ((strpos($item->flink, 'index.php?') !== false) && strcasecmp(substr($item->flink, 0, 4), 'http')) { $item->flink = Route::_($item->flink, true, $itemParams->get('secure')); } else { $item->flink = Route::_($item->flink); } // We prevent the double encoding because for some reason the $item is shared for menu modules and we get double encoding // when the cause of that is found the argument should be removed $item->title = htmlspecialchars($item->title, ENT_COMPAT, 'UTF-8', false); $item->menu_icon = htmlspecialchars($itemParams->get('menu_icon_css', ''), ENT_COMPAT, 'UTF-8', false); $item->anchor_css = htmlspecialchars($itemParams->get('menu-anchor_css', ''), ENT_COMPAT, 'UTF-8', false); $item->anchor_title = htmlspecialchars($itemParams->get('menu-anchor_title', ''), ENT_COMPAT, 'UTF-8', false); $item->anchor_rel = htmlspecialchars($itemParams->get('menu-anchor_rel', ''), ENT_COMPAT, 'UTF-8', false); $item->menu_image = htmlspecialchars($itemParams->get('menu_image', ''), ENT_COMPAT, 'UTF-8', false); $item->menu_image_css = htmlspecialchars($itemParams->get('menu_image_css', ''), ENT_COMPAT, 'UTF-8', false); } if (isset($items[$lastitem])) { $items[$lastitem]->deeper = (($start ?: 1) > $items[$lastitem]->level); $items[$lastitem]->shallower = (($start ?: 1) < $items[$lastitem]->level); $items[$lastitem]->level_diff = ($items[$lastitem]->level - ($start ?: 1)); } } $cache->store($items, $cacheKey); } return $items; } /** * Get base menu item. * * @param \Joomla\Registry\Registry &$params The module options. * * @return object * * @since 3.0.2 */ public static function getBase(&$params) { // Get base menu item from parameters if ($params->get('base')) { $base = Factory::getApplication()->getMenu()->getItem($params->get('base')); } else { $base = false; } // Use active menu item if no base found if (!$base) { $base = self::getActive($params); } return $base; } /** * Get active menu item. * * @param \Joomla\Registry\Registry &$params The module options. * * @return object * * @since 3.0.2 */ public static function getActive(&$params) { $menu = Factory::getApplication()->getMenu(); return $menu->getActive() ?: self::getDefault(); } /** * Get default menu item (home page) for current language. * * @return object */ public static function getDefault() { $menu = Factory::getApplication()->getMenu(); // Look for the home menu if (Multilanguage::isEnabled()) { return $menu->getDefault(Factory::getLanguage()->getTag()); } return $menu->getDefault(); } } mod_menu/mod_menu.php000064400000001512152163637060010673 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Helper\ModuleHelper; use Joomla\Module\Menu\Site\Helper\MenuHelper; $list = MenuHelper::getList($params); $base = MenuHelper::getBase($params); $active = MenuHelper::getActive($params); $default = MenuHelper::getDefault(); $active_id = $active->id; $default_id = $default->id; $path = $base->tree; $showAll = $params->get('showAllChildren', 1); $class_sfx = htmlspecialchars($params->get('class_sfx', ''), ENT_COMPAT, 'UTF-8'); if (!$list) { return; } require ModuleHelper::getLayoutPath('mod_menu', $params->get('layout', 'default')); mod_articles_archive/services/provider.php000064400000002253152163637060015113 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Extension\Service\Provider\HelperFactory; use Joomla\CMS\Extension\Service\Provider\Module; use Joomla\CMS\Extension\Service\Provider\ModuleDispatcherFactory; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; /** * The articles archive module service provider. * * @since 4.4.0 */ return new class () implements ServiceProviderInterface { /** * Registers the service provider with a DI container. * * @param Container $container The DI container. * * @return void * * @since 4.4.0 */ public function register(Container $container): void { $container->registerServiceProvider(new ModuleDispatcherFactory('\\Joomla\\Module\\ArticlesArchive')); $container->registerServiceProvider(new HelperFactory('\\Joomla\\Module\\ArticlesArchive\\Site\\Helper')); $container->registerServiceProvider(new Module()); } }; mod_articles_archive/mod_articles_archive.xml000064400000004177152163637060015624 0ustar00 mod_articles_archive Joomla! Project 2006-07 (C) 2006 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.0.0 MOD_ARTICLES_ARCHIVE_XML_DESCRIPTION Joomla\Module\ArticlesArchive services src tmpl language/en-GB/mod_articles_archive.ini language/en-GB/mod_articles_archive.sys.ini
    mod_articles_archive/tmpl/default.php000064400000001037152163637060014035 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; if (!$list) { return; } ?> mod_articles_archive/src/Dispatcher/Dispatcher.php000064400000002153152163637060016400 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Module\ArticlesArchive\Site\Dispatcher; use Joomla\CMS\Dispatcher\AbstractModuleDispatcher; use Joomla\CMS\Helper\HelperFactoryAwareInterface; use Joomla\CMS\Helper\HelperFactoryAwareTrait; // phpcs:disable PSR1.Files.SideEffects \defined('JPATH_PLATFORM') or die; // phpcs:enable PSR1.Files.SideEffects /** * Dispatcher class for mod_articles_archive * * @since 4.4.0 */ class Dispatcher extends AbstractModuleDispatcher implements HelperFactoryAwareInterface { use HelperFactoryAwareTrait; /** * Returns the layout data. * * @return array * * @since 4.4.0 */ protected function getLayoutData(): array { $data = parent::getLayoutData(); $data['list'] = $this->getHelperFactory()->getHelper('ArticlesArchiveHelper')->getArticlesByMonths($data['params'], $data['app']); return $data; } } mod_articles_archive/src/Helper/ArticlesArchiveHelper.php000064400000010266152163637060017657 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Module\ArticlesArchive\Site\Helper; use Joomla\CMS\Application\SiteApplication; use Joomla\CMS\Factory; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\Router\Route; use Joomla\Component\Content\Administrator\Extension\ContentComponent; use Joomla\Database\DatabaseAwareInterface; use Joomla\Database\DatabaseAwareTrait; use Joomla\Database\ParameterType; use Joomla\Registry\Registry; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Helper for mod_articles_archive * * @since 1.5 */ class ArticlesArchiveHelper implements DatabaseAwareInterface { use DatabaseAwareTrait; /** * Retrieve a list of months with archived articles * * @param Registry $moduleParams The module parameters. * @param SiteApplication $app The current application. * * @return \stdClass[] * * @since 4.4.0 */ public function getArticlesByMonths(Registry $moduleParams, SiteApplication $app): array { $db = $this->getDatabase(); $query = $db->getQuery(true); $query->select($query->month($db->quoteName('created')) . ' AS created_month') ->select('MIN(' . $db->quoteName('created') . ') AS created') ->select($query->year($db->quoteName('created')) . ' AS created_year') ->from($db->quoteName('#__content', 'c')) ->where($db->quoteName('c.state') . ' = ' . ContentComponent::CONDITION_ARCHIVED) ->group($query->year($db->quoteName('c.created')) . ', ' . $query->month($db->quoteName('c.created'))) ->order($query->year($db->quoteName('c.created')) . ' DESC, ' . $query->month($db->quoteName('c.created')) . ' DESC'); // Filter by language if ($app->getLanguageFilter()) { $query->whereIn($db->quoteName('language'), [$app->getLanguage()->getTag(), '*'], ParameterType::STRING); } $query->setLimit((int) $moduleParams->get('count')); $db->setQuery($query); try { $rows = (array) $db->loadObjectList(); } catch (\RuntimeException $e) { $app->enqueueMessage(Text::_('JERROR_AN_ERROR_HAS_OCCURRED'), 'error'); return []; } $menu = $app->getMenu(); $item = $menu->getItems('link', 'index.php?option=com_content&view=archive', true); $itemid = (isset($item) && !empty($item->id)) ? '&Itemid=' . $item->id : ''; $i = 0; $lists = []; foreach ($rows as $row) { $date = Factory::getDate($row->created); $createdMonth = $date->format('n'); $createdYear = $date->format('Y'); $createdYearCal = HTMLHelper::_('date', $row->created, 'Y'); $monthNameCal = HTMLHelper::_('date', $row->created, 'F'); $lists[$i] = new \stdClass(); $lists[$i]->link = Route::_('index.php?option=com_content&view=archive&year=' . $createdYear . '&month=' . $createdMonth . $itemid); $lists[$i]->text = Text::sprintf('MOD_ARTICLES_ARCHIVE_DATE', $monthNameCal, $createdYearCal); $i++; } return $lists; } /** * Retrieve list of archived articles * * @param Registry &$params module parameters * * @return \stdClass[] * * @since 1.5 * * @deprecated 4.4.0 will be removed in 6.0 * Use the non-static method getArticlesByMonths * Example: Factory::getApplication()->bootModule('mod_articles_archive', 'site') * ->getHelper('ArticlesArchiveHelper') * ->getArticlesByMonths($params, Factory::getApplication()) */ public static function getList(&$params) { /** @var SiteApplication $app */ $app = Factory::getApplication(); return (new self())->getArticlesByMonths($params, $app); } } mod_sppagebuilder/language/en-GB.mod_sppagebuilder.ini000064400000003147152163637060017107 0ustar00MOD_SPPAGEBUILDER="SP Page Builder" ; Ajax Contact COM_SPPAGEBUILDER_ADDON_AJAX_CONTACT_NAME="Name" COM_SPPAGEBUILDER_ADDON_AJAX_CONTACT_EMAIL="Email" COM_SPPAGEBUILDER_ADDON_AJAX_CONTACT_SUBJECT="Subject" COM_SPPAGEBUILDER_ADDON_AJAX_CONTACT_MESSAGE="Message" COM_SPPAGEBUILDER_ADDON_AJAX_CONTACT_SEND="Send Message" COM_SPPAGEBUILDER_ADDON_AJAX_CONTACT_WRONG_CAPTCHA="Wrong answer! Please enter right answer." COM_SPPAGEBUILDER_ADDON_AJAX_CONTACT_SUCCESS="Email sent successfully!" COM_SPPAGEBUILDER_ADDON_AJAX_CONTACT_FAILED="Email sent failed." ; Tweet Addon COM_SPPAGEBUILDER_TWEET_FOLLOWERS="Followers" COM_SPPAGEBUILDER_TWEET_FOLLOW="Follow" COM_SPPAGEBUILDER_SECOND="Second" COM_SPPAGEBUILDER_SECONDS="Seconds" COM_SPPAGEBUILDER_MINUTE="Minute" COM_SPPAGEBUILDER_MINUTES="Minutes" COM_SPPAGEBUILDER_HOUR="Hour" COM_SPPAGEBUILDER_HOURS="Hours" COM_SPPAGEBUILDER_DAY="Day" COM_SPPAGEBUILDER_DAYS="Days" COM_SPPAGEBUILDER_MONTHS="Months" COM_SPPAGEBUILDER_MONTH="Month" COM_SPPAGEBUILDER_YEAR="Year" COM_SPPAGEBUILDER_YEARS="Years" COM_SPPAGEBUILDER_AGO="ago" ; Addon Social Share COM_SPPAGEBUILDER_ADDON_SOCIALSHARE_TOTAL_SHARES="Shares" COM_SPPAGEBUILDER_ADDON_SOCIALSHARE_FACEBOOK="Facebook" COM_SPPAGEBUILDER_ADDON_SOCIALSHARE_TWITTER="Twitter" COM_SPPAGEBUILDER_ADDON_SOCIALSHARE_GOOGLE_PLUS="Google Plus" COM_SPPAGEBUILDER_ADDON_SOCIALSHARE_LINKEDIN="Linkedin" COM_SPPAGEBUILDER_ADDON_SOCIALSHARE_PINTEREST="Pinterest" COM_SPPAGEBUILDER_ADDON_SOCIALSHARE_THUMBLR="Thublr" COM_SPPAGEBUILDER_ADDON_SOCIALSHARE_GETPOCKET="Getpocket" COM_SPPAGEBUILDER_ADDON_SOCIALSHARE_REDDIT="Reddit" COM_SPPAGEBUILDER_ADDON_SOCIALSHARE_VK="VK"mod_sppagebuilder/fields/pagebuilder.php000064400000006265152163637060014515 0ustar00input->get('id', 0, 'INT'); if ($id) { $pageData = $this->pageData($id); if (isset($pageData->id) && $pageData->id) { $view_id = $pageData->id; } else { $data = $this->form->getData(); $title = $data->get('title'); $view_id = $this->insertData($id, $title, '[]'); } $front_link = 'index.php?option=com_sppagebuilder&view=form&tmpl=component&layout=edit&extension=mod_sppagebuilder&extension_view=module&id=' . $view_id; $sefURI = str_replace('/administrator', '', SppagebuilderHelperRoute::buildRoute($front_link)); $output = 'Edit with SP Page Builder'; $output .= ''; $output .= ''; $output .= ''; } else { $output .= '
    Please save this module to activate Page Builder
    '; } $output .= ''; return $output; } private function pageData($id) { $db = Factory::getDbo(); $query = $db->getQuery(true); $query->select('*'); $query->from($db->quoteName('#__sppagebuilder')); $query->where($db->quoteName('extension') . ' = ' . $db->quote('mod_sppagebuilder')); $query->where($db->quoteName('extension_view') . ' = ' . $db->quote('module')); $query->where($db->quoteName('view_id') . ' = ' . $db->quote($id)); $db->setQuery($query); $result = $db->loadObject(); return $result; } private function insertData($id, $title, $content) { $user = Factory::getUser(); $date = Factory::getDate(); $db = Factory::getDbo(); $page = new stdClass(); $page->title = $title; $page->text = $content; $page->extension = 'mod_sppagebuilder'; $page->extension_view = 'module'; $page->view_id = $id; $page->published = 1; $page->created_by = (int) $user->id; $page->created_on = $date->toSql(); $page->language = '*'; $page->access = 1; $page->css = ''; $page->active = 1; $db->insertObject('#__sppagebuilder', $page); return $db->insertid(); } function isJson($string) { json_decode($string); return (json_last_error() == JSON_ERROR_NONE); } } mod_sppagebuilder/assets/js/action.js000064400000003124152163637060013773 0ustar00/** * @package SP Page Builder * @author JoomShaper http://www.joomshaper.com * @copyright Copyright (c) 2010 - 2023 JoomShaper * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ jQuery(function ($) { if ($("#toolbar-save-copy").length > 0) { $("#toolbar-save-copy").remove(); } if ($("#toolbar-apply .button-apply").length > 0) { $("#toolbar-apply .button-apply").removeAttr("onclick").removeAttr("onClick"); } if ($("#toolbar-save .button-save").length > 0) { $("#toolbar-save .button-save").removeAttr("onclick").removeAttr("onClick"); } if ($("#toolbar-save-new .button-save-new").length > 0) { $("#toolbar-save-new .button-save-new").removeAttr("onclick").removeAttr("onClick"); } $("#toolbar-apply .button-apply, .button-save, .button-save-new").on("click", function (event) { event.preventDefault(); var action_id = event.target.parentNode.id; var task = "module.apply"; if (action_id == "toolbar-save") { task = "module.save"; } else if (action_id == "toolbar-save-new") { task = "module.save2new"; } var data = { id: $("#sppagebuilder_module_id").val(), title: $("#jform_title").val(), content: $("#jform_content_content").val(), }; $.ajax({ type: "POST", url: pagebuilder_base + "administrator/index.php?option=com_sppagebuilder&task=page.module_save", data: data, success: function (response) { var data = jQuery.parseJSON(response); if (data.status) { Joomla.submitbutton(task); } else { alert(data.message); } }, }); }); }); mod_sppagebuilder/mod_sppagebuilder.xml000064400000004047152163637060014456 0ustar00 SP Page Builder JoomShaper Oct 2016 Copyright (C) 2010 - 2023 JoomShaper.com. All rights reserved. GNU/GPL V2 or Later support@joomshaper.com www.joomshaper.com 4.0.8 Module to display content from SP Page Builder mod_sppagebuilder.php helper.php fields language assets tmpl language/en-GB.mod_sppagebuilder.ini
    mod_sppagebuilder/mod_sppagebuilder.php000064400000001374152163637060014445 0ustar00id, $params); $moduleclass_sfx = !empty($params->get('moduleclass_sfx')) ? htmlspecialchars($params->get('moduleclass_sfx'), ENT_COMPAT, 'UTF-8') : ""; require ModuleHelper::getLayoutPath('mod_sppagebuilder', $params->get('layout', 'default')); mod_sppagebuilder/tmpl/default.php000064400000003754152163637060013364 0ustar00input; $component_params = ComponentHelper::getParams('com_sppagebuilder'); if ($component_params->get('fontawesome', 1)) { SppagebuilderHelperSite::addStylesheet('font-awesome-5.min.css'); SppagebuilderHelperSite::addStylesheet('font-awesome-v4-shims.css'); } if (!$component_params->get('disableanimatecss', 0)) { SppagebuilderHelperSite::addStylesheet('animate.min.css'); } if (!$component_params->get('disablecss', 0)) { SppagebuilderHelperSite::addStylesheet('sppagebuilder.css'); } // load font assets form database SppagebuilderHelperSite::loadAssets(); HTMLHelper::_('jquery.framework'); HTMLHelper::_('script', 'components/com_sppagebuilder/assets/js/jquery.parallax.js', ['version' => SppagebuilderHelperSite::getVersion(true)] ); HTMLHelper::_('script', 'components/com_sppagebuilder/assets/js/sppagebuilder.js', ['version' => SppagebuilderHelperSite::getVersion(true)], ['defer' => true]); $data = SpPageBuilderAddonHelper::__($data); $data = SppagebuilderHelperSite::sanitize($data); ?>
    mod_sppagebuilder/helper.php000064400000002423152163637060012233 0ustar00text) && $data->text) { return $data->text; } else { $content = $params->get('content', '[]'); if(!self::isJson($content)) { $content = '[]'; } } return $content; } private static function pageBuilderData($id) { $db = Factory::getDbo(); $query = $db->getQuery(true); $query->select('*'); $query->from($db->quoteName('#__sppagebuilder')); $query->where($db->quoteName('extension') . ' = '. $db->quote('mod_sppagebuilder')); $query->where($db->quoteName('extension_view') . ' = '. $db->quote('module')); $query->where($db->quoteName('view_id') . ' = '. $db->quote($id)); $db->setQuery($query); $item = $db->loadObject(); return $item; } private static function isJson($string) { json_decode($string); return (json_last_error() == JSON_ERROR_NONE); } } mod_feed/mod_feed.xml000064400000010157152163637060010607 0ustar00 mod_feed Joomla! Project 2005-07 (C) 2005 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.0.0 MOD_FEED_XML_DESCRIPTION Joomla\Module\Feed mod_feed.php src tmpl language/en-GB/mod_feed.ini language/en-GB/mod_feed.sys.ini
    mod_feed/mod_feed.php000064400000001031152163637060010565 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Helper\ModuleHelper; use Joomla\Module\Feed\Site\Helper\FeedHelper; $rssurl = $params->get('rssurl', ''); $rssrtl = $params->get('rssrtl', 0); $feed = FeedHelper::getFeed($params); require ModuleHelper::getLayoutPath('mod_feed', $params->get('layout', 'default')); mod_feed/tmpl/default.php000064400000010274152163637060011434 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Filter\OutputFilter; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; // Check if feed URL has been set if (empty($rssurl)) { echo '
    ' . Text::_('MOD_FEED_ERR_NO_URL') . '
    '; return; } if (!empty($feed) && is_string($feed)) { echo $feed; } else { $lang = $app->getLanguage(); $myrtl = $params->get('rssrtl', 0); $direction = ' '; $isRtl = $lang->isRtl(); if ($isRtl && $myrtl == 0) { $direction = ' redirect-rtl'; } elseif ($isRtl && $myrtl == 1) { // Feed description $direction = ' redirect-ltr'; } elseif ($isRtl && $myrtl == 2) { $direction = ' redirect-rtl'; } elseif ($myrtl == 0) { $direction = ' redirect-ltr'; } elseif ($myrtl == 1) { $direction = ' redirect-ltr'; } elseif ($myrtl == 2) { $direction = ' redirect-rtl'; } if ($feed !== false) { ?>
    title !== null && $params->get('rsstitle', 1)) { ?>

    title; ?>

    get('rssdate', 1)) : ?>

    publishedDate, Text::_('DATE_FORMAT_LC3')); ?>

    get('rssdesc', 1)) { ?> description; ?> image && $params->get('rssimage', 1)) : ?> image->uri, $feed->image->title); ?>
    * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Module\Feed\Site\Helper; use Joomla\CMS\Feed\FeedFactory; use Joomla\CMS\Language\Text; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Helper for mod_feed * * @since 1.5 */ class FeedHelper { /** * Retrieve feed information * * @param \Joomla\Registry\Registry $params module parameters * * @return \Joomla\CMS\Feed\Feed|string */ public static function getFeed($params) { // Module params $rssurl = $params->get('rssurl', ''); // Get RSS parsed object try { $feed = new FeedFactory(); $rssDoc = $feed->getFeed($rssurl); } catch (\Exception $e) { return Text::_('MOD_FEED_ERR_FEED_NOT_RETRIEVED'); } if (empty($rssDoc)) { return Text::_('MOD_FEED_ERR_FEED_NOT_RETRIEVED'); } if ($rssDoc) { return $rssDoc; } } } mod_random_image/mod_random_image.xml000064400000003746152163637060014053 0ustar00 mod_random_image Joomla! Project 2006-07 (C) 2006 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.0.0 MOD_RANDOM_IMAGE_XML_DESCRIPTION Joomla\Module\RandomImage mod_random_image.php src tmpl language/en-GB/mod_random_image.ini language/en-GB/mod_random_image.sys.ini
    mod_random_image/mod_random_image.php000064400000001217152163637060014031 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Helper\ModuleHelper; use Joomla\Module\RandomImage\Site\Helper\RandomImageHelper; $link = $params->get('link'); $folder = RandomImageHelper::getFolder($params); $images = RandomImageHelper::getImages($params, $folder); $image = RandomImageHelper::getRandomImage($params, $images); require ModuleHelper::getLayoutPath('mod_random_image', $params->get('layout', 'default')); mod_random_image/tmpl/default.php000064400000001433152163637060013150 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; if (!count($images)) { echo Text::_('MOD_RANDOM_IMAGE_NO_IMAGES'); return; } ?>
    folder . '/' . htmlspecialchars($image->name, ENT_COMPAT, 'UTF-8'), '', ['width' => $image->width, 'height' => $image->height]); ?>
    mod_random_image/src/Helper/RandomImageHelper.php000064400000007271152163637060016107 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Module\RandomImage\Site\Helper; use Joomla\CMS\Uri\Uri; use Joomla\String\StringHelper; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Helper for mod_random_image * * @since 1.5 */ class RandomImageHelper { /** * Retrieves a random image * * @param \Joomla\Registry\Registry &$params module parameters object * @param array $images list of images * * @return mixed */ public static function getRandomImage(&$params, $images) { $width = $params->get('width', 100); $height = $params->get('height', null); $i = \count($images); if ($i === 0) { return null; } $random = mt_rand(0, $i - 1); $image = $images[$random]; $size = getimagesize(JPATH_BASE . '/' . $image->folder . '/' . $image->name); if ($size[0] < $width) { $width = $size[0]; } $coeff = $size[0] / $size[1]; if ($height === null) { $height = (int) ($width / $coeff); } else { $newheight = min($height, (int) ($width / $coeff)); if ($newheight < $height) { $height = $newheight; } else { $width = $height * $coeff; } } $image->width = $width; $image->height = $height; $image->folder = str_replace('\\', '/', $image->folder); return $image; } /** * Retrieves images from a specific folder * * @param \Joomla\Registry\Registry &$params module params * @param string $folder folder to get the images from * * @return array */ public static function getImages(&$params, $folder) { $type = $params->get('type', 'jpg'); $files = []; $images = []; $dir = JPATH_BASE . '/' . $folder; // Check if directory exists if (is_dir($dir)) { if ($handle = opendir($dir)) { while (false !== ($file = readdir($handle))) { if ($file !== '.' && $file !== '..' && $file !== 'CVS' && $file !== 'index.html') { $files[] = $file; } } } closedir($handle); $i = 0; foreach ($files as $img) { if (!is_dir($dir . '/' . $img) && preg_match('/' . $type . '/', $img)) { $images[$i] = new \stdClass(); $images[$i]->name = $img; $images[$i]->folder = $folder; $i++; } } } return $images; } /** * Get sanitized folder * * @param \Joomla\Registry\Registry &$params module params objects * * @return mixed */ public static function getFolder(&$params) { $folder = $params->get('folder'); $LiveSite = Uri::base(); // If folder includes livesite info, remove if (StringHelper::strpos($folder, $LiveSite) === 0) { $folder = str_replace($LiveSite, '', $folder); } // If folder includes absolute path, remove if (StringHelper::strpos($folder, JPATH_SITE) === 0) { $folder = str_replace(JPATH_BASE, '', $folder); } return str_replace(['\\', '/'], DIRECTORY_SEPARATOR, $folder); } } mod_convertforms/mod_convertforms.php000064400000001323152163637060014241 0ustar00 * @link http://www.tassos.gr * @copyright Copyright © 2021 Tassos Marinos All Rights Reserved * @license GNU GPLv3 or later */ defined('_JEXEC') or die('Restricted access'); // Initialize Convert Forms Library if (!@include_once(JPATH_ADMINISTRATOR . '/components/com_convertforms/autoload.php')) { return; } use Joomla\CMS\Helper\ModuleHelper; use ConvertForms\Helper; $form = Helper::renderFormById($params->get('form')); require ModuleHelper::getLayoutPath('mod_convertforms', $params->get('layout', 'default'));mod_convertforms/language/en-GB/en-GB.mod_convertforms.ini000064400000001101152163637060017565 0ustar00;; Language File ;; ;; @package Convert Forms ;; @version 3.2.4 Pro ;; ;; @author Tassos Marinos ;; @link http://www.tassos.gr ;; @copyright Copyright © 2021 Tassos Marinos All Rights Reserved ;; @license GNU GPLv3 or later MOD_CONVERTFORMS="Convert Forms" MOD_CONVERTFORMS_DESC="This module displays a Form from the Convert Forms component." CONVERTFORMS="Convert Forms Module" MOD_CONVERTFORMS_FORM="Choose Form" MOD_CONVERTFORMS_FORM_DESC="Choose Form"mod_convertforms/language/en-GB/en-GB.mod_convertforms.sys.ini000064400000000711152163637060020410 0ustar00;; Language File ;; ;; @package Convert Forms ;; @version 3.2.4 Pro ;; ;; @author Tassos Marinos ;; @link http://www.tassos.gr ;; @copyright Copyright © 2021 Tassos Marinos All Rights Reserved ;; @license GNU GPLv3 or later MOD_CONVERTFORMS="Convert Forms" MOD_CONVERTFORMS_DESC="Convert Forms Module" CONVERTFORMS="Convert Forms Module"mod_convertforms/script.install.helper.php000064400000034570152163637060015114 0ustar00 * @link http://www.tassos.gr * @copyright Copyright © 2016 Tassos Marinos All Rights Reserved * @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL */ defined('_JEXEC') or die; jimport('joomla.filesystem.file'); jimport('joomla.filesystem.folder'); class Mod_ConvertformsInstallerScriptHelper { public $name = ''; public $alias = ''; public $extname = ''; public $extension_type = ''; public $plugin_folder = 'system'; public $module_position = 'status'; public $client_id = 1; public $install_type = 'install'; public $show_message = true; public $autopublish = true; public $db = null; public $app = null; public $installedVersion; public function __construct(&$params) { $this->extname = $this->extname ?: $this->alias; $this->db = JFactory::getDbo(); $this->app = JFactory::getApplication(); $this->installedVersion = $this->getVersion($this->getInstalledXMLFile()); } /** * Preflight event * * @param string * @param JAdapterInstance * * @return boolean */ public function preflight($route, $adapter) { if (!in_array($route, array('install', 'update'))) { return; } JFactory::getLanguage()->load('plg_system_novaraininstaller', JPATH_PLUGINS . '/system/novaraininstaller'); if ($this->show_message && $this->isInstalled()) { $this->install_type = 'update'; } if ($this->onBeforeInstall() === false) { return false; } } /** * Preflight event * * @param string * @param JAdapterInstance * * @return boolean */ public function postflight($route, $adapter) { JFactory::getLanguage()->load($this->getPrefix() . '_' . $this->extname, $this->getMainFolder()); if (!in_array($route, array('install', 'update'))) { return; } if ($this->onAfterInstall() === false) { return false; } if ($route == 'install' && $this->autopublish) { $this->publishExtension(); } if ($this->show_message) { $this->addInstalledMessage(); } JFactory::getCache()->clean('com_plugins'); JFactory::getCache()->clean('_system'); } public function isInstalled() { if (!is_file($this->getInstalledXMLFile())) { return false; } $query = $this->db->getQuery(true) ->select('extension_id') ->from('#__extensions') ->where($this->db->quoteName('type') . ' = ' . $this->db->quote($this->extension_type)) ->where($this->db->quoteName('element') . ' = ' . $this->db->quote($this->getElementName())); $this->db->setQuery($query, 0, 1); $result = $this->db->loadResult(); return empty($result) ? false : true; } public function getMainFolder() { switch ($this->extension_type) { case 'plugin' : return JPATH_SITE . '/plugins/' . $this->plugin_folder . '/' . $this->extname; case 'component' : return JPATH_ADMINISTRATOR . '/components/com_' . $this->extname; case 'module' : return JPATH_ADMINISTRATOR . '/modules/mod_' . $this->extname; case 'library' : return JPATH_SITE . '/libraries/' . $this->extname; } } public function getInstalledXMLFile() { return $this->getXMLFile($this->getMainFolder()); } public function getCurrentXMLFile() { return $this->getXMLFile(__DIR__); } public function getXMLFile($folder) { switch ($this->extension_type) { case 'module' : return $folder . '/mod_' . $this->extname . '.xml'; default : return $folder . '/' . $this->extname . '.xml'; } } public function foldersExist($folders = array()) { foreach ($folders as $folder) { if (is_dir($folder)) { return true; } } return false; } public function publishExtension() { switch ($this->extension_type) { case 'plugin' : $this->publishPlugin(); case 'module' : $this->publishModule(); } } public function publishPlugin() { $query = $this->db->getQuery(true) ->update('#__extensions') ->set($this->db->quoteName('enabled') . ' = 1') ->where($this->db->quoteName('type') . ' = ' . $this->db->quote('plugin')) ->where($this->db->quoteName('element') . ' = ' . $this->db->quote($this->extname)) ->where($this->db->quoteName('folder') . ' = ' . $this->db->quote($this->plugin_folder)); $this->db->setQuery($query); $this->db->execute(); } public function publishModule() { // Get module id $query = $this->db->getQuery(true) ->select('id') ->from('#__modules') ->where($this->db->quoteName('module') . ' = ' . $this->db->quote('mod_' . $this->extname)) ->where($this->db->quoteName('client_id') . ' = ' . (int) $this->client_id); $this->db->setQuery($query, 0, 1); $id = $this->db->loadResult(); if (!$id) { return; } // check if module is already in the modules_menu table (meaning is is already saved) $query->clear() ->select('moduleid') ->from('#__modules_menu') ->where($this->db->quoteName('moduleid') . ' = ' . (int) $id); $this->db->setQuery($query, 0, 1); $exists = $this->db->loadResult(); if ($exists) { return; } // Get highest ordering number in position $query->clear() ->select('ordering') ->from('#__modules') ->where($this->db->quoteName('position') . ' = ' . $this->db->quote($this->module_position)) ->where($this->db->quoteName('client_id') . ' = ' . (int) $this->client_id) ->order('ordering DESC'); $this->db->setQuery($query, 0, 1); $ordering = $this->db->loadResult(); $ordering++; // publish module and set ordering number $query->clear() ->update('#__modules') ->set($this->db->quoteName('published') . ' = 1') ->set($this->db->quoteName('ordering') . ' = ' . (int) $ordering) ->set($this->db->quoteName('position') . ' = ' . $this->db->quote($this->module_position)) ->where($this->db->quoteName('id') . ' = ' . (int) $id); $this->db->setQuery($query); $this->db->execute(); // add module to the modules_menu table $query->clear() ->insert('#__modules_menu') ->columns(array($this->db->quoteName('moduleid'), $this->db->quoteName('menuid'))) ->values((int) $id . ', 0'); $this->db->setQuery($query); $this->db->execute(); } public function addInstalledMessage() { JFactory::getApplication()->enqueueMessage( JText::sprintf( JText::_($this->install_type == 'update' ? 'NRI_THE_EXTENSION_HAS_BEEN_UPDATED_SUCCESSFULLY' : 'NRI_THE_EXTENSION_HAS_BEEN_INSTALLED_SUCCESSFULLY'), '' . JText::_($this->name) . '', '' . $this->getVersion() . '', $this->getFullType() ) ); } public function getPrefix() { switch ($this->extension_type) { case 'plugin'; return JText::_('plg_' . strtolower($this->plugin_folder)); case 'component': return JText::_('com'); case 'module': return JText::_('mod'); case 'library': return JText::_('lib'); default: return $this->extension_type; } } public function getElementName($type = null, $extname = null) { $type = is_null($type) ? $this->extension_type : $type; $extname = is_null($extname) ? $this->extname : $extname; switch ($type) { case 'component' : return 'com_' . $extname; case 'module' : return 'mod_' . $extname; case 'plugin' : default: return $extname; } } public function getFullType() { return JText::_('NRI_' . strtoupper($this->getPrefix())); } public function isPro() { $versionFile = __DIR__ . "/version.php"; // If version file does not exist we assume a PRO version if (!JFile::exists($versionFile)) { return true; } // Load version file require_once $versionFile; return (bool) $NR_PRO; } public function getVersion($file = '') { $file = $file ?: $this->getCurrentXMLFile(); if (!is_file($file)) { return ''; } $xml = JInstaller::parseXMLInstallFile($file); if (!$xml || !isset($xml['version'])) { return ''; } return $xml['version']; } /** * Checks wether the extension can be installed or not * * @return boolean */ public function canInstall() { // The extension is not installed yet. Accept Install. if (!$installed_version = $this->getVersion($this->getInstalledXMLFile())) { return true; } // Path to extension's version file $versionFile = $this->getMainFolder() . "/version.php"; $NR_PRO = true; // If version file does not exist we assume we have a PRO version installed if (file_exists($versionFile)) { require_once($versionFile); } // The free version is installed. Accept install. if (!(bool)$NR_PRO) { return true; } // Current package is a PRO version. Accept install. if ($this->isPro()) { return true; } // User is trying to update from PRO version to FREE. Do not accept install. JFactory::getLanguage()->load($this->getPrefix() . '_' . $this->extname, __DIR__); JFactory::getApplication()->enqueueMessage( JText::_('NRI_ERROR_PRO_TO_FREE'), 'error' ); JFactory::getApplication()->enqueueMessage( html_entity_decode( JText::sprintf( 'NRI_ERROR_UNINSTALL_FIRST', '', '', JText::_($this->name) ) ), 'error' ); return false; } /** * Checks if current version is newer than the installed one * Used for Novarain Framework * * @return boolean [description] */ public function isNewer() { if (!$installed_version = $this->getVersion($this->getInstalledXMLFile())) { return true; } $package_version = $this->getVersion(); return version_compare($installed_version, $package_version, '<='); } /** * Helper method triggered before installation * * @return bool */ public function onBeforeInstall() { if (!$this->canInstall()) { return false; } } /** * Helper method triggered after installation */ public function onAfterInstall() { } /** * Delete files * * @param array $folders */ public function deleteFiles($files = array()) { foreach ($files as $key => $file) { JFile::delete($file); } } /** * Deletes folders * * @param array $folders */ public function deleteFolders($folders = array()) { foreach ($folders as $folder) { if (!is_dir($folder)) { continue; } JFolder::delete($folder); } } public function dropIndex($table, $index) { $db = $this->db; // Check if index exists first $query = 'SHOW INDEX FROM ' . $db->quoteName('#__' . $table) . ' WHERE KEY_NAME = ' . $db->quote($index); $db->setQuery($query); $db->execute(); if (!$db->loadResult()) { return; } // Remove index $query = 'ALTER TABLE ' . $db->quoteName('#__' . $table) . ' DROP INDEX ' . $db->quoteName($index); $db->setQuery($query); $db->execute(); } public function dropUnwantedTables($tables) { if (!$tables) { return; } foreach ($tables as $table) { $query = "DROP TABLE IF EXISTS #__".$this->db->escape($table); $this->db->setQuery($query); $this->db->execute(); } } public function dropUnwantedColumns($table, $columns) { if (!$columns || !$table) { return; } $db = $this->db; // Check if columns exists in database function qt($n) { return(JFactory::getDBO()->quote($n)); } $query = 'SHOW COLUMNS FROM #__'.$table.' WHERE Field IN ('.implode(",", array_map("qt", $columns)).')'; $db->setQuery($query); $rows = $db->loadColumn(0); // Abort if we don't have any rows if (!$rows) { return; } // Let's remove the columns $q = ""; foreach ($rows as $key => $column) { $comma = (($key+1) < count($rows)) ? "," : ""; $q .= "drop ".$this->db->escape($column).$comma; } $query = "alter table #__".$table." $q"; $db->setQuery($query); $db->execute(); } public function fetch($table, $columns = "*", $where = null, $singlerow = false) { if (!$table) { return; } $db = $this->db; $query = $db->getQuery(true); $query ->select($columns) ->from("#__$table"); if (isset($where)) { $query->where("$where"); } $db->setQuery($query); return ($singlerow) ? $db->loadObject() : $db->loadObjectList(); } /** * Load the Novarain Framework * * @return boolean */ public function loadFramework() { if (is_file(JPATH_PLUGINS . '/system/nrframework/autoload.php')) { include_once JPATH_PLUGINS . '/system/nrframework/autoload.php'; } } /** * Re-orders plugin after passed array of plugins * * @param string $plugin Plugin element name * @param array $lowerPluginOrder Array of plugin element names * * @return boolean */ public function pluginOrderAfter($lowerPluginOrder) { if (!is_array($lowerPluginOrder) || !count($lowerPluginOrder)) { return; } $db = $this->db; // Get plugins max order $query = $db->getQuery(true); $query ->select($db->quoteName('b.ordering')) ->from($db->quoteName('#__extensions', 'b')) ->where($db->quoteName('b.element') . ' IN ("'.implode("\",\"",$lowerPluginOrder).'")') ->order('b.ordering desc'); $db->setQuery($query); $maxOrder = $db->loadResult(); if (is_null($maxOrder)) { return; } // Get plugin details $query ->clear() ->select(array($db->quoteName('extension_id'), $db->quoteName('ordering'))) ->from($db->quoteName('#__extensions')) ->where($db->quoteName('element') . ' = ' . $db->quote($this->alias)); $db->setQuery($query); $pluginInfo = $db->loadObject(); if (!isset($pluginInfo->ordering) || $pluginInfo->ordering > $maxOrder) { return; } // Update the new plugin order $object = new stdClass(); $object->extension_id = $pluginInfo->extension_id; $object->ordering = ($maxOrder + 1); try { $db->updateObject('#__extensions', $object, 'extension_id'); } catch (Exception $e) { return $e->getMessage(); } } } mod_convertforms/script.install.php000064400000001152152163637060013624 0ustar00 * @link http://www.tassos.gr * @copyright Copyright © 2021 Tassos Marinos All Rights Reserved * @license GNU GPLv3 or later */ defined('_JEXEC') or die('Restricted access'); require_once __DIR__ . '/script.install.helper.php'; class Mod_ConvertFormsInstallerScript extends Mod_ConvertFormsInstallerScriptHelper { public $name = 'CONVERTFORMS'; public $alias = 'convertforms'; public $extension_type = 'module'; } mod_convertforms/mod_convertforms.xml000064400000003672152163637060014263 0ustar00 mod_convertforms MOD_CONVERTFORMS_DESC 1.0 October 2016 Tassos Marinos info@tassos.gr http://www.tassos.gr Copyright © 2021 Tassos Marinos All Rights Reserved http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL script.install.php mod_convertforms.php language tmpl script.install.helper.php mod_convertforms.xml
    mod_convertforms/tmpl/default.php000064400000000602152163637060013252 0ustar00 * @link http://www.tassos.gr * @copyright Copyright © 2021 Tassos Marinos All Rights Reserved * @license GNU GPLv3 or later */ defined('_JEXEC') or die('Restricted access'); echo $form;mod_easyblogbio/mod_easyblogbio.xml000064400000004513152163637060013576 0ustar00 EasyBlog - Biography Module Stack Ideas Sdn Bhd 26th April 2022 Copyright 2009 - 2015 Stack Ideas Sdn Bhd. All rights reserved. GPL License v2 support@stackideas.com http://stackideas.com 6.0.5 en-GB.mod_easyblogbio.ini tmpl mod_easyblogbio.php mod_easyblogbio.xml
    https://stackideas.com/joomla4compat.xml
    mod_easyblogbio/tmpl/default.php000064400000003171152163637060013026 0ustar00
    getWrapperClass();?>>
    get('showavatar')) { ?>
    get('showbio')) { ?>
    0) { ?>
    mod_easyblogbio/mod_easyblogbio.php000064400000002441152163637060013563 0ustar00input->get('option', '', 'cmd'); $view = $modules->input->get('view', '', 'cmd'); $layout = $modules->input->get('layout', '', 'cmd'); if ($option != 'com_easyblog' || $view != 'entry') { return; } // Get the current post id and author name $id = $modules->input->get('id', '', 'int'); $post = EB::post($id); $blogger = $post->getAuthor(); $biography = $blogger->getBiography(false, true); // Get the bio character limit $biolimit = $params->get('biolimit', 100); require($modules->getLayout()); mod_easyblogticker/mod_easyblogticker.xml000064400000004542152163637060015020 0ustar00 EasyBlog - Ticker Module Stack Ideas Sdn Bhd 26th April 2022 Copyright 2009 - 2015 Stack Ideas Sdn Bhd. All rights reserved. GPL License v2 support@stackideas.com http://stackideas.com 6.0.5 en-GB.mod_easyblogticker.ini assets tmpl mod_easyblogticker.php mod_easyblogticker.xml
    https://stackideas.com/joomla4compat.xml
    mod_easyblogticker/mod_easyblogticker.php000064400000003514152163637060015005 0ustar00doc->addStyleSheet($url . '/modules/mod_easyblogticker/assets/styles/ticker-style.css'); $config = EB::config(); $model = EB::model('Blog'); $categoryIds = $params->get('catid'); $count = $params->get('count'); $truncateTitle = $params->get('truncate_title', 0); if ($categoryIds) { $categories = explode(',', $categoryIds); $posts = $model->getBlogsBy('category', $categories, 'latest', $count, EBLOG_FILTER_PUBLISHED, null, false, array(), false, false, false, array(), array(), null, 'listlength', false, array(), array(), false, array(), array('paginationType' => 'none')); } if (!$categoryIds) { $posts = $model->getBlogsBy('', '', 'latest', $count, EBLOG_FILTER_PUBLISHED, null, false, array(), false, false, false, array(), array(), null, 'listlength', false, array(), array(), false, array(), array('paginationType' => 'none')); } // If there's nothing to show at all, don't even display a box. if (!$posts) { return; } $posts = $modules->processItems($posts); require($modules->getLayout()); mod_easyblogticker/assets/styles/ticker-style.css000064400000005645152163637060016413 0ustar00/* Ticker Styling */ .ticker-wrapper.has-js { margin: 20px 0px 20px 0px; padding: 0px 15px; width: auto; height: 32px; display: block; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; background-color: #f5f5f5; font-size: inherit; } .ticker { width: 100%; height: 32px; display: block; position: relative; overflow: hidden; background-color: #f5f5f5; } .ticker-title { padding-top: 9px; /*color: #990000;*/ font-weight: bold; background-color: #f5f5f5; /*text-transform: uppercase;*/ } .ticker-content { margin: 0px; padding-top: 9px; position: absolute; /*color: #1F527B;*/ /*font-weight: bold;*/ background-color: #f5f5f5; overflow: hidden; white-space: nowrap; /*line-height: 1.2em;*/ } .ticker-content:focus { none; } .ticker-content a { text-decoration: none; /*color: #1F527B;*/ } .ticker-content a:hover { text-decoration: underline; /*color: #0D3059;*/ } .ticker-swipe { padding-top: 9px; position: absolute; top: 0px; background-color: #f5f5f5; display: block; width: 100%; height: 32px; } .ticker-swipe span { margin-left: 1px; background-color: #f5f5f5; border-bottom: 1px solid #1F527B; height: 12px; width: 7px; display: block; } .ticker-controls { padding: 8px 0px 0px 0px; list-style-type: none; float: left; } .ticker-controls li { padding: 0px; margin-left: 5px; float: left; cursor: pointer; height: 16px; width: 16px; display: block; } .ticker-controls li.jnt-play-pause { background-image: url('../controls.png'); background-position: 32px 16px; } .ticker-controls li.jnt-play-pause.over { background-position: 32px 32px; } .ticker-controls li.jnt-play-pause.down { background-position: 32px 0px; } .ticker-controls li.jnt-play-pause.paused { background-image: url('../controls.png'); background-position: 48px 16px; } .ticker-controls li.jnt-play-pause.paused.over { background-position: 48px 32px; } .ticker-controls li.jnt-play-pause.paused.down { background-position: 48px 0px; } .ticker-controls li.jnt-prev { background-image: url('../controls.png'); background-position: 0px 16px; } .ticker-controls li.jnt-prev.over { background-position: 0px 32px; } .ticker-controls li.jnt-prev.down { background-position: 0px 0px; } .ticker-controls li.jnt-next { background-image: url('../controls.png'); background-position: 16px 16px; } .ticker-controls li.jnt-next.over { background-position: 16px 32px; } .ticker-controls li.jnt-next.down { background-position: 16px 0px; } .js-hidden { display: none; } .no-js-news { padding: 10px 0px 0px 45px; color: #f5f5f5; } .left .ticker-swipe { /*left: 80px;*/ } .left .ticker-controls, .left .ticker-content, .left .ticker-title, .left .ticker { float: left; } .left .ticker-controls { padding-left: 6px; } .right .ticker-swipe { /*right: 80px;*/ } .right .ticker-controls, .right .ticker-content, .right .ticker-title, .right .ticker { float: right; } .right .ticker-controls { padding-right: 6px; } mod_easyblogticker/assets/controls.png000064400000004120152163637060014273 0ustar00PNG  IHDR@0K|tEXtSoftwareAdobe ImageReadyqe<IDATxZkLTG> [@ UF!b *Ĉ-V[S|FhS$T Q "X$E116>1"IE?*>xXXzpg3{5wٝy͹sx&aҏ3#KZ]'}5hd+DGFtLp ~;p!>fnnnSBCCV9B!,aBǏx!C@ Jw06ngggFߛz |Gg'@ȑV_جal۶A@@@֗/>ijhV ^CZ]ߡ݄>E7q*^ Pvt"EAh1r6_kSR@Si5_꽰*d#IVd'6ed0lЀ_O?$u^6~ |1syAJr2ܭ{OO߽/A$;ӡDZ~c?Y6@MmE9xblG/6~?jd\ -!djkx&\'6 I?`T99,EY 2qS{E3gU1W@9\AޗϓMN+;p 0xz0(쁌Lg}P|L@ǎP'ԕ@JR(C7- u,`$gNHr߀o0TMRS |h'BFz:t [<4ɺ}a̸qЈXkM o"o%/1#(̓I6;vO4;wvc>s@nf6ÅV/= Ќ7 ~ᣅ);J"NP;v$4ℷ57zizՕO߉a$Xٟd3v,ӡed/1$P؞XlOI`00/F dm%X2{6_<>}|@aagqj>J]h$ E>t*Ч~ nݺuF5ut5i GDDaEeKQA+'HJ\ " h{ ** -kݾm1maʕ+ bOWWuɁ܉ԞAOȩSaf>@˫7OƎ >&h%e>GK#c.2GhJexnx_>O7 WLJH|/r>`er2ܼq.\5 Z𷫥tX[ saL|RE'%tKYJxT;Ƕ^|\Dc֣sIWWBa0aaP!pE>g|g f>||@ѡH[9f>jQMv>;`|\|@AA|͡CdɒYZ>`}P\Td3@F|$ˀSt">H@#\ƅY||9@}|gΞR,ޢ0/BW+)/_P|M|@tCG}ŪV ŐZ>Keܞ3g̀ϰ:Ub J$M5sqyc:zc |jq]HG~@^N,7eә3Y.&/v gWU%Ivoqq y(8_npG+IM`^ mod_easyblogcategories/mod_easyblogcategories.xml000064400000007160152163637060016527 0ustar00 Easyblog - Categories Module Stack Ideas Sdn Bhd 26th April 2022 Copyright 2009 - 2015 Stack Ideas Sdn Bhd. All rights reserved. GPL License v2 support@stackideas.com http://stackideas.com 6.0.5 en-GB.mod_easyblogcategories.ini tmpl helper.php mod_easyblogcategories.php mod_easyblogcategories.xml
    https://stackideas.com/joomla4compat.xml
    mod_easyblogcategories/mod_easyblogcategories.php000064400000002000152163637060016502 0ustar00getLayoutFile(); $categories = $helper->getCategories(); if (!$categories) { return; } require($modules->getLayout()); mod_easyblogcategories/tmpl/default_toggle.php000064400000001147152163637060015744 0ustar00
    getToggleOutput($categories); ?>
    mod_easyblogcategories/tmpl/default_tree.php000064400000001064152163637060015420 0ustar00 getTreeOutput($categories); ?> mod_easyblogcategories/tmpl/nested.php000064400000001532152163637060014237 0ustar00
    mod_easyblogcategories/tmpl/default.php000064400000001341152163637060014377 0ustar00
    mod_easyblogcategories/tmpl/default_toggle_items.php000064400000004612152163637060017145 0ustar00
    title; ?> get('showcount', true)) { ?> (cnt; ?>) get('showrss', true)) { ?>
    childs) { ?>
    childs) { ?>
    childs ? 'id="eb-cat-' . $category->id . '"' : '';?> class="collapse"> getToggleOutput($category->childs, true); ?>
    mod_easyblogcategories/tmpl/default_tree_item.php000064400000003664152163637060016446 0ustar00
    get('layouttype') == 'tree')? ' style="padding-left: ' . $padding . 'px;"' : '';?>> <?php echo JText::_($category->title); ?>
    title); ?> get('showcount', true)) { ?>
    cnt);?>
    cnt);?> get('showrss', true)) { ?>
    mod_easyblogcategories/helper.php000064400000015711152163637060013264 0ustar00lib = $modules; $this->params = $this->lib->params; } /** * Normalize the layout file name * * @since 5.1 * @access public */ public function getLayoutFile() { $layout = $this->params->get('layouttype', 'tree'); // Flatmain seems to no longer exists since 5.0. // We should just normalize the value if ($layout == 'flat' || $layout == 'flatmain' || $layout == 'tree') { return 'tree'; } return $layout; } /** * Normalize the category id from the module settings * * @since 5.1 * @access public */ public function getCategoryIds() { $categories = $this->params->get('catid', ''); if (!empty($categories)) { if (is_string($categories)) { $categories = explode(',', $categories); } } return $categories; } /** * Retrieve categories with the module parameters * * @since 5.1 * @access public */ public function getCategories() { $layout = $this->params->get('layouttype', 'tree'); $ordering = $this->params->get('order', 'latest'); $limit = (int) $this->params->get('count', 0); $hideEmptyPost = $this->params->get('hideemptypost', false); $categoryIds = $this->getCategoryIds(); // in this module context, 0 means all if ($limit === 0) { $limit = 'all'; } $model = EB::model('Category'); // Retrieve parent categories $parent = $model->getCategories($ordering, $hideEmptyPost, $limit, $categoryIds, false); $categories = array(); // Retrieve child categories $this->getChildCategories($parent, $categories); return $categories; } /** * Retrieves a list of child categories given the set of categories provided * * @since 5.1 * @access public */ public function getChildCategories(&$result, &$categories, $level = 1) { $db = EB::db(); $ordering = $this->params->get('order', 'popular'); $sort = 'desc'; $total = (int) $this->params->get('count', 0); $hideEmptyPost = $this->params->get('hideemptypost', false); $language = EB::getCurrentLanguage(); foreach ($result as $row) { // Initialize default structure $category = EB::table('Category'); $category->bind($row); $category->cnt = $row->cnt; $categories[$row->id] = $category; $categories[$row->id]->childs = array(); // Find child categories $query = array(); $query[] = 'SELECT a.*, COUNT(' . $db->qn('b.id') . ') AS ' . $db->qn('cnt') . ',' . $db->Quote($level) . ' AS ' . $db->qn('level'); $query[] = 'FROM ' . $db->qn('#__easyblog_category') . ' AS a'; $query[] = 'LEFT JOIN ' . $db->qn('#__easyblog_post_category') . ' AS pc'; $query[] = 'ON ' . $db->qn('a.id') . '=' . $db->qn('pc.category_id'); $query[] = 'LEFT JOIN ' . $db->qn('#__easyblog_post') . ' AS b'; $query[] = 'ON ' . $db->qn('b.id') . '=' . $db->qn('pc.post_id'); $query[] = 'AND ' . $db->qn('b.published') . '=' . $db->Quote(EASYBLOG_POST_PUBLISHED); $query[] = 'AND ' . $db->qn('b.state') . '=' . $db->Quote(EASYBLOG_POST_NORMAL); $query[] = 'WHERE ' . $db->qn('a.published') . '=' . $db->Quote(1); $query[] = 'AND ' . $db->qn('parent_id') . '=' . $db->Quote($row->id); if ($language) { $query[] = 'AND('; $query[] = $db->qn('a.language') . '=' . $db->Quote($language); $query[] = 'OR'; $query[] = $db->qn('a.language') . '=' . $db->Quote(''); $query[] = 'OR'; $query[] = $db->qn('a.language') . '=' . $db->Quote('*'); $query[] = ')'; } if (!$hideEmptyPost) { $query[] = 'GROUP BY ' . $db->qn('a.id'); } else { $query[] = 'GROUP BY ' . $db->qn('a.id') . ' HAVING (COUNT(' . $db->qn('b.id') . ') > 0)'; } if ($ordering == 'ordering') { $query[] = ' ORDER BY `lft` desc'; } if ($ordering == 'popular') { $query[] = ' ORDER BY `cnt` desc'; } if ($ordering == 'alphabet') { $query[] = ' ORDER BY a.`title` asc'; } if ($ordering == 'latest') { $query[] = ' ORDER BY a.`created` desc'; } $query = implode(' ', $query); $db->setQuery($query); $children = $db->loadObjectList(); // Recursion happens here if ($children) { $this->getChildCategories($children, $categories[$row->id]->childs, ++$level); } } } /** * Get currently viewed category if the user is viewing a particular category page * * @since 5.1 * @access public */ public function getCurrentViewedCategory() { static $category = null; if (is_null($category)) { $category = false; $view = $this->input->get('view'); $layout = $this->input->get('layout'); $id = $this->input->get('id', 0); if ($view == 'categories' && $layout == 'listings' && $id) { $category = $id; } } return $category; } /** * Renders the tree layout * * @since 5.1 * @access public */ public function getTreeOutput(&$categories, $level = null) { // Simulate params variable $params = $this->params; $showCategoryAvatar = $this->params->get('showcavatar', true); $showCount = $this->params->get('showcount', true); $padding = 0; foreach ($categories as $category) { $selected = $this->getCurrentViewedCategory(); if (is_null($level)) { $level = 0; } $css = ''; if ($category->id == $selected) { $css = 'font-weight: bold;'; } if ($this->params->get('layouttype') == 'tree') { $padding = $level * 30; } require(JModuleHelper::getLayoutPath('mod_easyblogcategories', 'default_tree_item')); // For child items, we need to call itself recursively if (isset($category->childs) && is_array($category->childs)) { // Only reverse the ordering when we are ordering by ordering $sortItems = $params->get('order', 'popular') == 'ordering'; if ($sortItems) { $category->childs = array_reverse($category->childs); } $this->getTreeOutput($category->childs, $level + 1); } } } /** * Renders the nested category child items * * @since 5.1 * @access public */ public function getToggleOutput(&$categories, $isChild = false) { $params = $this->params; $showCount = $params->get('showcount', true); $showCategoryAvatar = $this->params->get('showcavatar', true); $helper = $this; // We only want to re-sort the items when the ordering is by column ordering $sortItems = $params->get('order', 'popular') == 'ordering'; if ($isChild && $sortItems) { $categories = array_reverse($categories); } require(JModuleHelper::getLayoutPath('mod_easyblogcategories', 'default_toggle_items')); } } mod_easyblograndompost/mod_easyblograndompost.xml000064400000014503152163637060016630 0ustar00 EasyBlog - Random Post Module Stack Ideas Sdn Bhd 26th April 2022 Copyright 2009 - 2015 Stack Ideas Sdn Bhd. All rights reserved. GPL License v2 support@stackideas.com http://stackideas.com 6.0.5 en-GB.mod_easyblograndompost.ini tmpl mod_easyblograndompost.php mod_easyblograndompost.xml
    https://stackideas.com/joomla4compat.xml
    mod_easyblograndompost/tmpl/default_vertical.php000064400000001542152163637060016334 0ustar00
    mod_easyblograndompost/tmpl/default_item.php000064400000017504152163637060015466 0ustar00'; } ?>
    get('showavatar', true)) { ?>
    get('showauthor', true)) { ?> getAuthor()->getName(); ?> get('showdate' , true)) { ?>
    getCreationDate()->format($params->get('dateformat', JText::_('DATE_FORMAT_LC3'))); ?>
    posttype == 'quote') { ?>
    title);?>
    content; ?>
    posttype == 'video') { ?> videos) && $params->get( 'video_show' , 1 ) ){ ?>
    videos as $video ){ ?>
    html; ?>
    posttype, array('twitter', 'email', 'link'))) { ?> get('photo_show', true)) { ?> hasImage()) { $postCover = $post->getImage($photoSize); } if (!$post->hasImage() && $params->get('photo_legacy', true)) { $postCover = $post->getContentImage(); } ?>
    full) && $photoLayout->full) { echo "is-full"; } ?>"> crop) && $photoLayout->crop) { ?> <?php echo $post->title;?> <?php echo $post->title;?>
    posttype != 'quote' && $params->get('showintro', '-1') != '-1') { ?>
    protect) { ?> content; ?> protect) { ?> summary; ?>
    get('showratings', true) && $post->showRating) { ?>
    html($post, 'ebmostrandom-' . $post->id . '-ratings', JText::_('MOD_EASYBLOGRANDOMPOST_RATEBLOG'), $disabled); ?>
    get('showhits', true) || $params->get('showcommentcount', 0) || $params->get('showreadmore', true)) { ?>
    get('showhits' , true)) { ?>
    hits);?>
    get('showcommentcount', 0)) { ?> get('showreadmore', true)) { ?>
    '; } if ($gridPath<$columnCount) { $gridPath++; } else { $gridPath = 1; } ?> mod_easyblograndompost/tmpl/default_item_heading.php000064400000002546152163637060017145 0ustar00
    get('showavatar', false)) { ?>
    get('showauthor', false)) { ?> getAuthor()->getName(); ?> get('showdate' , true)) { ?>
    getCreationDate()->format($params->get('dateformat', JText::_('DATE_FORMAT_LC3'))); ?>
    mod_easyblograndompost/tmpl/default_horizontal.php000064400000002107152163637060016712 0ustar00
    get('showratings', false) && $post->showRating) { ?>
    html($post, 'ebmostrandom-' . $post->id . '-ratings', JText::_('MOD_EASYBLOGRANDOMPOST_RATEBLOG'), $disabled); ?>
    get('showhits', false) || $params->get('showcommentcount', false) || $params->get('showreadmore', true)) { ?>
    get('showhits' , false)) { ?>
    hits);?>
    get('showcommentcount', false)) { ?> get('showreadmore', true)) { ?>
    mod_easyblograndompost/tmpl/default_item_content.php000064400000007502152163637060017215 0ustar00 posttype == 'quote') { ?>
    title);?>
    content; ?>
    posttype == 'video' && !empty($post->videos) && $params->get('video_show', false)) { ?>
    videos as $video) { ?>
    html; ?>
    posttype, array('twitter', 'link'))) { ?> get('photo_show', true) && $post->cover) { ?>
    full) && $photoLayout->full) ? "is-full" : '';?>"> isCoverImage) { ?> crop) && $photoLayout->crop) { ?> <?php echo $post->title;?> <?php echo $post->title;?> isCoverImage) { ?> isEmbedCover()) { ?>
    videoEmbedCover; ?>
    videoCover; ?>
    get('showcategory', true)) { ?> getCategories() as $category) { ?>
    getTitle(); ?>
    posttype != 'quote' && $params->get('showintro', '-1') != '-1') { ?>
    protect) { ?> content; ?> summary; ?>
    mod_easyblograndompost/tmpl/default.php000064400000002414152163637060014442 0ustar00
    get('main_ratings')) { ?> mod_easyblograndompost/mod_easyblograndompost.php000064400000003775152163637060016630 0ustar00config; $count = (int) trim($params->get('total', 0)); $model = EB::model('Blog'); $type = ''; $catId = $params->get('catid', ''); // Backward compatibility $categories = EB::getCategoryInclusion($catId); if (!empty($categories)) { $type = 'category'; } $posts = $model->getBlogsBy('', '', 'random', $count, EBLOG_FILTER_PUBLISHED, null, true, array(), false, false, true, array(), $categories, '', '', false, array(), array(), false, array(), array('paginationType' => 'none')); // Module paramters $posts = $modules->processItems($posts); $textcount = $params->get('textcount', 150); $disabled = !$params->get('enableratings', false); $layout = $params->get('module_layout', 'vertical'); // EasyBlog 5.0.x backward compatible fixes if (!in_array($layout, array('vertical', 'horizontal'))) { $layout = 'vertical'; } $columnCount = $params->get('column', 4); // Get the photo layout option $photoSize = $params->get('photo_size', 'medium'); $photoLayout = $modules->getCoverLayout(); $photoAlignment = $modules->getCoverAlignment(); if (!$posts) { return; } if ($params->get('increasehits', false)) { foreach ($posts as $post) { $post->hit(); } } require($modules->getLayout()); mod_easyblogsubscribers/mod_easyblogsubscribers.xml000064400000005025152163637060017127 0ustar00 EasyBlog - Subscribers Listing Module Stack Ideas Sdn Bhd 26th April 2022 Copyright 2009 - 2015 Stack Ideas Sdn Bhd. All rights reserved. GPL License v2 support@stackideas.com http://stackideas.com 6.0.5 en-GB.mod_easyblogsubscribers.ini tmpl mod_easyblogsubscribers.php mod_easyblogsubscribers.xml
    https://stackideas.com/joomla4compat.xml
    mod_easyblogsubscribers/mod_easyblogsubscribers.php000064400000003703152163637060017117 0ustar00input->get('option', '', 'cmd'); $view = $modules->input->get('view', '', 'cmd'); $id = $modules->input->get('id', 0, 'int'); // Get subscription type $type = $params->get('subscription_type', 'site'); if ($type != 'site') { // Allowed views $allowed = array('entry', 'categories', 'blogger', 'teamblog'); if ($option != 'com_easyblog') { return; } if (!in_array($view, $allowed)) { return; } if ($view != $type) { return; } if (!$id) { return; } // update the type to the correct constant if ($type == 'categories') { $type = EBLOG_SUBSCRIPTION_CATEGORY; } if ($type == 'teamblog') { $type = EBLOG_SUBSCRIPTION_TEAMBLOG; } } // Get a list of subscribers $model = EB::model('Subscription'); $subscribers = $model->getSubscribers($type, $id); // Determines if the current user is subscribed $subscribed = false; $my = JFactory::getuser(); // Compile the return url $return = base64_encode(EBFactory::getURI(true)); if (!$my->guest) { $subscription = EB::table('Subscriptions'); $exists = $subscription->load(array('uid' => $id, 'utype' => $type, 'user_id' => $my->id)); if ($exists) { $subscribed = $subscription->id; } } require($modules->getLayout()); mod_easyblogsubscribers/tmpl/default.php000064400000003331152163637060014601 0ustar00 mod_articles_news/services/provider.php000064400000002230152163637060014441 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Extension\Service\Provider\HelperFactory; use Joomla\CMS\Extension\Service\Provider\Module; use Joomla\CMS\Extension\Service\Provider\ModuleDispatcherFactory; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; /** * The article news module service provider. * * @since 4.2.0 */ return new class () implements ServiceProviderInterface { /** * Registers the service provider with a DI container. * * @param Container $container The DI container. * * @return void * * @since 4.2.0 */ public function register(Container $container) { $container->registerServiceProvider(new ModuleDispatcherFactory('\\Joomla\\Module\\ArticlesNews')); $container->registerServiceProvider(new HelperFactory('\\Joomla\\Module\\ArticlesNews\\Site\\Helper')); $container->registerServiceProvider(new Module()); } }; mod_articles_news/mod_articles_news.xml000064400000015677152163637060014521 0ustar00 mod_articles_news Joomla! Project 2006-07 (C) 2006 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.0.0 MOD_ARTICLES_NEWS_XML_DESCRIPTION Joomla\Module\ArticlesNews services src tmpl language/en-GB/mod_articles_news.ini language/en-GB/mod_articles_news.sys.ini
    mod_articles_news/tmpl/vertical.php000064400000002075152163637060013560 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Helper\ModuleHelper; /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $app->getDocument()->getWebAssetManager(); $wa->registerAndUseStyle('mod_articles_news_vertical', 'mod_articles_news/template-vert.css'); if (!$list) { return; } ?>
    • 1 && (($i < $n - 1) || $params->get('showLastSeparator'))) : ?>  
    mod_articles_news/tmpl/default.php000064400000001201152163637060013361 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Helper\ModuleHelper; if (!$list) { return; } ?>
    mod_articles_news/tmpl/_item.php000064400000003450152163637060013042 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Layout\LayoutHelper; ?> get('item_title')) : ?> get('item_heading', 'h4'); ?> < class="newsflash-title"> link !== '' && $params->get('link_titles')) : ?> title; ?> title; ?> > get('img_intro_full') !== 'none' && !empty($item->imageSrc)) : ?>
    $item->imageSrc, 'alt' => $item->imageAlt, ] ); ?> imageCaption)) : ?>
    imageCaption; ?>
    get('intro_only')) : ?> afterDisplayTitle; ?> beforeDisplayContent; ?> get('show_introtext', 1)) : ?> introtext; ?> afterDisplayContent; ?> link) && $item->readmore != 0 && $params->get('readmore')) : ?> $item, 'params' => $item->params, 'link' => $item->link]); ?> mod_articles_news/tmpl/horizontal.php000064400000001500152163637060014130 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Helper\ModuleHelper; /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $app->getDocument()->getWebAssetManager(); $wa->registerAndUseStyle('mod_articles_news_horizontal', 'mod_articles_news/template.css'); if (empty($list)) { return; } ?>
    mod_articles_news/src/Dispatcher/Dispatcher.php000064400000002123152163637060015730 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Module\ArticlesNews\Site\Dispatcher; use Joomla\CMS\Dispatcher\AbstractModuleDispatcher; use Joomla\CMS\Helper\HelperFactoryAwareInterface; use Joomla\CMS\Helper\HelperFactoryAwareTrait; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Dispatcher class for mod_articles_news * * @since 4.2.0 */ class Dispatcher extends AbstractModuleDispatcher implements HelperFactoryAwareInterface { use HelperFactoryAwareTrait; /** * Returns the layout data. * * @return array * * @since 4.2.0 */ protected function getLayoutData() { $data = parent::getLayoutData(); $data['list'] = $this->getHelperFactory()->getHelper('ArticlesNewsHelper')->getArticles($data['params'], $this->getApplication()); return $data; } } mod_articles_news/src/Helper/ArticlesNewsHelper.php000064400000020226152163637060016542 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Module\ArticlesNews\Site\Helper; use Joomla\CMS\Access\Access; use Joomla\CMS\Application\SiteApplication; use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Factory; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\Router\Route; use Joomla\CMS\Uri\Uri; use Joomla\Component\Content\Site\Helper\RouteHelper; use Joomla\Database\DatabaseAwareInterface; use Joomla\Database\DatabaseAwareTrait; use Joomla\Registry\Registry; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Helper for mod_articles_news * * @since 1.6 */ class ArticlesNewsHelper implements DatabaseAwareInterface { use DatabaseAwareTrait; /** * Get a list of the latest articles from the article model. * * @param Registry $params Object holding the models parameters * @param SiteApplication $app The app * * @return mixed * * @since 4.2.0 */ public function getArticles(Registry $params, SiteApplication $app) { /** @var \Joomla\Component\Content\Site\Model\ArticlesModel $model */ $model = $app->bootComponent('com_content')->getMVCFactory()->createModel('Articles', 'Site', ['ignore_request' => true]); // Set application parameters in model $appParams = $app->getParams(); $model->setState('params', $appParams); $model->setState('list.start', 0); $model->setState('filter.published', 1); // Set the filters based on the module params $model->setState('list.limit', (int) $params->get('count', 5)); // This module does not use tags data $model->setState('load_tags', false); // Access filter $access = !ComponentHelper::getParams('com_content')->get('show_noauth'); $authorised = Access::getAuthorisedViewLevels($app->getIdentity() ? $app->getIdentity()->id : 0); $model->setState('filter.access', $access); // Category filter $model->setState('filter.category_id', $params->get('catid', [])); // Filter by language $model->setState('filter.language', $app->getLanguageFilter()); // Filter by tag $model->setState('filter.tag', $params->get('tag', [])); // Featured switch $featured = $params->get('show_featured', ''); if ($featured === '') { $model->setState('filter.featured', 'show'); } elseif ($featured) { $model->setState('filter.featured', 'only'); } else { $model->setState('filter.featured', 'hide'); } $input = $app->getInput(); // Filter by id in case it should be excluded if ( $params->get('exclude_current', true) && $input->get('option') === 'com_content' && $input->get('view') === 'article' ) { // Exclude the current article from displaying in this module $model->setState('filter.article_id', $input->get('id', 0, 'UINT')); $model->setState('filter.article_id.include', false); } // Set ordering $ordering = $params->get('ordering', 'a.publish_up'); $model->setState('list.ordering', $ordering); if (trim($ordering) === 'rand()') { $model->setState('list.ordering', $this->getDatabase()->getQuery(true)->rand()); } else { $direction = $params->get('direction', 1) ? 'DESC' : 'ASC'; $model->setState('list.direction', $direction); $model->setState('list.ordering', $ordering); } // Check if we should trigger additional plugin events $triggerEvents = $params->get('triggerevents', 1); // Retrieve Content $items = $model->getItems(); foreach ($items as &$item) { $item->readmore = \strlen(trim($item->fulltext)); $item->slug = $item->id . ':' . $item->alias; if ($access || \in_array($item->access, $authorised)) { // We know that user has the privilege to view the article $item->link = Route::_(RouteHelper::getArticleRoute($item->slug, $item->catid, $item->language)); $item->linkText = Text::_('MOD_ARTICLES_NEWS_READMORE'); } else { $item->link = new Uri(Route::_('index.php?option=com_users&view=login', false)); $item->link->setVar('return', base64_encode(RouteHelper::getArticleRoute($item->slug, $item->catid, $item->language))); $item->linkText = Text::_('MOD_ARTICLES_NEWS_READMORE_REGISTER'); } $item->introtext = HTMLHelper::_('content.prepare', $item->introtext, '', 'mod_articles_news.content'); // Remove any images belongs to the text if (!$params->get('image')) { $item->introtext = preg_replace('/]*>/', '', $item->introtext); } // Show the Intro/Full image field of the article if ($params->get('img_intro_full') !== 'none') { $images = json_decode($item->images); $item->imageSrc = ''; $item->imageAlt = ''; $item->imageCaption = ''; if ($params->get('img_intro_full') === 'intro' && !empty($images->image_intro)) { $item->imageSrc = htmlspecialchars($images->image_intro, ENT_COMPAT, 'UTF-8'); $item->imageAlt = htmlspecialchars($images->image_intro_alt, ENT_COMPAT, 'UTF-8'); if ($images->image_intro_caption) { $item->imageCaption = htmlspecialchars($images->image_intro_caption, ENT_COMPAT, 'UTF-8'); } } elseif ($params->get('img_intro_full') === 'full' && !empty($images->image_fulltext)) { $item->imageSrc = htmlspecialchars($images->image_fulltext, ENT_COMPAT, 'UTF-8'); $item->imageAlt = htmlspecialchars($images->image_fulltext_alt, ENT_COMPAT, 'UTF-8'); if ($images->image_intro_caption) { $item->imageCaption = htmlspecialchars($images->image_fulltext_caption, ENT_COMPAT, 'UTF-8'); } } } if ($triggerEvents) { $item->text = ''; $app->triggerEvent('onContentPrepare', ['com_content.article', &$item, &$params, 0]); $results = $app->triggerEvent('onContentAfterTitle', ['com_content.article', &$item, &$params, 0]); $item->afterDisplayTitle = trim(implode("\n", $results)); $results = $app->triggerEvent('onContentBeforeDisplay', ['com_content.article', &$item, &$params, 0]); $item->beforeDisplayContent = trim(implode("\n", $results)); $results = $app->triggerEvent('onContentAfterDisplay', ['com_content.article', &$item, &$params, 0]); $item->afterDisplayContent = trim(implode("\n", $results)); } else { $item->afterDisplayTitle = ''; $item->beforeDisplayContent = ''; $item->afterDisplayContent = ''; } } return $items; } /** * Get a list of the latest articles from the article model * * @param \Joomla\Registry\Registry &$params object holding the models parameters * * @return mixed * * @since 1.6 * * @deprecated 4.3 will be removed in 6.0 * Use the non-static method getArticles * Example: Factory::getApplication()->bootModule('mod_articles_news', 'site') * ->getHelper('ArticlesNewsHelper') * ->getArticles($params, Factory::getApplication()) */ public static function getList(&$params) { return (new self())->getArticles($params, Factory::getApplication()); } } mod_jbusiness_progress/assets/index.html000064400000000037152163637060014644 0ustar00 mod_jbusiness_progress/assets/images/add_business_gray.png000064400000012563152163637060020316 0ustar00PNG  IHDRddtIME w'IDATx]W^I%6c0Hۤ9iNO旦4`wݬ}?L<ͮd@OQ XL&]1I,bV>^B hZͲeCآ`pRJ4'Iwc]"Y¨TҎb0 m/rp8tNK*>0q͙$ `ٺ,tZՖk!pN D HRQ{SYB `A{Az=Xe mYbhuuL(g{I00L^ E2p"rEQ׳m{) #]%aC`'BVa|}} ءT.,{uuHi tcfGVP^LHlt]w4L {L& |q|ص*YDvآk+& (/#AB`~ ,R$bEPN}Jdp ;TզRdt\) $YȢKkmE5a0=U!^X-;PMPR@vř|g-J7&,-AlZQOK.!y( CjT"%gK8qHVJyǧs m_d {`0R} A`(?V>>)B1Mʪce&3"bf!wJx<}qň(d *->n>hW09>B)M(4F:^hSR 02mGd:ܰ$>ƦK)SÌɚa ;*oUi5H)YbvΠWI㉔wB0 .p6hR- "8nRR8;%K)$a %"H%ҍݙ[wXd$m0qDK~1[ ,8?EcT)F=SU:ѱ2Ia`f7ZjPX}aT+Uo7qjJ.l0q\,SCb 74ـti^ , Y '+,Jd_5Qsfʮ뺮 >NBqȾm) a`uDm?r]FIJ?bz=N2,\R@8mFHsLAV]*E\ >*ٮXCԌbXnΪժi7>b`!5lۆsq'U!RvrLC (BRv:n[P5.PYnU H1)IP4*jqw]T S4uC8[ JF,MynKurÁm`.ِ֖aVM͆tlDz6Yx٢uuEgC͔A7Ҵ $pS[i9@YepNv)`M{CV("Qj[uE׋"c i$Iଭ$+aRd2r B!M޴m{8z`1heVoB}6QUFX_IP#o6Ca&o8(2ܡ(Ǐ*6b K>4(:;;NmAlmm,ЎK"f)ZSt:}HirBɋ %F>X׌j\.f8T;R5oXW*N7$}{qUux<^]],wC)iB=wetA}XAԑ#hP,MT%JYlg:PfεɹOD~ykkkXP`JU4WI\/P[LY*t:jRRhV(lVHB~ ( /AQ@hn5M 2cY۷o8nZ!9qT%O">jk3PSZp<u\ ުU\ZhV쩊WgjfV޽ VkeeןV6MT*@,0E X}9cƣ`4QZmZJYJ"L&y;x'ӱ qTUmfH VBR4͓F)fCf^˲*h4u<KuBB~ bN̢@~Bچ6Uv]*<'b3ŋCplA9EکAMՋ/n٤O tmYxQKqjqT8EJ(t^|K_M?D}*J\]NjLF!Sd:K!%ӧOM,:iz"\xf 0|ja#f,R;;;;;;0 4RqVuuunh`.hg̾H"Y ˲^~ŋzJe{`z> vwwaW&e[e*(H '/0M!DZٸHquu;svMK0{Uu{{{8~wwWΦED3 撪B$Ii4NG[(MCg!̲/wyL&914GrݖĹ{DXI|?Rڶ].ʵE ɓ'߿GeVX(pmmmwwnN>fq sFTEOT@괕'kt &8trrٳ`PFheyfin]ϯwvv߿yuȘJ'lBt:?ݻwm7̓J-;#,&?9!$Y&? `:R+n(znݻunRu(>|pttw$iUAvȪk|՛7o|߯T*fsooo{{+EJ|&XBRdt^zu~~nr?.Ve5L)Ѩw:(rhvVlY|.X ۷aV*vh4:b`0v~4jh4ZVժjS* `烅tB$IiەRJzQT*44s7xp8gggޭnV[[[k6+++ЏJ*[ _Ç~2yeYfQ nDZ) 뮬Z;&g+ |u$a‹{`0T"8螰WJr\TVWWWVV*yOL;uhY_?L0}4C:T,]iѧ,,*^XFOk`ђRO'Y`IENDB`mod_jbusiness_progress/assets/images/add_business.png000064400000014436152163637060017275 0ustar00PNG  IHDRddtIME wIDATx]oHvn[Ԓ%Yюw&$[% @nO [9b^^˲F`U/GVH[S l6Yz{UB"ڥp$bl&#UqK)QgFDDj B UFceqEa&I$ dXRJUBQ̓USEADQB8QV&IBDRJ!뺍F^3j qn,&RJq#8B((_H)$R"bh6Z >d7H$I~RJqؖ҉Vx(.*\mۍF4n  r:ocV=uϹLY O M뺝N^CQG^;}X{GDlD g6}\A@[In8N1(QE2ExA pR5)1?\/뺮/Md2&4@Jc?^!@]`]`|&lnsh$I2\ RY(f,3ƤO9jVYX(q8R5$," !QBL+0\,?ɤWI)5' $~GčC4<""}OyOQ˨I)"7 gy"%@ $z_pYs0$FȤ&›_|Z3E;\P‹ H}Jfdoiv'vl8l6 fS5',~aU*etGwtmS!yz9zjZ˗nw}}E&IgC,[JeMu5ADsE +$dj#f*&d;ݻ^܀˹ͦrɥ Qe5=klkb:y.:6 Z19ۭVKo,t.OC)O2w _!P~h@peH}lHf<[[[j %u0z}pAU+:s!SsH9Zee#ewjV+xBJ4eTo1UUtHate1w'Ȍq"U \hssskk}Q]B UDlZD jhqOC!"9b<)[lE8?~,s(:imm-t d^/=G.ŬW2eʐ2dV !zY A^/f pKsUs( y[[ѣG+++wUo_%[xJ2 Ӱ[ gހHQ$|t:?KwpkJA\ޞL&AKᥚdL/$[_ $eab Jxzzu "şBx˗wv @v"vQ]/ȫ/K"!ut :QeW8RlNNN^w`vOp5`2yf_IЂ\u\$"bqƳnY (*gJ&%~Qi5Rʞ x<ꫯ`_F+J2ӧo޼UE1/Jyq՟hĮ@Ut#X`cߎ-lB!%|gԹibbgZxo4=y1oP@us alE /8>>~(9 S?yd00^\|lyDZxaS&CymÇl?u. I=vvxݹsGnt^9ufYBC^}>|`0xƕH-H=~xssݻG%~H7+8%F}9*ZYYO؅79ŗ_~ݻܻwoq?z>Nޝ}U_|f6mmm}Լ RKUp8|p8<<<}+?MfVvjSɓ'~bwwpoo?H8RˁU(t:}'|jTfxq51`R NOO޹sp0(ӱ\,Cz>ӧqGX ۜ*V*eyZI#Bd><㍍3mYVI\^^>{~p}}W m5*Xf[qwD իWaںwZ(m}ٳgp0ܻwommqeb ~ ͛ϟϒ-\,%Mxի#666KȀ'0y+st3`At:=??? t:F֭[^^w:VwFh_T0 3:\h4<}^<_]]^|T18j%7;.///..޿fh~JuRqjVWW^nYǍ?Pn,NWJ)0d&xLl![@|:Fk *>"X*l7ȩ߭\(S,KATx!"DHDIENDB`mod_jbusiness_progress/assets/images/add_user.png000064400000016241152163637060016414 0ustar00PNG  IHDRddtIME wUIDATx}{leYU}ھ~wϙ000!.킄V $.K4 M6 z7̤3g&3mv۾׾[sn;I>sN}U:e$"&"BGW=G(ՁUMxJ`d$㘈QM?of1lV'ew59~Ԏ~)0HJ)NR1h8sqludG TΥaADZ1su !T1q\׵m#+(|csT,?U)zeY繮e8ZȎ,S %\f3c@0#ifeO$r9E[G+-PF#"˲8%AL'n=,󧉝JB8uB$Q(H`%% PHA3@DA5d|>.P!JTODfl=SiLaf>3%& s>44dPa2=c,]!mۜsuU9).REfK4!#(8.bZءJ^ժsh4L! `%PWN3J%ιr@uJ jnȄ |DK<ۏJz!ԟaQTr]:X }jZEha_+.RVqECCC\΄x,SD"!"qP%TJD bxRjCJZ~0As$թ$&T.M|5h)e\nhhxVS16~}s&SJI.ȹS?-E "b&2Hy4}er " 5;'?ԩ_K8fmW,ӑ?u/)}T*,~jZ{{{jEJ"$yU_W>}12h{ՊG"LB5 )AoYVm~BAj_BC|); ی#8XinǷ ˆzL lڶ=22nmɦDJj(2CPf_@Yo[?>{JHȀP1KPW;#Dlj̿īUDz$K% [υyA4 ɬ BF?Or$?ն?kaO!:<  諝`KO0~H iRJ/qd.!msIMXuIXf$Ƕ[s73"@ԦFꀇ ^1ke~WQ~V%21zeCJXoڱ!mTf[ێeTBl5FPl6e^F $NKs?vwYY>OBvݐrUw cˌ9L(hvVS>Ƙ48VD5ktRij}$;~֗i m4(.,Ѵh<ϋxoo/\IfRZ-οsy$$P'8CHfCclL!ӊ8ؙZ'Pd*BK k$HZ#+O 875$CZf(I)DD5?0D-\_oԡ@@ I_žZ,ۣs0+$QK6THL'6gf"]3.KsMr1QM_U;a5"tlH TcU^?@.plVbX FA`o)ư3pRJ$P/c#MH@p.bDy rH!Ǚ))\ Me[VMzji8$c9gʳ@<6 Ę+EDF&XnٌH0S(Ln6Bv*)E?C"AL'VB"t-LMU~>}]HYj&tXMw?Zu؊D<H#AD@@]yƹIgKiYEi۶^kܻ` !T]'z"@^ {glK>3E6%E»ic)욡`M4)}/Ȑ"!1׸P@BH<9b{ dK:iҠ=͡nnFҠkJJ$,&GqB,pubIbLok0L˲|W(Od0L 1\ Pʈ+0"d&G.3 G X~o<3*[lC_xrN#!fHDe!4hq@3L @?p܌b%qDъ?pG% `:&Q+f0Le? +H!ь8!c(Zd)j3 3ۙn&"f)I󰩍;CT1Ǿ{旿uAxb_8 (}'62#Jvd8gHsΜD+ SY!2@HDKLzq8J RJ\誇2!J)Xȹ>_F#:HDE'wrX bS=*=OgE4ضe3ϔ!c 9ɟ8Oݩ6bD=D`8Owҩ!X]Yn]SLT85Yڻ8 ALK5N@RO#khߪ-Xc.?_vg։![r$$0 Iͩ>.A`r-JfjƘe)O $I{<;O7R!G&(LL3[ࡃQ5殃0<gKܱGkqNRJXHuDXH!ZDmYۍ֟WV6mrl+RX+i}_J2sA#:'qO:Säxaq}_. .xm9DB+ ,8C1oϼjcnw]|8 sfMiOM%mX*laY@fYQ}mBNPs;\n/oTx(;='? f3٪3([}Y܅)>Zln/>7ӣC CKZr3_㥾Xdݺukqq'.u(V ,Vqɐz+cIKdD"DDH`z̶ T % Q؂K?J1L ǯ}zo"j4/ɓ'yqҷ2,2\mwՉsN~ުdRN㑠#T:ZX("vm)Sf *֊X;ϼPx5mF4 "4rlYV"}Y?5)g jӄ>/\k[ زۓ$slL 2) ?yZ~iְ:߭RV|ZJX3n;H0% CǾV'HV0! x(@BH>{]?ވ!V8(JbQ_eI,mk&LNTl*<5>{ZIzbpKl3<J>|疢̂crӶh4FFF{gRӇa2<<<<WDDe-n>{ C%;?S?HJ^a[\)nooMLL6DqM%[ہ,Ks$V7۹}QIumDQ;hsF+9IeԒ/,UɷnT LJ nԃ ↛O@fjyyy|||||\d _z8NрNsklta,l`$5؉l{[usd`RիRaz22_\P5Yjެ~Zk- w9C-*ogeݻwݻj +yW,kZRe#`L 1n{pʱ&DP/Z -RLo;775NHoa1::Wh5uc? ^$[~ Hp6'ƺ6"7nlmm]paffƌ’`rglllmm<<ӌH|T?kScW5=4*u!ϖ0վ2+W͕J% ĚU.\.nnnNOOCw!h~vW)n7hޓS,BVg'Z^{s>777997,HC1Ʀo޼UT4XЋW0J砦j /YCFm2Ib6@uPVϝ;7??ovj=&\=qov^fFvfOl>) n!m:1vũ3g:eI WVV&;D3t/M܆X'R% wER !۷orٳӦfKL`jjR۾﫸AO@' +AӋHfi2+,kii_rgΜ3'bOS͛7 [&^A/<)5ȢRLSwl3gΝ;w]h jW *7%P,FfN#H:ةjii˜3g\xqlllbx)! zO??q"}ϟx7֛QH)]{777wJrp V nݺuΝSN40 $_, iifaaaqqP(?cE`hyyr… \Na~Jp 'ӧϝ;W.J.X__rJ=䤾'׾T:1J <8{ܜzozX V/)eVyŢ I8b!NLJ{[Baff̙3333nCu2 z[[rƍ U>L@-]yY(jz;wةSGFFxg~U=X TZ...޹sǶY5I `Z)P;wvvԞsssSSSz YCH%777o߾fɓ'|vze3[T$},L~AU'fgg6f%NFBf|}"T*J%녊v a3VwnmmQXQtGn (k^]]yryjj\.J%ǞJzl;ZVZZ__VjkR466699911Q.M<[GK4d﫹u<\.W,+J.S  5EoǭVKj[[[Vkwwl. ryttt|||ttP(L,э>GbOnZ٩UeY ՐV ]-CCCr\. kjxKKP: !1j4z^Z-E(sdmr\q|>_,nepzA#:~)mkqqAjW`x&v z9IG1Rbݺf7c֐8ұeu2}?Vt@MoOIENDB`mod_jbusiness_progress/assets/images/index.html000064400000000037152163637060016111 0ustar00 mod_jbusiness_progress/assets/style.css000064400000004010152163637060014514 0ustar00 .module.progress-box { background: none repeat scroll 0 0 #FFFFFF; border-radius: 3px; border-top: 5px solid #0087D0 !important; box-shadow: 0 1px 1px 0 #A4A3A3; margin: 0 0 14px; padding: 20px; position: relative; } .progress-container{ text-align: center } .progress-container h1{ font-size: 24px; color: #067AB4; } .progress-container h1{ font-size: 32px; color: #067AB4; } .progress-steps{ margin: 20px auto; } .progress-step{ display: inline-block; max-width: 330px; min-width: 270px; } .progress-steps .progress-img { float: left; margin-right: 10px; } .progress-steps .profile { background-image: url("images/add_user.png"); display: block; height: 100px; margin: 10px 0 0 10px; width: 100px; } .progress-steps .business { background-image: url("images/add_business_gray.png"); display: block; height: 100px; margin: 10px 0 0 10px; width: 100px; } .progress-steps .progress.business.current{ background-image: url("images/add_business.png"); } .step { background: none repeat scroll 0 0 #B1B1B1; border: 2px solid #FFFFFF; border-radius: 100%; display: block; height: 34px; left: -7px; position: relative; top: -3px; width: 34px; } .current .step { background: none repeat scroll 0 0 #00A2DB; } .completed .step { background: none repeat scroll 0 0 #83B802; } .step i { color: #FFFFFF; font-family: depotnewmedium; font-size: 19px; font-style: normal; left: 12px; position: absolute; top: 4px; } .progress-steps h3 { margin: 10px 0 13px 0; color: #004A73; font-size: 19px; line-height: 18px; } .progress-steps .progress-content{ text-align: left; } .progress-steps .bottom { font-size: 13px; line-height: 155%; margin-bottom: 12px; position: relative; margin-bottom: 0 !important; padding-bottom: 0 !important; }mod_jbusiness_progress/mod_jbusiness_progress.xml000064400000005074152163637060016665 0ustar00 JBusinessDirectory - Progress November 2013 CMSJunkie (C) CMSJunkie. All rights reserved. http://www.gnu.org/copyleft/gpl.html info@cmsjunkie.com www.cmsjunkie.com 1.0.0 JBusinessDirectory - Progress mod_jbusiness_progress.php tmpl assets index.html mod_jbusiness_progress.xml
    mod_jbusiness_progress/mod_jbusiness_progress.php000064400000001062152163637060016645 0ustar00get('moduleclass_sfx')); require JModuleHelper::getLayoutPath('mod_jbusiness_progress', $params->get('layout', 'default')); mod_jbusiness_progress/tmpl/default.php000064400000002403152163637060014455 0ustar00

    get("title"); ?>

    ">
    1

    get("member_title"); ?>

    get("member_text"); ?>

    ">
    2

    get("add_business_title"); ?>

    get("add_business_text"); ?>

    mod_jbusiness_progress/tmpl/index.html000064400000000037152163637060014316 0ustar00 mod_jbusiness_progress/index.html000064400000000037152163637060013342 0ustar00 mod_easyblogsearch/mod_easyblogsearch.xml000064400000003745152163637060014774 0ustar00 EasyBlog - Search Blogs Module Stack Ideas Sdn Bhd 26th April 2022 Copyright 2009 - 2015 Stack Ideas Sdn Bhd. All rights reserved. GPL License v2 support@stackideas.com http://stackideas.com 6.0.5 en-GB.mod_easyblogsearch.ini tmpl mod_easyblogsearch.php mod_easyblogsearch.xml
    https://stackideas.com/joomla4compat.xml
    mod_easyblogsearch/tmpl/default.php000064400000002410152163637060013515 0ustar00 mod_easyblogsearch/mod_easyblogsearch.php000064400000001572152163637060014757 0ustar00get('category_id', 0); require($modules->getLayout()); mod_languages/mod_languages.xml000064400000007271152163637060012720 0ustar00 mod_languages Joomla! Project 2010-02 (C) 2010 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.5.0 MOD_LANGUAGES_XML_DESCRIPTION Joomla\Module\Languages mod_languages.php src tmpl language/en-GB/mod_languages.ini language/en-GB/mod_languages.sys.ini
    mod_languages/mod_languages.php000064400000001102152163637060012672 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Helper\ModuleHelper; use Joomla\Module\Languages\Site\Helper\LanguagesHelper; $headerText = $params->get('header_text'); $footerText = $params->get('footer_text'); $list = LanguagesHelper::getList($params); require ModuleHelper::getLayoutPath('mod_languages', $params->get('layout', 'default')); mod_languages/tmpl/default.php000064400000014676152163637060012511 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\Uri\Uri; /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $app->getDocument()->getWebAssetManager(); $wa->registerAndUseStyle('mod_languages', 'mod_languages/template.css'); ?>

    get('dropdown', 0)) : ?>
    active) : ?>

    mod_languages/src/Helper/LanguagesHelper.php000064400000012432152163637060015151 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Module\Languages\Site\Helper; use Joomla\CMS\Association\AssociationServiceInterface; use Joomla\CMS\Factory; use Joomla\CMS\Language\Associations; use Joomla\CMS\Language\LanguageHelper; use Joomla\CMS\Language\Multilanguage; use Joomla\CMS\Router\Route; use Joomla\CMS\Uri\Uri; use Joomla\Component\Menus\Administrator\Helper\MenusHelper; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Helper for mod_languages * * @since 1.6 */ abstract class LanguagesHelper { /** * Gets a list of available languages * * @param \Joomla\Registry\Registry &$params module params * * @return array */ public static function getList(&$params) { $user = Factory::getUser(); $lang = Factory::getLanguage(); $languages = LanguageHelper::getLanguages(); $app = Factory::getApplication(); $menu = $app->getMenu(); $active = $menu->getActive(); // Get menu home items $homes = []; $homes['*'] = $menu->getDefault('*'); foreach ($languages as $item) { $default = $menu->getDefault($item->lang_code); if ($default && $default->language === $item->lang_code) { $homes[$item->lang_code] = $default; } } // Load associations $assoc = Associations::isEnabled(); if ($assoc) { if ($active) { $associations = MenusHelper::getAssociations($active->id); } $option = $app->getInput()->get('option'); $component = $app->bootComponent($option); if ($component instanceof AssociationServiceInterface) { $cassociations = $component->getAssociationsExtension()->getAssociationsForItem(); } else { // Load component associations $class = str_replace('com_', '', $option) . 'HelperAssociation'; \JLoader::register($class, JPATH_SITE . '/components/' . $option . '/helpers/association.php'); if (class_exists($class) && \is_callable([$class, 'getAssociations'])) { $cassociations = \call_user_func([$class, 'getAssociations']); } } } $levels = $user->getAuthorisedViewLevels(); $sitelangs = LanguageHelper::getInstalledLanguages(0); $multilang = Multilanguage::isEnabled(); // Filter allowed languages foreach ($languages as $i => &$language) { // Do not display language without frontend UI if (!\array_key_exists($language->lang_code, $sitelangs)) { unset($languages[$i]); } elseif (!isset($homes[$language->lang_code])) { // Do not display language without specific home menu unset($languages[$i]); } elseif (isset($language->access) && $language->access && !\in_array($language->access, $levels)) { // Do not display language without authorized access level unset($languages[$i]); } else { $language->active = ($language->lang_code === $lang->getTag()); // Fetch language rtl // If loaded language get from current JLanguage metadata if ($language->active) { $language->rtl = $lang->isRtl(); } else { // If not loaded language fetch metadata directly for performance $languageMetadata = LanguageHelper::getMetadata($language->lang_code); $language->rtl = $languageMetadata['rtl']; } if ($multilang) { if (isset($cassociations[$language->lang_code])) { $language->link = Route::_($cassociations[$language->lang_code]); } elseif (isset($associations[$language->lang_code]) && $menu->getItem($associations[$language->lang_code])) { $itemid = $associations[$language->lang_code]; $language->link = Route::_('index.php?lang=' . $language->sef . '&Itemid=' . $itemid); } elseif ($active && $active->language === '*') { $language->link = Route::_('index.php?lang=' . $language->sef . '&Itemid=' . $active->id); } else { if ($language->active) { $language->link = Uri::getInstance()->toString(['path', 'query']); } else { $itemid = isset($homes[$language->lang_code]) ? $homes[$language->lang_code]->id : $homes['*']->id; $language->link = Route::_('index.php?lang=' . $language->sef . '&Itemid=' . $itemid); } } } else { $language->link = Route::_('&Itemid=' . $homes['*']->id); } } } return $languages; } } mod_syndicate/mod_syndicate.xml000064400000004067152163637060012752 0ustar00 mod_syndicate Joomla! Project 2006-05 (C) 2006 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.0.0 MOD_SYNDICATE_XML_DESCRIPTION Joomla\Module\Syndicate mod_syndicate.php src tmpl language/en-GB/mod_syndicate.ini language/en-GB/mod_syndicate.sys.ini
    mod_syndicate/mod_syndicate.php000064400000001212152163637060012726 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Helper\ModuleHelper; use Joomla\Module\Syndicate\Site\Helper\SyndicateHelper; $params->def('format', 'rss'); $link = SyndicateHelper::getLink($params, $app->getDocument()); if ($link === null) { return; } $text = htmlspecialchars($params->get('text', ''), ENT_COMPAT, 'UTF-8'); require ModuleHelper::getLayoutPath('mod_syndicate', $params->get('layout', 'default')); mod_syndicate/tmpl/default.php000064400000001324152163637060012510 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; $textClass = ($params->get('display_text', 1) ? '' : 'class="visually-hidden"'); $linkText = ''; $linkText .= '' . (!empty($text) ? $text : Text::_('MOD_SYNDICATE_DEFAULT_FEED_ENTRIES')) . ''; $attribs = [ 'class' => 'mod-syndicate syndicate-module' ]; echo HTMLHelper::_('link', $link, $linkText, $attribs); mod_syndicate/src/Helper/SyndicateHelper.php000064400000002240152163637060015177 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Module\Syndicate\Site\Helper; use Joomla\CMS\Document\HtmlDocument; use Joomla\Registry\Registry; use Joomla\Utilities\ArrayHelper; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Helper for mod_syndicate * * @since 1.5 */ class SyndicateHelper { /** * Gets the link * * @param Registry $params The module parameters * @param HtmlDocument $document The document * * @return string|null The link as a string, if found * * @since 1.5 */ public static function getLink(Registry $params, HtmlDocument $document) { foreach ($document->_links as $link => $value) { $value = ArrayHelper::toString($value); if (strpos($value, 'application/' . $params->get('format') . '+xml')) { return $link; } } return null; } } mod_articles_category/services/provider.php000064400000002251152163637060015305 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Extension\Service\Provider\HelperFactory; use Joomla\CMS\Extension\Service\Provider\Module; use Joomla\CMS\Extension\Service\Provider\ModuleDispatcherFactory; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; /** * The articles category module service provider. * * @since 4.4.0 */ return new class () implements ServiceProviderInterface { /** * Registers the service provider with a DI container. * * @param Container $container The DI container. * * @return void * * @since 4.4.0 */ public function register(Container $container) { $container->registerServiceProvider(new ModuleDispatcherFactory('\\Joomla\\Module\\ArticlesCategory')); $container->registerServiceProvider(new HelperFactory('\\Joomla\\Module\\ArticlesCategory\\Site\\Helper')); $container->registerServiceProvider(new Module()); } }; mod_articles_category/mod_articles_category.xml000064400000036552152163637060016216 0ustar00 mod_articles_category Joomla! Project 2010-02 (C) 2010 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.0.0 MOD_ARTICLES_CATEGORY_XML_DESCRIPTION Joomla\Module\ArticlesCategory services src tmpl language/en-GB/mod_articles_category.ini language/en-GB/mod_articles_category.sys.ini
    mod_articles_category/tmpl/default_items.php000064400000006470152163637060015440 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\Layout\LayoutHelper; ?>
  • get('link_titles') == 1) : ?> 'mod-articles-category-title ' . $item->active]; ?> link, ENT_COMPAT, 'UTF-8', false); ?> title, ENT_COMPAT, 'UTF-8', false); ?> title; ?> displayHits) : ?> (displayHits; ?>) get('show_author')) : ?> displayAuthorName; ?> displayCategoryTitle) : ?> (displayCategoryTitle; ?>) displayDate) : ?> displayDate; ?> get('show_tags', 0) && $item->tags->itemTags) : ?>
    tags->itemTags); ?>
    get('show_introtext')) : ?>

    displayIntrotext; ?>

    get('show_readmore')) : ?>

    params->get('access-view') == false) : ?> alternative_readmore) : ?> alternative_readmore; ?> title, $params->get('readmore_limit')); ?> get('show_readmore_title', 0)) : ?> title, $params->get('readmore_limit')); ?> get('show_readmore_title', 0)) : ?> title, $params->get('readmore_limit')); ?>

  • mod_articles_category/tmpl/default.php000064400000002013152163637060014224 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Helper\ModuleHelper; use Joomla\CMS\Language\Text; if (!$list) { return; } ?>
      $items) : ?>
      • get('layout', 'default') . '_items'); ?>
    • get('layout', 'default') . '_items'); ?>
    mod_articles_category/src/Dispatcher/Dispatcher.php000064400000005115152163637060016575 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Module\ArticlesCategory\Site\Dispatcher; use Joomla\CMS\Dispatcher\AbstractModuleDispatcher; use Joomla\CMS\Helper\HelperFactoryAwareInterface; use Joomla\CMS\Helper\HelperFactoryAwareTrait; use Joomla\CMS\Helper\ModuleHelper; // phpcs:disable PSR1.Files.SideEffects \defined('JPATH_PLATFORM') or die; // phpcs:enable PSR1.Files.SideEffects /** * Dispatcher class for mod_articles_category * * @since 4.4.0 */ class Dispatcher extends AbstractModuleDispatcher implements HelperFactoryAwareInterface { use HelperFactoryAwareTrait; /** * Returns the layout data. * * @return array * * @since 4.4.0 */ protected function getLayoutData(): array { $data = parent::getLayoutData(); $params = $data['params']; // Prep for Normal or Dynamic Modes $mode = $params->get('mode', 'normal'); $idBase = null; switch ($mode) { case 'dynamic': $option = $data['input']->get('option'); $view = $data['input']->get('view'); if ($option === 'com_content') { switch ($view) { case 'category': case 'categories': $idBase = $data['input']->getInt('id'); break; case 'article': if ($params->get('show_on_article_page', 1)) { $idBase = $data['input']->getInt('catid'); } break; } } break; default: $idBase = $params->get('catid'); break; } $cacheParams = new \stdClass(); $cacheParams->cachemode = 'id'; $cacheParams->class = $this->getHelperFactory()->getHelper('ArticlesCategoryHelper'); $cacheParams->method = 'getArticles'; $cacheParams->methodparams = [$params, $data['app']]; $cacheParams->modeparams = md5(serialize([$idBase, $this->module->module, $this->module->id])); $data['list'] = ModuleHelper::moduleCache($this->module, $params, $cacheParams); $data['grouped'] = $params->get('article_grouping', 'none') !== 'none'; return $data; } } mod_articles_category/src/Helper/ArticlesCategoryHelper.php000064400000047310152163637060020247 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Module\ArticlesCategory\Site\Helper; use Joomla\CMS\Access\Access; use Joomla\CMS\Application\SiteApplication; use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Date\Date; use Joomla\CMS\Factory; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Plugin\PluginHelper; use Joomla\CMS\Router\Route; use Joomla\Component\Content\Administrator\Extension\ContentComponent; use Joomla\Component\Content\Site\Helper\RouteHelper; use Joomla\Database\DatabaseAwareInterface; use Joomla\Database\DatabaseAwareTrait; use Joomla\Registry\Registry; use Joomla\String\StringHelper; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Helper for mod_articles_category * * @since 1.6 */ class ArticlesCategoryHelper implements DatabaseAwareInterface { use DatabaseAwareTrait; /** * Retrieve a list of article * * @param Registry $params The module parameters. * @param SiteApplication $app The current application. * * @return object[] * * @since 4.4.0 */ public function getArticles(Registry $params, SiteApplication $app) { $factory = $app->bootComponent('com_content')->getMVCFactory(); // Get an instance of the generic articles model $articles = $factory->createModel('Articles', 'Site', ['ignore_request' => true]); // Set application parameters in model $input = $app->getInput(); $appParams = $app->getParams(); $articles->setState('params', $appParams); $articles->setState('list.start', 0); $articles->setState('filter.published', ContentComponent::CONDITION_PUBLISHED); // Set the filters based on the module params $articles->setState('list.limit', (int) $params->get('count', 0)); $articles->setState('load_tags', $params->get('show_tags', 0) || $params->get('article_grouping', 'none') === 'tags'); // Access filter $access = !ComponentHelper::getParams('com_content')->get('show_noauth'); $authorised = Access::getAuthorisedViewLevels($app->getIdentity()->get('id')); $articles->setState('filter.access', $access); // Prep for Normal or Dynamic Modes $mode = $params->get('mode', 'normal'); switch ($mode) { case 'dynamic': $option = $input->get('option'); $view = $input->get('view'); if ($option === 'com_content') { switch ($view) { case 'category': case 'categories': $catids = [$input->getInt('id')]; break; case 'article': if ($params->get('show_on_article_page', 1)) { $article_id = $input->getInt('id'); $catid = $input->getInt('catid'); if (!$catid) { // Get an instance of the generic article model $article = $factory->createModel('Article', 'Site', ['ignore_request' => true]); $article->setState('params', $appParams); $article->setState('filter.published', 1); $article->setState('article.id', (int) $article_id); $item = $article->getItem(); $catids = [$item->catid]; } else { $catids = [$catid]; } } else { // Return right away if show_on_article_page option is off return; } break; default: // Return right away if not on the category or article views return; } } else { // Return right away if not on a com_content page return; } break; default: $catids = $params->get('catid'); $articles->setState('filter.category_id.include', (bool) $params->get('category_filtering_type', 1)); break; } // Category filter if ($catids) { if ($params->get('show_child_category_articles', 0) && (int) $params->get('levels', 0) > 0) { // Get an instance of the generic categories model $categories = $factory->createModel('Categories', 'Site', ['ignore_request' => true]); $categories->setState('params', $appParams); $levels = $params->get('levels', 1) ?: 9999; $categories->setState('filter.get_children', $levels); $categories->setState('filter.published', 1); $categories->setState('filter.access', $access); $additional_catids = []; foreach ($catids as $catid) { $categories->setState('filter.parentId', $catid); $recursive = true; $items = $categories->getItems($recursive); if ($items) { foreach ($items as $category) { $condition = (($category->level - $categories->getParent()->level) <= $levels); if ($condition) { $additional_catids[] = $category->id; } } } } $catids = array_unique(array_merge($catids, $additional_catids)); } $articles->setState('filter.category_id', $catids); } // Ordering $ordering = $params->get('article_ordering', 'a.ordering'); switch ($ordering) { case 'random': $articles->setState('list.ordering', $this->getDatabase()->getQuery(true)->rand()); break; case 'rating_count': case 'rating': $articles->setState('list.ordering', $ordering); $articles->setState('list.direction', $params->get('article_ordering_direction', 'ASC')); if (!PluginHelper::isEnabled('content', 'vote')) { $articles->setState('list.ordering', 'a.ordering'); } break; default: $articles->setState('list.ordering', $ordering); $articles->setState('list.direction', $params->get('article_ordering_direction', 'ASC')); break; } // Filter by multiple tags $articles->setState('filter.tag', $params->get('filter_tag', [])); $articles->setState('filter.featured', $params->get('show_front', 'show')); $articles->setState('filter.author_id', $params->get('created_by', [])); $articles->setState('filter.author_id.include', $params->get('author_filtering_type', 1)); $articles->setState('filter.author_alias', $params->get('created_by_alias', [])); $articles->setState('filter.author_alias.include', $params->get('author_alias_filtering_type', 1)); $excluded_articles = $params->get('excluded_articles', ''); if ($excluded_articles) { $excluded_articles = explode("\r\n", $excluded_articles); $articles->setState('filter.article_id', $excluded_articles); // Exclude $articles->setState('filter.article_id.include', false); } $date_filtering = $params->get('date_filtering', 'off'); if ($date_filtering !== 'off') { $articles->setState('filter.date_filtering', $date_filtering); $articles->setState('filter.date_field', $params->get('date_field', 'a.created')); $articles->setState('filter.start_date_range', $params->get('start_date_range', '1000-01-01 00:00:00')); $articles->setState('filter.end_date_range', $params->get('end_date_range', '9999-12-31 23:59:59')); $articles->setState('filter.relative_date', $params->get('relative_date', 30)); } // Filter by language $articles->setState('filter.language', $app->getLanguageFilter()); $items = $articles->getItems(); // Display options $show_date = $params->get('show_date', 0); $show_date_field = $params->get('show_date_field', 'created'); $show_date_format = $params->get('show_date_format', 'Y-m-d H:i:s'); $show_category = $params->get('show_category', 0); $show_hits = $params->get('show_hits', 0); $show_author = $params->get('show_author', 0); $show_introtext = $params->get('show_introtext', 0); $introtext_limit = $params->get('introtext_limit', 100); // Find current Article ID if on an article page $option = $input->get('option'); $view = $input->get('view'); if ($option === 'com_content' && $view === 'article') { $active_article_id = $input->getInt('id'); } else { $active_article_id = 0; } // Prepare data for display using display options foreach ($items as &$item) { $item->slug = $item->id . ':' . $item->alias; if ($access || \in_array($item->access, $authorised)) { // We know that user has the privilege to view the article $item->link = Route::_(RouteHelper::getArticleRoute($item->slug, $item->catid, $item->language)); } else { $menu = $app->getMenu(); $menuitems = $menu->getItems('link', 'index.php?option=com_users&view=login'); if (isset($menuitems[0])) { $Itemid = $menuitems[0]->id; } elseif ($input->getInt('Itemid') > 0) { // Use Itemid from requesting page only if there is no existing menu $Itemid = $input->getInt('Itemid'); } $item->link = Route::_('index.php?option=com_users&view=login&Itemid=' . $Itemid); } // Used for styling the active article $item->active = $item->id == $active_article_id ? 'active' : ''; $item->displayDate = ''; if ($show_date) { $item->displayDate = HTMLHelper::_('date', $item->$show_date_field, $show_date_format); } if ($item->catid) { $item->displayCategoryLink = Route::_(RouteHelper::getCategoryRoute($item->catid, $item->category_language)); $item->displayCategoryTitle = $show_category ? '' . $item->category_title . '' : ''; } else { $item->displayCategoryTitle = $show_category ? $item->category_title : ''; } $item->displayHits = $show_hits ? $item->hits : ''; $item->displayAuthorName = $show_author ? $item->author : ''; if ($show_introtext) { $item->introtext = HTMLHelper::_('content.prepare', $item->introtext, '', 'mod_articles_category.content'); $item->introtext = self::_cleanIntrotext($item->introtext); } $item->displayIntrotext = $show_introtext ? self::truncate($item->introtext, $introtext_limit) : ''; $item->displayReadmore = $item->alternative_readmore; } // Check if items need be grouped $article_grouping = $params->get('article_grouping', 'none'); $article_grouping_direction = $params->get('article_grouping_direction', 'ksort'); $grouped = $article_grouping !== 'none'; if ($items && $grouped) { switch ($article_grouping) { case 'year': case 'month_year': $items = ArticlesCategoryHelper::groupByDate( $items, $article_grouping_direction, $article_grouping, $params->get('month_year_format', 'F Y'), $params->get('date_grouping_field', 'created') ); break; case 'author': case 'category_title': $items = ArticlesCategoryHelper::groupBy($items, $article_grouping, $article_grouping_direction); break; case 'tags': $items = ArticlesCategoryHelper::groupByTags($items, $article_grouping_direction); break; } } return $items; } /** * Get a list of articles from a specific category * * @param Registry &$params object holding the models parameters * * @return array The array of users * * @since 1.6 * * @deprecated 4.4.0 will be removed in 6.0 * Use the non-static method getArticles * Example: Factory::getApplication()->bootModule('mod_articles_category', 'site') * ->getHelper('ArticlesCategoryHelper') * ->getArticles($params, Factory::getApplication()) */ public static function getList(&$params) { /* @var SiteApplication $app */ $app = Factory::getApplication(); return (new self())->getArticles($params, $app); } /** * Strips unnecessary tags from the introtext * * @param string $introtext introtext to sanitize * * @return string * * @since 1.6 */ public static function _cleanIntrotext($introtext) { $introtext = str_replace(['

    ', '

    '], ' ', $introtext); $introtext = strip_tags($introtext, ''); return trim($introtext); } /** * Method to truncate introtext * * The goal is to get the proper length plain text string with as much of * the html intact as possible with all tags properly closed. * * @param string $html The content of the introtext to be truncated * @param int $maxLength The maximum number of characters to render * * @return string The truncated string * * @since 1.6 */ public static function truncate($html, $maxLength = 0) { $baseLength = \strlen($html); // First get the plain text string. This is the rendered text we want to end up with. $ptString = HTMLHelper::_('string.truncate', $html, $maxLength, true, false); for ($maxLength; $maxLength < $baseLength;) { // Now get the string if we allow html. $htmlString = HTMLHelper::_('string.truncate', $html, $maxLength, true, true); // Now get the plain text from the html string. $htmlStringToPtString = HTMLHelper::_('string.truncate', $htmlString, $maxLength, true, false); // If the new plain text string matches the original plain text string we are done. if ($ptString === $htmlStringToPtString) { return $htmlString; } // Get the number of html tag characters in the first $maxlength characters $diffLength = \strlen($ptString) - \strlen($htmlStringToPtString); // Set new $maxlength that adjusts for the html tags $maxLength += $diffLength; if ($baseLength <= $maxLength || $diffLength <= 0) { return $htmlString; } } return $ptString; } /** * Groups items by field * * @param array $list list of items * @param string $fieldName name of field that is used for grouping * @param string $direction ordering direction * @param null $fieldNameToKeep field name to keep * * @return array * * @since 1.6 */ public static function groupBy($list, $fieldName, $direction, $fieldNameToKeep = null) { $grouped = []; if (!\is_array($list)) { if ($list === '') { return $grouped; } $list = [$list]; } foreach ($list as $key => $item) { if (!isset($grouped[$item->$fieldName])) { $grouped[$item->$fieldName] = []; } if ($fieldNameToKeep === null) { $grouped[$item->$fieldName][$key] = $item; } else { $grouped[$item->$fieldName][$key] = $item->$fieldNameToKeep; } unset($list[$key]); } $direction($grouped); return $grouped; } /** * Groups items by date * * @param array $list list of items * @param string $direction ordering direction * @param string $type type of grouping * @param string $monthYearFormat date format to use * @param string $field date field to group by * * @return array * * @since 1.6 */ public static function groupByDate($list, $direction = 'ksort', $type = 'year', $monthYearFormat = 'F Y', $field = 'created') { $grouped = []; if (!\is_array($list)) { if ($list === '') { return $grouped; } $list = [$list]; } foreach ($list as $key => $item) { switch ($type) { case 'month_year': $month_year = StringHelper::substr($item->$field, 0, 7); if (!isset($grouped[$month_year])) { $grouped[$month_year] = []; } $grouped[$month_year][$key] = $item; break; default: $year = StringHelper::substr($item->$field, 0, 4); if (!isset($grouped[$year])) { $grouped[$year] = []; } $grouped[$year][$key] = $item; break; } unset($list[$key]); } $direction($grouped); if ($type === 'month_year') { foreach ($grouped as $group => $items) { $date = new Date($group); $formatted_group = $date->format($monthYearFormat); $grouped[$formatted_group] = $items; unset($grouped[$group]); } } return $grouped; } /** * Groups items by tags * * @param array $list list of items * @param string $direction ordering direction * * @return array * * @since 3.9.0 */ public static function groupByTags($list, $direction = 'ksort') { $grouped = []; $untagged = []; if (!$list) { return $grouped; } foreach ($list as $item) { if ($item->tags->itemTags) { foreach ($item->tags->itemTags as $tag) { $grouped[$tag->title][] = $item; } } else { $untagged[] = $item; } } $direction($grouped); if ($untagged) { $grouped['MOD_ARTICLES_CATEGORY_UNTAGGED'] = $untagged; } return $grouped; } } mod_jbusiness_events/mod_jbusiness_events.xml000064400000022252152163637060015762 0ustar00 JBusinessDirectory - Events August 2015 CMSJunkie (C) CMSJunkie. All rights reserved. http://www.gnu.org/copyleft/gpl.html info@cmsjunkie.com www.cmsjunkie.com 3.1.0 Display the events based on selected criterias mod_jbusiness_events.php assets tmpl helper.php index.html mod_jbusiness_events.xml language/de-DE/de-DE.mod_jbusiness_events.ini language/de-DE/de-DE.mod_jbusiness_events.sys.ini language/en-GB/en-GB.mod_jbusiness_events.ini language/en-GB/en-GB.mod_jbusiness_events.sys.ini language/es-ES/es-ES.mod_jbusiness_events.ini language/es-ES/es-ES.mod_jbusiness_events.sys.ini language/fr-FR/fr-FR.mod_jbusiness_events.ini language/fr-FR/fr-FR.mod_jbusiness_events.sys.ini language/nl-NL/nl-NL.mod_jbusiness_events.ini language/nl-NL/nl-NL.mod_jbusiness_events.sys.ini language/pt-PT/pt-PT.mod_jbusiness_events.ini language/pt-PT/pt-PT.mod_jbusiness_events.sys.ini
    mod_jbusiness_events/assets/js/script.js000064400000001062152163637060014564 0ustar00function addCoordinatesToUrl(position){ var latitude = position.coords.latitude; var longitude = position.coords.longitude; var newURLString = window.location.href; newURLString += ((newURLString.indexOf('?') == -1) ? '?' : '&'); newURLString += "latitude="+latitude; newURLString += ((newURLString.indexOf('?') == -1) ? '?' : '&'); newURLString += "longitude="+longitude; window.location.href = newURLString; // The page will redirect instantly } function goToLink(link){ document.location.href=link; }mod_jbusiness_events/assets/js/index.html000064400000000040152163637060014712 0ustar00 mod_jbusiness_events/assets/index.html000064400000000037152163637060014304 0ustar00 mod_jbusiness_events/assets/style.css000064400000005632152163637060014167 0ustar00/*-----------simple - events --------------*/ #events-container { width: 100%; } #events-container .events-wrapper { display: inline-block; margin: 0 auto; text-align: left; } #events-container .event-item { background-color: #F1F1F1; margin-bottom: 20px; margin-top: 5px; position: relative; text-align: center; } #events-container .event-item a{ color: #111; } #events-container .event-content { display: block; } #events-container h3 { color: #555; font-size: 17px; margin: 10px 0 5px 0; } #events-container h3 a { color: #555; } #events-container .event-image { margin: 0; padding: 0; } #events-container .item-thumbnail{ text-align: center; } #events-container .item-thumbnail img { height: 100%; width: auto; max-width: none; } #events-container .event-description { margin: 10px 0; } #events-container .entry-date { background: #575756 none repeat scroll 0 0; border-radius: 2px; box-sizing: border-box; color: #fff; left: 20px; font-size: 14px; font-weight: 600; line-height: normal; padding: 10px 10px 12px; position: absolute; text-align: center; top: -9px; transition: all 0.4s ease 0s; width: 90px; z-index: 11; } #events-container .entry-date .day { display: block; font-size: 22px; line-height: 28px; } #events-container .entry-date .month { text-transform: uppercase; } #events-container .item-location{ background: #919191 none repeat scroll 0 0; padding: 7px 20px; text-align: center; line-height: 20px; } #events-container .item-location a{ color: #FFFFFF; font-weight: 700; font-size: 13px; } .latest-events.view-all-items{ text-align: center; } .latest-events .view-all-items a{ background-color: white; border: 1px solid rgba(0, 0, 0, 0.075); border-radius: 3px; font-size: 14px; padding: 6px 18px; } .latest-events.view-all-items a:hover{ background-color: #F0F0F0; } /*-----------end simple - events --------------*/ .view-all-items{ display: block; text-align: center; } .company-info{ padding: 10px 0; margin: 0; float: none; } .mod-items-list .list-item{ background-color: #fff; color: #555; } .mod-items-list .item-name{ font-size: 18px; font-weight: 500; } .mod-items-list .listing-name{ font-size: 15px; } .mod-items-list .btn{ text-transform: none !important; } .mod-items-list .jitem-img-wrap{ height: 100%; } .mod-items-list .jitem-img-wrap > a{ position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 2; cursor: pointer; } .mod-items-list .jitem-img-wrap > img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }mod_jbusiness_events/mod_jbusiness_events.php000064400000006037152163637060015754 0ustar00get('viewtype') == 'slider') { JBusinessUtil::enqueueStyle('libraries/slick/slick.css'); JBusinessUtil::enqueueScript('libraries/slick/slick.js'); } if ($appSettings->enable_ratings) { JBusinessUtil::enqueueStyle('libraries/star-rating/star-rating.css'); JBusinessUtil::enqueueScript('libraries/star-rating/star-rating.js'); } JBusinessUtil::loadBaseScripts(); require_once HELPERS_PATH.'/translations.php'; // Include the syndicate functions only once require_once __DIR__ . '/helper.php'; JBusinessUtil::loadSiteLanguage(); JBusinessUtil::includeCSSLibraries(); //load items through cache mechanism $cache = Factory::getCache('mod_jbusiness_events', ''); if ($cache->contains($module->id)) { $items = $cache->get($module->id); } else { $items = modJBusinessEventsHelper::getList($params); $cache->store($items, $module->id, 'mod_jbusiness_events'); } $showLocation = $params->get('showLocation'); $showListingName = $params->get('showlistingName'); $newTab = ($appSettings->open_listing_on_new_tab)?" target='_blank'":""; if ($appSettings->enable_multilingual) { JBusinessDirectoryTranslations::updateEventsTranslation($items); } $moduleclass_sfx = htmlspecialchars((string)$params->get('moduleclass_sfx')); $backgroundCss=""; if ($params->get('backgroundColor')) { $backgroundCss = "background-color:".$params->get('backgroundColor').";"; } $borderCss=""; if ($params->get('borderColor')) { $borderCss="border-color:".$params->get('borderColor').";"; } $menuItemId = JBusinessUtil::getApplicationSettings()->menu_item_id; $categoryParam = ""; $categoriesIds = $params->get('categoryIds'); if (isset($categoriesIds) && count($categoriesIds)>0 && $categoriesIds[0]!= 0 && $categoriesIds[0]!= "") { $categoryParam="&categorySearch=".$categoriesIds[0]; } $menuItemId =""; if ($params->get('mItemId')) { $menuItemId="&Itemid=".$params->get('mItemId'); } $viewAllLink = JRoute::_('index.php?option=com_jbusinessdirectory&view=events&resetSearch=1'.$menuItemId.$categoryParam); $span = $params->get('layout-type')=="vertical"?"col-12":$params->get('phoneGridOption', 'col-12').' '.$params->get('tabletGridOption', 'col-md-6').' '.$params->get('desktopGridOption', "col-lg-4"); require JModuleHelper::getLayoutPath('mod_jbusiness_events', "default_".$params->get('viewtype')); mod_jbusiness_events/tmpl/default_slider.php000064400000021644152163637060015467 0ustar00get('rtl'); $showLocation = isset($showLocation)?$showLocation:1; $appSettings = JBusinessUtil::getApplicationSettings(); $enablePackages = $appSettings->enable_packages; $idnt = rand(500, 1500); $sliderId = rand(1000,10000); $sliderParams = array(); $sliderParams['sliderId'] = $sliderId; $sliderParams['autoplay'] = $params->get('autoplay') ? true : false; $sliderParams['autoplaySpeed'] = $params->get('autoplaySpeed'); $sliderParams['nrVisibleItems'] = $params->get('nrVisibleItems'); $sliderParams['nrItemsToScrool'] = $params->get('nrItemsToScrool'); $sliderParams['rtl'] = $dir ? true : false; $user = JBusinessUtil::getUser(); $showData = !($user->id==0 && $appSettings->show_details_user == 1); $db = JFactory::getDBO(); require_once BD_CLASSES_PATH.'/attributes/attributeservice.php'; ?>
    logoLocation) && $item->logoLocation!='') { ?> <?php echo $item->picture_info ?> <?php echo $item->name ?>
    company_id) && !empty($item->companyName)){ ?>
    href="company_id) ?>">companyName; ?>
    phone) && $showData && (isset($item->packageFeatures) && in_array(PHONE,$item->packageFeatures) || !$enablePackages)) { ?>
    phone, ENT_QUOTES) ?>
    website) && (isset($item->packageFeatures) && in_array(WEBSITE_ADDRESS,$item->packageFeatures) || !$enablePackages)){ if ($appSettings->enable_link_following){ $followLink = (isset($item->packageFeatures) && in_array(LINK_FOLLOW,$item->packageFeatures) && $enablePackages)?'rel="follow noopener"' : 'rel="nofollow noopener"'; }else{ $followLink ='rel="noopener"'; }?> customAttributes)) { ?>
    customAttributes as $attribute) { $icons = AttributeService::getAttributeIcons($attribute, $appSettings->enable_packages, $item->packageFeatures); $color = !empty($attribute->color)?$attribute->color:''; if(!empty($icons)) { foreach($icons as $icon) echo ''; } }?>
    name ?>
    start_date); if(!empty($dates)) { ?> show_start_time && !empty($item->start_time)) { ?> / show_start_time ? JBusinessUtil::convertTimeToFormat($item->start_time) : "") ?>
    mainCategoryIcon)){ ?>
    get('showviewall')){?>
    mod_jbusiness_events/tmpl/default_simple.php000064400000010024152163637060015464 0ustar00
    $item){ $counter++?>
    start_date)){ ?>

    start_date) ?>

    start_date) ?> start_date) ?>

    picture_path)){?> <?php echo $item->picture_info ?> <?php echo stripslashes($item->name)?>
    show_start_time && !empty($item->start_time)){?>
    show_start_time?JBusinessUtil::convertTimeToFormat($item->start_time):"")." ".(!empty($item->end_time) && $item->show_end_time?"-":"")." ".($item->show_end_time?JBusinessUtil::convertTimeToFormat($item->end_time):""); ?>
    item_decouple && $showListingName && !empty($item->company_id)){?> href="company_id) ?>">companyName; ?>
    short_description ?>
    city)) { ?>
    3){?>
    get('showviewall')){?>
    mod_jbusiness_events/tmpl/default.php000064400000012663152163637060014126 0ustar00
    start_date)){ ?>

    start_date) ?>

    start_date) ?> start_date) ?>

    logoLocation) && $item->logoLocation!='') { ?> <?php echo $item->picture_info ?> <?php echo $item->name ?>
    show_start_time && !empty($item->start_time)){?>
    show_start_time?JBusinessUtil::convertTimeToFormat($item->start_time):"")." ".(!empty($item->end_time) && $item->show_end_time?"-":"")." ".($item->show_end_time?JBusinessUtil::convertTimeToFormat($item->end_time):""); ?>
    slogan)) { echo $item->slogan; } else if(!empty($item->short_description)) { echo JBusinessUtil::truncate($item->short_description, 200); } else if(!empty($item->description)) { echo JBusinessUtil::truncate($item->description, 200); } ?>
    $index){ ?>
    get('showviewall')){?>
    mod_jbusiness_events/tmpl/default_list.php000064400000010672152163637060015157 0ustar00
    picture_path)){?> <?php echo $item->picture_info ?> <?php echo stripslashes($item->name)?>
    company_id)){ ?> start_date); if(!empty($dates)) { ?>
    show_start_time && !empty($item->start_time)) { ?> / show_start_time ? JBusinessUtil::convertTimeToFormat($item->start_time) : "") ?>
    get('showviewall')){?>
    mod_jbusiness_events/tmpl/default_simple_2.php000064400000010327152163637060015713 0ustar00
    $item){ $counter++?>
    picture_path)){?> <?php echo $item->picture_info ?> <?php echo stripslashes($item->name)?>
    start_date)){ ?>
    start_date) ?> start_date) ?>
    show_start_time && !empty($item->start_time)){?>

    show_start_time?JBusinessUtil::convertTimeToFormat($item->start_time):"")." ".(!empty($item->end_time) && $item->show_end_time?"-":"")." ".($item->show_end_time?JBusinessUtil::convertTimeToFormat($item->end_time):""); ?>

    city)){ ?>

    city ?>

    phone)) {?>

    phone ?>

    company_id)){ ?>
    get('showviewall')){?>
    mod_jbusiness_events/tmpl/index.html000064400000000037152163637060013756 0ustar00 mod_jbusiness_events/helper.php000064400000005764152163637060013011 0ustar00get('categoryIds'); if (isset($categoriesIds) && count($categoriesIds)>0 && $categoriesIds[0]!= 0 && $categoriesIds[0]!= "") { $searchDetails["categoriesIds"] = $categoriesIds; } if(isset($_REQUEST["current_event"]) && $params->get('event_link')){ $event = $_REQUEST["current_event"]; $searchDetails["categoriesIDs"] = array($event->main_subcategory); $searchDetails["excluded_event"] = $event->id; } $packages = $params->get('packages'); if (!empty($packages)) { $searchDetails["packages"] = $packages; } $ordering = $params->get('order'); if ($ordering == 1) { $orderBy ="co.created desc"; } elseif ($ordering == 2) { $orderBy ="co.id desc"; } elseif ($ordering == 3) { $orderBy ="co.name asc"; } elseif ($ordering == 4) { $orderBy ="co.start_date asc"; } else { $orderBy = " rand() "; } $nrResults = $params->get('count'); $searchDetails["enablePackages"] = $appSettings->enable_packages; $searchDetails["showPendingApproval"] = ($appSettings->enable_item_moderation=='0' || ($appSettings->enable_item_moderation=='1' && $appSettings->show_pending_approval == '1')); $searchDetails["orderBy"] = $orderBy; $searchDetails["featured"] = $params->get('only_featured'); $searchDetails["citySearch"] = $params->get('city'); $searchDetails["regionSearch"] = $params->get('region'); $searchDetails["typeSearch"] = $params->get('type'); $radius = $params->get('radius'); $latitude = JFactory::getApplication()->input->get("latitude"); $longitude = JFactory::getApplication()->input->get("longitude"); $searchDetails["radius"] = $radius; if ($params->get('geo_location')) { $searchDetails["latitude"] = $latitude; $searchDetails["longitude"] = $longitude; } JTable::addIncludePath(JPATH_ROOT.'/administrator/components/com_jbusinessdirectory/tables'); $eventsTable = JTable::getInstance("Event", "JTable"); $events = $eventsTable->getEventsByCategories($searchDetails, 0, $nrResults); foreach ($events as $event) { $event->link = JBusinessUtil::getEventLink($event->id, $event->alias, true); $event->picture_path = str_replace(" ", "%20", $event->picture_path); $event->logoLocation = $event->picture_path; // $event->mainCategoryLink = JBusinessUtil::getEventCategoryLink($event->mainCategoryId, $event->mainCategoryAlias); } if ($appSettings->enable_multilingual) { JBusinessDirectoryTranslations::updateEventsTranslation($events); JBusinessDirectoryTranslations::updateEventTypesTranslation($events); } return $events; } } mod_jbusiness_events/index.html000064400000000037152163637060013002 0ustar00 mod_easyblogmostcommentedpost/mod_easyblogmostcommentedpost.xml000064400000014725152163637060021632 0ustar00 EasyBlog - Most Commented Post Module Stack Ideas Sdn Bhd 26th April 2022 Copyright 2009 - 2015 Stack Ideas Sdn Bhd. All rights reserved. GPL License v2 support@stackideas.com http://stackideas.com 6.0.5 en-GB.mod_easyblogmostcommentedpost.ini tmpl helper.php mod_easyblogmostcommentedpost.php mod_easyblogmostcommentedpost.xml
    https://stackideas.com/joomla4compat.xml
    mod_easyblogmostcommentedpost/mod_easyblogmostcommentedpost.php000064400000002770152163637060021616 0ustar00config; $data = $helper->getMostCommentedPost(); if (!$data) { return; } // Process the posts $posts = $modules->processItems($data); $textcount = $params->get('textcount', 150); $layout = $params->get('module_layout', 'vertical'); // Get photo layout and alignment settings $photoLayout = $modules->getCoverLayout(); $photoAlignment = $modules->getCoverAlignment(); // EasyBlog 5.0.x backward compatible fixes if (!in_array($layout, array('vertical', 'horizontal'))) { $layout = 'vertical'; } $columnCount = $params->get('column'); $disabled = $params->get('enableratings') ? false : true; require($modules->getLayout()); mod_easyblogmostcommentedpost/tmpl/default_vertical.php000064400000001551152163637060017732 0ustar00
    mod_easyblogmostcommentedpost/tmpl/default_item_heading.php000064400000003416152163637060020540 0ustar00
    get('showavatar', false)) { ?> get('showtavatar', false) && $post->isTeamBlog()) { ?>
    get('showauthor', false)) { ?> getAuthor()->getName(); ?> get('showdate' , true)) { ?>
    getCreationDate(true)->format($params->get('dateformat', JText::_('DATE_FORMAT_LC3'))); ?>
    mod_easyblogmostcommentedpost/tmpl/default_horizontal.php000064400000002121152163637060020304 0ustar00
    config->get('main_ratings') && $params->get('showratings', false) && $post->showRating) { ?>
    html($post, 'ebmostcommentedpost-' . $post->id . '-ratings', JText::_('MOD_EASYBLOG_RATEBLOG'), $disabled); ?>
    get('showhits' , false) || $params->get('showcommentcount', false) || $params->get('showreadmore', true)) { ?>
    get('showhits' , true)) { ?>
    hits;?>
    get('showcommentcount', false)) { ?> get('showreadmore', true)) { ?>
    mod_easyblogmostcommentedpost/tmpl/default_item_content.php000064400000007466152163637060020624 0ustar00 posttype == 'quote') { ?>
    title);?>
    content; ?>
    posttype == 'video' && !empty($post->videos) && $params->get('video_show', false)) { ?>
    videos as $video) { ?>
    html; ?>
    posttype, array('twitter', 'link'))) { ?> get('photo_show', true) && $post->cover) { ?>
    full) && $photoLayout->full) ? "is-full" : '';?>"> isCoverImage) { ?> crop) && $photoLayout->crop) { ?> <?php echo $post->title;?> <?php echo $post->title;?> isCoverImage) { ?> isEmbedCover()) { ?>
    videoEmbedCover; ?>
    videoCover; ?>
    get('showcategory', true)) { ?> getCategories() as $category) { ?>
    getTitle(); ?>
    posttype != 'quote' && $params->get('showintro', '-1') != '-1') { ?>
    protect) { ?> content; ?> summary; ?>
    mod_easyblogmostcommentedpost/tmpl/default.php000064400000002725152163637060016045 0ustar00
    ">
    get('allentrieslink', false)) { ?>
    config->get('main_ratings')) { ?> mod_easyblogmostcommentedpost/helper.php000064400000006603152163637060014723 0ustar00lib = $modules; $this->params = $this->lib->params; } public function getMostCommentedPost() { $db = EB::db(); $my = JFactory::getUser(); $config = $this->lib->config; $count = (int) trim($this->params->get('count', 0)); $categories = $this->params->get('catid'); $interval = (int) $this->params->get('interval', 0); $showBlockedUserPosts = $config->get('main_show_blockeduserposts', 0); $catAccess = array(); // Respect inclusion categories if (!empty($categories)) { if (!is_array($categories)) { $categories = array($categories); } $catAccess['include'] = $categories; } $showprivate = $this->params->get('showprivate', true); $query = 'SELECT a.*, count(b.' . $db->quoteName('id') . ') as ' . $db->quoteName('comment_count'); $query .= ' FROM ' . $db->quoteName('#__easyblog_post') . ' AS a'; if (!$showBlockedUserPosts) { //exlude blocked users posts $query .= ' INNER JOIN `#__users` as uu on a.`created_by` = uu.`id` and uu.`block` = 0'; } $query .= ' LEFT JOIN ' . $db->quoteName('#__easyblog_comment') . ' AS b ON a.' . $db->quoteName('id') . ' = b.' . $db->quoteName('post_id'); $query .= ' WHERE a.' . $db->quoteName('published') . ' = ' . $db->Quote(EASYBLOG_POST_PUBLISHED); $query .= ' AND a.' . $db->quoteName('state') . ' = ' . $db->Quote(EASYBLOG_POST_NORMAL); // Add interval checks if ($interval) { $now = EB::date()->toSql(); $query .= ' AND b.' . $db->quoteName('created') . ' >= DATE_SUB(' . $db->Quote($now) . ', INTERVAL ' . $interval . ' DAY)'; } if(!$showprivate) $query .= ' AND a.' . $db->quoteName('access') . ' = ' . $db->Quote('0'); // contribution type sql $contributor = EB::contributor(); $contributeSQL = ' AND ((a.`source_type` = ' . $db->Quote(EASYBLOG_POST_SOURCE_SITEWIDE) . ') '; if ($config->get('main_includeteamblogpost')) { $contributeSQL .= $contributor::genAccessSQL(EASYBLOG_POST_SOURCE_TEAM, 'a'); } $contributeSQL .= ')'; $query .= $contributeSQL; // category access here $catLib = EB::category(); if ($config->get('main_category_privacy')) { $catAccessSQL = $catLib->genAccessSQL('a.`id`', $catAccess); $query .= ' AND (' . $catAccessSQL . ')'; } else { $catAccessSQL = $catLib->genBasicSQL('a.`id`', $catAccess); if ($catAccessSQL) { $query .= ' AND ' . $catAccessSQL; } } $query .= ' GROUP BY a.' . $db->quoteName('id'); $query .= ' HAVING (' . $db->quoteName('comment_count') . ' > 0)'; $query .= ' ORDER BY ' . $db->quoteName('comment_count') . ' DESC'; if ($count > 0) { $query .= ' LIMIT ' . $count; } $db->setQuery($query); $posts = $db->loadObjectList(); return $posts; } } mod_easyblogtagcloud/mod_easyblogtagcloud.php000064400000001776152163637060015657 0ustar00get('layout', 'default'); // Get the list of tags $tags = $helper->getTagCloud(); require($modules->getLayout()); mod_easyblogtagcloud/mod_easyblogtagcloud.xml000064400000006724152163637060015666 0ustar00 EasyBlog - Tag Cloud Module Stack Ideas Sdn Bhd 26th April 2022 Copyright 2009 - 2015 Stack Ideas Sdn Bhd. All rights reserved. GPL License v2 support@stackideas.com http://stackideas.com 6.0.5 en-GB.mod_easyblogtagcloud.ini tmpl helper.php mod_easyblogtagcloud.php mod_easyblogtagcloud.xml
    https://stackideas.com/joomla4compat.xml
    mod_easyblogtagcloud/tmpl/list.php000064400000002341152163637060013404 0ustar00 mod_easyblogtagcloud/tmpl/default.php000064400000001761152163637060014062 0ustar00 mod_easyblogtagcloud/helper.php000064400000005243152163637060012740 0ustar00lib = $modules; $this->params = $this->lib->params; } public function getTagCloud() { $order = $this->params->get('order', 'postcount'); $sort = $this->params->get('sort', 'desc'); $count = (int) trim( $this->params->get('count', 0) ); $shuffeTags = $this->params->get('shuffleTags', true); $min_size = $this->params->get('minsize', '10'); $max_size = $this->params->get('maxsize', '30'); $categoryBased = $this->params->get('categoryBased', false); $view = $this->input->get('view', '', 'var'); $layout = $this->input->get('layout', '', 'var'); // If this is not categories view, categoryBased is not usable if ($view != 'categories' && $layout != 'listings') { $categoryBased = false; } // if category-Based tags is enabled, we should get the category ID if ($categoryBased) { $id = $this->input->get('id', '', 'var'); $categoryBased = $id; } $model = EB::model('Tags'); $tagCloud = $model->getTagCloud($count, $order, $sort, false, '', $categoryBased); $extraInfo = array(); $moduleLayout = $this->params->get('layout', 'default'); // Remove the _: from the value $moduleLayout = str_replace('_:', '', $moduleLayout); if ($moduleLayout == 'default' && $shuffeTags) { shuffle($tagCloud); } $tags = []; // get the count for every tag foreach ($tagCloud as $item) { $tag = EB::table('Tag'); $tag->bind($item); $tag->post_count = $item->post_count; $tags[] = $tag; $extraInfo[] = $item->post_count; } $minimum_count = 0; $maximum_count = 0; // get the min and max if (!empty($extraInfo)) { $minimum_count = min($extraInfo); $maximum_count = max($extraInfo); } $spread = $maximum_count - $minimum_count; if ($spread == 0) { $spread = 1; } $cloud_html = ''; $cloud_tags = array(); //foreach ($tags as $tag => $count) for ($i = 0; $i < count($tags); $i++) { $row =& $tags[$i]; $size = $min_size + ($row->post_count - $minimum_count) * ($max_size - $min_size) / $spread; $row->fontsize = $size; } return $tags; } }mod_easyblogshowcase/mod_easyblogshowcase.xml000064400000013307152163637060015705 0ustar00 EasyBlog - Showcase Module Stack Ideas Sdn Bhd 26th April 2022 Copyright 2009 - 2015 Stack Ideas Sdn Bhd. All rights reserved. GPL License v2 support@stackideas.com http://stackideas.com 6.0.5 en-GB.mod_easyblogshowcase.ini tmpl helper.php mod_easyblogshowcase.php mod_easyblogshowcase.xml
    https://stackideas.com/joomla4compat.xml
    mod_easyblogshowcase/tmpl/card.php000064400000003523152163637060013357 0ustar00
    html('featured.slider', $posts, [ 'style' => 'card', 'autoplay' => $autoplay, 'autoplayInterval' => $autoplayInterval, 'navigation' => true, 'image' => $params->get('photo_show', true), 'pickFirstImage' => $params->get('photo_legacy', true), 'postTitle' => true, 'postDate' => $params->get('contentdate', true), 'postDateSource' => 'created', 'postCategory' => true, 'postContent' => true, 'postContentSource' => $params->get('contentfrom', 'content'), 'postContentLimit' => $params->get('textlimit', 200), 'authorAvatar' => $params->get('authoravatar', true), 'authorTitle' => $params->get('contentauthor', true), 'readmore' => $params->get('showreadmore', true), 'ratings' => $params->get('showratings', false), 'cropCover' => $coverLayout->crop, 'coverWidth' => $coverLayout->width, 'coverHeight' => $coverLayout->height, 'coverAlignment' => $coverLayout->alignment, 'fromModule' => true, 'showPlaceholder' => $params->get('show_cover_placeholder', true) ]); ?>
    mod_easyblogshowcase/tmpl/uikit.php000064400000003525152163637060013575 0ustar00
    html('featured.slider', $posts, [ 'style' => 'uikit', 'autoplay' => $autoplay, 'autoplayInterval' => $autoplayInterval, 'navigation' => true, 'image' => $params->get('photo_show', true), 'pickFirstImage' => $params->get('photo_legacy', true), 'postTitle' => true, 'postDate' => $params->get('contentdate', true), 'postDateSource' => 'created', 'postCategory' => true, 'postContent' => true, 'postContentSource' => $params->get('contentfrom', 'content'), 'postContentLimit' => $params->get('textlimit', 200), 'authorAvatar' => $params->get('authoravatar', true), 'authorTitle' => $params->get('contentauthor', true), 'readmore' => $params->get('showreadmore', true), 'ratings' => $params->get('showratings', false), 'cropCover' => $coverLayout->crop, 'coverWidth' => $coverLayout->width, 'coverHeight' => $coverLayout->height, 'coverAlignment' => $coverLayout->alignment, 'fromModule' => true, 'showPlaceholder' => $params->get('show_cover_placeholder', true) ]); ?>
    mod_easyblogshowcase/tmpl/slick.php000064400000003361152163637060013553 0ustar00
    html('featured.slider', $posts, [ 'style' => 'slick', 'autoplay' => $autoplay, 'autoplayInterval' => $autoplayInterval, 'navigation' => true, 'image' => $params->get('photo_show', true), 'pickFirstImage' => $params->get('photo_legacy', true), 'postTitle' => true, 'postDate' => $params->get('contentdate', true), 'postDateSource' => 'created', 'postCategory' => true, 'postContent' => true, 'postContentSource' => $params->get('contentfrom', 'content'), 'postContentLimit' => $params->get('textlimit', 200), 'authorAvatar' => $params->get('authoravatar', true), 'authorTitle' => $params->get('contentauthor', true), 'readmore' => $params->get('showreadmore', true), 'ratings' => $params->get('showratings', false), 'cropCover' => $coverLayout->crop, 'coverWidth' => $coverLayout->width, 'coverHeight' => $coverLayout->height, 'coverAlignment' => $coverLayout->alignment, 'fromModule' => true, 'showPlaceholder' => $params->get('show_cover_placeholder', true) ]); ?>
    mod_easyblogshowcase/tmpl/sidenav.php000064400000003244152163637060014077 0ustar00
    html('featured.slider', $posts, [ 'style' => 'sidenav', 'autoplay' => $autoplay, 'autoplayInterval' => $autoplayInterval, 'navigation' => true, 'image' => $params->get('photo_show', true), 'pickFirstImage' => $params->get('photo_legacy', true), 'postTitle' => true, 'postDate' => $params->get('contentdate', true), 'postDateSource' => 'created', 'postCategory' => true, 'postContent' => true, 'postContentSource' => $params->get('contentfrom', 'content'), 'fromModule' => true, 'postContentLimit' => $params->get('textlimit', 200), 'authorAvatar' => $params->get('authoravatar', true), 'authorTitle' => $params->get('contentauthor', true), 'readmore' => $params->get('showreadmore', true), 'ratings' => $params->get('showratings', false), 'cropCover' => $coverLayout->crop, 'coverWidth' => $coverLayout->width, 'coverHeight' => $coverLayout->height, 'coverAlignment' => $coverLayout->alignment, 'showPlaceholder' => $params->get('show_cover_placeholder', true) ]); ?>
    mod_easyblogshowcase/tmpl/default.php000064400000003513152163637060014071 0ustar00
    html('featured.slider', $posts, [ 'style' => 'default', 'autoplay' => $autoplay, 'autoplayInterval' => $autoplayInterval, 'navigation' => true, 'navigationType' => $params->get('navigation_type', 'default'), 'image' => $params->get('photo_show', true), 'pickFirstImage' => $params->get('photo_legacy', true), 'postTitle' => true, 'postDate' => $params->get('contentdate', true), 'postDateSource' => 'created', 'postCategory' => true, 'postContent' => true, 'postContentSource' => $params->get('contentfrom', 'content'), 'postContentLimit' => $params->get('textlimit', 200), 'authorAvatar' => $params->get('authoravatar', true), 'authorTitle' => $params->get('contentauthor', true), 'readmore' => $params->get('showreadmore', true), 'ratings' => $params->get('showratings', false), 'cropCover' => $coverLayout->crop, 'coverWidth' => $coverLayout->width, 'coverHeight' => $coverLayout->height, 'coverAlignment' => $coverLayout->alignment, 'fromModule' => true, 'showPlaceholder' => $params->get('show_cover_placeholder', true) ]); ?>
    mod_easyblogshowcase/tmpl/thumbnails.php000064400000003366152163637060014621 0ustar00
    html('featured.slider', $posts, [ 'style' => 'thumbnails', 'autoplay' => $autoplay, 'autoplayInterval' => $autoplayInterval, 'navigation' => true, 'image' => $params->get('photo_show', true), 'pickFirstImage' => $params->get('photo_legacy', true), 'postTitle' => true, 'postDate' => $params->get('contentdate', true), 'postDateSource' => 'created', 'postCategory' => true, 'postContent' => true, 'postContentSource' => $params->get('contentfrom', 'content'), 'postContentLimit' => $params->get('textlimit', 200), 'authorAvatar' => $params->get('authoravatar', true), 'authorTitle' => $params->get('contentauthor', true), 'readmore' => $params->get('showreadmore', true), 'ratings' => $params->get('showratings', false), 'cropCover' => $coverLayout->crop, 'coverWidth' => $coverLayout->width, 'coverHeight' => $coverLayout->height, 'coverAlignment' => $coverLayout->alignment, 'fromModule' => true, 'showPlaceholder' => $params->get('show_cover_placeholder', true) ]); ?>
    mod_easyblogshowcase/tmpl/hero.php000064400000003357152163637060013410 0ustar00
    html('featured.slider', $posts, [ 'style' => 'hero', 'autoplay' => $autoplay, 'autoplayInterval' => $autoplayInterval, 'navigation' => true, 'image' => $params->get('photo_show', true), 'pickFirstImage' => $params->get('photo_legacy', true), 'postTitle' => true, 'postDate' => $params->get('contentdate', true), 'postDateSource' => 'created', 'postCategory' => true, 'postContent' => true, 'postContentSource' => $params->get('contentfrom', 'content'), 'postContentLimit' => $params->get('textlimit', 200), 'authorAvatar' => $params->get('authoravatar', true), 'authorTitle' => $params->get('contentauthor', true), 'readmore' => $params->get('showreadmore', true), 'ratings' => $params->get('showratings', false), 'cropCover' => $coverLayout->crop, 'coverWidth' => $coverLayout->width, 'coverHeight' => $coverLayout->height, 'coverAlignment' => $coverLayout->alignment, 'fromModule' => true, 'showPlaceholder' => $params->get('show_cover_placeholder', true) ]); ?>
    mod_easyblogshowcase/tmpl/default_viewall.php000064400000001371152163637060015614 0ustar00 mod_easyblogshowcase/tmpl/magazine.php000064400000003364152163637060014244 0ustar00
    html('featured.slider', $posts, [ 'style' => 'magazine', 'autoplay' => $autoplay, 'autoplayInterval' => $autoplayInterval, 'navigation' => true, 'image' => $params->get('photo_show', true), 'pickFirstImage' => $params->get('photo_legacy', true), 'postTitle' => true, 'postDate' => $params->get('contentdate', true), 'postDateSource' => 'created', 'postCategory' => true, 'postContent' => true, 'postContentSource' => $params->get('contentfrom', 'content'), 'postContentLimit' => $params->get('textlimit', 200), 'authorAvatar' => $params->get('authoravatar', true), 'authorTitle' => $params->get('contentauthor', true), 'readmore' => $params->get('showreadmore', true), 'ratings' => $params->get('showratings', false), 'cropCover' => $coverLayout->crop, 'coverWidth' => $coverLayout->width, 'coverHeight' => $coverLayout->height, 'coverAlignment' => $coverLayout->alignment, 'fromModule' => true, 'showPlaceholder' => $params->get('show_cover_placeholder', true) ]); ?>
    mod_easyblogshowcase/helper.php000064400000007024152163637060012751 0ustar00lib = $modules; $this->params = $this->lib->params; } /** * Retrieves a list of items for the module * * @since 5.1 * @access public */ public function getPosts() { $model = EB::model('Blog'); // Determines if we should display featured or latest entries $type = $this->params->get('showposttype', 'featured'); $layoutType = $this->params->get('layout', 'default'); // Determines if we should filter by category $categoryId = $this->params->get('catid'); $result = []; if ($categoryId && !is_array($categoryId)) { $categoryId = (int) $categoryId; } $excludeIds = []; // If type equal to latest only, we need to exclude featured post as well if ($type == 'latestOnly') { // Retrieve a list of featured blog posts on the site. $featured = $model->getFeaturedBlog(); foreach ($featured as $item) { $excludeIds[] = $item->id; } } $inclusion = ''; // Get a list of category inclusions $inclusion = EB::getCategoryInclusion($categoryId); $subCat = $this->params->get('subcat', 1); // Include child category in the inclusions if ($subCat && !empty($inclusion)) { $tmpInclusion = []; foreach ($inclusion as $includeCatId) { // Retrieve nested categories $category = new stdClass(); $category->id = $includeCatId; $category->childs = null; EB::buildNestedCategories($category->id, $category); $linkage = ''; EB::accessNestedCategories($category, $linkage, '0', '', 'link', ', '); $catIds = []; $catIds[] = $category->id; EB::accessNestedCategoriesId($category, $catIds); $tmpInclusion = array_merge($tmpInclusion, $catIds); } $inclusion = $tmpInclusion; } // Let's get the post now if (($type == 'all' || $type == 'latestOnly')) { $result = $model->getBlogsBy('', '', 'latest', $this->params->get('count'), EBLOG_FILTER_PUBLISHED, null, null, $excludeIds, false, false, false, [], $inclusion, '', '', false, [], [], false, [], array('paginationType' => 'none')); } // If not latest posttype, show featured post. if ($type == 'featured') { $result = $model->getFeaturedBlog($inclusion, $this->params->get('count')); } // If there's nothing to show at all, don't display anything if (!$result) { return $result; } $posts = EB::formatter('list', $result); // Randomize items if ($this->params->get('autoshuffle')) { shuffle($posts); } return $posts; } /** * Retrieves the photo layout settings * * @since 5.1 * @access public */ public function getPhotoLayout() { $layout = $this->params->get('photo_layout'); if (!$layout) { $layout = (object) [ 'width' => 300, 'height' => 200, 'crop' => false, 'alignment' => 'left' ]; } $layout->variation = $this->params->get('photo_size', 'medium'); if ($layout->alignment === 'default') { $layout->alignment = 'left'; } if (!isset($layout->crop)) { $layout->crop = false; } return $layout; } } mod_easyblogshowcase/mod_easyblogshowcase.php000064400000002340152163637060015667 0ustar00getPosts($params); if (!$posts) { return; } $coverLayout = $helper->getPhotoLayout(); $autoplay = $modules->params->get('autorotate', false) ? 1 : 0; $autoplayInterval = $modules->params->get('autorotate_seconds', 30); $displayViewAll = $modules->params->get('display_showall', false); require($modules->getLayout());mod_users_latest/services/provider.php000064400000002233152163637060014317 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Extension\Service\Provider\HelperFactory; use Joomla\CMS\Extension\Service\Provider\Module; use Joomla\CMS\Extension\Service\Provider\ModuleDispatcherFactory; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; /** * The users latest module service provider. * * @since 4.4.0 */ return new class () implements ServiceProviderInterface { /** * Registers the service provider with a DI container. * * @param Container $container The DI container. * * @return void * * @since 4.4.0 */ public function register(Container $container): void { $container->registerServiceProvider(new ModuleDispatcherFactory('\\Joomla\\Module\\UsersLatest')); $container->registerServiceProvider(new HelperFactory('\\Joomla\\Module\\UsersLatest\\Site\\Helper')); $container->registerServiceProvider(new Module()); } }; mod_users_latest/mod_users_latest.xml000064400000004603152163637060014232 0ustar00 mod_users_latest Joomla! Project 2009-12 (C) 2009 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.0.0 MOD_USERS_LATEST_XML_DESCRIPTION Joomla\Module\UsersLatest services src tmpl language/en-GB/mod_users_latest.ini language/en-GB/mod_users_latest.sys.ini
    mod_users_latest/tmpl/default.php000064400000000777152163637060013255 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; ?>
    • username; ?>
    mod_users_latest/src/Dispatcher/Dispatcher.php000064400000002132152163637060015603 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Module\UsersLatest\Site\Dispatcher; use Joomla\CMS\Dispatcher\AbstractModuleDispatcher; use Joomla\CMS\Helper\HelperFactoryAwareInterface; use Joomla\CMS\Helper\HelperFactoryAwareTrait; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Dispatcher class for mod_users_latest * * @since 4.4.0 */ class Dispatcher extends AbstractModuleDispatcher implements HelperFactoryAwareInterface { use HelperFactoryAwareTrait; /** * Returns the layout data. * * @return array * * @since 4.4.0 */ protected function getLayoutData(): array { $data = parent::getLayoutData(); $data['names'] = $this->getHelperFactory()->getHelper('UsersLatestHelper')->getLatestUsers($data['params'], $this->getApplication()); return $data; } } mod_users_latest/src/Helper/UsersLatestHelper.php000064400000006062152163637060016272 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Module\UsersLatest\Site\Helper; use Joomla\CMS\Application\SiteApplication; use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\Database\DatabaseAwareInterface; use Joomla\Database\DatabaseAwareTrait; use Joomla\Registry\Registry; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Helper for mod_users_latest * * @since 1.6 */ class UsersLatestHelper implements DatabaseAwareInterface { use DatabaseAwareTrait; /** * Get users sorted by activation date * * @param Registry $params Object holding the models parameters * @param SiteApplication $app The app * * @return array The array of users * * @since 4.4.0 */ public function getLatestUsers(Registry $params, SiteApplication $app): array { // Get the Dbo and User object $db = $this->getDatabase(); $user = $app->getIdentity(); $query = $db->getQuery(true) ->select($db->quoteName(['a.id', 'a.name', 'a.username', 'a.registerDate'])) ->order($db->quoteName('a.registerDate') . ' DESC') ->from($db->quoteName('#__users', 'a')); if (!$user->authorise('core.admin') && $params->get('filter_groups', 0) == 1) { $groups = $user->getAuthorisedGroups(); if (empty($groups)) { return []; } $query->leftJoin($db->quoteName('#__user_usergroup_map', 'm'), $db->quoteName('m.user_id') . ' = ' . $db->quoteName('a.id')) ->leftJoin($db->quoteName('#__usergroups', 'ug'), $db->quoteName('ug.id') . ' = ' . $db->quoteName('m.group_id')) ->whereIn($db->quoteName('ug.id'), $groups) ->where($db->quoteName('ug.id') . ' <> 1'); } $query->setLimit((int) $params->get('shownumber', 5)); $db->setQuery($query); try { return (array) $db->loadObjectList(); } catch (\RuntimeException $e) { $app->enqueueMessage(Text::_('JERROR_AN_ERROR_HAS_OCCURRED'), 'error'); return []; } } /** * Get users sorted by activation date * * @param \Joomla\Registry\Registry $params module parameters * * @return array The array of users * * @since 1.6 * * @deprecated 4.4.0 will be removed in 6.0 * Use the non-static method getLatestUsers * Example: Factory::getApplication()->bootModule('mod_users_latest', 'site') * ->getHelper('UsersLatestHelper') * ->getLatestUsers($params, Factory::getApplication()) */ public static function getUsers($params) { return (new self())->getLatestUsers($params, Factory::getApplication()); } } mod_easybloglatestcomment/assets/index.html000064400000000054152163637060015317 0ustar00mod_easybloglatestcomment/mod_easybloglatestcomment.xml000064400000005633152163637060020016 0ustar00 EasyBlog - Latest Comments Module Stack Ideas Sdn Bhd 26th April 2022 Copyright 2009 - 2015 Stack Ideas Sdn Bhd. All rights reserved. GPL License v2 support@stackideas.com http://stackideas.com 6.0.5 en-GB.mod_easybloglatestcomment.ini assets tmpl helper.php mod_easybloglatestcomment.php mod_easybloglatestcomment.xml
    https://stackideas.com/joomla4compat.xml
    mod_easybloglatestcomment/tmpl/default.php000064400000004417152163637060015140 0ustar00
    get('showavatar')) { ?>
    get('showauthor')) { ?> created_by == 0) { ?> name;?> author->getName();?> get('showauthor') && $params->get('showtitle')) { ?> get('showtitle')) { ?> blog_title; ?>
    dateString; ?>
    parseBBCode($comment->comment)); ?> $maxCharacter? EBString::substr($text, 0, $maxCharacter) . '...' : $text; ?>
    mod_easybloglatestcomment/helper.php000064400000011724152163637060014016 0ustar00lib = $modules; $this->params = $this->lib->params; } public function getLatestComment() { $db = EB::db(); $config = EB::config(); $count = (int) trim($this->params->get('count', 5)); $showprivate = $this->params->get('showprivate', true); $showBlockedUserPosts = $config->get('main_show_blockeduserposts', 0); $query = 'SELECT ' . $db->qn('b.title') . ' as `blog_title`, ' . $db->qn('b.created_by') . ' as `author_id`, ' . $db->qn('b.category_id') . ' as `category_id`, a.*'; $query .= ' from `#__easyblog_comment` as a'; $query .= ' left join `#__easyblog_post` as b'; $query .= ' on a.`post_id` = b.`id`'; if (!$showBlockedUserPosts) { $query .= ' left join `#__users` as uu on a.`created_by` = uu.`id`'; } $query .= ' where b.`published` = ' . $db->Quote(EASYBLOG_POST_PUBLISHED); $query .= ' and b.`state` = ' . $db->Quote(EASYBLOG_POST_NORMAL); $query .= ' and a.`published`=' . $db->Quote( '1' ); // Respect privacy if (!$showprivate) { $query .= ' and b.`access` = ' . $db->Quote('0'); // category access here $config = EB::config(); if ($config->get('main_category_privacy')) { $catAccess = array(); $catLib = EB::category(); $catAccessSQL = $catLib->genAccessSQL('b.`id`', $catAccess); $query .= ' AND (' . $catAccessSQL . ')'; } $isJSGrpPluginInstalled = JPluginHelper::isEnabled('system', 'groupeasyblog'); $isEventPluginInstalled = JPluginHelper::isEnabled('system', 'eventeasyblog'); $isJSInstalled = false; // need to check if the site installed jomsocial. $file = JPATH_ROOT . '/components/com_community/libraries/core.php'; $isJSExists = JFile::exists($file); if ($isJSExists) { $isJSInstalled = true; } $includeJSGrp = ($isJSGrpPluginInstalled && $isJSInstalled) ? true : false; $includeJSEvent = ($isEventPluginInstalled && $isJSInstalled) ? true : false; // contribution type sql $contributor = EB::contributor(); $contributeSQL = ' AND ((b.`source_type` = ' . $db->Quote(EASYBLOG_POST_SOURCE_SITEWIDE) . ') '; if ($config->get('main_includeteamblogpost')) { $contributeSQL .= $contributor::genAccessSQL(EASYBLOG_POST_SOURCE_TEAM, 'b'); } if ($includeJSEvent) { $contributeSQL .= $contributor::genAccessSQL(EASYBLOG_POST_SOURCE_JOMSOCIAL_EVENT, 'b'); } if ($includeJSGrp) { $contributeSQL .= $contributor::genAccessSQL(EASYBLOG_POST_SOURCE_JOMSOCIAL_GROUP, 'b'); } // Only process the contribution sql for EasySocial if EasySocial really exists. if (EB::easysocial()->exists()) { if (EB::easysocial()->isBlogAppInstalled('group')) { $contributeSQL .= $contributor::genAccessSQL(EASYBLOG_POST_SOURCE_EASYSOCIAL_GROUP, 'b'); } if (EB::easysocial()->isBlogAppInstalled('page')) { $contributeSQL .= $contributor::genAccessSQL(EASYBLOG_POST_SOURCE_EASYSOCIAL_PAGE, 'b'); } if (EB::easysocial()->isBlogAppInstalled('event')) { $contributeSQL .= $contributor::genAccessSQL(EASYBLOG_POST_SOURCE_EASYSOCIAL_EVENT, 'b'); } } $contributeSQL .= ')'; $query .= $contributeSQL; } if (!$showBlockedUserPosts) { $query .= ' and (uu.block = 0 OR uu.id IS NULL)'; } $query .= ' order by a.`created` desc'; $query .= ' limit ' . $count; $db->setQuery($query); $result = $db->loadObjectList(); if (count($result) > 0) { for ($i = 0; $i < count($result); $i++) { $row =& $result[ $i ]; $row->author = EB::user($row->created_by); $row->dateString = EB::date($row->created)->format(JText::_('DATE_FORMAT_LC3')); } } return $result; } public function getJComment() { $db = EB::db(); $query = 'SELECT * FROM ' . $db->nameQuote('#__jcomments') . ' ' . 'WHERE ' . $db->nameQuote('published') . '=' . $db->Quote(1) . ' ' . 'AND ' . $db->nameQuote('object_group') . '=' . $db->Quote('com_easyblog') . ' ' . 'ORDER BY `date` desc' . ' ' . 'LIMIT 0,' . $this->params->get('count'); $db->setQuery($query); $rows = $db->loadObjectList(); $comments = array(); if ($rows) { foreach ($rows as $row) { $row->author = EB::user($row->userid); $row->created_by = $row->userid; $row->post_id = $row->object_id; $blog = EB::table('Blog'); $blog->load($row->object_id); $row->blog_title = $blog->title; $row->dateString = $row->date; $comments[] = $row; } } return $comments; } } mod_easybloglatestcomment/mod_easybloglatestcomment.php000064400000002357152163637060020005 0ustar00config; $jCommentFile = JPATH_ROOT . '/components/com_jcomments/jcomments.php'; // Use jComment if the component exists. if ($config->get('comment_jcomments') && JFile::exists($jCommentFile)) { $comments = $helper->getJComment(); } else { $comments = $helper->getLatestComment(); } $maxCharacter = $params->get('maxcommenttext', 100); require($modules->getLayout()); mod_easyblogmostpopularpost/mod_easyblogmostpopularpost.php000064400000004200152163637060021022 0ustar00config; $count = (int) trim($params->get('count', 0)); $model = EB::model('Blog'); $type = ''; $cid = $params->get('catid', ''); if (!empty($cid)) { $type = 'category'; // Normalize the categories to be an array if (!is_array($cid)) { $cid = array($cid); } } $disabled = $params->get('enableratings') ? false : true; $retrievalDuration = $params->get('postduration', 0); $posts = $model->getBlogsBy($type, $cid, 'popular', $count, EBLOG_FILTER_PUBLISHED, null, false, array(), false, false, true, array(), array(), null, 'listlength', true, array(), array(), false, array(), array('retrievalDuration' => $retrievalDuration, 'paginationType' => 'none')); // if no records found, stop here. #1589 if (!$posts) { return; } $posts = $modules->processItems($posts); $textcount = $params->get('textcount', 150); $layout = $params->get('module_layout', 'vertical'); // EasyBlog 5.0.x backward compatible fixes if (!in_array($layout, array('vertical', 'horizontal'))) { $layout = 'vertical'; } $columnCount = $params->get('column'); // Get the photo layout option $photoLayout = $modules->getCoverLayout(); $photoLayout = $params->get('photo_layout'); $photoSize = $params->get('photo_size', 'medium'); // Get the photo layout alignment $photoAlignment = $modules->getCoverAlignment(); require($modules->getLayout()); mod_easyblogmostpopularpost/mod_easyblogmostpopularpost.xml000064400000014451152163637060021044 0ustar00 EasyBlog - Most Popular Post Module Stack Ideas Sdn Bhd 26th April 2022 Copyright 2009 - 2015 Stack Ideas Sdn Bhd. All rights reserved. GPL License v2 support@stackideas.com http://stackideas.com 6.0.5 en-GB.mod_easyblogmostpopularpost.ini tmpl mod_easyblogmostpopularpost.php mod_easyblogmostpopularpost.xml
    https://stackideas.com/joomla4compat.xml
    mod_easyblogmostpopularpost/tmpl/default_vertical.php000064400000001543152163637060017442 0ustar00
    mod_easyblogmostpopularpost/tmpl/default_item_heading.php000064400000003416152163637060020247 0ustar00
    get('showavatar', false)) { ?> get('showtavatar', false) && $post->isTeamBlog()) { ?>
    get('showauthor', false)) { ?> getAuthor()->getName(); ?> get('showdate' , true)) { ?>
    getCreationDate(true)->format($params->get('dateformat', JText::_('DATE_FORMAT_LC3'))); ?>
    mod_easyblogmostpopularpost/tmpl/default_horizontal.php000064400000002113152163637060020014 0ustar00
    config->get('main_ratings') && $params->get('showratings', false) && $post->showRating) { ?>
    html($post, 'ebmostpopularpost-' . $post->id . '-ratings', JText::_('MOD_EASYBLOG_RATEBLOG'), $disabled); ?>
    get('showhits' , false) || $params->get('showcommentcount', false) || $params->get('showreadmore', true)) { ?>
    get('showhits' , true)) { ?>
    hits;?>
    get('showcommentcount', false)) { ?> get('showreadmore', true)) { ?>
    mod_easyblogmostpopularpost/tmpl/default_item_content.php000064400000007467152163637060020334 0ustar00 posttype == 'quote') { ?>
    title);?>
    content; ?>
    posttype == 'video' && !empty($post->videos) && $params->get('video_show', false)) { ?>
    videos as $video) { ?>
    html; ?>
    posttype, array('twitter', 'link'))) { ?> get('photo_show', true) && $post->cover) { ?>
    full) && $photoLayout->full) ? "is-full" : '';?>"> isCoverImage) { ?> crop) && $photoLayout->crop) { ?> <?php echo $post->title;?> <?php echo $post->title;?> isCoverImage) { ?> isEmbedCover()) { ?>
    videoEmbedCover; ?>
    videoCover; ?>
    get('showcategory', true)) { ?> getCategories() as $category) { ?>
    getTitle(); ?>
    posttype != 'quote' && $params->get('showintro', '-1') != '-1') { ?>
    protect) { ?> content; ?> summary; ?>
    mod_easyblogmostpopularpost/tmpl/default.php000064400000002715152163637060015553 0ustar00
    ">
    get('allentrieslink', false)) { ?>
    config->get('main_ratings')) { ?> mod_footer/services/provider.php000064400000001741152163637060013103 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Extension\Service\Provider\Module; use Joomla\CMS\Extension\Service\Provider\ModuleDispatcherFactory; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; /** * The footer module service provider. * * @since 4.4.0 */ return new class () implements ServiceProviderInterface { /** * Registers the service provider with a DI container. * * @param Container $container The DI container. * * @return void * * @since 4.4.0 */ public function register(Container $container): void { $container->registerServiceProvider(new ModuleDispatcherFactory('\\Joomla\\Module\\Footer')); $container->registerServiceProvider(new Module()); } }; mod_footer/mod_footer.xml000064400000003525152163637060011576 0ustar00 mod_footer Joomla! Project 2006-07 (C) 2006 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.0.0 MOD_FOOTER_XML_DESCRIPTION Joomla\Module\Footer services src tmpl language/en-GB/mod_footer.ini language/en-GB/mod_footer.sys.ini
    mod_footer/tmpl/default.php000064400000000703152163637060012023 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Language\Text; ?> mod_footer/src/Dispatcher/Dispatcher.php000064400000002145152163637060014370 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Module\Footer\Site\Dispatcher; use Joomla\CMS\Dispatcher\AbstractModuleDispatcher; use Joomla\CMS\HTML\HTMLHelper; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Dispatcher class for mod_footer * * @since 4.4.0 */ class Dispatcher extends AbstractModuleDispatcher { /** * Returns the layout data. * * @return array * * @since 4.4.0 */ protected function getLayoutData(): array { $data = parent::getLayoutData(); $lineOne = $this->getApplication()->getLanguage()->_('MOD_FOOTER_LINE1'); $lineOne = str_replace('%date%', HTMLHelper::_('date', 'now', 'Y'), $lineOne); $lineOne = str_replace('%sitename%', $this->getApplication()->get('sitename', ''), $lineOne); $data['lineone'] = $lineOne; return $data; } } mod_easyblogarchive/mod_easyblogarchive.xml000064400000010153152163637060015313 0ustar00 EasyBlog - Archive Module Stack Ideas Sdn Bhd 26th April 2022 Copyright 2009 - 2017 Stack Ideas Sdn Bhd. All rights reserved. GPL License v2 support@stackideas.com http://stackideas.com 6.0.5 en-GB.mod_easyblogarchive.ini styles tmpl mod_easyblogarchive.php mod_easyblogarchive.xml
    https://stackideas.com/joomla4compat.xml
    mod_easyblogarchive/mod_easyblogarchive.php000064400000004644152163637060015312 0ustar00get('filterType', 'normal'); $model = EB::model('Archive'); $year = $model->getArchiveMinMaxYear($filterType); if (!$year) { return; } $currentMonth = (int) EB::date()->format('m'); $currentYear = (int) EB::date()->format('Y'); $count = $params->get('count', 0); if (!empty($count)) { if (($year['maxyear'] - $year['minyear']) > $count) { $year['minyear'] = $year['maxyear'] - $count; } } // Set default year $defaultYear = $modules->input->get('archiveyear', $year['maxyear'], 'REQUEST'); // Set default month $defaultMonth = $modules->input->get('archivemonth', 0, 'REQUEST'); $menuitemid = $params->get('menuitemid', ''); $menuitemid = (!empty($menuitemid)) ? '&Itemid=' . $menuitemid : ''; $showEmptyMonth= $params->get('showempty', 1); $showEmptyYear = $params->get('showemptyyear', false); // Get excluded/included categories $excludeCats = $params->get('excatid', array()); $includeCats = $params->get('catid', array()); $includeCats = EB::getCategoryInclusion($includeCats); $catUrl = ''; if (is_array($includeCats)) { foreach ($includeCats as $includeCat) { $catUrl .= '&category[]='.$includeCat; } } // Default filter $filter = $params->get('filter', ''); $filterId = ''; // Get any available filter if ($filter == 'blogger') { $filterId = $params->get('bloggerId', ''); } else { $filterId = $params->get('teamId', ''); } $postCounts = $model->getArchivePostCounts($year['minyear'], $year['maxyear'], $excludeCats, $includeCats, $filter, $filterId, $filterType); $filterUrl = ''; if ($filterType == 'archives') { $filterUrl = '&archives=1'; } require($modules->getLayout()); mod_easyblogarchive/styles/style.min.css000064400000000627152163637060014547 0ustar00div#fd.eb.mod-easyblogarchive .eb-mod-item>a.collapsed>.fa{margin:0 10px 0 0;-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0)}div#fd.eb.mod-easyblogarchive .eb-mod-item>a .fa{-webkit-transition:all .5s ease;transition:all .5s ease;-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}div#fd.eb.mod-easyblogarchive .eb-mod-item-submenu{margin:0 0 0 30px}mod_easyblogarchive/styles/index.html000064400000000037152163637060014103 0ustar00 mod_easyblogarchive/styles/style.less000064400000000764152163637060014145 0ustar00/** * @package EasyBlog * @copyright Copyright (C) 2010 - 2017 Stack Ideas Sdn Bhd. All rights reserved. * @license Proprietary Use License http://stackideas.com/licensing.html **/ @import "config"; @{EasyBlog} { &.mod-easyblogarchive { .eb-mod-item { > a { &.collapsed { > .fa { margin: 0 10px 0 0; .rotate(0); } } .fa { .transition(all .5s ease); .rotate(90deg); } } } .eb-mod-item-submenu { margin: 0 0 0 30px; } } } mod_easyblogarchive/styles/style.css000064400000000721152163637060013760 0ustar00div#fd.eb.mod-easyblogarchive .eb-mod-item > a.collapsed > .fa { margin: 0 10px 0 0; -webkit-transform: rotate(0); -ms-transform: rotate(0); transform: rotate(0); } div#fd.eb.mod-easyblogarchive .eb-mod-item > a .fa { -webkit-transition: all .5s ease; transition: all .5s ease; -webkit-transform: rotate(90deg); -ms-transform: rotate(90deg); transform: rotate(90deg); } div#fd.eb.mod-easyblogarchive .eb-mod-item-submenu { margin: 0 0 0 30px; } mod_easyblogarchive/tmpl/default_item.php000064400000002722152163637060014715 0ustar00format('F'); ?> get('showfuture')) || $params->get('showfuture')) { ?> $i->$m))) { ?> $i->$m)) { ?>
    mod_easyblogarchive/tmpl/default.php000064400000003514152163637060013677 0ustar00
    = $year['minyear']; $i--) { ?> $i)) { ?>
    get('order') == 'asc') { ?> 0; $m--) { ?>
    mod_jbusiness_event_search/mod_jbusiness_event_search.php000064400000016602152163637060020257 0ustar00google_map_key)) { $key="&key=".$appSettings->google_map_key; } $lang = JBusinessUtil::getLanguageTag(); JBusinessUtil::loadSiteLanguage(); $session = JFactory::getSession(); $preserve = $params->get('preserve'); $geoLocation = $session->get("geolocation"); $startDate = $session->get('ev-startDate') && $preserve?$session->get('ev-startDate'):""; $endDate = $session->get('ev-endDate') && $preserve?$session->get('ev-endDate'):""; $jsSettings = JBusinessUtil::addJSSettings(); $jsSettings->isProfile = 1; if (!defined('JBD_UTILS_LOADED')) { $document = JFactory::getDocument(); $document->addScriptDeclaration(' window.addEventListener("load",function() { jbdUtils.setProperties(' . json_encode($jsSettings) . '); }); '); define('JBD_UTILS_LOADED', 1); } if ($params->get('showCountries')) { $countries = modJBusinessEventSearchHelper::getCountries(); if ($appSettings->enable_multilingual) { JBusinessDirectoryTranslations::updateCountriesTranslation($countries); } } if ($params->get('showTypes')) { $types = modJBusinessEventSearchHelper::getTypes(); } if ($params->get('showProvince')) { $provinces = modJBusinessEventSearchHelper::getProvinces(); } $choices = 0; if ($params->get('linklocation')) { if ($params->get('showCountries') && !$params->get('showRegions')) { $choices = 1; } elseif ($params->get('showCountries')) { $choices = 2; } elseif ($params->get('showRegions')) { $choices = 3; } } $categories = array(); $subCategories = array(); $separateCategories = $params->get('separateCategories'); $availableCategories = $params->get('availableCategories'); if (is_array($availableCategories) && !($availableCategories[0]==0 && count($availableCategories)==1)) { $categories = modJBusinessEventSearchHelper::getMainCategories(); $subCategories = modJBusinessEventSearchHelper::getSubCategories(); if ($appSettings->enable_multilingual) { JBusinessDirectoryTranslations::updateCategoriesTranslation($categories); JBusinessDirectoryTranslations::updateCategoriesTranslation($subCategories); } $availableCategories = array_filter($availableCategories); if (!empty($availableCategories)) { foreach ($categories as $key => $category) { if (!in_array($category->id, $availableCategories)) { unset($categories[$key]); } } foreach ($subCategories as $key => $category) { if (!in_array($category->id, $availableCategories)) { unset($subCategories[$key]); } } } foreach ($categories as $category) { foreach ($subCategories as $key => $subCat) { if ($category->id == $subCat->parent_id) { if (!isset($category->subcategories)) { $category->subcategories = array(); } $category->subcategories[] = $subCat; unset($subCategories[$key]); } } } $params->set('separateCategories', 0); $separateCategories = 0; } elseif ($params->get('showCategories')) { $categories = modJBusinessEventSearchHelper::getMainCategories(); $subCategories = modJBusinessEventSearchHelper::getSubCategories(); if ($appSettings->enable_multilingual) { JBusinessDirectoryTranslations::updateCategoriesTranslation($categories); JBusinessDirectoryTranslations::updateCategoriesTranslation($subCategories); } if ($params->get('showSubCategories') && !$separateCategories) { foreach ($categories as $category) { foreach ($subCategories as $key => $subCat) { if ($category->id == $subCat->parent_id) { if (!isset($category->subcategories)) { $category->subcategories = array(); } $category->subcategories[] = $subCat; } } } } } if ($appSettings->category_order == ORDER_ALPHABETICALLY && count($categories)>0) { require_once HELPERS_PATH.'/category_lib.php'; $categoryService = new JBusinessDirectorCategoryLib(); $categories = $categoryService->sortCategories($categories, false, true); } if (is_array($availableCategories)) { reset($availableCategories); if (!(current($availableCategories)==0 && count($availableCategories)==1)) { foreach ($subCategories as $key => $subCat) { end($categories)->subcategories[] = $subCat; } } } $appSettings = JBusinessUtil::getApplicationSettings(); if ($params->get('showCities')) { if ($appSettings->limit_cities_regions ==1) { $cities = modJBusinessEventSearchHelper::getActivityCities(); } else { $cities = modJBusinessEventSearchHelper::getCities(); } } $maxRadius = $params->get("max-radius"); if (empty($maxRadius)) { $maxRadius = 500; } if ($params->get('showMap')) { $maxEvents = $params->get('maxEvents'); if (empty($maxEvents)) { $maxEvents = 200; } $events = modJBusinessEventSearchHelper::getEvents($maxEvents); } if ($appSettings->enable_multilingual) { JBusinessDirectoryTranslations::updateEventTypesTranslation($types); } if ($params->get('showRegions')) { if ($appSettings->limit_cities_regions == 1) { $regions = modJBusinessEventSearchHelper::getActivityRegions(); } else { $regions = modJBusinessEventSearchHelper::getRegions(); } } $attributes = $params->get('customAttributes'); $atrributesValues = $session->get('customAtrributes'); if (!$params->get('preserve')) { $atrributesValues = array(); } if (!empty($attributes)) { $customAttributes = modJBusinessEventSearchHelper::getCustomAttributes($attributes, $atrributesValues); } $menuItemId =""; if ($params->get('mItemId')) { $menuItemId="&Itemid=".$params->get('mItemId'); } $layoutType = $params->get('layout-type', 'horizontal'); $moduleclass_sfx = htmlspecialchars((string)$params->get('moduleclass_sfx')); $radius = JFactory::getApplication()->input->getInt("radius"); if (!isset($radius)) { $radius = $params->get('radius'); } $bgStyle = !empty($params->get('bg-color'))?"padding: 20px;background-color:".$params->get('bg-color'):""; require(JModuleHelper::getLayoutPath('mod_jbusiness_event_search', $params->get('base-layout', 'default'))); mod_jbusiness_event_search/assets/js/script.js000064400000014476152163637060015743 0ustar00(function ($) { $.widget("custom.combobox", { _create: function () { this.wrapper = $("") .addClass("custom-combobox") .insertAfter(this.element); this.element.hide(); this._createAutocomplete(); this._createShowAllButton(); }, _createAutocomplete: function () { var selected = this.element.children(":selected"), value = selected.val() ? selected.text() : ""; this.input = $("") .appendTo(this.wrapper) .val(value) .attr("title", "") .addClass("custom-combobox-input ui-widget ui-widget-content ui-state-default ui-corner-left") .autocomplete({ delay: 0, minLength: 0, source: $.proxy(this, "_source") }) .tooltip({ tooltipClass: "ui-state-highlight" }); this._on(this.input, { autocompleteselect: function (event, ui) { ui.item.option.selected = true; this._trigger("select", event, { item: ui.item.option }); }, autocompletechange: "_removeIfInvalid" }); }, _createShowAllButton: function () { var input = this.input, wasOpen = false; $("") .attr("tabIndex", -1) .attr("title", "Show All Items") .tooltip() .appendTo(this.wrapper) .button({ icons: { primary: "ui-icon-carat-2-n-s" }, text: false }) .removeClass("ui-corner-all") .addClass("custom-combobox-toggle ui-corner-right") .mousedown(function () { wasOpen = input.autocomplete("widget").is(":visible"); }) .click(function () { input.focus(); // Close if already visible if (wasOpen) { return; } // Pass empty string as value to search for, displaying all results input.autocomplete("search", ""); }); }, _source: function (request, response) { var matcher = new RegExp($.ui.autocomplete.escapeRegex(request.term), "i"); response(this.element.children("option").map(function () { var text = $(this).text(); if (this.value && (!request.term || matcher.test(text))) return { label: text, value: text, option: this }; })); }, _removeIfInvalid: function (event, ui) { // Selected an item, nothing to do if (ui.item) { return; } // Search for a match (case-insensitive) var value = this.input.val(), valueLowerCase = value.toLowerCase(), valid = false; this.element.children("option").each(function () { if ($(this).text().toLowerCase() === valueLowerCase) { this.selected = valid = true; return false; } }); // Found a match, nothing to do if (valid) { return; } // Remove invalid value this.input .val("") .attr("title", value + " didn't match any item") .tooltip("open"); this.element.val(""); this._delay(function () { this.input.tooltip("close").attr("title", ""); }, 2500); this.input.data("ui-autocomplete").term = ""; }, _destroy: function () { this.wrapper.remove(); this.element.show(); } }); })(jQuery); function disableEmptyFields() { //disable all empty fields to have a nice url jQuery('#companies-search').submit(function() { jQuery(':input', this).each(function() { this.disabled = !(jQuery(this).val()); }); jQuery('#companies-search select').each(function() { if(!(jQuery(this).val()) || jQuery(this).val()==0 && !jQuery(this).hasClass('required')){ jQuery(this).attr('disabled', 'disabled'); } }); }); } function getRegionsByCountry() { let urlRegionsByCountry = jbdUtils.getAjaxUrl('getRegionsByCountryAjax', 'search'); let data = { type: JBDConstants.ITEM_TYPE_EVENT, countryId: jQuery("#countrySearch").val() }; jQuery.ajax({ type: "GET", url: urlRegionsByCountry, data: data, dataType: 'json', success: function (data) { jQuery("#regionSearch").empty(); jQuery("#regionSearch").html(data); jbdUtils.updateChosenSelect('#regionSearch'); getCitiesByCountry(); } }); } function getCitiesByRegion() { let urlCitiesByRegion = jbdUtils.getAjaxUrl('getCitiesByRegionAjax', 'search'); let data = { type: JBDConstants.ITEM_TYPE_EVENT, region: jQuery("#regionSearch").val() }; jQuery.ajax({ type: "GET", url: urlCitiesByRegion, data: data, dataType: 'json', success: function (data) { jQuery("#citySearch").empty(); jQuery("#citySearch").html(data); jbdUtils.updateChosenSelect('#citySearch'); } }); } function getCitiesByCountry() { let urlCitiesByCountry = jbdUtils.getAjaxUrl('getCitiesByCountryAjax', 'search'); let data = { type: JBDConstants.ITEM_TYPE_EVENT, countryId: jQuery("#countrySearch").val() }; jQuery.ajax({ type: "GET", url: urlCitiesByCountry, data: data, dataType: 'json', success: function (data) { jQuery("#citySearch").empty(); jQuery("#citySearch").html(data); jbdUtils.updateChosenSelect('#citySearch'); } }); } mod_jbusiness_event_search/assets/js/index.html000064400000000037152163637060016062 0ustar00 mod_jbusiness_event_search/assets/index.html000064400000000037152163637060015446 0ustar00 mod_jbusiness_event_search/mod_jbusiness_event_search.xml000064400000032505152163637060020270 0ustar00 JBusinessDirectory Events Search January 2015 CMSJunkie (C) CMSJunkie. All rights reserved. http://www.gnu.org/copyleft/gpl.html info@cmsjunkie.com www.cmsjunkie.com 1.0.0 Search module for events mod_jbusiness_event_search.xml mod_jbusiness_event_search.php index.html helper.php tmpl/default.php tmpl/index.html assets images language/de-DE/de-DE.mod_jbusiness_event_search.ini language/de-DE/de-DE.mod_jbusiness_event_search.sys.ini language/en-GB/en-GB.mod_jbusiness_event_search.ini language/en-GB/en-GB.mod_jbusiness_event_search.sys.ini language/es-ES/es-ES.mod_jbusiness_event_search.ini language/es-ES/es-ES.mod_jbusiness_event_search.sys.ini language/fr-FR/fr-FR.mod_jbusiness_event_search.ini language/fr-FR/fr-FR.mod_jbusiness_event_search.sys.ini language/nl-NL/nl-NL.mod_jbusiness_event_search.ini language/nl-NL/nl-NL.mod_jbusiness_event_search.sys.ini language/pt-PT/pt-PT.mod_jbusiness_event_search.ini language/pt-PT/pt-PT.mod_jbusiness_event_search.sys.ini
    mod_jbusiness_event_search/tmpl/default.php000064400000073342152163637060015271 0ustar00get('preserve'); $minLetters = $params->get('minLetters'); $minLetters = is_numeric($minLetters)?$minLetters:3; $token = rand(10, 1000); JBusinessUtil::loadMapScripts(); $user = JBusinessUtil::getUser(); $limitCountries = JBusinessUtil::getCountryRestriction(); ?>
    get('showMap')) { require JPATH_SITE.'/components/com_jbusinessdirectory/views/events/tmpl/map.php'; } ?>
    get('showOnlyMap')) { ?>
    mod_jbusiness_event_search/tmpl/index.html000064400000000037152163637060015120 0ustar00 mod_jbusiness_event_search/helper.php000064400000011562152163637060014144 0ustar00setQuery($query); return $db->loadObjectList(); } public static function getSubCategories() { $db = JFactory::getDBO(); $query = ' SELECT c.* FROM #__jbusinessdirectory_categories c inner join #__jbusinessdirectory_categories cc on c.parent_id = cc.id where c.parent_id!=1 and c.published=1 and c.published=1 and c.type='.CATEGORY_TYPE_EVENT.' order by c.lft'; $db->setQuery($query, 0, 1000); $result = $db->loadObjectList(); return $result; } public static function getCountries() { $db = JFactory::getDBO(); $query = "select distinct c.id, c.country_name FROM #__jbusinessdirectory_countries c inner join #__jbusinessdirectory_company_events cp on c.id = cp.countryId where country_name!='' order by country_name asc"; $db->setQuery($query); return $db->loadObjectList(); } public static function getProvinces() { $db = JFactory::getDBO(); $query = "select distinct province FROM #__jbusinessdirectory_company_events where state=1 and province!='' order by province asc"; $db->setQuery($query); return $db->loadObjectList(); } public static function getTypes() { $db = JFactory::getDBO(); $query = ' SELECT * FROM #__jbusinessdirectory_company_event_types order by ordering asc'; $db->setQuery($query); $result = $db->loadObjectList(); return $result; } public static function getCities() { $db = JFactory::getDBO(); $query = ' SELECT distinct city FROM #__jbusinessdirectory_company_events where state =1 and city!="" order by city asc'; $db->setQuery($query); return $db->loadObjectList(); } public static function getRegions() { $db = JFactory::getDBO(); $query = 'SELECT distinct county FROM #__jbusinessdirectory_company_events where state =1 and county!="" order by county asc'; $db->setQuery($query); return $db->loadObjectList(); } public static function getActivityRegions() { $appSettings = JBusinessUtil::getApplicationSettings(); $db = JFactory::getDBO(); $orderBy = ' name asc'; if($appSettings->cities_regions_order == ORDER_BY_ORDER) { $orderBy = ' ordering asc'; } $query = 'select distinct name as county FROM #__jbusinessdirectory_regions order by '.$orderBy; $db->setQuery($query); return $db->loadObjectList(); } public static function getActivityCities() { $appSettings = JBusinessUtil::getApplicationSettings(); $db = JFactory::getDBO(); $orderBy = ' name asc'; if($appSettings->cities_regions_order == ORDER_BY_ORDER) { $orderBy = ' ordering asc'; } $query = ' SELECT distinct name as city FROM #__jbusinessdirectory_cities order by '.$orderBy; $db->setQuery($query); return $db->loadObjectList(); } public static function getEvents($maxEvents) { if (isset($_REQUEST["event-search-results"])) { return $_REQUEST["event-search-results"]; } JTable::addIncludePath(JPATH_ROOT.'/administrator/components/com_jbusinessdirectory/tables'); $eventsTable = JTable::getInstance('Event', 'JTable'); $appSettings = JBusinessUtil::getApplicationSettings(); $searchDetails = array(); $searchDetails["enablePackages"] = $appSettings->enable_packages; $searchDetails["showPendingApproval"] = ($appSettings->enable_item_moderation=='0' || ($appSettings->enable_item_moderation=='1' && $appSettings->show_pending_approval == '1')); $events = $eventsTable->getEventsByCategories($searchDetails, 0, $maxEvents); foreach ($events as $event) { $attributesTable = JTable::getInstance('EventAttributes', 'JTable'); $event->customAttributes = $attributesTable->getEventAttributes($event->id); } return $events; } public static function getCustomAttributes($attributes, $atrributesValues) { $attributes = array_filter($attributes); if (empty($attributes)) { return; } JTable::addIncludePath(JPATH_ROOT.'/administrator/components/com_jbusinessdirectory/tables'); $attributesTable = JTable::getInstance('Attribute', 'JTable'); $attributes = implode(",", array_filter($attributes)); $attributes = $attributesTable->getAttributesConfiguration($attributes); foreach ($attributes as $attribute) { if (isset($atrributesValues[$attribute->id])) { $attribute->attributeValue =$atrributesValues[$attribute->id]; } } return $attributes; } } mod_jbusiness_event_search/index.html000064400000000037152163637060014144 0ustar00 mod_jbusiness_event_search/images/loading_small.gif000064400000020751152163637060016715 0ustar00GIF89ajݛCd vkTz^ڷ200EtZk\Zw! ! NETSCAPE2.0,0@$PA D0B 0dаC@1D 'PPE /`Đ1F 7pбG?2H#G$QI'OD2J+WdѲK/_3L3gФQM7ođ3N;wѳO?4P!C%RQ#G E4R%K0eҴS'O@5T)SPRU+W`Œ5V-[pҵW/_6X1cǐ%SY3gϠE6Z5kװeӶ[7o%7\9sХS];wœ7^={ӷ_?! ,~jݩ\10ydC>05v̦ws]ڕ\ZZk0@$PA D0B 0dаC@1D 'PPE /`Đ1F 7pбG?2H#G$QI'OD2J+WdѲK/_3L3gФQM7ođ3N;wѳO?4P!C%RQ#G E4R%K0eҴS'O@5T)SPRU+W`Œ5V-[pҵW/_6X1cǐ%SY3gϠE6Z5kװeӶ[7o%7\9sХS];wœ7^={ӷ_?! ,~}[Zy01\eZ^50>t:Tʪ(l_ۛ0@$PA D0B 0dаC@1D 'PPE /`Đ1F 7pбG?2H#G$QI'OD2J+WdѲK/_3L3gФQM7ođ3N;wѳO?4P!C%RQ#G E4R%K0eҴS'O@5T)SPRU+W`Œ5V-[pҵW/_6X1cǐ%SY3gϠE6Z5kװeӶ[7o%7\9sХS];wœ7^={ӷ_?! ,Z[}^ZfTk02E0t_ۛ(lʪ:T0@$PA D0B 0dаC@1D 'PPE /`Đ1F 7pбG?2H#G$QI'OD2J+WdѲK/_3L3gФQM7ođ3N;wѳO?4P!C%RQ#G E4R%K0eҴS'O@5T)SPRU+W`Œ5V-[pҵW/_6X1cǐ%SY3gϠE6Z5kװeӶ[7o%7\9sХS];wœ7^={ӷ_?! ,wZ\kZtE002^zTkv ̐dCjݩ0@$PA D0B 0dаC@1D 'PPE /`Đ1F 7pбG?2H#G$QI'OD2J+WdѲK/_3L3gФQM7ođ3N;wѳO?4P!C%RQ#G E4R%K0eҴS'O@5T)SPRU+W`Œ5V-[pҵW/_6X1cǐ%SY3gϠE6Z5kװeӶ[7o%7\9sХS];wœ7^={ӷ_?! ,kZZ\]ڷswv50>Cdy01\jݛ~0@$PA D0B 0dаC@1D 'PPE /`Đ1F 7pбG?2H#G$QI'OD2J+WdѲK/_3L3gФQM7ođ3N;wѳO?4P!C%RQ#G E4R%K0eҴS'O@5T)SPRU+W`Œ5V-[pҵW/_6X1cǐ%SY3gϠE6Z5kװeӶ[7o%7\9sХS];wœ7^={ӷ_?! ,_۔l(ɄT:Ӏt>05^Ze\10yZ[}~0@$PA D0B 0dаC@1D 'PPE /`Đ1F 7pбG?2H#G$QI'OD2J+WdѲK/_3L3gФQM7ođ3N;wѳO?4P!C%RQ#G E4R%K0eҴS'O@5T)SPRU+W`Œ5V-[pҵW/_6X1cǐ%SY3gϠE6Z5kװeӶ[7o%7\9sХS];wœ7^={ӷ_?! ,T:ӶɅl(_۔t0E20kTfZ^}[Z0@$PA D0B 0dаC@1D 'PPE /`Đ1F 7pбG?2H#G$QI'OD2J+WdѲK/_3L3gФQM7ođ3N;wѳO?4P!C%RQ#G E4R%K0eҴS'O@5T)SPRU+W`Œ5V-[pҵW/_6X1cǐ%SY3gϠE6Z5kװeӶ[7o%7\9sХS];wœ7^={ӷ_?;mod_jbusiness_event_search/images/index.html000064400000000037152163637060015411 0ustar00 mod_jbusinesscategoriesoffers/assets/js/script.js000064400000000075152163637060016456 0ustar00function goToLink(link){ document.location.href=link; }mod_jbusinesscategoriesoffers/assets/js/index.html000064400000000040152163637060016601 0ustar00 mod_jbusinesscategoriesoffers/assets/index.html000064400000000037152163637060016173 0ustar00 mod_jbusinesscategoriesoffers/assets/style.css000064400000001464152163637060016055 0ustar00.main-categories .la.la-menu-arrow { float: right; line-height: 19px; font-size: 16px; line-height: 26px; } .main-categories .active> a >.la.la-menu-arrow::before { content: "\f110"; } .main-categories .la.la-menu-arrow::before { content: "\f111"; } .offer-categories-slider .categories-slider-item .categories-slide-image { margin: 0 auto; width: 111px; height: 111px; border-radius: 50%; margin-bottom: 10px; border: 1px solid #dfdfdf; background-repeat: no-repeat; background-position: center center; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; } /* Slide Title */ .offer-categories-slider .categories-slider-item p { color: #333; font-size: 13px; line-height: 1.2; text-align: center; }mod_jbusinesscategoriesoffers/mod_jbusinesscategoriesoffers.php000064400000004765152163637060021540 0ustar00get('viewtype') == 'slider') { JBusinessUtil::enqueueStyle('libraries/slick/slick.css'); JBusinessUtil::enqueueScript('libraries/slick/slick.js'); } else { JBusinessUtil::enqueueStyle('libraries/metis-menu/metisMenu.css'); JBusinessUtil::enqueueScript('libraries/metis-menu/metisMenu.js'); } $helper = new modJBusinessCategoriesOffersHelper(); JBusinessUtil::includeCSSLibraries(); JBusinessUtil::loadSiteLanguage(); $moduleclass_sfx = htmlspecialchars((string)$params->get('moduleclass_sfx')); $categoriesIds = $params->get('categoryIds'); if ($params->get('viewtype') == 'slider') { $categories = $helper->getCategoriesByIdsOnSlider($categoriesIds); } elseif ($params->get('viewtype') == 'menu') { $categories = $helper->getCategoriesByIdsOnMenu($categoriesIds); } else { $categories = $helper->getCategories($categoriesIds, true); } $appSettings = JBusinessUtil::getApplicationSettings(); if ($appSettings->enable_multilingual) { JBusinessDirectoryTranslations::updateCategoriesTranslation($categories); } $jsSettings = JBusinessUtil::addJSSettings(); $jsSettings->isProfile = 1; if (!defined('JBD_UTILS_LOADED')) { $document = JFactory::getDocument(); $document->addScriptDeclaration(' window.addEventListener("load",function() { jbdUtils.setProperties(' . json_encode($jsSettings) . '); }); '); define('JBD_UTILS_LOADED', 1); } $viewAllLink = JRoute::_('index.php?option=com_jbusinessdirectory&view=categories&categoryType='.CATEGORY_TYPE_OFFER); $span = $params->get('phoneGridOption', 'col-12').' '.$params->get('tabletGridOption', 'col-md-6').' '.$params->get('desktopGridOption', "col-lg-4"); require JModuleHelper::getLayoutPath('mod_jbusinesscategoriesoffers', "default_".$params->get('viewtype')); mod_jbusinesscategoriesoffers/tmpl/default_slider.php000064400000004712152163637060017353 0ustar00get('autoplay') ? true : false; $sliderParams['autoplaySpeed'] = $params->get('autoplaySpeed'); $sliderParams['nrVisibleItems'] = $params->get('nrVisibleItems'); $sliderParams['nrItemsToScrool'] = $params->get('nrItemsToScrool'); ?> get('showviewall')){?>
    mod_jbusinesscategoriesoffers/tmpl/default_accordion.php000064400000000664152163637060020034 0ustar00
    mod_jbusinesscategoriesoffers/tmpl/default.php000064400000006173152163637060016014 0ustar00
    get('showviewall')){?>
    mod_jbusinesscategoriesoffers/tmpl/default_grid.php000064400000000571152163637060017015 0ustar00mod_jbusinesscategoriesoffers/tmpl/default_boxes.php000064400000000663152163637060017212 0ustar00
    mod_jbusinesscategoriesoffers/tmpl/default_grid_icons.php000064400000000570152163637060020207 0ustar00mod_jbusinesscategoriesoffers/tmpl/index.html000064400000000037152163637060015645 0ustar00 mod_jbusinesscategoriesoffers/helper.php000064400000005621152163637060014670 0ustar00getCategories(CATEGORY_TYPE_OFFER, $categoriesIds); if (!empty($categories)) { if ($appSettings->show_total_business_count && $showListingsCount) { $details = array(); $details["enablePackages"] = $appSettings->enable_packages; $details["showPendingApproval"] = ($appSettings->enable_item_moderation=='0' || ($appSettings->enable_item_moderation=='1' && $appSettings->show_pending_approval == '1')); JTable::addIncludePath(JPATH_ROOT.'/administrator/components/com_jbusinessdirectory/tables'); $categoryTable = JTable::getInstance('Category', 'JBusinessTable'); $listingsCount = $categoryTable->getCountPerCategory($details, CATEGORY_TYPE_OFFER); foreach ($categories as &$category) { if (!is_array($category)) { $category = array($category); $category["subCategories"] = array(); } if (isset($category[0]->id)) { $category[0]->nr_listings = isset($listingsCount[$category[0]->id]->nr_listings) ? $listingsCount[$category[0]->id]->nr_listings : '0'; } } } foreach ($categories as &$category) { if (isset($category[0]->id)) { $category[0]->link = JBusinessUtil::getOfferCategoryLink($category[0]->id, $category[0]->alias); if (!empty($category["subCategories"])) { foreach ($category["subCategories"] as $cat) { $cat[0]->link = JBusinessUtil::getOfferCategoryLink($cat[0]->id, $cat[0]->alias); } } } } } return $categories; } public function getCategoriesByIdsOnMenu($categoriesIds) { $categoryService = new JBusinessDirectorCategoryLib(); $categoriesIds = implode(",", $categoriesIds); $categories = $categoryService->getCategories(CATEGORY_TYPE_OFFER, $categoriesIds); return $categories; } public function getCategoriesByIdsOnSlider($categoriesIds) { $categoryService = new JBusinessDirectorCategoryLib(); if (!empty($categoriesIds)) { $categoriesIds = implode(",", $categoriesIds); } $categories = $categoryService->getAllCategories(CATEGORY_TYPE_OFFER, $categoriesIds); $newCategories = array(); foreach ($categories as $category) { $newCategories[$category->id] = array($category,"subCategories"=>array()); } return $newCategories; } } mod_jbusinesscategoriesoffers/mod_jbusinesscategoriesoffers.xml000064400000013114152163637060021535 0ustar00 JBusinessCategoriesOffers July 2013 CMSJunkie (C) CMSJunkie. All rights reserved. http://www.gnu.org/copyleft/gpl.html info@cmsjunkie.com www.cmsjunkie.com 1.0.0 JBusinessCategoriesOffers mod_jbusinesscategoriesoffers.xml mod_jbusinesscategoriesoffers.php index.html helper.php tmpl assets language/de-DE/de-DE.mod_jbusinesscategories.ini language/de-DE/de-DE.mod_jbusinesscategories.sys.ini language/en-GB/en-GB.mod_jbusinesscategoriesoffers.ini language/en-GB/en-GB.mod_jbusinesscategoriesoffers.sys.ini language/es-ES/es-ES.mod_jbusinesscategories.ini language/es-ES/es-ES.mod_jbusinesscategories.sys.ini language/fr-FR/fr-FR.mod_jbusinesscategories.ini language/fr-FR/fr-FR.mod_jbusinesscategories.sys.ini language/nl-NL/nl-NL.mod_jbusinesscategories.ini language/nl-NL/nl-NL.mod_jbusinesscategories.sys.ini language/pt-PT/pt-PT.mod_jbusinesscategories.ini language/pt-PT/pt-PT.mod_jbusinesscategories.sys.ini
    mod_jbusinesscategoriesoffers/index.html000064400000000037152163637060014671 0ustar00 mod_custom/mod_custom.xml000064400000004613152163637060011625 0ustar00 mod_custom Joomla! Project 2004-07 (C) 2005 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.0.0 MOD_CUSTOM_XML_DESCRIPTION Joomla\Module\Custom services src tmpl language/en-GB/mod_custom.ini language/en-GB/mod_custom.sys.ini
    mod_custom/services/provider.php000064400000001746152163637060013124 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Extension\Service\Provider\Module; use Joomla\CMS\Extension\Service\Provider\ModuleDispatcherFactory; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; /** * The module Custom HTML service provider. * * @since 4.4.0 */ return new class () implements ServiceProviderInterface { /** * Registers the service provider with a DI container. * * @param Container $container The DI container. * * @return void * * @since 4.4.0 */ public function register(Container $container): void { $container->registerServiceProvider(new ModuleDispatcherFactory('\\Joomla\\Module\\Custom')); $container->registerServiceProvider(new Module()); } }; mod_custom/tmpl/default.php000064400000001517152163637060012043 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Factory; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Uri\Uri; $modId = 'mod-custom' . $module->id; if ($params->get('backgroundimage')) { /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = Factory::getApplication()->getDocument()->getWebAssetManager(); $wa->addInlineStyle(' #' . $modId . '{background-image: url("' . Uri::root(true) . '/' . HTMLHelper::_('cleanImageURL', $params->get('backgroundimage'))->url . '");} ', ['name' => $modId]); } ?>
    content; ?>
    mod_custom/src/Dispatcher/Dispatcher.php000064400000001760152163637060014406 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Module\Custom\Site\Dispatcher; use Joomla\CMS\Dispatcher\AbstractModuleDispatcher; use Joomla\CMS\HTML\HTMLHelper; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Dispatcher class for mod_custom * * @since 4.4.0 */ class Dispatcher extends AbstractModuleDispatcher { /** * Returns the layout data. * * @return array * * @since 4.4.0 */ protected function getLayoutData() { $data = parent::getLayoutData(); if (($data['params'])->get('prepare_content', 1)) { ($data['module'])->content = HTMLHelper::_('content.prepare', ($data['module'])->content, '', 'mod_custom.content'); } return $data; } } mod_easyblogpostmap/mod_easyblogpostmap.php000064400000004621152163637060015411 0ustar00config; if (!$config->get('main_locations')) { return; } $my = JFactory::getUser(); $helper = new modEasyBlogPostMapHelper($modules); // Retrieve posts $posts = $helper->getPosts(); $totalPosts = count($posts); // When there is no posts, just skip this if (!$posts) { return; } // Sort the posts $posts = $helper->sortLocation($posts); $locations = array(); if ($posts) { // always store first location $locations[] = new modEasyBlogMapLocation($posts[0]); // store previous post by reference $previousPost = $locations[0]; // start from second location to check for ($i = 1; $i < $totalPosts; $i++) { $post = $posts[$i]; $postObj = new modEasyBlogMapLocation($post); if ($helper->sameLocation($post, $previousPost)) { $previousPost->content .= $postObj->content; $previousPost->ratingid[] = $postObj->id; } else { $locations[] = $postObj; $previousPost = $locations[count($locations) - 1]; } } } if (!$locations) { return; } $osm_zoom = $params->get('osm_zoom', 15); $language = $params->get('language', 'en'); $zoom = $params->get('zoom', 15); $fitBounds = $params->get('fitbounds', 1); $mapUi = $params->get('mapui', 0) == 1? "false" : "true"; $mapWidth = $params->get('mapwidth'); $mapHeight = $params->get('mapheight'); $enableMarkerClusterer = $params->get('enableMarkerClusterer', 0) == 1? "true" : "false"; // Google Maps API Key $gMapsKey = $config->get('googlemaps_api_key'); // Generate a unique uid for this module $uid = uniqid(); require($modules->getLayout()); mod_easyblogpostmap/assets/images/rating-arrow.png000064400000000236152163637060016517 0ustar00PNG  IHDR xD eIDATx^A @PqRn!\)'r=^9(+%L~oB id = $item->id; $this->latitude = $item->latitude; $this->longitude = $item->longitude; $this->address = $item->address; $this->title = $item->title; $this->content = $item->title; if (isset($item->html)) { $this->content = $item->html; } // stores rating id in an array (custom hack when same location is loaded multiple times, rating form doesn't not get parsed properly) $this->ratingid = array($item ->id); } } mod_easyblogpostmap/tmpl/default_tooltip_content.php000064400000005235152163637060017247 0ustar00
    params->get('showimage', true) && $post->hasImage()) { ?> params->get('showavatar', false)) { ?>
    params->get('showavatar', false) ? 'colspan="2"' : '';?>>
    params->get('showauthor', true)) { ?>
    creator->getName());?>
    params->get('showaddress', true)) { ?>
    address);?>
    params->get('showcommentcount', false)) { ?>
    commentCount);?>
    params->get('showhits', false)) { ?>
    hits);?>
    params->get('showratings', true)) { ?>
    html($post, 'ebpostmap_'.$post->id.'-ratings',JText::_('MOD_EASYBLOGPOSTMAP_RATEBLOG'), !$this->params->get('enableratings', true));?>
    mod_easyblogpostmap/tmpl/default.php000064400000004626152163637060013746 0ustar00
    mod_easyblogpostmap/tmpl/tooltip.php000064400000001156152163637060014007 0ustar00 mod_easyblogpostmap/helper.php000064400000013672152163637060012626 0ustar00lib = $modules; $this->params = $this->lib->params; } /** * Retrieves a list of posts * * @since 5.1 * @access public */ public function getPosts() { $type = $this->params->get('type', 'recent'); $type = $this->normalizeFilterType($type); // Get the query $query = $this->getPostsQuery($type); $db = EB::db(); $db->setQuery($query); $posts = $db->loadObjectList(); // Format the post $posts = $this->lib->processItems($posts); // Generate the tooltips for the map $posts = $this->generateTooltips($posts); return $posts; } /** * Generates the sql query to retrieve posts * * @since 5.1 * @access public */ private function getPostsQuery($type) { $db = EB::db(); $config = EB::config(); $showBlockedUserPosts = $config->get('main_show_blockeduserposts', 0); $joinQuery = ''; $headQuery = 'SELECT a.* FROM ' . $db->qn('#__easyblog_post') . ' as a'; if (!$showBlockedUserPosts) { // exclude blocked users pots #1978 $headQuery .= ' INNER JOIN `#__users` as uu on a.`created_by` = uu.`id` and uu.`block` = 0'; } // select valid latitude/longitude or address $query = ' WHERE ((TRIM(a.' . $db->qn('latitude') . ') != ' . $db->quote('') . ' AND TRIM(a.' . $db->qn('longitude') . ') != ' . $db->quote('') . ')'; $query .= ' OR TRIM(a.' . $db->qn('address') . ') != ' . $db->quote('') . ')'; $query .= ' AND a.' . $db->qn('published') . ' = ' . $db->quote(EASYBLOG_POST_PUBLISHED); $query .= ' AND a.' . $db->qn('state') . ' = ' . $db->quote(EASYBLOG_POST_NORMAL); // @rule: When language filter is enabled, we need to detect the appropriate contents $filterLanguage = JFactory::getApplication()->getLanguageFilter(); if ($filterLanguage) { $query .= EBR::getLanguageQuery('AND', 'a.language'); } if ($type == 'author') { $bloggers = $this->lib->join($this->params->get('bloggerid')); if (!empty($bloggers)) { $query .= ' AND a.' . $db->qn('created_by') . ' IN (' . $bloggers . ')'; } } if ($type == 'category') { $categories = $this->lib->join($this->params->get('categoryid')); if (!empty($categories)) { $joinQuery .= ' INNER JOIN ' . $db->qn('#__easyblog_post_category') . ' as pc'; $joinQuery .= ' ON pc.'. $db->qn('post_id') . ' = a.' . $db->qn('id'); $query .= ' AND pc.' . $db->qn( 'category_id' ) . ' IN (' . $categories . ')'; } } if ($type == 'tags') { $tags = $this->lib->join($this->params->get('tagid')); if (!empty($post_ids)) { $joinQuery .= ' INNER JOIN ' . $db->qn('#__easyblog_post_tag') . ' as pt'; $joinQuery .= ' ON pt.'. $db->qn('post_id') . ' = a.' . $db->qn('id'); $query .= ' AND pt' . $db->qn('tag_id') . ' IN (' . $tags . ')'; } } if ($type == 'team') { $teams = $this->lib->join($this->params->get('teamids')); if (!empty($post_ids)) { $query .= ' AND a.' . $db->qn('source_type') . ' = ' . $db->Quote(EASYBLOG_POST_SOURCE_TEAM); $query .= ' AND a.' . $db->qn('source_id') . ' IN (' . $post_ids . ')'; } } if ($type == 'recent') { $featured = $this->params->get('usefeatured', false); if ($featured) { $joinQuery .= ' INNER JOIN ' . $db->qn('#__easyblog_featured') . ' as f'; $joinQuery .= ' ON f.'. $db->qn('content_id') . ' = a.' . $db->qn('id'); $joinQuery .= ' AND f.'. $db->qn('type') . ' = ' . $db->Quote(EBLOG_FEATURED_BLOG); } } // always sort by latest $query .= ' ORDER BY a.' . $db->qn('created') . ' DESC'; // set limit $count = (int) trim($this->params->get('count', 5)); if ($count < 1) { $count = 5; } $query .= ' LIMIT ' . $count; // joins the strings. $query = $headQuery . $joinQuery . $query; return $query; } /** * Generate tooltips for the posts * * @since 5.1 * @access public */ public function generateTooltips($posts) { foreach ($posts as $post) { ob_start(); include(__DIR__ . '/tmpl/tooltip.php'); $contents = ob_get_contents(); ob_end_clean(); $post->html = $contents; } return $posts; } /** * Sort the posts * * @since 5.1 * @access public */ public function sortLocation($items) { usort($items, array('modEasyBlogPostMapSorter', 'latitudesort')); usort($items, array('modEasyBlogPostMapSorter', 'longitudesort')); return $items; } /** * Given two location, determine if the location are the same * * @since 5.1 * @access public */ public function sameLocation($a, $b) { return ($a->latitude == $b->latitude && $a->longitude == $b->longitude); } /** * Normalize legacy values for post types * * @since 5.1 * @access public */ public function normalizeFilterType($type) { if ($type == '0') { return 'recent'; } if ($type == '1') { return 'author'; } if ($type == '2') { return 'category'; } if ($type == '3') { return 'tags'; } if ($type == '4') { return 'team'; } // Default filter type return $type; } } class modEasyBlogPostMapSorter { // sort by location first static function customsort($a, $b, $field) { if ($a->$field == $b->$field) { return 0; } return ($a->$field > $b->$field)? -1 : 1; } static function latitudesort($a, $b) { return self::customsort($a, $b, 'latitude'); } static function longitudesort($a, $b) { return self::customsort($a, $b, 'longitude'); } } mod_easyblogpostmap/mod_easyblogpostmap.xml000064400000020253152163637060015421 0ustar00 EasyBlog - Post Map Module Stack Ideas Sdn Bhd 26th April 2022 Copyright 2009 - 2015 Stack Ideas Sdn Bhd. All rights reserved. GPL License v2 support@stackideas.com http://stackideas.com 6.0.5 en-GB.mod_easyblogpostmap.ini assets tmpl helper.php location.php mod_easyblogpostmap.php mod_easyblogpostmap.xml
    https://stackideas.com/joomla4compat.xml
    mod_breadcrumbs/mod_breadcrumbs.xml000064400000005653152163637060013570 0ustar00 mod_breadcrumbs Joomla! Project 2006-07 (C) 2006 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.0.0 MOD_BREADCRUMBS_XML_DESCRIPTION Joomla\Module\Breadcrumbs services src tmpl language/en-GB/mod_breadcrumbs.ini language/en-GB/mod_breadcrumbs.sys.ini
    mod_breadcrumbs/services/provider.php000064400000002231152163637060014071 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Extension\Service\Provider\HelperFactory; use Joomla\CMS\Extension\Service\Provider\Module; use Joomla\CMS\Extension\Service\Provider\ModuleDispatcherFactory; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; /** * The breadcrumbs module service provider. * * @since 4.4.0 */ return new class () implements ServiceProviderInterface { /** * Registers the service provider with a DI container. * * @param Container $container The DI container. * * @return void * * @since 4.4.0 */ public function register(Container $container): void { $container->registerServiceProvider(new ModuleDispatcherFactory('\\Joomla\\Module\\Breadcrumbs')); $container->registerServiceProvider(new HelperFactory('\\Joomla\\Module\\Breadcrumbs\\Site\\Helper')); $container->registerServiceProvider(new Module()); } }; mod_breadcrumbs/tmpl/default.php000064400000010737152163637060013026 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\Router\Route; use Joomla\CMS\WebAsset\WebAssetManager; ?> mod_breadcrumbs/src/Dispatcher/Dispatcher.php000064400000002503152163637060015361 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Module\Breadcrumbs\Site\Dispatcher; use Joomla\CMS\Dispatcher\AbstractModuleDispatcher; use Joomla\CMS\Helper\HelperFactoryAwareInterface; use Joomla\CMS\Helper\HelperFactoryAwareTrait; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Dispatcher class for mod_breadcrumbs * * @since 4.4.0 */ class Dispatcher extends AbstractModuleDispatcher implements HelperFactoryAwareInterface { use HelperFactoryAwareTrait; /** * Returns the layout data. * * @return array * * @since 4.4.0 */ protected function getLayoutData(): array { $data = parent::getLayoutData(); $data['list'] = $this->getHelperFactory()->getHelper('BreadcrumbsHelper')->getBreadcrumbs($data['params'], $data['app']); $data['count'] = count($data['list']); if (!$data['params']->get('showHome', 1)) { $data['homeCrumb'] = $this->getHelperFactory()->getHelper('BreadcrumbsHelper')->getHomeItem($data['params'], $data['app']); } return $data; } } mod_breadcrumbs/src/Helper/BreadcrumbsHelper.php000064400000011744152163637060016024 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Module\Breadcrumbs\Site\Helper; use Joomla\CMS\Application\CMSApplication; use Joomla\CMS\Application\SiteApplication; use Joomla\CMS\Factory; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Multilanguage; use Joomla\Registry\Registry; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Helper for mod_breadcrumbs * * @since 1.5 */ class BreadcrumbsHelper { /** * Retrieve breadcrumb items * * @param Registry $params The module parameters * @param SiteApplication $app The application * * @return array * * @since 4.4.0 */ public function getBreadcrumbs(Registry $params, SiteApplication $app): array { // Get the PathWay object from the application $pathway = $app->getPathway(); $items = $pathway->getPathway(); $count = \count($items); // Don't use $items here as it references JPathway properties directly $crumbs = []; for ($i = 0; $i < $count; $i++) { $crumbs[$i] = new \stdClass(); $crumbs[$i]->name = stripslashes(htmlspecialchars($items[$i]->name, ENT_COMPAT, 'UTF-8')); $crumbs[$i]->link = $items[$i]->link; } if ($params->get('showHome', 1)) { array_unshift($crumbs, $this->getHomeItem($params, $app)); } return $crumbs; } /** * Retrieve home item (start page) * * @param Registry $params The module parameters * @param SiteApplication $app The application * * @return object * * @since 4.4.0 */ public function getHomeItem(Registry $params, SiteApplication $app): object { $menu = $app->getMenu(); if (Multilanguage::isEnabled()) { $home = $menu->getDefault($app->getLanguage()->getTag()); } else { $home = $menu->getDefault(); } $item = new \stdClass(); $item->name = htmlspecialchars($params->get('homeText', $app->getLanguage()->_('MOD_BREADCRUMBS_HOME')), ENT_COMPAT, 'UTF-8'); $item->link = 'index.php?Itemid=' . $home->id; return $item; } /** * Set the breadcrumbs separator for the breadcrumbs display. * * @param string $custom Custom xhtml compliant string to separate the items of the breadcrumbs * * @return string Separator string * * @since 1.5 * * @deprecated 4.4.0 will be removed in 6.0 as this function is not used anymore */ public static function setSeparator($custom = null) { $lang = Factory::getApplication()->getLanguage(); // If a custom separator has not been provided we try to load a template // specific one first, and if that is not present we load the default separator if ($custom === null) { if ($lang->isRtl()) { $_separator = HTMLHelper::_('image', 'system/arrow_rtl.png', null, null, true); } else { $_separator = HTMLHelper::_('image', 'system/arrow.png', null, null, true); } } else { $_separator = htmlspecialchars($custom, ENT_COMPAT, 'UTF-8'); } return $_separator; } /** * Retrieve breadcrumb items * * @param Registry $params The module parameters * @param CMSApplication $app The application * * @return array * * @since 1.5 * * @deprecated 4.4.0 will be removed in 6.0 * Use the non-static method getBreadcrumbs * Example: Factory::getApplication()->bootModule('mod_breadcrumbs', 'site') * ->getHelper('BreadcrumbsHelper') * ->getBreadcrumbs($params, Factory::getApplication()) */ public static function getList(Registry $params, CMSApplication $app) { return (new self())->getBreadcrumbs($params, Factory::getApplication()); } /** * Retrieve home item (start page) * * @param Registry $params The module parameters * @param CMSApplication $app The application * * @return object * * @since 4.2.0 * * @deprecated 4.4.0 will be removed in 6.0 * Use the non-static method getHomeItem * Example: Factory::getApplication()->bootModule('mod_breadcrumbs', 'site') * ->getHelper('BreadcrumbsHelper') * ->getHomeItem($params, Factory::getApplication()) */ public static function getHome(Registry $params, CMSApplication $app) { return (new self())->getHomeItem($params, Factory::getApplication()); } } mod_easyblognavigationbutton/mod_easyblognavigationbutton.php000064400000002537152163637060021235 0ustar00guest; // Build the return url $return = base64_encode(JURI::getInstance()->toString()); $helper = new EBHelperNavigation(); $subscription = $helper->getSubscriptions(); $allowManage = $helper->isAllowedManage(); $totalPending = $helper->getPendingPosts(); $totalPendingComments = $helper->getPendingComments(); $totalTeamRequests = $helper->getTeamRequests(); require($modules->getLayout()); mod_easyblognavigationbutton/mod_easyblognavigationbutton.xml000064400000004226152163637060021243 0ustar00 EasyBlog - Navigation Button Stack Ideas Sdn Bhd 26th April 2022 Copyright 2009 - 2019 Stack Ideas Sdn Bhd. All rights reserved. GPL License v2 support@stackideas.com http://stackideas.com 6.0.5 en-GB.mod_easyblognavigationbutton.ini tmpl helper.php mod_easyblognavigationbutton.php mod_easyblognavigationbutton.xml
    https://stackideas.com/joomla4compat.xml
    mod_easyblognavigationbutton/tmpl/default.php000064400000031764152163637060015661 0ustar00
    get('add_entry')) {?> get('add_entry') && $config->get('main_microblog')) { ?> get('main_sitesubscription') && $acl->get('allow_subscription')) { ?> get('layout_login') && $guest) { ?>
    mod_easyblognavigationbutton/helper.php000064400000003247152163637060014533 0ustar00acl = EB::acl(); parent::__construct(); } public function getPendingPosts() { $pending = EB::model('pending'); return $pending->getTotal($this->my->id); } public function isAllowedManage() { $allowManage = false; $permissions = array( 'add_entry', 'moderate_entry', 'manage_comment', 'create_category', 'create_tag', 'create_team_blog', ); foreach ($permissions as $permission) { if ($this->acl->get($permission)) { $allowManage = true; break; } } return $allowManage; } public function getPendingComments() { $comments = EB::model('Comments'); return $comments->getTotalPending(); } public function getTeamRequests() { $team = EB::model('TeamBlogs'); return $team->getTotalRequest(); } /* Load up the subscription record for the current user. * */ public function getSubscriptions() { $subscription = EB::table('Subscriptions'); if (!$this->my->guest) { $subscription->load(array('email' => $this->my->email, 'utype' => 'site')); } return $subscription; } }mod_articles_latest/mod_articles_latest.xml000064400000007436152163637060015353 0ustar00 mod_articles_latest Joomla! Project 2004-07 (C) 2005 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.0.0 MOD_LATEST_NEWS_XML_DESCRIPTION Joomla\Module\ArticlesLatest services src tmpl language/en-GB/mod_articles_latest.ini language/en-GB/mod_articles_latest.sys.ini
    mod_articles_latest/services/provider.php000064400000002240152163637060014762 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Extension\Service\Provider\HelperFactory; use Joomla\CMS\Extension\Service\Provider\Module; use Joomla\CMS\Extension\Service\Provider\ModuleDispatcherFactory; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; /** * The article latest module service provider. * * @since 4.2.0 */ return new class () implements ServiceProviderInterface { /** * Registers the service provider with a DI container. * * @param Container $container The DI container. * * @return void * * @since 4.2.0 */ public function register(Container $container) { $container->registerServiceProvider(new ModuleDispatcherFactory('\\Joomla\\Module\\ArticlesLatest')); $container->registerServiceProvider(new HelperFactory('\\Joomla\\Module\\ArticlesLatest\\Site\\Helper')); $container->registerServiceProvider(new Module()); } }; mod_articles_latest/tmpl/default.php000064400000001214152163637060013705 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; if (!$list) { return; } ?> mod_articles_latest/src/Dispatcher/Dispatcher.php000064400000002133152163637060016251 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Module\ArticlesLatest\Site\Dispatcher; use Joomla\CMS\Dispatcher\AbstractModuleDispatcher; use Joomla\CMS\Helper\HelperFactoryAwareInterface; use Joomla\CMS\Helper\HelperFactoryAwareTrait; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Dispatcher class for mod_articles_latest * * @since 4.2.0 */ class Dispatcher extends AbstractModuleDispatcher implements HelperFactoryAwareInterface { use HelperFactoryAwareTrait; /** * Returns the layout data. * * @return array * * @since 4.2.0 */ protected function getLayoutData() { $data = parent::getLayoutData(); $data['list'] = $this->getHelperFactory()->getHelper('ArticlesLatestHelper')->getArticles($data['params'], $this->getApplication()); return $data; } } mod_articles_latest/src/Helper/ArticlesLatestHelper.php000064400000012431152163637060017401 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Module\ArticlesLatest\Site\Helper; use Joomla\CMS\Access\Access; use Joomla\CMS\Application\SiteApplication; use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Factory; use Joomla\CMS\Router\Route; use Joomla\Component\Content\Site\Helper\RouteHelper; use Joomla\Component\Content\Site\Model\ArticlesModel; use Joomla\Database\DatabaseAwareInterface; use Joomla\Database\DatabaseAwareTrait; use Joomla\Registry\Registry; use Joomla\Utilities\ArrayHelper; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Helper for mod_articles_latest * * @since 1.6 */ class ArticlesLatestHelper implements DatabaseAwareInterface { use DatabaseAwareTrait; /** * Retrieve a list of article * * @param Registry $params The module parameters. * @param ArticlesModel $model The model. * * @return mixed * * @since 4.2.0 */ public function getArticles(Registry $params, SiteApplication $app) { // Get the Dbo and User object $db = $this->getDatabase(); $user = $app->getIdentity(); /** @var ArticlesModel $model */ $model = $app->bootComponent('com_content')->getMVCFactory()->createModel('Articles', 'Site', ['ignore_request' => true]); // Set application parameters in model $model->setState('params', $app->getParams()); $model->setState('list.start', 0); $model->setState('filter.published', 1); // Set the filters based on the module params $model->setState('list.limit', (int) $params->get('count', 5)); // This module does not use tags data $model->setState('load_tags', false); // Access filter $access = !ComponentHelper::getParams('com_content')->get('show_noauth'); $authorised = Access::getAuthorisedViewLevels($user->get('id')); $model->setState('filter.access', $access); // Category filter $model->setState('filter.category_id', $params->get('catid', [])); // State filter $model->setState('filter.condition', 1); // User filter $userId = $user->get('id'); switch ($params->get('user_id')) { case 'by_me': $model->setState('filter.author_id', (int) $userId); break; case 'not_me': $model->setState('filter.author_id', $userId); $model->setState('filter.author_id.include', false); break; case 'created_by': $model->setState('filter.author_id', $params->get('author', [])); break; case '0': break; default: $model->setState('filter.author_id', (int) $params->get('user_id')); break; } // Filter by language $model->setState('filter.language', $app->getLanguageFilter()); // Featured switch $featured = $params->get('show_featured', ''); if ($featured === '') { $model->setState('filter.featured', 'show'); } elseif ($featured) { $model->setState('filter.featured', 'only'); } else { $model->setState('filter.featured', 'hide'); } // Set ordering $order_map = [ 'm_dsc' => 'a.modified DESC, a.created', 'mc_dsc' => 'a.modified', 'c_dsc' => 'a.created', 'p_dsc' => 'a.publish_up', 'random' => $db->getQuery(true)->rand(), ]; $ordering = ArrayHelper::getValue($order_map, $params->get('ordering', 'p_dsc'), 'a.publish_up'); $dir = 'DESC'; $model->setState('list.ordering', $ordering); $model->setState('list.direction', $dir); $items = $model->getItems(); foreach ($items as &$item) { $item->slug = $item->id . ':' . $item->alias; if ($access || \in_array($item->access, $authorised)) { // We know that user has the privilege to view the article $item->link = Route::_(RouteHelper::getArticleRoute($item->slug, $item->catid, $item->language)); } else { $item->link = Route::_('index.php?option=com_users&view=login'); } } return $items; } /** * Retrieve a list of articles * * @param Registry $params The module parameters. * @param ArticlesModel $model The model. * * @return mixed * * @since 1.6 * * @deprecated 4.3 will be removed in 6.0 * Use the non-static method getArticles * Example: Factory::getApplication()->bootModule('mod_articles_latest', 'site') * ->getHelper('ArticlesLatestHelper') * ->getArticles($params, Factory::getApplication()) */ public static function getList(Registry $params, ArticlesModel $model) { return (new self())->getArticles($params, Factory::getApplication()); } } mod_jbusiness_listings/mod_jbusiness_listings.php000064400000012731152163637060016632 0ustar00get('viewtype') == 'slider' || $params->get('viewtype') == 'slider_2' || $params->get('viewtype') == 'tier') { JBusinessUtil::enqueueStyle('libraries/slick/slick.css'); JBusinessUtil::enqueueScript('libraries/slick/slick.js'); } if ($appSettings->enable_ratings) { JBusinessUtil::enqueueStyle('libraries/star-rating/star-rating.css'); JBusinessUtil::enqueueScript('libraries/star-rating/star-rating.js'); } JBusinessUtil::enqueueStyle('libraries/modal/jquery.modal.css'); JBusinessUtil::enqueueScript('libraries/modal/jquery.modal.js'); require_once HELPERS_PATH.'/translations.php'; // Include the syndicate functions only once require_once __DIR__ . '/helper.php'; JBusinessUtil::includeCSSLibraries(); JBusinessUtil::loadSiteLanguage(); //load items through cache mechanism $cache = Factory::getCache('mod_jbusiness_listings', ''); $key = 'mod_jbusiness_listings'.$module->id; if ($cache->contains($key) && $params->get("cache")) { $items = $cache->get($key); } else { $items = modJBusinessListingsHelper::getList($params); $cache->store($items, $key); } if (!empty($items)) { foreach ($items as $company) { if (GET_DATA_FROM_YELP) { $yelpData = JBusinessUtil::getYelpData($company->yelp_id, false); if (isset($yelpData->error) || empty($company->yelp_id)) { $company->review_score = 0; } else { $company->review_score = $yelpData->rating; } } if (!empty($params->get('truncate_title')) && strlen($company->name)>$params->get('truncate_title')) { $company->name = substr($company->name, 0, $params->get('truncate_title'))."..."; } } } $newTab = ($appSettings->open_listing_on_new_tab)?" target='_blank'":""; $jsSettings = JBusinessUtil::addJSSettings(); $jsSettings->isProfile = 1; $token = rand(10, 1000); if (!defined('JBD_UTILS_LOADED')) { $document = JFactory::getDocument(); $document->addScriptDeclaration(' window.addEventListener("load",function() { jbdUtils.setProperties(' . json_encode($jsSettings) . '); }); '); define('JBD_UTILS_LOADED', 1); } $document = JFactory::getDocument(); $campaignCall = ""; $campaignCallClass = ""; if (!empty($params->get('plan')) && !empty($params->get('only_campaign'))) { $campaignCallClass = 'campaignCall'; $campaignCall = " var campaignUrl = jbdUtils.getAjaxUrl('decreaseCampaignBudget', 'campaign', 'managecampaign'); var planId = '".$params->get('plan')."'; jQuery.ajax({ type:'GET', url: campaignUrl, data: { planId: planId, companyId: companyId }, dataType: 'json', cache: false, success: function(data) { console.log(data); } }); "; } $document->addScriptDeclaration(" window.addEventListener('load',function() { jQuery('.campaignCall').on('click', function() { companyId = jQuery(this).attr('data-companyId'); ".$campaignCall." }); }); "); if ($appSettings->enable_multilingual) { JBusinessDirectoryTranslations::updateBusinessListingsTranslation($items); JBusinessDirectoryTranslations::updateBusinessListingsSloganTranslation($items); } $moduleclass_sfx = htmlspecialchars((string)$params->get('moduleclass_sfx')); $backgroundCss=""; if ($params->get('backgroundColor')) { $backgroundCss = "background-color:".$params->get('backgroundColor').";"; } $borderCss=""; if (!empty(trim($params->get('borderColor')))) { $borderCss="border: 1px solid ".$params->get('borderColor').";"; } $menuItemId =""; if ($params->get('mItemId')) { $menuItemId="&Itemid=".$params->get('mItemId'); } $categoryParam = ""; $categoriesIds = $params->get('categoryIds'); if (isset($categoriesIds) && count($categoriesIds)>0 && $categoriesIds[0]!= 0 && $categoriesIds[0]!= "") { $categoryParam="&categorySearch=".$categoriesIds[0]; } $viewAllLink = JRoute::_('index.php?option=com_jbusinessdirectory&view=search'.$menuItemId.$categoryParam); $jinput = JFactory::getApplication()->input; $geoLocationParams = ""; $latitude = $jinput->get("latitude"); $longitude = $jinput->get("longitude"); if (!empty($latitude)) { $geoLocationParams = "?geo-latitude=$latitude&geo-longitude=$longitude&geolocation=1&radius=50"; } $span = $params->get('layout-type')=="vertical"?"col-12":$params->get('phoneGridOption', 'col-12').' '.$params->get('tabletGridOption', 'col-md-6').' '.$params->get('desktopGridOption', "col-lg-4"); require JModuleHelper::getLayoutPath('mod_jbusiness_listings', "default_".$params->get('viewtype', "simple")); mod_jbusiness_listings/assets/js/script.js000064400000001074152163637060015117 0ustar00function addCoordinatesToUrl(position) { var latitude = position.coords.latitude; var longitude = position.coords.longitude; var newURLString = window.location.href; newURLString += ((newURLString.indexOf('?') == -1) ? '?' : '&'); newURLString += "latitude=" + latitude; newURLString += ((newURLString.indexOf('?') == -1) ? '?' : '&'); newURLString += "longitude=" + longitude; window.location.href = newURLString; // The page will redirect instantly } function goToLink(link) { document.location.href = link; } mod_jbusiness_listings/assets/js/index.html000064400000000037152163637060015250 0ustar00 mod_jbusiness_listings/assets/index.html000064400000000037152163637060014634 0ustar00 mod_jbusiness_listings/assets/style.css000064400000007522152163637060014517 0ustar00.latestbusiness .view-all-items{ text-align: center; } .latestbusiness .view-all-items a{ background-color: white; border: 1px solid rgba(0, 0, 0, 0.075); border-radius: 3px; font-size: 14px; padding: 6px 18px; } .latestbusiness .view-all-items a:hover{ background-color: #F0F0F0; } .jbd-container .grid-divider{ display: flex; justify-content: center; align-items: center; } .latestbusiness li{ display: inline-block; clear: both; margin-bottom: 5px; } .latestbusiness ul{ margin: 0; padding: 0; } .latestbusiness .company-info{ margin-bottom: 15px; } .latestbusiness .company-name{ display: block; margin:5px 0; } .latestbusiness .company-address{ line-height: 20px!important; font-size: 13px; } .latestbusiness.list-view img{ width: 100%; } .latestbusiness .offer-overlay .offer-vertical-middle { display: table; height: 100%; width: 100%; } .latestbusiness .offer-overlay .offer-vertical-middle > div { display: table-cell; vertical-align: middle; } .latestbusiness .offer-overlay{ background: none repeat scroll 0 0 rgba(0, 0, 0, 0.5); bottom: 0; color: #fff; left: 0; opacity: 0; padding: 10px; position: absolute; right: 0; text-align: center; top: 0; transition: opacity 400ms ease 0s; z-index: 2; } .latestbusiness .company-box:hover .offer-overlay { opacity: 1; } .latestbusiness .offer-overlay .offer-vertical-middle { display: table; height: 100%; width: 100%; } .latestbusiness .offer-overlay .offer-vertical-middle > div { display: table-cell; vertical-align: middle; } .latestbusiness .offer-overlay a { background: none repeat scroll 0 0 transparent; border: 1px solid #fff; border-radius: 100px; color: #fff; cursor: pointer; display: inline-block; font-size: 12px; letter-spacing: 2px; line-height: 1; margin: 3px; opacity: 0; padding: 10px 22px; text-align: center; text-decoration: none; text-transform: uppercase; transform: scale3d(0, 0, 0); transition: all 400ms ease 0s; vertical-align: middle; } .latestbusiness:hover .offer-overlay a:hover { background: none repeat scroll 0 0 #333; border-color: #333; } .latestbusiness .offer-overlay:hover a{ opacity:1; transform: scale3d(1, 1, 1); } #latestbusiness h1 { font-size:18px; text-align: center; } #latestbusiness .col-md-12{ text-align:center; display:block; } #latestbusiness .col-md-12 ul{ display: inline-block; list-style-type: none; margin: 0; padding: 0; } #latestbusiness .col-md-12 ul li { display: inline; } .company-box { margin-bottom: 25px; text-align: center; width: 220px; margin-left: 15px; } .list-view2 .item-container{ background: #FAFAFA; padding: 10px; border: 1px solid #E8E8E8; margin-bottom: 10px; min-height: 130px; } .small-image .btn-view{ font-size:10px !important; padding: 5px 10px !important; } .medium-image.company-box{ width: 170px; height: 140px; } .small-image.company-box{ width: 120px; height: 100px; } .jbd-container.module-style-simple-1 .jitem-card .jitem-body .jitem-body-content{ justify-content: center; align-items: center; } .jbd-container.listings-simple-3 .jitem-card .jitem-logo img{ position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: center; } .listing-custom-attributes .listing-attributes .attribute-item{ display: inline-flex; align-items: center; margin-right: 7px; } .listing-custom-attributes .listing-attributes .attribute-item *[class*="la"]{ margin-right: 4px; } @media (max-width: 576px) { .dynamic-col{ width: 100% !important; height: auto !important; } .latestbusiness li{ width: 90%; } .full-width-logo{ width: 100%; margin: 0; } .full-width-logo img{ width: 100%; } }mod_jbusiness_listings/mod_jbusiness_listings.xml000064400000034316152163637060016646 0ustar00 JBusinessDirectory - Business Listings November 2013 CMSJunkie (C) CMSJunkie. All rights reserved. http://www.gnu.org/copyleft/gpl.html info@cmsjunkie.com www.cmsjunkie.com 3.5.0 JBusinessDirectory mod_jbusiness_listings.php assets tmpl helper.php index.html mod_jbusiness_listings.xml language/de-DE/de-DE.mod_jbusiness_listings.ini language/de-DE/de-DE.mod_jbusiness_listings.sys.ini language/en-GB/en-GB.mod_jbusiness_listings.ini language/en-GB/en-GB.mod_jbusiness_listings.sys.ini language/es-ES/es-ES.mod_jbusiness_listings.ini language/es-ES/es-ES.mod_jbusiness_listings.sys.ini language/fr-FR/fr-FR.mod_jbusiness_listings.ini language/fr-FR/fr-FR.mod_jbusiness_listings.sys.ini language/nl-NL/nl-NL.mod_jbusiness_listings.ini language/nl-NL/nl-NL.mod_jbusiness_listings.sys.ini language/pt-PT/pt-PT.mod_jbusiness_listings.ini language/pt-PT/pt-PT.mod_jbusiness_listings.sys.ini
    mod_jbusiness_listings/tmpl/default_slider.php000064400000020036152163637060016011 0ustar00get('rtl'); $showLocation = isset($showLocation)?$showLocation:1; $appSettings = JBusinessUtil::getApplicationSettings(); $enablePackages = $appSettings->enable_packages; $idnt = rand(500, 1500); $sliderId = rand(1000,10000); $sliderParams = array(); $sliderParams['sliderId'] = $sliderId; $sliderParams['autoplay'] = $params->get('autoplay') ? true : false; $sliderParams['autoplaySpeed'] = $params->get('autoplaySpeed'); $sliderParams['nrVisibleItems'] = $params->get('nrVisibleItems'); $sliderParams['nrItemsToScrool'] = $params->get('nrItemsToScrool'); $sliderParams['rtl'] = $dir ? true : false; $user = JBusinessUtil::getUser(); $showData = !($user->id==0 && $appSettings->show_details_user == 1); $db = JFactory::getDBO(); require_once BD_CLASSES_PATH.'/attributes/attributeservice.php'; ?>
    class="" data-companyId="id ?>" href="link, ENT_QUOTES) ?>"> logoLocation)) { ?> <?php echo $item->name ?> <?php echo $item->name ?>

    name ?>

    phone) && $showData && (isset($item->packageFeatures) && in_array(PHONE,$item->packageFeatures) || !$enablePackages)) { ?>
    phone, ENT_QUOTES) ?>
    website) && (isset($item->packageFeatures) && in_array(WEBSITE_ADDRESS,$item->packageFeatures) || !$enablePackages)){ if ($appSettings->enable_link_following){ $followLink = (isset($item->packageFeatures) && in_array(LINK_FOLLOW,$item->packageFeatures) && $enablePackages)?'rel="follow noopener"' : 'rel="nofollow noopener"'; }else{ $followLink ='rel="noopener"'; }?> customAttributes)) { ?>
    customAttributes as $attribute) { // $icons = AttributeService::getAttributeIcons($attribute, $appSettings->enable_packages, $item->packageFeatures); $color = !empty($attribute->color)?$attribute->color:''; if(!empty($icons)) { foreach($icons as $icon) echo ''; } }?>
    class="" data-companyId="id ?>" href="link, ENT_QUOTES) ?>"> name ?> review_score) && $appSettings->enable_ratings){ ?>
    mainCategoryIcon) || !empty($item->categoryIconImage)){ ?> mainCategoryIcon, $item->categoryIconImage, $attributes) ?>
    get('showviewall')){?>
    mod_jbusiness_listings/tmpl/default_simple.php000064400000010643152163637060016023 0ustar00

    slogan)) { echo $item->slogan; } else if(!empty($item->short_description)) { echo JBusinessUtil::truncate($item->short_description, 200); } else if(!empty($item->description)) { echo JBusinessUtil::truncate($item->description, 200); } ?>

    get('showviewall')){?>
    mod_jbusiness_listings/tmpl/default_list2.php000064400000005035152163637060015566 0ustar00 mod_jbusiness_listings/tmpl/default_slider_2.php000064400000022464152163637060016241 0ustar00get('rtl'); $showLocation = isset($showLocation)?$showLocation:1; $appSettings = JBusinessUtil::getApplicationSettings(); $enablePackages = $appSettings->enable_packages; $idnt = rand(500, 1500); $sliderId = rand(1000,10000); $sliderParams = array(); $sliderParams['sliderId'] = $sliderId; $sliderParams['autoplay'] = $params->get('autoplay') ? true : false; $sliderParams['autoplaySpeed'] = $params->get('autoplaySpeed'); $sliderParams['nrVisibleItems'] = $params->get('nrVisibleItems'); $sliderParams['nrItemsToScrool'] = $params->get('nrItemsToScrool'); $sliderParams['rtl'] = $dir ? true : false; $user = JBusinessUtil::getUser(); $showData = !($user->id==0 && $appSettings->show_details_user == 1); $db = JFactory::getDBO(); require_once BD_CLASSES_PATH.'/attributes/attributeservice.php'; $menuItemId = JBusinessUtil::getActiveMenuItem(); ?>
    class="" data-companyId="id ?>" href="link, ENT_QUOTES) ?>"> package) && in_array(SHOW_COMPANY_LOGO, $item->package))) && !empty($item->business_cover_image)) { ?> <?php echo $item->name ?> <?php echo $item->name ?>
    review_score) && $appSettings->enable_ratings){ ?> nr_reviews)){ ?>
    nr_reviews." ".JText::_("LNG_REVIEWS") ?>
    slogan)) { echo JBusinessUtil::truncate($item->slogan, 75); } else if(!empty($item->short_description)) { echo JBusinessUtil::truncate($item->short_description, 75); } ?>
    mainCategoryIcon) || !empty($item->categoryIconImage)) { ?> mainCategoryIcon, $item->categoryIconImage) ?> mainCategory ?> packageFeatures) && in_array(PHONE, $item->packageFeatures) || !$enablePackages)) { ?> phone)) { ?>
    packageFeatures) && in_array(CONTACT_FORM, $item->packageFeatures) || !$enablePackages)) { ?> show_contact_form) { ?>
    get('showviewall')){?>
    mod_jbusiness_listings/tmpl/default_tier.php000064400000011211152163637060015465 0ustar00get('max-numbers-row'); $showHeader = $params->get('show-header'); $imageSize = $params->get('image_size'); $span = $params->get('phoneGridOption').' '.$params->get('tabletGridOption').' '.$params->get('desktopGridOption'); $imageClass = ''; if ($imageSize == 1) { $imageClass = 'small-image'; } else if ($imageSize == 2) { $imageClass = 'medium-image'; } if(!empty($max_numbers_row) && is_numeric($max_numbers_row)) { $percent = 100/$max_numbers_row; $width = $percent.'%'; ?> mod_jbusiness_listings/tmpl/default_list.php000064400000005073152163637060015506 0ustar00 mod_jbusiness_listings/tmpl/listing_utils.php000064400000014223152163637060015715 0ustar00id > 0) { $userNameDetails = explode(' ', $user->name); $firstName = $userNameDetails[0]; $lastName = (count($userNameDetails) > 1) ? $userNameDetails[1] : ''; } ?> mod_jbusiness_listings/tmpl/default_simple_3.php000064400000014263152163637060016247 0ustar00enable_packages; $idnt = rand(500, 1500); $user = JBusinessUtil::getUser(); $showData = !($user->id==0 && $appSettings->show_details_user == 1); ?>
    class="" data-companyId="id ?>" href="link, ENT_QUOTES) ?>"> package) && in_array(SHOW_COMPANY_LOGO, $item->package))) && !empty($item->business_cover_image)) { ?> <?php echo $item->name ?> <?php echo $item->name ?>
    review_score) && $appSettings->enable_ratings){ ?> nr_reviews > 0){ ?>
    nr_reviews." ".JText::_("LNG_REVIEWS") ?>
    slogan)) { echo JBusinessUtil::truncate($item->slogan, 75); } else if(!empty($item->short_description)) { echo JBusinessUtil::truncate($item->short_description, 75); } ?>
    mainCategoryIcon) || !empty($item->categoryIconImage)) { ?> mainCategoryIcon, $item->categoryIconImage) ?> mainCategory ?> packageFeatures) && in_array(PHONE, $item->packageFeatures) || !$enablePackages)) { ?> phone)) { ?>
    packageFeatures) && in_array(CONTACT_FORM, $item->packageFeatures) || !$enablePackages)) { ?> show_contact_form) { ?>
    get('showviewall')){?>
    mod_jbusiness_listings/tmpl/default_simple_2.php000064400000013406152163637060016244 0ustar00
    review_score) && $appSettings->enable_ratings){ ?>
    review_score ?> / 5

    slogan)) { echo $item->slogan; } ?>

    phone)) { ?>

    phone ?>

    customAttributes)) {?>
    customAttributes, $appSettings->enable_packages, $item->package, true); echo $renderedContent; ?>
    mainCategoryIcon) || !empty($item->categoryIconImage)) { ?> show_open_status && $item->enableWorkingStatus){ if ($item->openStatus){?>
    get('showviewall')){?>
    mod_jbusiness_listings/tmpl/index.html000064400000000037152163637060014306 0ustar00 mod_jbusiness_listings/tmpl/default_tier_type.php000064400000011141152163637060016530 0ustar00get('max-numbers-row'); $showHeader = $params->get('show-header'); $imageSize = $params->get('image_size'); $span = $params->get('phoneGridOption').' '.$params->get('tabletGridOption').' '.$params->get('desktopGridOption'); $imageClass = ''; if ($imageSize == 1) { $imageClass = 'small-image'; } else if ($imageSize == 2) { $imageClass = 'medium-image'; } if(!empty($max_numbers_row) && is_numeric($max_numbers_row)) { $percent = 100/$max_numbers_row; $width = $percent.'%'; ?> mod_jbusiness_listings/helper.php000064400000032312152163637060013326 0ustar00enable_packages; // Get the database object. $db = JFactory::getDBO(); $catNameFilter = ""; if(isset($_REQUEST["video_category"])){ $cat = $_REQUEST["video_category"]; $catNameFilter = " and cg.name like '%$cat->name%'"; } if(isset($_REQUEST["current_listing"]) && $params->get('listing_link')){ $listing = $_REQUEST["current_listing"]; $catId = $listing->mainSubcategory; $itemId = $listing->id; $catNameFilter = " and cg.id = $catId and cp.id!= $itemId"; } $whereCatCond = ''; $categoriesIds = $params->get('categoryIds'); if (isset($categoriesIds) && count($categoriesIds)>0 && $categoriesIds[0]!= 0 && $categoriesIds[0]!= "") { $categoriesIDs = implode(",", $params->get('categoryIds')); $whereCatCond = " and cc.categoryId in ($categoriesIDs)"; } $companyStatusFilter="and cp.approved = ".COMPANY_STATUS_APPROVED; if (($appSettings->enable_item_moderation=='0' || ($appSettings->enable_item_moderation=='1' && $appSettings->show_pending_approval == '1'))) { $companyStatusFilter = "and (cp.approved = ".COMPANY_STATUS_APPROVED." or cp.approved= ".COMPANY_STATUS_CREATED.") "; } $packageFilter = ''; if ($appSettings->enable_packages) { $packageFilter = " and ( ( (inv.state= ".PAYMENT_STATUS_PAID." and ( ( (( now() between inv.start_date and inv.end_date) or p.expiration_type=1) or (now() between inv.start_trial_date and inv.end_trial_date) ) )) ) or ( ((p.expiration_type=1 and p.price=0) or (p.id = cp.package_id and p.price=0))) )"; } $only_with_logo = $params->get('only_with_logo'); //dump($city); $whereLogoCond=''; if (!empty($only_with_logo)) { $whereLogoCond=" and cp.logoLocation != '' "; } $city = $params->get('city'); //dump($city); $whereCityCond=''; if (!empty($city)) { $whereCityCond=" and cp.city = '".$db->escape($city)."' "; } $region = $params->get('region'); //dump($city); $whereRegionCond=''; if (!empty($region)) { $whereRegionCond=" and cp.county = '".$db->escape($region)."' "; } $countryId = $params->get('country'); $whereCountryCond=''; if (!empty($countryId)) { $whereCountryCond=" and cp.countryId = ".$db->escape($countryId); } $type = $params->get('type'); $whereTypeCond=''; if (!empty($type)) { $type = $db->escape($type); $whereTypeCond=" and find_in_set($type,cp.typeId) "; } $membership = $params->get('membership'); $leftJoinCompanyMembership = ""; $leftJoinMemberships = ""; $whereMembershipCondition = ""; if (!empty($membership)) { $leftJoinMemberships = " left join #__jbusinessdirectory_memberships as mmb on mmb.id = $membership"; $leftJoinCompanyMembership = " left join #__jbusinessdirectory_company_membership as cmb on cmb.company_id = cp.id"; $whereMembershipCondition = "and cmb.membership_id = mmb.id"; } $plan = $params->get('plan'); $onlyCampaigns = $params->get('only_campaign'); $wherePlanCondition = ""; $leftJoinCampaign = ""; $leftJoinCampaignHasPlans = ""; $leftJoinCampaignPlans = ""; if (!empty($plan) && !empty($onlyCampaigns) && JBusinessUtil::isAppInstalled(JBD_APP_CAMPAIGNS)) { $wherePlanCondition = " and cmp.id = $plan and cmg.published = 1 and cmg.status = ".CAMPAIGN_STATUS_PAID." and cmg.budget > 0"; $leftJoinCampaign = " left join #__jbusinessdirectory_campaigns as cmg on cmg.company_id = cp.id"; $leftJoinCampaignHasPlans = " left join #__jbusinessdirectory_campaign_has_plans as chp on chp.campaign_id = cmg.id"; $leftJoinCampaignPlans = " left join #__jbusinessdirectory_campaign_plans as cmp on cmp.id = chp.campaign_plan_id"; } $ordering = $params->get('order'); if ($ordering == 1) { $orderBy ="slec.creationDate desc"; } elseif ($ordering == 2) { $orderBy ="slec.id asc"; } elseif ($ordering == 3) { $orderBy ="slec.name asc"; } elseif ($ordering == 4) { $orderBy = "slec.review_score desc"; } else { $orderBy = " rand() "; } $nrResults = $params->get('count'); $radius = $params->get('radius'); $radius = $db->escape($radius); $jinput = JFactory::getApplication()->input; $latitude = $jinput->get("geo-latitude"); $latitude = $db->escape($latitude); $longitude = $jinput->get("geo-longitude"); $longitude = $db->escape($longitude); $enableNearby = $params->get('nearby'); $whereCompanyCond = ''; if ($enableNearby) { $companyId = $jinput->get('companyId'); if (!empty($companyId)) { $company = self::getCompany($companyId); $latitude = $company->latitude; $longitude = $company->longitude; //if the module is in a company details page, exclude that company from the nearby list $whereCompanyCond = ' and cp.id not in ('.$companyId.')'; // if company location is not set while enable nearby is active, // the results should be empty if (empty($latitude) && empty($longitude)) { return null; } } } $distance = ""; if (!empty($latitude) && !empty($longitude) && $radius>0 && ($params->get('geo_location') || $enableNearby)) { $distance = ", 3956 * 2 * ASIN(SQRT( POWER(SIN(($latitude -( slec.latitude)) * pi()/180 / 2),2) + COS($latitude * pi()/180 ) * COS( abs( slec.latitude) * pi()/180) * POWER(SIN(($longitude - slec.longitude) * pi()/180 / 2), 2) )) as distance"; } $publishFilter = ''; $publishFilter = " and (cp.publish_start_date<=DATE(now()) or cp.publish_start_date='0000-00-00' or cp.publish_start_date is null) and (cp.publish_end_date>=DATE(now()) or cp.publish_end_date='0000-00-00' or cp.publish_end_date is null) "; $having = ""; if (!empty($latitude) && !empty($longitude) && $radius>0 && ($params->get('geo_location') || $enableNearby)) { $having .= " and distance < $radius"; } else { $having = ""; } $whereFeatured = ''; $featured = $params->get('only_featured'); if ($featured) { $whereFeatured = ' and featuredListing = 1'; } $searchImages = false; if ($params->get('viewtype')=="simple_3") { $searchImages = true; } $wherePackageCond = ''; $packages = $params->get('packages'); if (!empty($packages) && $enablePackage) { $packagesIds = implode(",", $packages); $wherePackageCond = " and (inv.package_id in ($packagesIds) or p.id in ($packagesIds)) "; } $weekday = date("N"); $whereListingsCond = ''; if ($params->get('show_recently_viewed') && isset($_COOKIE['jbdViewedListings'])) { $listingIds = explode(",", $_COOKIE['jbdViewedListings']); $listingIds = array_filter($listingIds); if(!empty($listingIds)){ $listingIds = implode(",",$listingIds); $whereListingsCond = "and cp.id in ($listingIds)"; } } $query = "select slec.*, mainCategory, mainCategoryId, companyName, companyId1". ($enablePackage?" ,features, GREATEST(if(FIND_IN_SET('featured_companies',features) ,1,0), featured) as featuredListing":" ,featured as featuredListing "). " $distance from ( select cp.id, cp.name, cp.alias, cp.short_description, cp.description, cp.street_number, cp.area, cp.address, cp.city, cp.county, cp.province, cp.postalCode, cp.website, cp.phone, cp.email, cp.state, cp.fax, cp.business_cover_image, cp.averageRating, cp.slogan, cp.logoLocation, cp.creationDate, cp.latitude, cp.longitude,cp.mainSubcategory, cp.publish_start_date, cp.publish_end_date, cp.review_score, cp.yelp_id, cp.featured,cp.publish_only_city, cp.name as companyName,cp.id as companyId1, cn.country_name as countryName,GROUP_CONCAT(distinct ct.name) as typeName,". ($appSettings->show_open_status?" cph.start_hour,cph.end_hour,":""). ($searchImages?" GROUP_CONCAT( DISTINCT CONCAT_WS('#', cpt.picture_path, cpt.picture_title, cpt.picture_info)) as pictures, ":""). (!empty($whereCatCond)?" GROUP_CONCAT( DISTINCT cg.id) as categoryIds, GROUP_CONCAT(DISTINCT cg.name separator '#') as categoryNames, GROUP_CONCAT( DISTINCT cg.id,'|',cg.name,'|',cg.alias ORDER BY cg.name separator '#') as categories, ":""). ($enablePackage?" GROUP_CONCAT(DISTINCT pf.feature) as features,":""). " bc.name as mainCategory, bc.id as mainCategoryId, bc.icon as mainCategoryIcon, bc.iconImgLocation as categoryIconImage, bc.alias as mainCategoryAlias, bc.color as mainCategoryColor from #__jbusinessdirectory_companies cp". (!empty($whereCatCond) || !empty($catNameFilter) ?" left join #__jbusinessdirectory_company_category cc on cp.id=cc.companyId left join #__jbusinessdirectory_categories cg on cg.id=cc.categoryId ":""). " left join #__jbusinessdirectory_categories bc on bc.id=cp.mainSubcategory left join #__jbusinessdirectory_countries cn on cp.countryId=cn.id". ($appSettings->show_open_status?" left join #__jbusinessdirectory_company_provider_hours cph on cp.id = cph.provider_id and cph.item_type = ".BUSINESS_HOURS." and cph.type = ".STAFF_WORK_HOURS." and cph.status = 1 and cph.weekday = $weekday ":""). " left join #__jbusinessdirectory_company_types ct on find_in_set(ct.id,cp.typeId)". ($searchImages?" left join #__jbusinessdirectory_company_pictures cpt on cpt.companyId=cp.id and cpt.picture_enable = 1 ":""). ($enablePackage?" left join #__jbusinessdirectory_orders inv on inv.company_id=cp.id left join #__jbusinessdirectory_packages p on (inv.package_id=p.id and p.status=1 and $enablePackage) or (p.price=0 and (p.expiration_type=1 or cp.package_id = p.id) and p.status=1 and $enablePackage) left join #__jbusinessdirectory_package_fields pf on p.id=pf.package_id ":""). " $leftJoinCampaign $leftJoinCampaignHasPlans $leftJoinCampaignPlans $leftJoinMemberships $leftJoinCompanyMembership where 1 $wherePlanCondition $whereCatCond $packageFilter $whereMembershipCondition and cp.state=1 $companyStatusFilter $whereCityCond $whereRegionCond $whereTypeCond $whereCountryCond $whereLogoCond $publishFilter $whereCompanyCond $catNameFilter $wherePackageCond $whereListingsCond group by cp.id order by cp.name) as slec group by companyId1 having 1 $having $whereFeatured order by $orderBy"; // Set the query and get the result list. $db->setQuery($query, 0, $nrResults); $items = $db->loadObjectlist(); $link_target = $params->get('link_target'); $selAttributes = $params->get('customAttributes'); if(!empty($selAttributes)){ $selAttributes = array_filter($selAttributes); } foreach ($items as $key => $item) { if (!empty($item->features)) { $item->package = explode(",", $item->features); }else{ $item->package = array(); } if (!empty($item->website) && $link_target == 2) { $item->link = $item->website; } else { $item->link = JBusinessUtil::getCompanyLink($item, true); } $item->mainCategoryLink = JBusinessUtil::getCategoryLink($item->mainCategoryId, $item->mainCategoryAlias); if ((!$enablePackage || isset($item->package) && in_array(SHOW_COMPANY_LOGO, $item->package))) { $item->logoLocation = str_replace(" ", "%20", $item->logoLocation); } else { // $item->logoLocation = ""; // if ($only_with_logo) { // //unset($items[$key]); // } } $categoryId = null; if ($appSettings->enable_attribute_category) { $categoryId = -1; if (!empty($item->mainCategoryId)) { $categoryId = $item->mainCategoryId; } } if ($appSettings->show_open_status) { $startTime = date("Y-m-d") . " " . $item->start_hour; $endTime = date("Y-m-d") . " " . $item->end_hour; $currentTime = date('Y-m-d h:i A'); $item->openStatus = JBusinessUtil::checkDateInterval($startTime, $endTime, $currentTime, false, true); } $item->enableWorkingStatus = false; if (!empty($item->start_hour)) { $item->enableWorkingStatus = true; } if(!empty($selAttributes)){ $attributesTable = JTable::getInstance('CompanyAttributes'); $customAttributes = $attributesTable->getCompanyAttributes($item->id, $categoryId); $attributes = array(); foreach ($customAttributes as $attr){ if (in_array($attr->id, $selAttributes)){ $attributes[]=$attr; } } $item->customAttributes = $attributes; } } $listings = array_values($items); return $listings; } public static function getCompany($companyId) { $db =JFactory::getDbo(); $query = "select bc.* from #__jbusinessdirectory_companies bc where bc.id=".$companyId; $db->setQuery($query); $result = $db->loadObject(); return $result; } } mod_jbusiness_listings/index.html000064400000000037152163637060013332 0ustar00 mod_whosonline/mod_whosonline.xml000064400000004703152163637060013353 0ustar00 mod_whosonline Joomla! Project 2004-07 (C) 2005 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.0.0 MOD_WHOSONLINE_XML_DESCRIPTION Joomla\Module\Whosonline mod_whosonline.php src tmpl language/en-GB/mod_whosonline.ini language/en-GB/mod_whosonline.sys.ini
    mod_whosonline/tmpl/default.php000064400000002111152163637060012705 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Language\Text; ?>

    0) && count($names)) : ?> get('filter_groups', 0)) : ?>

    mod_whosonline/tmpl/disabled.php000064400000000633152163637060013037 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Language\Text; ?>

    mod_whosonline/mod_whosonline.php000064400000001546152163637060013344 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Helper\ModuleHelper; use Joomla\Module\Whosonline\Site\Helper\WhosonlineHelper; // Check if session metadata tracking is enabled if ($app->get('session_metadata', true)) { $showmode = $params->get('showmode', 0); if ($showmode == 0 || $showmode == 2) { $count = WhosonlineHelper::getOnlineCount(); } if ($showmode > 0) { $names = WhosonlineHelper::getOnlineUserNames($params); } require ModuleHelper::getLayoutPath('mod_whosonline', $params->get('layout', 'default')); } else { require ModuleHelper::getLayoutPath('mod_whosonline', 'disabled'); } mod_whosonline/src/Helper/WhosonlineHelper.php000064400000006577152163637060015624 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Module\Whosonline\Site\Helper; use Joomla\CMS\Factory; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Helper for mod_whosonline * * @since 1.5 */ class WhosonlineHelper { /** * Show online count * * @return array The number of Users and Guests online. * * @since 1.5 **/ public static function getOnlineCount() { $db = Factory::getDbo(); // Calculate number of guests and users $result = []; $user_array = 0; $guest_array = 0; $whereCondition = Factory::getApplication()->get('shared_session', '0') ? 'IS NULL' : '= 0'; $query = $db->getQuery(true) ->select('guest, client_id') ->from('#__session') ->where('client_id ' . $whereCondition); $db->setQuery($query); try { $sessions = (array) $db->loadObjectList(); } catch (\RuntimeException $e) { $sessions = []; } if (\count($sessions)) { foreach ($sessions as $session) { // If guest increase guest count by 1 if ($session->guest == 1) { $guest_array++; } // If member increase member count by 1 if ($session->guest == 0) { $user_array++; } } } $result['user'] = $user_array; $result['guest'] = $guest_array; return $result; } /** * Show online member names * * @param mixed $params The parameters * * @return array (array) $db->loadObjectList() The names of the online users. * * @since 1.5 **/ public static function getOnlineUserNames($params) { $whereCondition = Factory::getApplication()->get('shared_session', '0') ? 'IS NULL' : '= 0'; $db = Factory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName(['a.username', 'a.userid', 'a.client_id'])) ->from($db->quoteName('#__session', 'a')) ->where($db->quoteName('a.userid') . ' != 0') ->where($db->quoteName('a.client_id') . ' ' . $whereCondition) ->group($db->quoteName(['a.username', 'a.userid', 'a.client_id'])); $user = Factory::getUser(); if (!$user->authorise('core.admin') && $params->get('filter_groups', 0) == 1) { $groups = $user->getAuthorisedGroups(); if (empty($groups)) { return []; } $query->leftJoin($db->quoteName('#__user_usergroup_map', 'm'), $db->quoteName('m.user_id') . ' = ' . $db->quoteName('a.userid')) ->leftJoin($db->quoteName('#__usergroups', 'ug'), $db->quoteName('ug.id') . ' = ' . $db->quoteName('m.group_id')) ->whereIn($db->quoteName('ug.id'), $groups) ->where($db->quoteName('ug.id') . ' <> 1'); } $db->setQuery($query); try { return (array) $db->loadObjectList(); } catch (\RuntimeException $e) { return []; } } } mod_easyblogimagewall/mod_easyblogimagewall.php000064400000001750152163637060016147 0ustar00getPosts(); // Format the post $posts = $modules->processItems($posts); require($modules->getLayout()); mod_easyblogimagewall/tmpl/default.php000064400000002501152163637060014213 0ustar00
    get('columns', 1) == 0) { ?>
    mod_easyblogimagewall/helper.php000064400000003413152163637060013075 0ustar00lib = $modules; $this->params = $this->lib->params; } public function getPosts() { $count = (int) $this->params->get('count', 0); // Retrieve the model from the component. $model = EB::model('Blog'); $categories = $this->params->get('catid'); $type = !empty($categories) ? 'categoryimage' : 'image'; if ($categories && !is_array($categories)) { $categories = explode(',', $categories); $categories = array_map('trim', $categories); } $sorting = array(); $sorting[] = $this->params->get('sorting', 'latest'); $sorting[] = $this->params->get('ordering', 'desc'); $rows = $model->getBlogsBy($type, $categories, $sorting, $count, EBLOG_FILTER_PUBLISHED, null, false, array(), false, false, true, array(), array(), null, 'listlength', true, array(), array(), false, array(), array('paginationType' => 'none')); return $rows; } /** * get post image * * @since 5.1 * @access public */ public function getImage($content) { $pattern = '#]*>#i'; preg_match($pattern, $content, $matches); if (isset($matches[0])) { return $matches[0]; } return false; } } mod_easyblogimagewall/mod_easyblogimagewall.xml000064400000005710152163637060016160 0ustar00 EasyBlog - Image Wall Module Stack Ideas Sdn Bhd 26th April 2022 Copyright 2009 - 2015 Stack Ideas Sdn Bhd. All rights reserved. GPL License v2 support@stackideas.com http://stackideas.com 6.0.5 tmpl helper.php mod_easyblogimagewall.php mod_easyblogimagewall.xml styles.css
    https://stackideas.com/joomla4compat.xml
    mod_easyblogimagewall/styles.css000064400000000753152163637060013146 0ustar00div.mod_easyblogimagewall{ background: none; list-style: none; } div.mod_easyblogimagewall span.item-wrapper{ position: relative; display: inline-block; float: left; } div.mod_easyblogimagewall span.item-wrapper{ margin: 0 0 20px 20px; } div.mod_easyblogimagewall span.item-title{ position: absolute; bottom: 0; height: 50px; font-weight: 700; left: 0; background: #000; opacity: 0.8; text-align: center; padding: 8px 0 8px; overflow: hidden; color: #fff; width: 100%; }mod_easyblogteamblogs/mod_easyblogteamblogs.php000064400000001725152163637060016177 0ustar00get('avatarwidth', '50'); $height = $params->get('avatarheight', '50'); $model = EB::model('TeamBlogs'); $teams = $model->getTeamBlogs(); require($modules->getLayout()); mod_easyblogteamblogs/mod_easyblogteamblogs.xml000064400000003625152163637060016211 0ustar00 EasyBlog - Team Blogs Module Stack Ideas Sdn Bhd 26th April 2022 Copyright 2009 - 2015 Stack Ideas Sdn Bhd. All rights reserved. GPL License v2 support@stackideas.com http://stackideas.com 6.0.5 en-GB.mod_easyblogteamblogs.ini tmpl mod_easyblogteamblogs.php mod_easyblogteamblogs.xml
    https://stackideas.com/joomla4compat.xml
    mod_easyblogteamblogs/tmpl/default.php000064400000003332152163637060014231 0ustar00

    title;?>

    getDescription();?>
    getMembersCount());?>
    mod_easybloglatestblogs/mod_easybloglatestblogs.xml000064400000024447152163637060017132 0ustar00 EasyBlog - Latest Blogs Module Stack Ideas Sdn Bhd 26th April 2022 Copyright 2009 - 2019 Stack Ideas Sdn Bhd. All rights reserved. GPL License v2 support@stackideas.com http://stackideas.com 6.0.5 en-GB.mod_easybloglatestblogs.ini tmpl helper.php mod_easybloglatestblogs.php mod_easybloglatestblogs.xml
    https://stackideas.com/joomla4compat.xml
    mod_easybloglatestblogs/mod_easybloglatestblogs.php000064400000003514152163637060017111 0ustar00config; // We need to normalize the filter type because of legacy issues $filterType = $modules->params->get('type'); $filterType = $helper->normalizeFilterType($filterType); // Other parameters $layout = $params->get('alignment', 'vertical'); // EasyBlog 5.0.x backward compatible fixes if (!in_array($layout, array('vertical', 'horizontal'))) { $layout = 'vertical'; } $columnCount = $params->get('column', 3); $enableRatings = $params->get('enableratings', false); $excludeFeatured = $params->get('excludefeatured', false); $viewAllButtonSuffix = $params->get('allentries_suffix', ''); // Get photo layout and alignment settings $photoLayout = $modules->getCoverLayout(); $photoAlignment = $modules->getCoverAlignment(); // Get post items $posts = $helper->getItems($filterType); if (!$posts) { if ($helper->hasErrors()) { echo JText::_($helper->getError()); } return; } require($modules->getLayout()); mod_easybloglatestblogs/tmpl/default_vertical.php000064400000001552152163637060016472 0ustar00
    mod_easybloglatestblogs/tmpl/default_item_heading.php000064400000003555152163637060017303 0ustar00
    get('showavatar', false) && $filterType != 'author') { ?> get('showtavatar', false) && $post->isTeamBlog()) { ?>
    get('showauthor', false)) { ?> getAuthor()->getName(); ?> get('showdate' , true)) { ?>
    getDisplayDate($params->get('sourcedate', ''))->format($params->get('dateformat', JText::_('DATE_FORMAT_LC3'))); ?>
    mod_easybloglatestblogs/tmpl/default_horizontal.php000064400000002064152163637060017051 0ustar00
    config->get('main_ratings') && $params->get('showratings', false) && $post->showRating) { ?>
    html($post, 'eblatestblogs-' . $post->id . '-ratings', JText::_('MOD_LATESTBLOGS_RATEBLOG'), !$enableRatings); ?>
    get('showhits' , false) || $params->get('showcommentcount', false) || $params->get('showreadmore', true)) { ?>
    get('showhits' , true)) { ?>
    hits;?>
    get('showcommentcount', false)) { ?> get('showreadmore', true)) { ?>
    mod_easybloglatestblogs/tmpl/default_item_content.php000064400000007343152163637060017355 0ustar00 posttype == 'quote') { ?>
    title);?>
    content; ?>
    posttype == 'video' && !empty($post->videos) && $params->get('video_show', false)) { ?>
    videos as $video) { ?>
    html; ?>
    posttype, ['twitter', 'link'])) { ?> get('photo_show', true) && $post->cover) { ?>
    full) && $photoLayout->full) ? "is-full" : '';?>"> isCoverImage) { ?> crop) && $photoLayout->crop) { ?> <?php echo $post->title;?> <?php echo $post->title;?> isCoverImage) { ?> isEmbedCover()) { ?>
    videoEmbedCover; ?>
    videoCover; ?>
    get('showcategory', true)) { ?> getCategories() as $category) { ?>
    getTitle(); ?>
    posttype, ['quote', 'video']) && $params->get('showintro', '-1') != '-1') { ?>
    summary; ?>
    mod_easybloglatestblogs/tmpl/default.php000064400000002744152163637060014605 0ustar00
    ">
    get('allentrieslink', false)) { ?>
    config->get('main_ratings')) { ?> mod_easybloglatestblogs/helper.php000064400000024056152163637060013464 0ustar00lib = $modules; $this->params = $this->lib->params; } /** * Retrieve items based on a particular set of filter type * * @since 5.1 * @access public */ public function getItems($filterType) { $method = 'get' . ucfirst($filterType) . 'Posts'; if (!method_exists($this, $method)) { return false; } return $this->$method(); } /** * Retrieves recent posts * * @since 5.1 * @access public */ public function getRecentPosts() { $posts = $this->getPosts(); return $posts; } /** * Retrieves posts by the current logged in user * * @since 5.2.0 * @access public */ public function getViewerPosts() { if (!$this->my->id) { return false; } $id = (int) $this->my->id; $posts = $this->getPosts($id, 'blogger'); return $posts; } /** * Retrieves recent posts by author * * @since 5.1 * @access public */ public function getAuthorPosts() { $id = (int) $this->lib->params->get('bloggerlist', ''); if (!$id) { $this->setError('MOD_LATESTBLOGS_SELECT_BLOGGER'); return false; } $posts = $this->getPosts($id, 'blogger'); return $posts; } /** * Retrieves recent posts * * @since 5.1 * @access public */ public function getCategoryPosts() { $id = (int) $this->params->get('cid', ''); if (!$id) { $this->setError(JText::_('MOD_LATESTBLOGS_SELECT_CATEGORY')); return false; } // Load up the category table $category = EB::table('Category'); $category->load($id); // Check if the category is a private category. If it is private, ensure that the user has access // to view the category. if ($category->private != 0 && $this->my->guest) { $privacy = $category->checkPrivacy(); if (!$privacy->allowed) { $this->setError(JText::_('MOD_LATESTBLOGS_CATEGORY_IS_CURRENTLY_SET_TO_PRIVATE')); return false; } } // Initialize the default list of categories. $catIds = array($category->id); // If configured to display subcategory items if ($this->lib->params->get('includesubcategory', 0)) { $category->childs = null; // Build nested category level EB::buildNestedCategories($category->id, $category, false, true); EB::accessNestedCategoriesId($category, $catIds); } // Get the list of blog posts associated with the category $posts = $this->getPosts($catIds, 'category'); return $posts; } /** * Retrieves recent posts by a specific tag * * @since 5.1 * @access public */ public function getTagsPosts() { $ids = $this->lib->params->get('tagid', ''); // Legacy value perhaps as it was previously stored as a string if (!is_array($ids)) { $ids = explode(',', $ids); if (!is_array($ids)) { $ids = array($ids); } } // Ensure that the admin actually selected a tag if (empty($ids)) { $this->setError(JText::_('MOD_LATESTBLOGS_SELECT_TAG')); return; } // Get the posts that are associated with the tag $posts = $this->getPosts($ids, 'tag'); return $posts; } /** * Retrieves recent posts by a specific team * * @since 5.1 * @access public */ public function getTeamPosts() { $id = $this->lib->params->get('tid'); // Ensure that the admin selected a team from the module settings if (!$id) { $this->setError(JText::_('MOD_LATESTBLOGS_SELECT_TEAM')); return false; } // Load up the team blog table $team = EB::table('TeamBlog'); $team->load($id); // Determine if the current viewer is a member of the team $gids = EB::getUserGids(); $team->isMember = $team->isMember($this->my->id, $gids); // Default set empty posts unless they can view it $posts = array(); if ($team->access != 1 || $team->isMember) { $posts = $this->getPosts($id, 'team'); } return $posts; } /** * Retrieves recent posts by author of a particular article. This only works on view=entry * * @since 5.1 * @access public */ public function getEntryPosts() { // Get the current view of the page $view = $this->input->get('view', '', 'cmd'); // We need to have the id $id = $this->input->get('id', 0, 'int'); // If the view is not entry, skip this if ($view != 'entry' || !$id) { return false; } // Load up the post $post = EB::post($id); // Ensure that the blog post has a proper author if (!$post->created_by) { return; } // Now we load the posts $posts = $this->getPosts($post->created_by, 'blogger'); return $posts; } /** * Retrieves the latest posts * * @since 5.1 * @access public */ public function getPosts($id = null, $type = 'latest') { $db = EB::db(); $count = (int) $this->params->get('count', 0); if ($count < 1) { $count = 5; } $excludeFeatured = $this->params->get('excludefeatured', false); $respectFrontpage = $this->params->get('respectfrontpage', false); $excludeViewed = $this->params->get('excludeviewed', false); $excludeBlog = array(); // Get the current view of the page $view = $this->input->get('view', '', 'cmd'); // We need to have the id $currentPostId = $this->input->get('id', 0, 'int'); if ($excludeViewed && $view == 'entry' && $currentPostId) { $excludeBlog = array($currentPostId); } $model = EB::model('Blog'); $posts = array(); $sort = $this->params->get('sortby', 'latest'); if ($type == 'blogger') { $posts = $model->getBlogsBy('blogger', $id, array($sort, 'DESC'), $count, EBLOG_FILTER_PUBLISHED, null, $respectFrontpage, $excludeBlog, false, false, true, array(), array(), null, 'listlength', true, array(), array(), $excludeFeatured, array(), array('paginationType' => 'none')); } if ($type == 'category') { $posts = $model->getBlogsBy('category', $id, array($sort, 'DESC'), $count, EBLOG_FILTER_PUBLISHED, null, $respectFrontpage, $excludeBlog, false, false, true, array(), array(), null, 'listlength', true, array(), array(), $excludeFeatured, array(), array('paginationType' => 'none')); } if ($type == 'tag') { $posts = $model->getTaggedBlogs($id, $count, '', '', $excludeFeatured, array('excludeBlogs' => $excludeBlog, 'sort' => 'DESC')); } if ($type == 'team') { $posts = $model->getBlogsBy('teamblog', $id, array($sort, 'DESC'), $count, EBLOG_FILTER_PUBLISHED, null, $respectFrontpage, $excludeBlog, false, false, true, array(), array(), null, 'listlength', true, array(), array(), $excludeFeatured, array(), array('paginationType' => 'none')); } if ($type == 'latest') { // Determines if we should be using featured blogs only $featuredOnly = $this->params->get('usefeatured', false); $categories = EB::getCategoryInclusion($this->params->get('catid')); $catIds = array(); if (!empty($categories)) { if (!is_array($categories)) { $categories = array($categories); } foreach ($categories as $item) { $category = new stdClass(); $category->id = trim( $item ); $catIds[] = $category->id; if ($this->params->get('includesubcategory', 0)) { $category->childs = null; EB::buildNestedCategories($category->id, $category , false , true ); EB::accessNestedCategoriesId($category, $catIds); } } $catIds = array_unique($catIds); } if ($featuredOnly) { $posts = $model->getFeaturedBlog($catIds, $count); } else { $cid = $catIds; if (!empty($cid)) { $type = 'category'; } $postType = null; if ($this->params->get('postType') != 'all') { $postType = $this->params->get('postType'); } $posts = $model->getBlogsBy($type, $cid, array($sort, 'DESC'), $count, EBLOG_FILTER_PUBLISHED, null, $respectFrontpage, $excludeBlog, false, false, true, array(), $cid, $postType, 'listlength', true, array(), array(), $excludeFeatured, array(), array('paginationType' => 'none')); } } // Format the items $posts = $this->lib->processItems($posts); return $posts; } /** * Normalize legacy values for post types * * @since 5.1 * @access public */ public function normalizeFilterType($type) { if ($type == '0') { return 'recent'; } if ($type == '1') { return 'author'; } if ($type == '2') { return 'category'; } if ($type == '3') { return 'tags'; } if ($type == '4') { return 'team'; } if ($type == '5') { return 'entry'; } // Default filter type return $type; } /** * Determine the view all link based on the module filter type. * * @since 5.1 * @access public */ public function getViewAllLink($type) { $link = ''; switch($type) { case 'category': $id = (int) $this->params->get('cid', ''); $link = EBR::_('index.php?option=com_easyblog&view=categories&layout=listings&id=' . $id); break; case 'author': $id = (int) $this->params->get('bloggerlist', ''); $link = EBR::_('index.php?option=com_easyblog&view=blogger&layout=listings&id=' . $id); break; case 'tags': $ids = $this->params->get('tagid', ''); if (!is_array($ids)) { $ids = explode(',', $ids); if (!is_array($ids)) { $ids = array($ids); } } if (count($ids) > 1) { $link = EBR::_('index.php?option=com_easyblog'); } else { $id = $ids[0]; $link = EBR::_('index.php?option=com_easyblog&view=tags&layout=tag&id=' . $id); } break; case 'team': $id = (int) $this->params->get('tid', ''); $link = EBR::_('index.php?option=com_easyblog&view=teamblog&layout=listings&id=' . $id); break; case 'recent': default: $link = EBR::_('index.php?option=com_easyblog'); break; } return $link; } } mod_jchat_messaging/assets/index.html000064400000000037152163637060014041 0ustar00 mod_jchat_messaging/assets/style.css000064400000003665152163637060013730 0ustar00#jes_mod_jchatpm ul { margin: 0; padding: 0; max-height: 200px; overflow: auto; } #jes_mod_jchatpm ul::-webkit-scrollbar { -webkit-appearance: none; width: 7px; } #jes_mod_jchatpm ul::-webkit-scrollbar-thumb { border-radius: 4px; background-color: rgba(0,0,0,0.5); -webkit-box-shadow: 0 0 1px rgba(255,255,255,0.5); box-shadow: 0 0 1px rgba(255,255,255,0.5); } #jes_mod_jchatpm .list-group-item { position: relative; display: block; padding: 10px 6px; background-color: #fff; border: 1px solid #ddd; margin-top: -1px; min-height: 40px; box-sizing: border-box; } #jes_mod_jchatpm .list-group-item:first-child { border-radius: 2px; } #jes_mod_jchatpm .list-group-item:first-child a, #jes_mod_jchatpm .list-group-item:first-child a:hover { color: #FFF; } #jes_mod_jchatpm .list-group-item.title { z-index: 2; color: #fff; background-color: #428bca; } #jes_mod_jchatpm .list-group-item a, #jes_mod_jchatpm .list-group-item a:hover { color: #333; background: transparent; } #jes_mod_jchatpm .list-group-item.counter { z-index: 2; color: #fff; background-color: #428bca; border: 4px solid #FFF; text-align: center; padding: 2px; margin-bottom: 2px; border-style: double; } #jes_mod_jchatpm .badge { display: inline-block; min-width: 10px; min-height: 12px; padding: 3px 7px; font-size: 12px; font-weight: 700; line-height: 1; color: #fff; text-align: center; white-space: nowrap; vertical-align: baseline; background-color: #777; border-radius: 10px; } #jes_mod_jchatpm .list-group-item.title .badge, #jes_mod_jchatpm .list-group-item.counter .badge { background-color: #FFF; color: #333; } #jes_mod_jchatpm .list-group-item.counter .badge { float: none; font-size: 14px; } #jes_mod_jchatpm .list-group-item > .badge, #jes_mod_jchatpm .list-group-item a > .badge { float: right; }mod_jchat_messaging/mod_jchat_messaging.xml000064400000001635152163637060015256 0ustar00 JChatSocial Private Messaging Module Joomla! Extensions Store 2022-08-16 Copyright (C) 2015 - Joomla! Extensions Store. All Rights Reserved. http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL info@storejextensions.org http://storejextensions.org 2.49 JChatSocial Private Messaging Module JExtStore\Module\JchatMessaging mod_jchat_messaging.php tmpl assets Helper index.html mod_jchat_messaging.xml mod_jchat_messaging/tmpl/default.php000064400000003166152163637060013661 0ustar00 mod_jchat_messaging/tmpl/index.html000064400000000037152163637060013513 0ustar00 mod_jchat_messaging/index.html000064400000000037152163637060012537 0ustar00 mod_jchat_messaging/Helper/JchatMessagingHelper.php000064400000001564152163637060016527 0ustar00getPendingMessages(); return $newTotalMessagesByUser; } } mod_jchat_messaging/Helper/index.html000064400000000037152163637060013756 0ustar00 mod_jchat_messaging/mod_jchat_messaging.php000064400000007732152163637060015251 0ustar00getIdentity(); if(!$user->id) { return; } // Load component translations $jLang = Factory::getApplication()->getLanguage (); $jLang->load ( 'com_jchat', JPATH_ROOT . '/components/com_jchat', 'en-GB', true, true ); if ($jLang->getTag () != 'en-GB') { $jLang->load ( 'com_jchat', JPATH_SITE, null, true, false ); $jLang->load ( 'com_jchat', JPATH_ROOT . '/components/com_jchat', null, true, false ); } // Get component params $cParams = ComponentHelper::getParams('com_jchat'); // Include component model require_once JPATH_ADMINISTRATOR . '/components/com_jchat/Framework/Exception/Exception.php'; require_once JPATH_ADMINISTRATOR . '/components/com_jchat/Framework/Model/Model.php'; require_once JPATH_ADMINISTRATOR . '/components/com_jchat/Framework/Helpers/Users.php'; // Instantiate model $app = Factory::getApplication(); $userSessionTable = JChatHelpersUsers::getSessiontable (); $streamModel = $app->bootComponent('com_jchat')->getMVCFactory()->createModel('Stream', 'Site', array ( 'sessiontable' => $userSessionTable )); $messagingModel = $app->bootComponent('com_jchat')->getMVCFactory()->createModel('Messaging', 'Site', array ( 'streamModel' => $streamModel )); $totalPmMessages = 0; $pmData = JchatMessagingHelper::getData($cParams, $messagingModel); if(is_array($pmData) && count($pmData)) { foreach ($pmData as $pmUserMessage) { $totalPmMessages += $pmUserMessage['newmessages']; } } $layout = $params->get ( 'layout', 'default' ); // Add stylesheet $doc = Factory::getApplication()->getDocument(); $doc->getWebAssetManager()->registerAndUseStyle ( 'jchat.messaging.style', 'modules/mod_jchat_messaging/assets/style.css'); $chatTemplate = $cParams->get('chat_template', 'default.css'); switch ($chatTemplate) { case 'black.css': $doc->getWebAssetManager()->addInlineStyle('#jes_mod_jchatpm .list-group-item.title{background-color: #333}'); break; case 'electric.css': $doc->getWebAssetManager()->addInlineStyle('#jes_mod_jchatpm .list-group-item.title{background-color: rgb(212, 117, 83)}'); break; case 'fire.css': $doc->getWebAssetManager()->addInlineStyle('#jes_mod_jchatpm .list-group-item.title{background-color: #B44949}'); break; case 'girls.css': $doc->getWebAssetManager()->addInlineStyle('#jes_mod_jchatpm .list-group-item.title{background-color: #ef8ea2}'); break; case 'gold.css': $doc->getWebAssetManager()->addInlineStyle('#jes_mod_jchatpm .list-group-item.title{background-color: #8c6239}'); break; case 'livesupport.css': $doc->getWebAssetManager()->addInlineStyle('#jes_mod_jchatpm .list-group-item.title{background-color: #0858C2}'); break; case 'livesupportchatbot.css': $doc->getWebAssetManager()->addInlineStyle('#jes_mod_jchatpm .list-group-item.title{background-color: #3B5998}'); break; case 'mobile.css': $doc->getWebAssetManager()->addInlineStyle('#jes_mod_jchatpm .list-group-item.title{background-color: #627bae}'); break; case 'nature.css': $doc->getWebAssetManager()->addInlineStyle('#jes_mod_jchatpm .list-group-item.title{background-color: #00C504}'); break; } if($cParams->get('chat_color_override', null)) { $doc->getWebAssetManager()->addInlineStyle('#jes_mod_jchatpm .list-group-item.title{background-color: ' . $cParams->get('chat_color_override') . '}'); } require ModuleHelper::getLayoutPath ( 'mod_jchat_messaging', $layout );mod_wrapper/mod_wrapper.php000064400000001671152163637060012131 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Helper\ModuleHelper; use Joomla\Module\Wrapper\Site\Helper\WrapperHelper; $params = WrapperHelper::getParams($params); $load = $params->get('load'); $url = htmlspecialchars($params->get('url', ''), ENT_COMPAT, 'UTF-8'); $target = htmlspecialchars($params->get('target', ''), ENT_COMPAT, 'UTF-8'); $width = htmlspecialchars($params->get('width', ''), ENT_COMPAT, 'UTF-8'); $height = htmlspecialchars($params->get('height', ''), ENT_COMPAT, 'UTF-8'); $ititle = $module->title; $id = $module->id; $lazyloading = $params->get('lazyloading', 'lazy'); require ModuleHelper::getLayoutPath('mod_wrapper', $params->get('layout', 'default')); mod_wrapper/tmpl/default.php000064400000001555152163637060012213 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Language\Text; /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $app->getDocument()->getWebAssetManager(); $wa->registerAndUseScript('com_wrapper.iframe', 'com_wrapper/iframe-height.min.js', [], ['defer' => true]); ?> mod_wrapper/mod_wrapper.xml000064400000006231152163637060012137 0ustar00 mod_wrapper Joomla! Project 2004-10 (C) 2005 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.0.0 MOD_WRAPPER_XML_DESCRIPTION Joomla\Module\Wrapper mod_wrapper.php src tmpl language/en-GB/mod_wrapper.ini language/en-GB/mod_wrapper.sys.ini
    mod_wrapper/src/Helper/WrapperHelper.php000064400000003403152163637060014373 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Module\Wrapper\Site\Helper; use Joomla\CMS\Factory; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Helper for mod_wrapper * * @since 1.5 */ class WrapperHelper { /** * Gets the parameters for the wrapper * * @param mixed &$params The parameters set in the administrator section * * @return mixed &$params The modified parameters * * @since 1.5 */ public static function getParams(&$params) { $params->def('url', ''); $params->def('scrolling', 'auto'); $params->def('height', '200'); $params->def('height_auto', 0); $params->def('width', '100%'); $params->def('add', 1); $params->def('name', 'wrapper'); $url = $params->get('url'); if ($params->get('add')) { // Adds 'http://' if none is set if (strpos($url, '/') === 0) { // Relative URL in component. use server http_host. $url = 'http://' . Factory::getApplication()->getInput()->server->get('HTTP_HOST') . $url; } elseif (strpos($url, 'http') === false && strpos($url, 'https') === false) { $url = 'http://' . $url; } } $load = ''; // Auto height control if ($params->def('height_auto')) { $load = 'onload="iFrameHeight(this)"'; } $params->set('load', $load); $params->set('url', $url); return $params; } } mod_easyblogsubscribe/mod_easyblogsubscribe.php000064400000005653152163637060016213 0ustar00input->get('option', '', 'cmd'); $view = $modules->input->get('view', '', 'cmd'); $id = $modules->input->get('id', 0, 'int'); // By default the type will be "site" $type = 'site'; // Allowed view $allowed = array('categories', 'blogger', 'teamblog'); if ($params->get('autodetection', true)) { if ($option == 'com_easyblog') { if (in_array($view, $allowed)) { if ($id) { if ($view == 'categories') { $type = EBLOG_SUBSCRIPTION_CATEGORY; } if ($view == 'teamblog') { $type = EBLOG_SUBSCRIPTION_TEAMBLOG; } if ($view == 'blogger') { $type = EBLOG_SUBSCRIPTION_BLOGGER; } } // If 'id' is not provided this must be 'site' subscription. } // If 'view' is not inside 'allowed' view this must be 'site' subscription. } if ($type == 'site') { // If 'type' is still 'site' subscription, 'id' must be 0. $id = 0; } } else { $type = $params->get('subscription_type', 'site'); // Site type subscription will appear everywhere. if ($type != 'site') { if ($option != 'com_easyblog') { return; } if (!in_array($view, $allowed)) { return; } if ($view != $type) { return; } if (!$id) { return; } // update the type to the correct constant if ($type == 'categories') { $type = EBLOG_SUBSCRIPTION_CATEGORY; } if ($type == 'teamblog') { $type = EBLOG_SUBSCRIPTION_TEAMBLOG; } } else { // if subscription type is site, the id must be 0 $id = 0; } } // Determines if the current user is subscribed $subscribed = false; $my = JFactory::getuser(); // Get return url $return = base64_encode(EBFactory::getURI(true)); if (!$my->guest) { $subscription = EB::table('Subscriptions'); $exists = $subscription->load(array('uid' => $id, 'utype' => $type, 'user_id' => $my->id)); // If subscribed, we need to display unsubscribe button instead if ($exists) { $subscribed = $subscription->id; } } // Determines if registration should be allowed here $registration = JComponentHelper::getParams('com_users')->get('allowUserRegistration') == 0 ? 0 : $config->get('main_registeronsubscribe'); require($modules->getLayout()); mod_easyblogsubscribe/mod_easyblogsubscribe.xml000064400000005526152163637060016223 0ustar00 EasyBlog - Subscribe Module Stack Ideas Sdn Bhd 26th April 2022 Copyright 2009 - 2015 Stack Ideas Sdn Bhd. All rights reserved. GPL License v2 support@stackideas.com http://stackideas.com 6.0.5 en-GB.mod_easyblogsubscribe.ini tmpl mod_easyblogsubscribe.php mod_easyblogsubscribe.xml
    https://stackideas.com/joomla4compat.xml
    mod_easyblogsubscribe/tmpl/default.php000064400000012315152163637060014236 0ustar00
    get('type' , 'link') == 'link') { ?>
    guest) { ?>
    config->get('main_subscription_agreement')) { ?>
    mod_easyblogbloggercloud/mod_easyblogbloggercloud.xml000064400000006333152163637060017376 0ustar00 EasyBlog - Blogger Cloud Module Stack Ideas Sdn Bhd 26th April 2022 Copyright 2009 - 2019 Stack Ideas Sdn Bhd. All rights reserved. GPL License v2 support@stackideas.com http://stackideas.com 6.0.5 en-GB.mod_easyblogbloggercloud.ini tmpl helper.php mod_easyblogbloggercloud.php mod_easyblogbloggercloud.xml
    https://stackideas.com/joomla4compat.xml
    mod_easyblogbloggercloud/tmpl/list.php000064400000002404152163637060014252 0ustar00 mod_easyblogbloggercloud/tmpl/default.php000064400000001764152163637060014733 0ustar00 mod_easyblogbloggercloud/helper.php000064400000004536152163637060013612 0ustar00lib = $modules; $this->params = $this->lib->params; } public function getBloggerCloud() { $order = $this->params->get('order', 'postcount'); $sort = $this->params->get('sort', 'desc'); $count = (int) trim( $this->params->get('count', 0) ); $shuffeTags = $this->params->get('shuffleTags', true); $min_size = $this->params->get('minsize', '10'); $max_size = $this->params->get('maxsize', '30'); $view = $this->input->get('view', '', 'var'); $layout = $this->input->get('layout', 'default', 'var'); $model = EB::model('Bloggers'); $bloggerCloud = $model->getBloggerCloud($count, $order, $sort, false); $extraInfo = array(); $moduleLayout = $this->params->get('layout', 'default'); // Remove the _: from the value $moduleLayout = str_replace('_:', '', $moduleLayout); if ($moduleLayout == 'default' && $shuffeTags) { shuffle($bloggerCloud); } $bloggers = []; // Get the count for every tag foreach ($bloggerCloud as $item) { $blogger = EB::table('Profile'); $blogger->load($item->id); $blogger->post_count = $item->post_count; $bloggers[] = $blogger; $extraInfo[] = $item->post_count; } $minimum_count = 0; $maximum_count = 0; // get the min and max if (!empty($extraInfo)) { $minimum_count = min($extraInfo); $maximum_count = max($extraInfo); } $spread = $maximum_count - $minimum_count; if ($spread == 0) { $spread = 1; } $cloud_html = ''; $cloud_tags = array(); //foreach ($tags as $tag => $count) for ($i = 0; $i < count($bloggers); $i++) { $row =& $bloggers[$i]; $size = $min_size + ($row->post_count - $minimum_count) * ($max_size - $min_size) / $spread; $row->fontsize = $size; } return $bloggers; } }mod_easyblogbloggercloud/mod_easyblogbloggercloud.php000064400000002016152163637060017357 0ustar00get('layout', 'default'); // Get the list of bloggers $bloggers = $helper->getBloggerCloud(); require($modules->getLayout()); mod_finder/mod_finder.xml000064400000006746152163637060011530 0ustar00 mod_finder Joomla! Project 2011-08 (C) 2011 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.0.0 MOD_FINDER_XML_DESCRIPTION Joomla\Module\Finder mod_finder.php src tmpl language/en-GB/mod_finder.ini language/en-GB/mod_finder.sys.ini
    mod_finder/tmpl/default.php000064400000005523152163637060012001 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\Router\Route; use Joomla\Module\Finder\Site\Helper\FinderHelper; // Load the smart search component language file. $lang = $app->getLanguage(); $lang->load('com_finder', JPATH_SITE); $input = ''; $showLabel = $params->get('show_label', 1); $labelClass = (!$showLabel ? 'visually-hidden ' : '') . 'finder'; $label = ''; $output = ''; if ($params->get('show_button', 0)) { $output .= $label; $output .= ''; } else { $output .= $label; $output .= $input; } Text::script('MOD_FINDER_SEARCH_VALUE'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $app->getDocument()->getWebAssetManager(); $wa->getRegistry()->addExtensionRegistryFile('com_finder'); /* * This segment of code sets up the autocompleter. */ if ($params->get('show_autosuggest', 1)) { $wa->usePreset('awesomplete'); $app->getDocument()->addScriptOptions('finder-search', ['url' => Route::_('index.php?option=com_finder&task=suggestions.suggest&format=json&tmpl=component', false)]); Text::script('JLIB_JS_AJAX_ERROR_OTHER'); Text::script('JLIB_JS_AJAX_ERROR_PARSE'); } $wa->useScript('com_finder.finder'); ?> mod_finder/mod_finder.php000064400000003411152163637060011501 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Helper\ModuleHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\Router\Route; use Joomla\CMS\Uri\Uri; use Joomla\Component\Finder\Administrator\Helper\LanguageHelper; use Joomla\Component\Finder\Site\Helper\RouteHelper; use Joomla\Module\Finder\Site\Helper\FinderHelper; $cparams = ComponentHelper::getParams('com_finder'); // Check for OpenSearch if ($params->get('opensearch', $cparams->get('opensearch', 1))) { $defaultTitle = Text::_('MOD_FINDER_OPENSEARCH_NAME') . ' ' . $app->get('sitename'); $ostitle = $params->get('opensearch_name', $cparams->get('opensearch_name', $defaultTitle)); $app->getDocument()->addHeadLink( Uri::getInstance()->toString(['scheme', 'host', 'port']) . Route::_('index.php?option=com_finder&view=search&format=opensearch'), 'search', 'rel', ['title' => $ostitle, 'type' => 'application/opensearchdescription+xml'] ); } // Get the route. $route = RouteHelper::getSearchRoute($params->get('searchfilter', null)); if ($params->get('set_itemid')) { $uri = Uri::getInstance($route); $uri->setVar('Itemid', $params->get('set_itemid')); $route = $uri->toString(['path', 'query']); } // Load component language file. LanguageHelper::loadComponentLanguage(); // Load plugin language files. LanguageHelper::loadPluginLanguage(); // Get Smart Search query object. $query = FinderHelper::getQuery($params); require ModuleHelper::getLayoutPath('mod_finder', $params->get('layout', 'default')); mod_finder/src/Helper/FinderHelper.php000064400000005011152163637060013746 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Module\Finder\Site\Helper; use Joomla\CMS\Factory; use Joomla\CMS\Filter\InputFilter; use Joomla\CMS\Router\Route; use Joomla\CMS\Uri\Uri; use Joomla\Component\Finder\Administrator\Indexer\Query; use Joomla\Database\DatabaseInterface; use Joomla\Utilities\ArrayHelper; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Finder module helper. * * @since 2.5 */ class FinderHelper { /** * Method to get hidden input fields for a get form so that control variables * are not lost upon form submission. * * @param string $route The route to the page. [optional] * @param integer $paramItem The menu item ID. (@since 3.1) [optional] * * @return string A string of hidden input form fields * * @since 2.5 */ public static function getGetFields($route = null, $paramItem = 0) { $fields = []; $uri = Uri::getInstance(Route::_($route)); $uri->delVar('q'); // Create hidden input elements for each part of the URI. foreach ($uri->getQuery(true) as $n => $v) { $fields[] = ''; } return implode('', $fields); } /** * Get Smart Search query object. * * @param \Joomla\Registry\Registry $params Module parameters. * * @return Query object * * @since 2.5 */ public static function getQuery($params) { $request = Factory::getApplication()->getInput()->request; $filter = InputFilter::getInstance(); // Get the static taxonomy filters. $options = []; $options['filter'] = ($request->get('f', 0, 'int') !== 0) ? $request->get('f', '', 'int') : $params->get('searchfilter'); $options['filter'] = $filter->clean($options['filter'], 'int'); // Get the dynamic taxonomy filters. $options['filters'] = $request->get('t', '', 'array'); $options['filters'] = $filter->clean($options['filters'], 'array'); $options['filters'] = ArrayHelper::toInteger($options['filters']); // Instantiate a query object. return new Query($options, Factory::getContainer()->get(DatabaseInterface::class)); } } mod_easyblogquickpost/mod_easyblogquickpost.php000064400000001600152163637060016301 0ustar00load('com_easyblog', JPATH_ROOT); require($modules->getLayout()); mod_easyblogquickpost/mod_easyblogquickpost.xml000064400000003377152163637060016327 0ustar00 EasyBlog - Quick Post Module Stack Ideas Sdn Bhd 26th April 2022 Copyright 2009 - 2015 Stack Ideas Sdn Bhd. All rights reserved. GPL License v2 support@stackideas.com http://stackideas.com 6.0.5 tmpl mod_easyblogquickpost.php mod_easyblogquickpost.xml
    https://stackideas.com/joomla4compat.xml
    mod_easyblogquickpost/tmpl/default.php000064400000004533152163637060014302 0ustar00 mod_login/tmpl/default.php000064400000015741152163637060011645 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\Plugin\PluginHelper; use Joomla\CMS\Router\Route; $app->getDocument()->getWebAssetManager() ->useScript('core') ->useScript('keepalive') ->useScript('field.passwordview'); Text::script('JSHOWPASSWORD'); Text::script('JHIDEPASSWORD'); ?> mod_login/tmpl/default_logout.php000064400000003517152163637060013234 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\Router\Route; /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = \Joomla\CMS\Factory::getApplication()->getDocument()->getWebAssetManager(); $wa->useScript('keepalive'); ?> mod_login/mod_login.php000064400000001735152163637060011212 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Factory; use Joomla\CMS\Helper\AuthenticationHelper; use Joomla\CMS\Helper\ModuleHelper; use Joomla\Module\Login\Site\Helper\LoginHelper; $params->def('greeting', 1); // HTML IDs $formId = 'login-form-' . $module->id; $type = LoginHelper::getType(); $return = LoginHelper::getReturnUrl($params, $type); $registerLink = LoginHelper::getRegistrationUrl($params); $extraButtons = AuthenticationHelper::getLoginButtons($formId); $user = Factory::getUser(); $layout = $params->get('layout', 'default'); // Logged users must load the logout sublayout if (!$user->guest) { $layout .= '_logout'; } require ModuleHelper::getLayoutPath('mod_login', $layout); mod_login/src/Helper/LoginHelper.php000064400000004572152163637060013463 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Module\Login\Site\Helper; use Joomla\CMS\Factory; use Joomla\CMS\Language\Multilanguage; use Joomla\CMS\Uri\Uri; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Helper for mod_login * * @since 1.5 */ class LoginHelper { /** * Retrieve the URL where the user should be returned after logging in * * @param \Joomla\Registry\Registry $params module parameters * @param string $type return type * * @return string */ public static function getReturnUrl($params, $type) { $item = Factory::getApplication()->getMenu()->getItem($params->get($type)); // Stay on the same page $url = Uri::getInstance()->toString(); if ($item) { $lang = ''; if ($item->language !== '*' && Multilanguage::isEnabled()) { $lang = '&lang=' . $item->language; } $url = 'index.php?Itemid=' . $item->id . $lang; } return base64_encode($url); } /** * Returns the current users type * * @return string */ public static function getType() { $user = Factory::getUser(); return (!$user->get('guest')) ? 'logout' : 'login'; } /** * Retrieve the URL for the registration page * * @param \Joomla\Registry\Registry $params module parameters * * @return string */ public static function getRegistrationUrl($params) { $regLink = 'index.php?option=com_users&view=registration'; $regLinkMenuId = $params->get('customRegLinkMenu'); // If there is a custom menu item set for registration => override default if ($regLinkMenuId) { $item = Factory::getApplication()->getMenu()->getItem($regLinkMenuId); if ($item) { $regLink = 'index.php?Itemid=' . $regLinkMenuId; if ($item->language !== '*' && Multilanguage::isEnabled()) { $regLink .= '&lang=' . $item->language; } } } return $regLink; } } mod_login/mod_login.xml000064400000007526152163637060011227 0ustar00 mod_login Joomla! Project 2006-07 (C) 2006 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.0.0 MOD_LOGIN_XML_DESCRIPTION Joomla\Module\Login mod_login.php src tmpl language/en-GB/mod_login.ini language/en-GB/mod_login.sys.ini
    mod_articles_categories/mod_articles_categories.xml000064400000011125152163637060017023 0ustar00 mod_articles_categories Joomla! Project 2010-02 (C) 2010 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.0.0 MOD_ARTICLES_CATEGORIES_XML_DESCRIPTION Joomla\Module\ArticlesCategories services src tmpl language/en-GB/mod_articles_categories.ini language/en-GB/mod_articles_categories.sys.ini
    mod_articles_categories/services/provider.php000064400000002261152163637060015616 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Extension\Service\Provider\HelperFactory; use Joomla\CMS\Extension\Service\Provider\Module; use Joomla\CMS\Extension\Service\Provider\ModuleDispatcherFactory; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; /** * The articles categories module service provider. * * @since 4.4.0 */ return new class () implements ServiceProviderInterface { /** * Registers the service provider with a DI container. * * @param Container $container The DI container. * * @return void * * @since 4.4.0 */ public function register(Container $container) { $container->registerServiceProvider(new ModuleDispatcherFactory('\\Joomla\\Module\\ArticlesCategories')); $container->registerServiceProvider(new HelperFactory('\\Joomla\\Module\\ArticlesCategories\\Site\\Helper')); $container->registerServiceProvider(new Module()); } }; mod_articles_categories/tmpl/default_items.php000064400000003572152163637060015750 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Helper\ModuleHelper; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Router\Route; use Joomla\Component\Content\Site\Helper\RouteHelper; $input = $app->getInput(); $option = $input->getCmd('option'); $view = $input->getCmd('view'); $id = $input->getInt('id'); foreach ($list as $item) : ?> id && in_array($view, ['category', 'categories']) && $option == 'com_content') { echo ' class="active"'; } ?>> level - $startLevel - 1; ?> title; ?> get('numitems')) : ?> (numitems; ?>) get('show_description', 0)) : ?> description, $item->getParams(), 'mod_articles_categories.content'); ?> get('show_children', 0) && (($params->get('maxlevel', 0) == 0) || ($params->get('maxlevel') >= ($item->level - $startLevel))) && count($item->getChildren()) ) : ?> '; ?> getChildren(); ?> get('layout', 'default') . '_items'); ?> '; ?> mod_articles_categories/tmpl/default.php000064400000001016152163637060014536 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Helper\ModuleHelper; if (!$list) { return; } ?>
      get('layout', 'default') . '_items'); ?>
    mod_articles_categories/src/Dispatcher/Dispatcher.php000064400000003170152163637060017104 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Module\ArticlesCategories\Site\Dispatcher; use Joomla\CMS\Dispatcher\AbstractModuleDispatcher; use Joomla\CMS\Helper\HelperFactoryAwareInterface; use Joomla\CMS\Helper\HelperFactoryAwareTrait; use Joomla\CMS\Helper\ModuleHelper; // phpcs:disable PSR1.Files.SideEffects \defined('JPATH_PLATFORM') or die; // phpcs:enable PSR1.Files.SideEffects /** * Dispatcher class for mod_articles_categories * * @since 4.4.0 */ class Dispatcher extends AbstractModuleDispatcher implements HelperFactoryAwareInterface { use HelperFactoryAwareTrait; /** * Returns the layout data. * * @return array * * @since 4.4.0 */ protected function getLayoutData(): array { $data = parent::getLayoutData(); $params = $data['params']; $cacheParams = new \stdClass(); $cacheParams->cachemode = 'id'; $cacheParams->class = $this->getHelperFactory()->getHelper('ArticlesCategoriesHelper'); $cacheParams->method = 'getChildrenCategories'; $cacheParams->methodparams = [$params, $data['app']]; $cacheParams->modeparams = md5(serialize($this->module->id)); $data['list'] = ModuleHelper::moduleCache($this->module, $params, $cacheParams); $data['startLevel'] = $data['list'] ? reset($data['list'])->getParent()->level : null; return $data; } } mod_articles_categories/src/Helper/ArticlesCategoriesHelper.php000064400000005663152163637060021074 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Module\ArticlesCategories\Site\Helper; use Joomla\CMS\Application\SiteApplication; use Joomla\CMS\Categories\CategoryInterface; use Joomla\CMS\Categories\CategoryNode; use Joomla\CMS\Factory; use Joomla\Database\DatabaseAwareInterface; use Joomla\Database\DatabaseAwareTrait; use Joomla\Registry\Registry; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Helper for mod_articles_categories * * @since 1.5 */ class ArticlesCategoriesHelper implements DatabaseAwareInterface { use DatabaseAwareTrait; /** * Given a parent category, return a list of children categories * * @param Registry $moduleParams The module parameters. * @param SiteApplication $app The current application. * * @return CategoryNode[] * * @since 4.4.0 */ public function getChildrenCategories(Registry $moduleParams, SiteApplication $app): array { // Joomla\CMS\Categories\Categories options to set $options = []; // Get the number of items in this category or descendants of this category at the expense of performance. $options['countItems'] = $moduleParams->get('numitems', 0); /** @var CategoryInterface $categoryFactory */ $categoryFactory = $app->bootComponent('com_content')->getCategory($options); /** @var CategoryNode $parentCategory */ $parentCategory = $categoryFactory->get($moduleParams->get('parent', 'root')); if ($parentCategory === null) { return []; } // Get all the children categories of this node $childrenCategories = $parentCategory->getChildren(true); $count = $moduleParams->get('count', 0); if ($count > 0 && \count($childrenCategories) > $count) { $childrenCategories = \array_slice($childrenCategories, 0, $count); } return $childrenCategories; } /** * Get list of categories * * @param Registry $params module parameters * * @return array * * @since 1.6 * * @deprecated 4.4.0 will be removed in 6.0 * Use the non-static method getChildrenCategories * Example: Factory::getApplication()->bootModule('mod_articles_categories', 'site') * ->getHelper('ArticlesCategoriesHelper') * ->getChildrenCategories($params, Factory::getApplication()) */ public static function getList($params) { /** @var SiteApplication $app */ $app = Factory::getApplication(); return (new self())->getChildrenCategories($params, $app); } } mod_jmap/fields/cssfield.php000064400000005347152163637060012127 0ustar00getDocument (); $doc->getWebAssetManager()->addInlineStyle ( 'small.form-text.text-muted{display: none}joomla-tab-element[id*=general] > div.row > div:first-child div.controls>input,joomla-tab-element[id*=general] > div.row > div:first-child select.form-select{max-width:300px}select[size].custom-select{background-color:#FFF}' ); // Include jQuery/Bootstrap framework $wa = $doc->getWebAssetManager(); $wa->useScript('jquery'); $wa->useScript('jquery-noconflict'); array_map ( function ($script) use ($wa) { $wa->useScript ( 'bootstrap.' . $script ); }, [ 'popover' ] ); // Add custom JS to rework bootstrap popovers for the label description $script = <<

    ', "container":"body", "html":true, "placement":"top", "trigger":"hover focus" }); }); }); EOL; $doc->getWebAssetManager()->addInlineScript($script); return null; } }mod_jmap/mod_jmap.xml000064400000014546152163637060010665 0ustar00 JSitemap module Joomla! Extensions Store 2022-11-18 Copyright (C) 2016 - Joomla! Extensions Store. All Rights Reserved. http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL info@storejextensions.org http://storejextensions.org 4.11 JSitemap Module JExtStore\Module\Jmap mod_jmap.php Helper tmpl fields index.html
    mod_jmap/tmpl/iframe.js000064400000001562152163637060011124 0ustar00function jmapIFrameAutoHeight(e) { setTimeout(function() { var t = 0; if (!document.all) { if (!!window.chrome) { document.getElementById(e).style.height = 0 } t = document.getElementById(e).contentDocument.body.scrollHeight; document.getElementById(e).style.height = t + 150 + "px" } else if (document.all) { if (!!window.performance) { var n = document.getElementById(e); var r = n.contentWindow.document || n.contentDocument; var t = Math.max(r.body.offsetHeight, r.body.scrollHeight); t += 60; n.style.height = t + "px"; n.setAttribute("height", t) } else { t = document.frames(e).document.body.scrollHeight; document.all.jmap_sitemap_nav.style.height = t + 150 + "px" } } }, 10) }mod_jmap/tmpl/default.php000064400000001366152163637060011462 0ustar00 mod_jmap/tmpl/index.html000064400000000037152163637060011314 0ustar00 mod_jmap/index.html000064400000000037152163637060010340 0ustar00 mod_jmap/Helper/JmapHelper.php000064400000003001152163637060012314 0ustar00getDocument(); $doc->getWebAssetManager()->addInlineScript('function jmapIFrameAutoHeight(e){setTimeout(function(){var t=0;if(!document.all){if(!!window.chrome){document.getElementById(e).style.height=0}t=document.getElementById(e).contentDocument.body.scrollHeight;document.getElementById(e).style.height=t+150+"px"}else if(document.all){if(!!window.performance){var n=document.getElementById(e);var r=n.contentWindow.document||n.contentDocument;var t=Math.max(r.body.offsetHeight,r.body.scrollHeight);t+=150;n.style.height=t+"px";n.setAttribute("height",t)}else{t=document.frames(e).document.body.scrollHeight;document.all.jmap_sitemap_nav.style.height=t+150+"px"}}},10)}'); $jmapAutoHeightScript = true; } } } mod_jmap/Helper/index.html000064400000000037152163637060011557 0ustar00 mod_jmap/mod_jmap.php000064400000010133152163637060010640 0ustar00get('height_auto', 1)) { JmapHelper::jmapInjectAutoHeightScript(); } $scroll = htmlspecialchars($params->get('scrolling')); $width = htmlspecialchars($params->get('width')); if(stripos($width, 'px') === false && stripos($width, '%') === false) { $width .= 'px'; } $height = htmlspecialchars($params->get('height')); $height = preg_replace('/(%|px)/i', '', $height); $onLoad = $params->get('height_auto', 1) ? 'onload="jmapIFrameAutoHeight(\'jmap_sitemap_nav_' . $module->id . '\')"' : ''; $dataset = (int)$params->get('dataset', null); $dataset = $dataset ? '&dataset=' . $dataset : ''; $moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx', '')); // Check for multilanguage $app = Factory::getApplication(); $currentLanguageQueryString = null; $currentSefLanguage = null; if ($app->isClient('site')) { $multilangEnabled = $app->getLanguageFilter(); $currentSefLanguage = $multilangEnabled ? $app->getLanguage()->getLocale() : null; if(is_array($currentSefLanguage)) { $partialSef = explode('_', $currentSefLanguage[2]); $sefLang = array_shift($partialSef); $currentLanguageQueryString = '&lang=' . $sefLang; $currentSefLanguage = $sefLang . '/'; } } // Standard routing, full raw query string $targetIFrameUrl = Uri::base() . 'index.php?option=com_jmap&view=sitemap&tmpl=component&jmap_module=' . $module->id . $dataset . $currentLanguageQueryString; // Setup the lazy loading mode for the iframe $iframeLazyLoading = $params->get('iframe_loading_mode', 'lazy') == 'lazy' ? 'lazy' : 'eager'; // Legacy routing /en, /de, etc if($params->get('legacy_routing', 0)) { // Try to check for an active htaccess file $index = null; if(!$app->get ( 'sef_rewrite' )) { $index = 'index.php/'; } $targetIFrameUrl = Uri::base() . $index . $currentSefLanguage . '?option=com_jmap&view=sitemap&tmpl=component&jmap_module=' . $module->id . $dataset; } if($params->get('module_rendering_mode', 'iframe') == 'iframe') { // Module iframe rendering require ModuleHelper::getLayoutPath('mod_jmap', $params->get('layout', 'default')); } else { /** * Component execute and fetch * Load language files * Auto loader setup * Register autoloader prefix */ // Manage partial language translations $jLang = $app->getLanguage (); $jLang->load ( 'com_jmap', JPATH_ROOT . '/components/com_jmap', 'en-GB', true, true ); if ($jLang->getTag () != 'en-GB') { $jLang->load ( 'com_jmap', JPATH_SITE, null, true, false ); $jLang->load ( 'com_jmap', JPATH_SITE . '/components/com_jmap', null, true, false ); } require_once JPATH_ADMINISTRATOR . '/components/com_jmap/Framework/Loader.php'; Loader::setup(); Loader::registerNamespacePsr4 ( 'JExtstore\\Component\\JMap\\Administrator', JPATH_ADMINISTRATOR . '/components/com_jmap' ); // Class aliasing if(!class_exists('JMapRoute')) { class_alias('\\JExtstore\\Component\\JMap\\Administrator\\Framework\\Helpers\\Route', 'JMapRoute'); } // Instantiate model $extensionMVCFactory = $app->bootComponent('com_jmap')->getMVCFactory(); $sitemapModel = $extensionMVCFactory->createModel('Sitemap', 'Site', ['document_format'=>'html', 'jmap_module'=>$module->id]); $sitemapModel->setState('format', 'html'); $cparams = $sitemapModel->getComponentParams(); $cparams->set('show_title', 0); $view = $extensionMVCFactory->createView('Sitemap', 'Site', 'Html'); $view->setModel($sitemapModel, true); $view->addTemplatePath(JPATH_ROOT . '/components/com_jmap/tmpl/sitemap'); $contents = $view->display(); echo $contents; }mod_easyblogcustomfieldsearch/mod_easyblogcustomfieldsearch.xml000064400000010211152163637060021454 0ustar00 EasyBlog - Custom Field Search Module Stack Ideas Sdn Bhd 26th April 2022 Copyright 2009 - 2017 Stack Ideas Sdn Bhd. All rights reserved. GPL License v2 support@stackideas.com http://stackideas.com 6.0.5 en-GB.mod_easyblogcustomfieldsearch.ini tmpl helper.php mod_easyblogcustomfieldsearch.php mod_easyblogcustomfieldsearch.xml
    https://stackideas.com/joomla4compat.xml
    mod_easyblogcustomfieldsearch/tmpl/default_buttons.php000064400000002333152163637060017536 0ustar00 get('savefilter', false)) { ?> get('clearfilter', false)) { ?> mod_easyblogcustomfieldsearch/tmpl/default.php000064400000010546152163637060015765 0ustar00
    get('description'); ?>
    get('buttonposition'), array('top', 'both'))) { ?>
    getTitle(); ?>
    title; ?>
    options as $option) { ?> title && $option->value) { ?>
    = $limit) ? 'data-item-hide' : '';?>> checked ? 'checked' : ''; ?> data-checkbox-option/>
    options) > $limit) { ?> » »
    get('buttonposition'), array('bottom', 'both'))) { ?>
    mod_easyblogcustomfieldsearch/tmpl/default_scripts.php000064400000006073152163637060017534 0ustar00 mod_easyblogcustomfieldsearch/helper.php000064400000006727152163637060014652 0ustar00lib = $modules; $this->params = $this->lib->params; } public function getCustomFields($options) { $db = EB::db(); $query = 'SELECT a.* FROM ' . $db->quoteName('#__easyblog_fields') . ' AS a'; $query .= ' LEFT JOIN ' . $db->quoteName('#__easyblog_fields_groups_acl') . ' AS acl'; $query .= ' ON a.' . $db->quoteName('group_id') . ' = acl.' . $db->quoteName('group_id'); $query .= ' WHERE a.' . $db->quoteName('group_id') . '=' . $db->Quote($options['groupId']); $query .= ' AND a.' . $db->quoteName('state') . '=' . $db->Quote(1); $gid = EB::getUserGids(); $gids = ''; if (count($gid) > 0) { foreach ($gid as $id) { $gids .= (empty($gids)) ? $id : ',' . $id; } } // We need to check whether the user is belong to one of the group $query .= ' AND ('; $query .= ' acl.' . $db->quoteName('acl_id') . ' IN(' . $gids . ')'; $query .= ' AND acl.' . $db->quoteName('acl_type') . ' = ' . $db->Quote('read'); $query .= ' OR acl.' . $db->quotename('id') . ' IS NULL'; $query .= ' )'; $query .= ' GROUP BY a.' . $db->quoteName('id'); $query .= ' ORDER BY a.' . $db->quoteName($options['sorting']) . ' ASC'; $db->setQuery($query); $result = $db->loadObjectList(); if (!$result) { return $result; } // Here we need to check if this is already filtered page // Check if this is filter by custom field $filter = $this->lib->input->get('filter', false); $filteredFields = array(); $savedFilters = EB::model('fields')->getSavedFilter($options['catId']); if ($filter == 'field') { $filterVars = $this->lib->input->input->getArray(); foreach ($filterVars as $key => $value) { if (strpos($key, 'field') !== false) { $fieldId = explode('-', $key); $fieldId = $fieldId[1]; $filteredFields[$fieldId] = $filterVars[$key]; } } } else if ($savedFilters) { $params = json_decode($savedFilters->params); foreach ($params as $filter) { if (strpos($filter->name, 'field') !== false) { $fieldId = explode('-', $filter->name); $fieldId = $fieldId[1]; $filteredFields[$fieldId][] = $filter->value; } } } // Get the fields library $lib = EB::fields(); // Initialize the default value $fields = array(); $allowedFields = array('checkbox', 'radio', 'select'); foreach ($result as $row) { $field = EB::table('Field'); $field->bind($row); $field->options = json_decode($field->options); if (in_array($field->type, $allowedFields)) { foreach ($field->options as $option) { $option->checked = false; // Assign back the selected filter if (isset($filteredFields[$field->id])) { if (in_array($option->value, $filteredFields[$field->id])) { $option->checked = true; } } } $fields[] = $field; } } return $fields; } } mod_easyblogcustomfieldsearch/mod_easyblogcustomfieldsearch.php000064400000004276152163637060021461 0ustar00input->get('layout', '', 'cmd'); $view = $modules->input->get('view', '', 'cmd'); $allowedViews = array('latest', 'categories'); $my = EB::user(); if (!in_array($view, $allowedViews) || ($view == 'categories') && $layout != 'listings') { return; } // Get the helper $helper = new modCustomFieldHelper($modules); // @5.1 // Backward compatibility $config = $modules->config; // See whether this is include or exclude mode $filterMode = $params->get('filtermode', 'include'); $strictMode = $params->get('strictmode', false); // Get other params $limit = $params->get('optionscount', 0); $submitOnClick = $params->get('submitonclick', false, 'bool'); $catinclusion = $params->get('catinclusion', ''); if ($catinclusion) { $catinclusion = implode(',', $catinclusion); } $groupId = $params->get('fieldgroup'); $group = EB::table('FieldGroup'); $group->load($groupId); $sorting = $params->get('sorting', 'title'); $catid = 0; if ($view == 'categories' && $layout == 'listings') { $catid = $modules->input->get('id', 0, 'int'); } $hasSavedFilters = EB::model('fields')->getSavedFilter($catid); $fields = $helper->getCustomFields(array('groupId' => $groupId, 'sorting' => $sorting, 'catId' => $catid)); // if there is no fields return. do not show this module. if (!$fields) { return; } require($modules->getLayout()); mod_easyblogpostmeta/mod_easyblogpostmeta.xml000064400000005452152163637060015747 0ustar00 EasyBlog - Post Meta Module Stack Ideas Sdn Bhd 26th April 2022 Copyright 2009 - 2015 Stack Ideas Sdn Bhd. All rights reserved. GPL License V2 support@stackideas.com http://stackideas.com 6.0.5 en-GB.mod_easyblogpostmeta.ini tmpl mod_easyblogpostmeta.php mod_easyblogpostmeta.xml
    https://stackideas.com/joomla4compat.xml
    mod_easyblogpostmeta/mod_easyblogpostmeta.php000064400000002164152163637060015733 0ustar00input->get('view', '', 'var'); // Return if this is not entry view if ($view !== 'entry') { return; } // Load up our library $modules = EB::modules($module, false, true); $id = $modules->input->get('id', 0, 'default'); $post = EB::post($id); $categories = $post->getCategories(); $blogger = EB::user($post->created_by); require($modules->getLayout()); mod_easyblogpostmeta/tmpl/default.php000064400000004517152163637060014116 0ustar00
    get('showavatar', true) || $params->get('showAuthor', true)) { ?>
    get('showavatar', true)) { ?> get('showAuthor', true)) { ?>
    get('showDate', true)) { ?>
      getDisplayDate('created')->format(JText::_('DATE_FORMAT_LC1')); ?>
    get('showcategory', true)) { ?> get('showhits', true)) { ?>
      hits);?>
    get('showcommentcount', true)) { ?>
    mod_stackideas_toolbar/en-GB.mod_stackideas_toolbar.ini000064400000043067152163637060017347 0ustar00; @package StackIdeas ; @subpackage %MODULE.SUBPACKAGE% ; @copyright Copyright (C) Stack Ideas Private Limited. All rights reserved. ; @license GNU/GPL, see LICENSE.php ; Stackideas Toolbar is free software. This version may have been modified pursuant to the ; GNU General Public License, and as distributed it includes or is derivative of ; works licensed under the GNU General Public License or other free or open source ; software licenses. See COPYRIGHT.php for copyright notices and details. ; frontend MOD_SI_TOOLBAR_SEARCH="Search" MOD_SI_TOOLBAR_NO_SEARCH_RESULTS="No Search Results" MOD_SI_TOOLBAR_MENU="Menu" MOD_SI_TOOLBAR_SEARCH_DEFAULT="Search..." MOD_SI_TOOLBAR_CONVERSATIONS="Conversations" MOD_SI_TOOLBAR_NOTIFICATIONS="Notifications" MOD_SI_TOOLBAR_FRIENDS="Friends" MOD_SI_TOOLBAR_EDIT_PROFILE="Edit Profile" MOD_SI_TOOLBAR_MY_PROFILE="My Profile" MOD_SI_TOOLBAR_LOGOUT="Logout" MOD_SI_TOOLBAR_MORE="More" MOD_SI_TOOLBAR_NAVIGATION="Navigation" MOD_SI_TOOLBAR_HOME="Home" MOD_SI_TOOLBAR_USERNAME="Username" MOD_SI_TOOLBAR_CATEGORIES="Categories" MOD_SI_TOOLBAR_ALL_CATEGORIES="All Categories" MOD_SI_TOOLBAR_FILTER="Filter" MOD_SI_TOOLBAR_SHOW_RESULT_FILTER="Show results from selected filters below:" MOD_SI_TOOLBAR_CHECK_ALL="Check All" MOD_SI_TOOLBAR_UNCHECK_ALL="Uncheck All" MOD_SI_TOOLBAR_SIGN_IN_HEADING="Sign in to your account" MOD_SI_TOOLBAR_NEW_USERS_REGISTRATION="If you are new here please register for an account" MOD_SI_TOOLBAR_PASSWORD="Password" MOD_SI_TOOLBAR_SECRET_KEY="One Time Secret Key" MOD_SI_TOOLBAR_REMEMBER_ME="Keep me logged in" MOD_SI_TOOLBAR_SIGN_IN="Sign In" MOD_SI_TOOLBAR_FORGOT_PASSWORD="Forgot password?" MOD_SI_TOOLBAR_FORGOT_USERNAME="Forgot username?" MOD_SI_TOOLBAR_MARK_ALL_AS_READ="Mark as read" MOD_SI_TOOLBAR_VIEW_ALL="View All" MOD_SI_TOOLBAR_VIEW_ALL_NOTIFICATIONS="View all notifications" MOD_SI_TOOLBAR_NO_NEW_NOTIFICATIONS_YET="Awesome! You have caught up with all other notifications and there is nothing new currently." MOD_SI_TOOLBAR_FRIEND_REQUESTS="Friend Requests" MOD_SI_TOOLBAR_FRIENDS_MUTUAL_FRIENDS_TOTAL="%1$s Mutual Friends" MOD_SI_TOOLBAR_FRIENDS_NO_MUTUAL_FRIENDS="No mutual friends" MOD_SI_TOOLBAR_ACCEPT_BUTTON="Accept" MOD_SI_TOOLBAR_REJECT_BUTTON="Reject" MOD_SI_TOOLBAR_FRIENDS_NO_FRIENDS_YET="No friend requests currently" MOD_SI_TOOLBAR_CONVERSATIONS="Conversations" MOD_SI_TOOLBAR_CONVERSATIONS_COMPOSE="Compose" MOD_SI_TOOLBAR_CONVERSATIONS_NO_CONVERSATIONS_YET="Great!
    All your conversations have been read" MOD_SI_TOOLBAR_BACK="Back" MOD_SI_TOOLBAR_SUGGESTED_KEYWORDS="Suggested keywords" MOD_SI_TOOLBAR_NO_RECORD_FOUND="No records found based on your query" MOD_SI_TOOLBAR_MOBILE_APP="Mobile App" MOD_SI_TOOLBAR_MOBILE_APP_INFO="Open your mobile app & scan this code to automatically login" ; Menus MOD_SI_TOOLBAR_ACCOUNT="Account" MOD_SI_TOOLBAR_DISCOVER="Discover" MOD_SI_TOOLBAR_ADVERTISE="Advertise" MOD_SI_TOOLBAR_PREFERENCES="Preferences" MOD_SI_TOOLBAR_BLOG="Blog" MOD_SI_TOOLBAR_DISCUSS="Discuss" MOD_SI_TOOLBAR_MANAGE="Manage" MOD_SI_TOOLBAR_EASYSOCIAL="Social" MOD_SI_TOOLBAR_EASYBLOG="Blogs" MOD_SI_TOOLBAR_EASYDISCUSS="Forums" MOD_SI_TOOLBAR_PAYPLANS="Subscriptions" MOD_SI_TOOLBAR_KOMENTO="Comments" MOD_SI_TOOLBAR_PROFILE="Profile" MOD_SI_TOOLBAR_PROFILE_ITEM="My Profile" MOD_SI_TOOLBAR_EDIT_PROFILE_ITEM="Edit Profile" ; backend MOD_SI_TOOLBAR_ADAPTIVE_MENU_SETTINGS="
    Adaptive Menu Settings" MOD_SI_TOOLBAR_ADAPTIVE_MENU="Enable Adaptive Menu" MOD_SI_TOOLBAR_ADAPTIVE_MENU_DESC="With adaptive menus, the module will detect which menu to use dependent on the current extension on the page.

    Be sure to configure the respective menus for each of the extensions below." MOD_SI_TOOLBAR_MENU_SELECT_MENU="Default Menu" MOD_SI_TOOLBAR_MENU_SELECT_MENU_DESC="This option will determine the menu that should be used when adaptive mode is disabled or when viewing a non known extension pages" MOD_SI_TOOLBAR_MENU_SELECT_EB_MENU="EasyBlog Pages" MOD_SI_TOOLBAR_MENU_SELECT_EB_MENU_DESC="Determine what type of menu should the module uses on the EasyBlog pages." MOD_SI_TOOLBAR_MENU_SELECT_ED_MENU="EasyDiscuss Pages" MOD_SI_TOOLBAR_MENU_SELECT_ED_MENU_DESC="Determine what type of menu should the module uses on the EasyDiscuss pages." MOD_SI_TOOLBAR_MENU_SELECT_ES_MENU="EasySocial Pages" MOD_SI_TOOLBAR_MENU_SELECT_ES_MENU_DESC="Determine what type of menu should the module uses on the EasySocial pages." MOD_SI_TOOLBAR_MENU_SELECT_PP_MENU="PayPlans Pages" MOD_SI_TOOLBAR_MENU_SELECT_PP_MENU_DESC="Determine what type of menu should the module uses on the Payplans pages." MOD_SI_TOOLBAR_MENU_SELECT_KT_MENU="Komento Pages" MOD_SI_TOOLBAR_MENU_SELECT_KT_MENU_DESC="Determine what type of menu should the module uses on the Komento pages." MOD_SI_TOOLBAR_MENU_LIMIT="Limit Menu Items" MOD_SI_TOOLBAR_MENU_LIMIT_DESC="Set a limit to the number of items that are visible on the toolbar.

    To disable this limit, set this value to 0." MOD_SI_TOOLBAR_SHOW_HOME="Display Home Icon" MOD_SI_TOOLBAR_SHOW_HOME_DESC="Determine whether to display the home icon on the global toolbar." MOD_SI_TOOLBAR_DISABLE_TOOLBAR="Disable Toolbar" MOD_SI_TOOLBAR_DEFAULT_EXT_TOOLBAR="Default Extensions Behaviour" MOD_SI_TOOLBAR_JOOMLA_MENU="Joomla Menus" MOD_SI_TOOLBAR_EB_TOOLBAR="EasyBlog Toolbar" MOD_SI_TOOLBAR_ED_TOOLBAR="EasyDiscuss Toolbar" MOD_SI_TOOLBAR_ES_TOOLBAR="EasySocial Toolbar" MOD_SI_TOOLBAR_PP_TOOLBAR="PayPlans Toolbar" MOD_SI_TOOLBAR_KT_TOOLBAR="Komento Toolbar" MOD_SI_TOOLBAR_SHOW_DIVIDER="Show Divider" MOD_SI_TOOLBAR_SHOW_DIVIDER_DESC="Determine whether to show or hide divider below the toolbar." MOD_SI_TOOLBAR_DISPLAY_QRCODE_MOBILEAPP="Display QR Code for mobile app" MOD_SI_TOOLBAR_DISPLAY_QRCODE_MOBILEAPP_DESC="This option determines if the QR Code should be rendered in the toolbar so that users can quickly scan and login with the app" MOD_SI_TOOLBAR_EB_NAME="EasyBlog" MOD_SI_TOOLBAR_ES_NAME="EasySocial" MOD_SI_TOOLBAR_ED_NAME="EasyDiscuss" MOD_SI_TOOLBAR_DEFAULT_SEARCH="Searching Behaviour" MOD_SI_TOOLBAR_DEFAULT_SEARCH_DESC="Determine the default searching behaviour for the toolbar." MOD_SI_TOOLBAR_DEFAULT_EXT_SEARCH="Default Extensions Behaviour" MOD_SI_TOOLBAR_SPECIFIC_EXT_SEARCH="Specific Search Behaviour" MOD_SI_TOOLBAR_EB_SEARCH_OPT="EasyBlog Search" MOD_SI_TOOLBAR_ES_SEARCH_OPT="EasySocial Search" MOD_SI_TOOLBAR_ED_SEARCH_OPT="EasyDiscuss Search" MOD_SI_TOOLBAR_PP_SEARCH_OPT="PayPlans Search" COM_MODULES_EASYBLOG_FIELDSET_LABEL="EasyBlog" MOD_SI_TOOLBAR_EB_DISPLAY_HOME="Display Home Icon" MOD_SI_TOOLBAR_EB_DISPLAY_HOME_DESC="This option determines if the home icon would be displayed in the toolbar" MOD_SI_TOOLBAR_EB_DISPLAY_CATEGORIES="Display Categories" MOD_SI_TOOLBAR_EB_DISPLAY_CATEGORIES_DESC="This option determines if the categories link would be displayed in the toolbar" MOD_SI_TOOLBAR_EB_DISPLAY_TAGS="Display Tags" MOD_SI_TOOLBAR_EB_DISPLAY_TAGS_DESC="This option determines if the tags link would be displayed in the toolbar" MOD_SI_TOOLBAR_EB_DISPLAY_AUTHORS="Display Authors" MOD_SI_TOOLBAR_EB_DISPLAY_AUTHORS_DESC="This option determines if the authors link would be displayed in the toolbar" MOD_SI_TOOLBAR_EB_DISPLAY_TEAMS="Display Teams" MOD_SI_TOOLBAR_EB_DISPLAY_TEAMS_DESC="This option determines if the teams link would be displayed in the toolbar" MOD_SI_TOOLBAR_EB_DISPLAY_ARCHIVES="Display Archives" MOD_SI_TOOLBAR_EB_DISPLAY_ARCHIVES_DESC="This option determines if the archives link would be displayed in the toolbar" MOD_SI_TOOLBAR_EB_DISPLAY_CALENDAR="Display Calendar" MOD_SI_TOOLBAR_EB_DISPLAY_CALENDAR_DESC="This option determines if the calendar link would be displayed in the toolbar" MOD_SI_TOOLBAR_EB_DISPLAY_SEARCH="Display Search" MOD_SI_TOOLBAR_EB_DISPLAY_SEARCH_DESC="This option determines if the search would be displayed in the toolbar" MOD_SI_TOOLBAR_EB_DISPLAY_COMPOSE="Display Compose" MOD_SI_TOOLBAR_EB_DISPLAY_COMPOSE_DESC="This option determines if the compose button would be displayed in the toolbar" MOD_SI_TOOLBAR_EB_DISPLAY_QUICK_POST="Display Quick Post" MOD_SI_TOOLBAR_EB_DISPLAY_QUICK_POST_DESC="This option determines if the quick post button would be displayed in the toolbar" MOD_SI_TOOLBAR_EB_DISPLAY_SUBSCRIBE="Display Subscribe" MOD_SI_TOOLBAR_EB_DISPLAY_SUBSCRIBE_DESC="This option determines if the subscribe button would be displayed in the toolbar" COM_MODULES_EASYDISCUSS_FIELDSET_LABEL="EasyDiscuss" MOD_SI_TOOLBAR_ED_DISPLAY_HOME="Display Home Icon" MOD_SI_TOOLBAR_ED_DISPLAY_HOME_DESC="This option determines if the home icon would be displayed in the toolbar" MOD_SI_TOOLBAR_ED_DISPLAY_TAGS="Display Tags" MOD_SI_TOOLBAR_ED_DISPLAY_TAGS_DESC="This option determines if the tags link would be displayed in the toolbar" MOD_SI_TOOLBAR_ED_DISPLAY_CATEGORIES="Display Categories" MOD_SI_TOOLBAR_ED_DISPLAY_CATEGORIES_DESC="This option determines if the categories link would be displayed in the toolbar" MOD_SI_TOOLBAR_ED_DISPLAY_USERS="Display Users" MOD_SI_TOOLBAR_ED_DISPLAY_USERS_DESC="This option determines if the users link would be displayed in the toolbar" MOD_SI_TOOLBAR_ED_DISPLAY_BADGES="Display Badges" MOD_SI_TOOLBAR_ED_DISPLAY_BADGES_DESC="This option determines if the badges link would be displayed in the toolbar" MOD_SI_TOOLBAR_ED_DISPLAY_NEW_POST="Display New Post" MOD_SI_TOOLBAR_ED_DISPLAY_NEW_POST_DESC="This option determines if the New Post button would be displayed in the toolbar" MOD_SI_TOOLBAR_ED_DISPLAY_CONVERSATIONS="Display Conversations" MOD_SI_TOOLBAR_ED_DISPLAY_CONVERSATIONS_DESC="This option determines if the conversation button in the toolbar should be displayed" MOD_SI_TOOLBAR_ED_DISPLAY_NOTIFICATIONS="Display Notifications" MOD_SI_TOOLBAR_ED_DISPLAY_NOTIFICATIONS_DESC="This option determines if the notification button in the toolbar should be displayed" MOD_SI_TOOLBAR_ED_DISPLAY_SUBSCRIBE="Display Subscribe" MOD_SI_TOOLBAR_ED_DISPLAY_SUBSCRIBE_DESC="This option determines if the subscribe button would be displayed in the toolbar" MOD_SI_TOOLBAR_ED_DISPLAY_SEARCH="Display Search" MOD_SI_TOOLBAR_ED_DISPLAY_SEARCH_DESC="This option determines if the search would be displayed in the toolbar" COM_MODULES_EASYSOCIAL_FIELDSET_LABEL="EasySocial" MOD_SI_TOOLBAR_ES_DISPLAY_HOME="Display Home Icon" MOD_SI_TOOLBAR_ES_DISPLAY_HOME_DESC="Determine whether home icon would be displayed in the toolbar." MOD_SI_TOOLBAR_ES_DISPLAY_PAGES="Display Pages" MOD_SI_TOOLBAR_ES_DISPLAY_PAGES_DESC="Determine whether pages link would be displayed in the toolbar." MOD_SI_TOOLBAR_ES_DISPLAY_GROUPS="Display Groups" MOD_SI_TOOLBAR_ES_DISPLAY_GROUPS_DESC="Determine whether groups link would be displayed in the toolbar." MOD_SI_TOOLBAR_ES_DISPLAY_EVENTS="Display Events" MOD_SI_TOOLBAR_ES_DISPLAY_EVENTS_DESC="Determine whether events link would be displayed in the toolbar." MOD_SI_TOOLBAR_ES_DISPLAY_VIDEOS="Display Videos" MOD_SI_TOOLBAR_ES_DISPLAY_VIDEOS_DESC="Determine whether videos link would be displayed in the toolbar." MOD_SI_TOOLBAR_ES_DISPLAY_AUDIO="Display Audio" MOD_SI_TOOLBAR_ES_DISPLAY_AUDIO_DESC="Determine whether audio link would be displayed in the toolbar." MOD_SI_TOOLBAR_ES_DISPLAY_PHOTOS="Display Photos" MOD_SI_TOOLBAR_ES_DISPLAY_PHOTOS_DESC="Determine whether photos link would be displayed in the toolbar." MOD_SI_TOOLBAR_ES_DISPLAY_POLLS="Display Polls" MOD_SI_TOOLBAR_ES_DISPLAY_POLLS_DESC="Determine whether polls link would be displayed in the toolbar." MOD_SI_TOOLBAR_ES_DISPLAY_MARKETPLACE="Display Marketplace" MOD_SI_TOOLBAR_ES_DISPLAY_MARKETPLACE_DESC="Determine whether marketplace link would be displayed in the toolbar." MOD_SI_TOOLBAR_ES_DISPLAY_SEARCH="Display Search" MOD_SI_TOOLBAR_ES_DISPLAY_SEARCH_DESC="This option determines if the search should be visible in the toolbar" MOD_SI_TOOLBAR_ES_GUEST="Display Toolbar For Guests" MOD_SI_TOOLBAR_ES_GUEST_DESC="Determines if the toolbar should be visible by guest user." MOD_SI_TOOLBAR_ES_SEARCHGUEST="Display Search For Guests" MOD_SI_TOOLBAR_ES_SEARCHGUEST_DESC="Determines if the toolbar search should be visible to guest user." MOD_SI_TOOLBAR_ES_DISPLAY_FRIENDS="Display Friends Request" MOD_SI_TOOLBAR_ES_DISPLAY_FRIENDS_DESC="This option determines if the friend requests icon should appear on the toolbar" MOD_SI_TOOLBAR_ES_DISPLAY_CONVERSATIONS="Display Conversations" MOD_SI_TOOLBAR_ES_DISPLAY_CONVERSATIONS_DESC="This option determines if the conversations icon should appear on the toolbar" MOD_SI_TOOLBAR_ES_DISPLAY_NOTIFICATIONS="Display Notifications" MOD_SI_TOOLBAR_ES_DISPLAY_NOTIFICATIONS_DESC="This option determines if the notification icon should appear on the toolbar" MOD_SI_TOOLBAR_COMPOSE_EVENT="Display New Event" MOD_SI_TOOLBAR_COMPOSE_EVENT_DESC="Determines if the create new event link will appear under the compose dropdown" MOD_SI_TOOLBAR_COMPOSE_GROUP="Display New Group" MOD_SI_TOOLBAR_COMPOSE_GROUP_DESC="Determines if the create new group link will appear under the compose dropdown" MOD_SI_TOOLBAR_COMPOSE_PAGE="Display New Page" MOD_SI_TOOLBAR_COMPOSE_PAGE_DESC="Determines if the create new page link will appear under the compose dropdown" MOD_SI_TOOLBAR_COMPOSE_VIDEO="Display New Video" MOD_SI_TOOLBAR_COMPOSE_VIDEO_DESC="Determines if the create new video link will appear under the compose dropdown" MOD_SI_TOOLBAR_COMPOSE_AUDIO="Display New Audio" MOD_SI_TOOLBAR_COMPOSE_AUDIO_DESC="Determines if the create new audio link will appear under the compose dropdown" MOD_SI_TOOLBAR_COMPOSE_MARKETPLACE="Display New Marketplace" MOD_SI_TOOLBAR_COMPOSE_MARKETPLACE_DESC="Determines if the create new marketplace link will appear under the compose dropdown" MOD_SI_TOOLBAR_COMPOSE_ALBUM="Display New Album" MOD_SI_TOOLBAR_COMPOSE_ALBUM_DESC="Determines if the create new album link will appear under the compose dropdown" MOD_SI_TOOLBAR_COMPOSE_POLL="Display New Poll" MOD_SI_TOOLBAR_COMPOSE_POLL_DESC="Determines if the create new poll link will appear under the compose dropdown" COM_MODULES_PAYPLANS_FIELDSET_LABEL="PayPlans" MOD_SI_TOOLBAR_DROPDOWN_DISCOVER_PEOPLE="Display Discover People" MOD_SI_TOOLBAR_DROPDOWN_DISCOVER_PEOPLE_DESC="Determine whether people link should appear under EasySocial dropdown" ;helper MOD_SI_TOOLBAR_ELLIPSES="..." ;pp toolbar MOD_SI_TOOLBAR_PP_PLAN="Plans" MOD_SI_TOOLBAR_PP_DASHBOARD="Purchases" MOD_SI_TOOLBAR_PP_PREFERENCES="User Preferences" MOD_SI_TOOLBAR_PP_DOWNLOADS="Download Data" MOD_SI_TOOLBAR_PP_SUBSCRIPTION="Manage Purchases" ;; composer toolbar MOD_SI_TOOLBAR_COMPOSER_HEADING="Create New" MOD_SI_EASYBLOG_COMPOSE_BUTTON_TITLE="Blog Post" MOD_SI_EASYBLOG_QUICKPOST_BUTTON_TITLE="Microblog Post" MOD_SI_EASYDISCUSS_COMPOSE_BUTTON_TITLE="Discussion" MOD_SI_ES_NEW_MARKETPLACE_TITLE="Marketplace Listing" MOD_SI_ES_NEW_EVENT_TITLE="Event" MOD_SI_ES_NEW_PAGE_TITLE="Page" MOD_SI_ES_NEW_GROUP_TITLE="Group" MOD_SI_ES_NEW_VIDEO_TITLE="Video" MOD_SI_ES_NEW_AUDIO_TITLE="Audio" MOD_SI_ES_NEW_ALBUM_TITLE="Photo Album" MOD_SI_ES_NEW_POLL_TITLE="Poll" MOD_SI_TOOLBAR_USER_DROPDOWN="Display User Dropdown" MOD_SI_TOOLBAR_USER_DROPDOWN_DESC="This option determines if the user dropdown menu would be displayed in the toolbar" MOD_SI_TOOLBAR_DISPLAY_LOGIN="Display Login" MOD_SI_TOOLBAR_DISPLAY_LOGIN_DESC="This option determines if the login icon would be displayed to guests in the toolbar" MOD_SI_TOOLBAR_APPEARANCE_SETTINGS="Appearance" MOD_SI_TOOLBAR_APPEARANCE_SETTINGS_DESC="Determines the appearance of the toolbar.

    Dark mode is suitable only for templates that are dark. It is not ideal to change this to dark mode while having a bright background." MOD_SI_TOOLBAR_LIGHT="Light (Default)" MOD_SI_TOOLBAR_DARK="Dark" MOD_SI_TOOLBAR_ACCENT="Accent Colour" MOD_SI_TOOLBAR_ACCENT_DESC="Determines the accent color of the toolbar" ; Errors MOD_SI_TOOLBAR_ERROR_FETCHING_CONTENT="Some error occurred while fetching content." ; Social MOD_SI_TOOLBAR_FACEBOOK='Sign in with Facebook' MOD_SI_TOOLBAR_TWITTER='Sign in with Twitter' MOD_SI_TOOLBAR_LINKEDIN='Sign in with LinkedIn' MOD_SI_TOOLBAR_GOOGLE='Sign in with Google' MOD_SI_TOOLBAR_APPLE='Sign in with Apple' MOD_SI_TOOLBAR_AVATAR_STYLE_SETTINGS="Avatar Style" MOD_SI_TOOLBAR_AVATAR_STYLE_SETTINGS_DESC="Select the style of the avatar for the toolbar." MOD_SI_TOOLBAR_AVATAR_SHOW_ONLINE_STATE_SETTINGS="Display Online Status" MOD_SI_TOOLBAR_AVATAR_SHOW_ONLINE_STATE_SETTINGS_DESC="This option determines if user's online status should be visible for the toolbar.

    NOTE: Online state is only applicable if you have EasySocial or EasyDiscuss installed on the site." MOD_SI_TOOLBAR_PROFILE_SETTINGS="Profile Link" MOD_SI_TOOLBAR_PROFILE_SETTINGS_DESC="Select the behavior of profile links in this module. Profile links will be linked to the appropriate extension." MOD_SI_TOOLBAR_EDIT_PROFILE_SETTINGS="Edit Profile Link" MOD_SI_TOOLBAR_EDIT_PROFILE_SETTINGS_DESC="This setting allows you to pick the edit profile link that appears in the module. The edit link will link to the appropriate extension accordingly." COM_MODULES_PAYPLANS_FIELDSET_LABEL="Payplans" MOD_SI_TOOLBAR_PP_DISPLAY_HOME="Display Home Icon" MOD_SI_TOOLBAR_PP_DISPLAY_HOME_DESC="This option determines if the home icon would be displayed in the toolbar" COM_MODULES_KOMENTO_FIELDSET_LABEL="Komento" MOD_SI_TOOLBAR_KT_DISPLAY_HOME="Display Home Icon" MOD_SI_TOOLBAR_KT_DISPLAY_HOME_DESC="This option determines if the home icon would be displayed in the toolbar" MOD_SI_TOOLBAR_LOGIN_DROPDOWN_PLACEMENT_SETTINGS="Login Dropdown Placement (Mobile)" MOD_SI_TOOLBAR_LOGIN_DROPDOWN_PLACEMENT_SETTINGS_DESC="The position where the dropdown will be shown is relative to the login button." MOD_SI_TOOLBAR_LOGIN_BUTTON_TOOLTIP="Sign In" MOD_SI_TOOLBAR_FONTAWESOME="Render Font Awesome Stylesheets" MOD_SI_TOOLBAR_FONTAWESOME_DESC="Determines if toolbar should load font-awesome styling in the module or not." mod_stackideas_toolbar/mod_stackideas_toolbar.php000064400000002553152163637060016463 0ustar00enqueueMessage('To utilize StackIdeas Toolbar, please ensure that the plugin Foundry by StackIdeas is enabled on the site.', 'error'); } if (!FDT::componentExists()) { return; } // Initialize module params. FDT::setConfig($params); // Set the module id FDT::setModuleId($module->id); // Initialize scripts and stylesheets. FDT::initialize(); if (!FDT::toolbarEnabled()) { return; } $adapter = FDT::getAdapter(FDT::getMainComponent()); $themes = FDT::themes(); $responsive = FH::responsive()->isMobile() || FH::responsive()->isTablet(); require JModuleHelper::getLayoutPath('mod_stackideas_toolbar', $params->get('layout', 'default'));mod_stackideas_toolbar/mod_stackideas_toolbar.xml000064400000051252152163637060016474 0ustar00 StackIdeas Toolbar Stack Ideas Sdn Bhd 26th April 2022 Copyright (C) Stack Ideas Sdn Bhd. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt support@stackideas.com https://stackideas.com 1.0.12 admin assets includes tmpl en-GB.mod_stackideas_toolbar.ini helper.php mod_stackideas_toolbar.php mod_stackideas_toolbar.xml en-GB.mod_stackideas_toolbar.ini
    mod_stackideas_toolbar/assets/css/toolbar.min.css000064400000026363152163637060016313 0ustar00#fd,#fd .dark{--fd-toolbar-text:rgba(var(--fd-gray-800),1);--fd-toolbar-bg:rgba(var(--fd-white),1)}#fd .fd-toolbar{position:relative;display:flex;flex-wrap:wrap;font-size:var(--fd-font-size-sm);line-height:calc(var(--fd-root-font-size)*1.5);color:var(--fd-toolbar-text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}#fd .fd-toolbar__item{position:relative;display:flex;flex:1 0 auto;align-items:center}#fd .fd-toolbar__item:focus{outline:2px solid transparent;outline-offset:2px}#fd .fd-toolbar__item--home{flex:0 1 auto}#fd .fd-toolbar__item--home+.fd-toolbar__item--submenu{padding-left:0}#fd .fd-toolbar__item--search{position:absolute;top:0;left:0;z-index:99;display:none;order:2;width:100%;padding-right:var(--fd-spacing-xs)}#fd .fd-toolbar__item--action{position:static;flex:0 1 auto;margin-left:auto}#fd .fd-toolbar__item--action .fd-toolbar__o-nav>*+*{margin-left:var(--fd-spacing-xs)}#fd .fd-toolbar__item--mobile-toggle,#fd .fd-toolbar__item--submenu{display:none}#fd .fd-toolbar__item--submenu .fd-toolbar__o-nav>*+*{margin-left:var(--fd-spacing-3xs)}#fd .fd-toolbar__link-text{display:none}#fd .fd-toolbar__submenu{font-size:0}#fd .fd-toolbar__submenu>div{position:relative;display:inline-block;vertical-align:middle}#fd .fd-toolbar__submenu-link{display:block;font-size:var(--fd-font-size--01)}#fd .fd-toolbar__submenu-link i{display:none}#fd .fd-toolbar .is-active .fd-toolbar__link:not(.no-active-state),#fd .fd-toolbar .is-active .fd-toolbar__submenu-link{--tw-bg-opacity:1;background-color:var(--fd-primary-50-hex,rgba(var(--fd-primary-50),var(--tw-bg-opacity)));--tw-text-opacity:1;color:var(--fd-primary-500-hex,rgba(var(--fd-primary-500),var(--tw-text-opacity)))}#fd .fd-toolbar__link{position:relative;display:inline-flex;cursor:pointer;align-items:center;justify-content:center;border-radius:var(--fd-border-radius-md);border:1px solid transparent;background-color:transparent;padding:var(--fd-spacing-xs) var(--fd-spacing-sm);vertical-align:middle;font-size:var(--fd-font-size-sm);line-height:var(--fd-line-height-sm);text-decoration:none;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-duration:.15s;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1);color:var(--fd-toolbar-text);outline:2px solid transparent;outline-offset:2px}#fd .fd-toolbar__link:hover{--tw-bg-opacity:1;background-color:var(--fd-gray-100-hex,rgba(var(--fd-gray-100),var(--tw-bg-opacity)))}#fd .fd-toolbar__link:focus{outline:2px solid transparent;outline-offset:2px}#fd .fd-toolbar__link>i{line-height:var(--fd-line-height-sm)}#fd .fd-toolbar__link:active,#fd .fd-toolbar__link:focus,#fd .fd-toolbar__link:hover{text-decoration:none}#fd .fd-toolbar__link.is-composer{--tw-bg-opacity:1;background-color:var(--fd-primary-500-hex,rgba(var(--fd-primary-500),var(--tw-bg-opacity)));--tw-text-opacity:1;color:var(--fd-color-inverse-hex,rgba(var(--fd-color-inverse),var(--tw-text-opacity)))}#fd .fd-toolbar__link.has-new .fd-toolbar__link-bubble{display:block}#fd .fd-toolbar__link.has-avatar{padding:0;border-color:transparent}#fd .fd-toolbar__link.has-avatar:before{position:absolute;top:50%;right:0;display:none;width:.5em;height:.5em;vertical-align:top;content:"";border-style:solid;border-width:.1em .1em 0 0;transform:translateY(-50%) rotate(135deg)}#fd .fd-toolbar__link.has-avatar:active,#fd .fd-toolbar__link.has-avatar:focus,#fd .fd-toolbar__link.has-avatar:hover{background-color:transparent!important;border-color:transparent}#fd .fd-toolbar__link-bubble{position:absolute;top:0;right:0;display:none;width:.5rem;height:.5rem;overflow:hidden;font-size:10px;font-weight:700;line-height:.5rem;color:transparent;text-align:center;--tw-bg-opacity:1;background-color:var(--fd-primary-500-hex,rgba(var(--fd-primary-500),var(--tw-bg-opacity)));border-radius:50%}#fd .fd-toolbar__avatar{display:flex;align-items:center;justify-content:center;line-height:1;padding-left:var(--fd-spacing-xs);padding-right:var(--fd-spacing-xs)}#fd .fd-toolbar__avatar .o-avatar{width:calc(var(--fd-root-font-size)*2);height:calc(var(--fd-root-font-size)*2)}#fd .fd-toolbar__icon{--tw-text-opacity:1;color:var(--fd-gray-500-hex,rgba(var(--fd-gray-500),var(--tw-text-opacity)))}#fd .fd-toolbar__o-nav{display:flex;align-items:center}#fd .fd-toolbar__search{position:relative;display:flex;width:100%;height:100%}#fd .fd-toolbar__search-form{display:flex;align-items:center;width:100%;margin:0;background-color:var(--fd-toolbar-bg)}#fd .fd-toolbar__search-form>*+*{margin-left:calc(var(--fd-spacing)*1)}#fd .fd-toolbar__search-box{display:flex;flex:1}#fd .fd-toolbar__search-input{display:flex;flex:1;width:100%;height:auto;margin:0;font-size:var(--fd-font-size--02);line-height:1.25rem;color:var(--fd-toolbar-text);background-color:var(--fd-toolbar-bg);border:0 solid transparent;border-top:0;box-shadow:none}#fd .fd-toolbar__search-input:focus{outline:none;outline-offset:0;border-style:none!important}#fd .fd-toolbar__search-input:focus:focus{border-color:transparent!important;--tw-ring-offset-color:transparent!important}#fd .fd-toolbar__search-select .o-select-group{height:40px;border-radius:0}#fd .fd-toolbar__search-select select{height:100%;border-top:0;border-bottom:0;border-radius:0;box-shadow:none}#fd .fd-toolbar__search-select select:focus{box-shadow:none}#fd .fd-toolbar__search-close-btn a{position:relative;display:inline-flex;align-items:center;justify-content:center;color:var(--fd-toolbar-text);text-align:center;border:1px solid transparent;padding:var(--fd-spacing-xs);line-height:var(--fd-line-height-sm);text-decoration:none;outline:2px solid transparent;outline-offset:2px}#fd .fd-toolbar__search-close-btn a>i{line-height:var(--fd-line-height-xs)}#fd .fd-toolbar__search-dropdown{top:100%;right:0;width:262px}#fd .fd-toolbar__search .btn-toolbar-search{box-shadow:none}#fd .fd-toolbar-btn{-webkit-appearance:none;display:inline-flex;cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;justify-content:center;border-radius:var(--fd-border-radius-md);background-color:transparent;padding:var(--fd-spacing-xs) var(--fd-spacing-md);vertical-align:middle;font-size:var(--fd-font-size-sm);font-weight:700;line-height:var(--fd-line-height-sm);text-decoration:none;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-duration:.15s;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1);--tw-border-opacity:1;border:1px solid var(--fd-gray-400-hex,rgba(var(--fd-gray-400),var(--tw-border-opacity)));--tw-bg-opacity:1;background-color:var(--fd-white-hex,rgba(var(--fd-white),var(--tw-bg-opacity)));--tw-text-opacity:1;color:var(--fd-gray-800-hex,rgba(var(--fd-gray-800),var(--tw-text-opacity)))}#fd .fd-toolbar-btn:hover{--tw-bg-opacity:1;background-color:var(--fd-gray-100-hex,rgba(var(--fd-gray-100),var(--tw-bg-opacity)))}#fd .fd-toolbar-btn:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent);--tw-ring-offset-width:2px;--tw-ring-opacity:1;--tw-ring-color:var(--fd-primary-100-hex,rgba(var(--fd-primary-100),var(--tw-ring-opacity)));--tw-ring-offset-color:rgb(var(--fd-primary-100))}#fd .fd-toolbar-btn>i{line-height:var(--fd-line-height-sm)}#fd .fd-toolbar-divider{margin-top:var(--fd-spacing-sm);--tw-border-opacity:1;border-color:var(--fd-gray-200-hex,rgba(var(--fd-gray-200),var(--tw-border-opacity)));border-top:1px var(--fd-gray-200-hex,rgba(var(--fd-gray-200),var(--tw-border-opacity)));border-style:solid}#fd .fd-toolbar--search-on .fd-toolbar__item--search{display:flex}#fd .fd-toolbar--search-on .fd-toolbar__item--action,#fd .fd-toolbar--search-on .fd-toolbar__item--home,#fd .fd-toolbar--search-on .fd-toolbar__item--submenu{visibility:hidden}#fd .fd-navbar-submenu-toggle,#fd .fd-toolbar-mobile-toggle,#fd.is-mobile .fd-toolbar .fd-toolbar__item--submenu,#fd.is-mobile .fd-toolbar .fd-toolbar__o-nav-item.is-user,#fd.is-tablet .fd-toolbar .fd-toolbar__item--submenu,#fd.is-tablet .fd-toolbar .fd-toolbar__o-nav-item.is-user{display:none}#fd.is-mobile .fd-toolbar .fd-toolbar__item--mobile-toggle,#fd.is-mobile .fd-toolbar .fd-toolbar__item--submenu-dropdown,#fd.is-tablet .fd-toolbar .fd-toolbar__item--mobile-toggle,#fd.is-tablet .fd-toolbar .fd-toolbar__item--submenu-dropdown{display:flex}#fd.is-mobile .fd-toolbar__link,#fd.is-tablet .fd-toolbar__link{padding-left:var(--fd-spacing-sm);padding-right:var(--fd-spacing-sm)}#fd.is-mobile .fd-toolbar .fd-toolbar__item--action .fd-toolbar__o-nav>*+*,#fd.is-tablet .fd-toolbar .fd-toolbar__item--action .fd-toolbar__o-nav>*+*{margin-left:var(--fd-spacing-2xs)}#fd.is-mobile .fd-toolbar .fd-toolbar-mobile-toggle,#fd.is-tablet .fd-toolbar .fd-toolbar-mobile-toggle{display:block}#fd .body.mm-wrapper_opened{-webkit-overflow-scrolling:auto}#fd .fd-toolbar #fd-canvas{display:none}#fd-canvas{position:fixed;top:0;bottom:0;left:0;z-index:2147483647;height:100%;max-height:none;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:13px;transform:inherit}#fd-canvas .mm-navbar>.fas{display:flex}#fd-canvas .fa,#fd-canvas .fas{font-weight:900}#fd-canvas .fa,#fd-canvas .far,#fd-canvas .fas{font-family:Font Awesome\ 5 Free}#fd-canvas .fa,#fd-canvas .fab,#fd-canvas .fad,#fd-canvas .fal,#fd-canvas .far,#fd-canvas .fas{display:inline-block;font-style:normal;font-feature-settings:normal;font-variant:normal;line-height:1;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:auto}#fd-canvas .fa-rss-square:before{content:"\f143"}#fd-canvas .fa-at:before{content:"\f1fa"}#fd .mm-listitem__text{padding-top:12px;padding-bottom:12px}#fd .mm-divider{padding-top:10px;padding-bottom:8px;background-color:#434343!important}#fd .mm-divider:before{background-color:rgba(0,0,0,.05)}#fd .body .mm-searchfield__input input{box-sizing:border-box;display:block;width:100%;max-width:100%;height:30px!important;min-height:unset!important;max-height:unset!important;padding:8px!important;margin:0!important;font:inherit;font-size:medium!important;line-height:30px!important;border:none!important;border-radius:4px;outline:none!important;box-shadow:none!important}#fd .body .mm-searchfield__input input,#fd .body .mm-searchfield__input input:focus,#fd .body .mm-searchfield__input input:hover{color:#999!important;background-color:#434343!important}@media (min-width:768px){#fd .fd-toolbar__item--submenu{display:flex}} /*# sourceMappingURL=modules/mod_stackideas_toolbar/assets/css/toolbar.css.map */mod_stackideas_toolbar/assets/scripts/module.min.js000064400000027176152163637060016664 0ustar00document.addEventListener("DOMContentLoaded",function(){document.querySelector("body").addEventListener("click",function(t){var e=t.target.parentElement.closest("[data-fd-toolbar-logout-button]");if(t.target.hasAttribute("data-fd-toolbar-logout-button")||null!==e){const o=document.querySelector("[data-fd-toolbar-logout-form]");o.submit()}},!0)}),jQuery(document).ready(function(r){var o,a,n,d={minimumLength:3,opts:{form:"[data-fd-search-toolbar-form]",textfield:"[data-search-input]"},loading:!1,tip:null,category:0,suggest:function(i){if(!d.loading){null!==d.tip&&d.tip.hide();var t=i.length;if(i&&""!=r.trim(i)&&!(tt.nextElementSibling.innerHTML,onShow(o){if(r(o.popper).css("width",e),!d.loading){d.loading=!0;var a=o.reference.getAttribute("data-fd-component"),n=[];let t=document.querySelectorAll("[data-fd-filtertypes]:checked");t.forEach(t=>{n.push(t.value)});let e={type:"POST",url:window.tb.ajaxUrl,data:{method:"search",component:a,category_id:d.category,filtertypes:n}};a=o.reference.getAttribute("name");e.data[a]=i,e.data[window.tb.token]=1,r.ajax(e).done(function(t){!1===t.success&&(t=r("[data-fd-toolbar]").data("fd-error"));const e=r(o.popper).find("[data-fd-dropdown-body]");e.html(t);t=e.find("[data-search-suggestion]");0{t.checked=e})}};let t=document.querySelector(d.opts.textfield);null!==t&&t.addEventListener("keyup",(o=function(t){27!==t.which&&d.suggest(this.value)},a=350,n=0,function(){var t=this,e=arguments;clearTimeout(n),n=setTimeout(function(){o.apply(t,e)},a||0)})),window.tb.dialog=jQuery.extend(fd.dialog,{appearance:window.tb.appearance,theme:window.tb.theme,mobile:window.tb.mobile,ios:window.tb.ios}),document.querySelector("body").addEventListener("click",function(o){var t=o.target.parentElement.closest("[data-fd-toolbar-search-toggle]");if(o.target.hasAttribute("data-fd-toolbar-search-toggle")||null!==t){let t=o.target.getAttribute("data-fd-component"),e=o.target.getAttribute("data-fd-moduleId");if(null===t&&(t=o.target.parentElement.getAttribute("data-fd-component"),e=o.target.parentElement.getAttribute("data-fd-moduleId")),o.target.parentElement.closest("[data-fd-toolbar]").getAttribute("data-fd-responsive"))return void tb.dialog({content:r.ajax({type:"POST",url:window.tb.ajaxUrl,data:{method:"dialog",component:t,moduleId:e}})});const a=o.target.parentElement.closest("[data-fd-toolbar-wrapper]");a.classList.toggle("fd-toolbar--search-on")}else{t=o.target.parentElement.closest("[data-fd-search-filter-item]");if(o.target.hasAttribute("data-fd-search-filter-item")||null!==t){let t=o.target.getAttribute("data-fd-search-filter-value"),e=o.target.getAttribute("data-fd-search-filter-id");null===t&&(t=o.target.parentElement.getAttribute("data-fd-search-filter-value"),e=o.target.parentElement.getAttribute("data-fd-search-filter-id")),document.querySelector("[data-fd-search-filter]").innerHTML=t,d.category=e,document.querySelector("[data-fd-search-category-id]").value=e,document.querySelector(d.opts.textfield).focus()}o.target.hasAttribute("data-fd-filter")&&d.filter(o.target)}},!0)}),jQuery(document).ready(function(d){FD.require().script("vendor/tippy","vendor/perfectscrollbar","vendor/popper","shared").done(function(){!function(){let e=!1,o=!1,a=!1;const n=(t,e)=>{t.update(),e.scrollTop=0};window.tb.dropdown=function(t){return tippy(document.querySelectorAll(t),{content:t=>t.nextElementSibling.innerHTML,onShow(e){const o=e.reference.getAttribute("data-fd-dropdown-content");if(null!==o&&""!==o&&!0!==e.state.fetching&&!1!==e.state.canFetch){d(e.reference).parent().addClass("is-active"),e.state.fetching=!0,e.state.canFetch=!1;var a=o.split("/"),n=a[0],i=a[1],r=e.reference.getAttribute("data-module-id"),a=e.reference.getAttribute("data-fd-component");let t={type:"POST",url:window.tb.ajaxUrl,data:{method:n}};void 0!==i&&(t.data.type=i),void 0!==r&&(t.data.moduleId=r),void 0!==a&&(t.data.component=a),t.data[window.tb.token]=1,d.ajax(t).done(function(t){!1===t.success&&(t=d("[data-fd-toolbar]").data("fd-error")),d(e.popper).find("[data-fd-dropdown-body]").html(t)}).always(function(){e.state.fetching=!1})}},onHidden(t){t.state.canFetch=!0;var e=d(t.reference).siblings().find("[data-fd-dropdown-body]").html();d(t.popper).find("[data-fd-dropdown-body]").html(e),d(t.reference).parent().removeClass("is-active")},onMount:t=>{t.popperInstance.setOptions({placement:t.reference.getAttribute("data-fd-dropdown-placement")}),o=t.popper.querySelector("[data-fd-toolbar-dropdown-menus]"),e=e||new PerfectScrollbar(o,{suppressScrollX:!0}),a||(d(document).on("click","[data-fd-toolbar-dropdown-item]",function(){t.hide()}),a=!0)},popperOptions:{modifiers:[{name:"flip",options:{fallbackPlacements:["top","bottom","bottom-start","bottom-end","top-start","top-end"]}}]},maxWidth:"none",role:"fd-dropdown",allowHTML:!0,theme:"fd-light",trigger:"click",arrow:!1,interactive:!0,appendTo:document.body,zIndex:2147483647})},window.tb.dropdown('[data-fd-dropdown="toolbar"]');const i={hide:"hidden",submenu:"has-submenu",next:function(t){t.closest("li").siblings().addClass(this.hide),t.siblings("a").addBack().addClass(this.hide),t.siblings("ul").removeClass(this.hide),t.closest("ul").addClass(this.submenu),n(e,o)},prev:function(t){container=t.closest("ul"),container.addClass(this.hide),container.removeClass(this.submenu),container.siblings("a").removeClass(this.hide),parent=container.closest("li"),parent.siblings().removeClass(this.hide),parent.closest("ul").removeClass(this.hide),parent.closest("ul").removeClass(this.submenu),n(e,o)},resetDropdown:function(t){t.removeClass(this.hide),t.find("a").removeClass(this.hide),t.find("ul").addClass(this.hide),t.find("ul").removeClass(this.submenu)}};d("body").on("click.toolbar.toggle.dropdown","[data-fd-dropdown]",function(t){t.preventDefault(),t.stopPropagation(),d(this)!==t.target&&i.resetDropdown(d("[data-fd-filter-menu-item]"))}),d("body").on("click.toolbar.toggle.next","[data-fd-menu-nav]",function(t){t.preventDefault(),t.stopPropagation(),i.next(d(this))}),d("body").on("click.toolbar.toggle.prev","[data-fd-menu-nav-back]",function(t){t.preventDefault(),t.stopPropagation(),i.prev(d(this))})}(),window.tb.dropdownSearch=function(t){return tippy(document.querySelectorAll(t),{content:t=>t.nextElementSibling.innerHTML,onMount:t=>{t.popperInstance.setOptions({placement:t.reference.getAttribute("data-fd-dropdown-placement")})},onShow:t=>{let e=t.popper.querySelectorAll("[data-fd-filtertypes]");e.forEach(t=>{t.addEventListener("change",function(){!0===this.checked?document.getElementById(this.id).checked=!0:document.getElementById(this.id).checked=!1})})},popperOptions:{modifiers:[{name:"flip",options:{fallbackPlacements:["top","bottom","bottom-start","bottom-end","top-start","top-end"]}}]},maxWidth:"none",role:"fd-dropdown",allowHTML:!0,theme:"fd-light",trigger:"click",arrow:!1,interactive:!0,appendTo:document.querySelector("[data-fd-search-toolbar-form]"),zIndex:2147483647})},window.tb.dropdownSearch('[data-fd-search-dropdown="toolbar"]'),function(){const t=document.querySelector("[data-fd-tooltip-wrapper]");tippy(document.querySelectorAll('[data-fd-tooltip="toolbar"]'),{content:()=>t.innerHTML,popperOptions:{modifiers:[{name:"flip",options:{fallbackPlacements:["top","bottom","bottom-start","bottom-end","top-start","top-end"]}}]},onMount(t){t.popperInstance.setOptions({placement:t.reference.getAttribute("data-fd-tooltip-placement")});var e=t.reference.getAttribute("data-fd-tooltip-title");t.popper.querySelector("[data-fd-tooltip-message]").innerHTML=e},maxWidth:"none",role:"fd-tooltip",allowHTML:!0,theme:"fd-dark",arrow:tippy.roundArrow,interactive:!0,appendTo:document.body,touch:!1})}()})}),jQuery(document).ready(function(e){var o={popup:{width:500,height:520},openDialog:function(t){var e=this.popup.width,o=this.popup.height,a=t.data("url"),n=screen.width/2-e/2,t=screen.height/2-o/2;window.open(a,"","scrollbars=no,resizable=no,width="+e+",height="+o+",left="+n+",top="+t)}};e("body").on("click.toolbar.social.sso","[data-fd-oauth-login-button]",function(t){t.preventDefault(),t.stopPropagation(),o.openDialog(e(this))})}),jQuery(document).ready(function(a){FD.require().script("vendor/mmenu").done(function(){var t,e,o=a("#fd-canvas");0enqueueMessage('To utilize StackIdeas Toolbar, please ensure that the plugin Foundry by StackIdeas is enabled on the site.', 'error'); } $adapter = FDT::getAdapter(FDT::getMainComponent()); $this->fd = FDT::fd(); } /** * Responsible to include and load class of the requested theme file. * * @since 1.0.0 * @access public */ public function html($namespace) { $path = FDT_INCLUDES; $className = 'Toolbar'; $method = 'render'; static $cache = []; $parts = explode('.', strtolower($namespace)); if (count($parts) > 1) { $method = array_pop($parts); } if (!isset($cache[$namespace])) { $path .= '/' . strtolower(implode('/', $parts)) . '/' . strtolower(implode('/', $parts)); $path = $path . '.php'; if (!file_exists($path)) { throw new Exception('Failed to include file ' . $path . ' library for StackIdeas Toolbar.'); } include_once($path); $className .= ucfirst(implode('', $parts)); if (!class_exists($className)) { throw new Exception('Failed to load class ' . $className . ' library for StackIdeas Toolbar'); } $cache[$namespace] = new $className(); } $args = func_get_args(); // Arguments to send to the method $args = array_splice($args, 1); if (!method_exists($cache[$namespace], $method)) { throw new Exception('Call to undefined method ->' . $method . '() in ' . $className . ' library for StackIdeas Toolbar'); } return call_user_func_array(array($cache[$namespace], $method), $args); } /** * Responsible to render the output of the requested theme file. * * @since 1.0.0 * @access public */ public function output($tpl, $args = [], $debug = false) { $this->setTemplate($tpl); return $this->parse($args); } /** * Formatting the path (html/script) of the requested theme file. * * @since 1.0.0 * @access public */ public function setTemplate($tpl) { // Storing this for future use. $this->tpl = $tpl; $this->template = new stdClass(); $this->template->file = FDT_THEMES . '/' . $tpl . '.php'; $templateOverride = $this->getCurrentTemplatePath() . '/' . $tpl . '.php'; if (file_exists($templateOverride)) { $this->template->file = $templateOverride; } } /** * Parsing the template file of the requested theme file. * * @since 1.0.0 * @access public */ public function parse($args = []) { // Make sure the requested theme file exists on the site. if (!file_exists($this->template->file)) { throw new Exception("Unable to locate theme file " . $this->tpl . " for StackIdeas Toolbar."); } ob_start(); if (is_array($args)) { extract($args); } include($this->template->file); $output = ob_get_contents(); ob_end_clean(); return $output; } /** * Retrieves the current site template * * @since 1.0.1 * @access public */ public function getCurrentTemplate() { $db = JFactory::getDbo(); $query = 'SELECT `template` FROM `#__template_styles`'; $query .= ' WHERE `home` = ' . $db->Quote(1); $query .= ' AND `client_id` =' . $db->Quote(0); $db->setQuery($query); $template = $db->loadResult(); return $template; } /** * Retrieves the current site template's path * * @since 1.0.1 * @access public */ public function getCurrentTemplatePath() { // Get the custom.css override path for the current Joomla template $template = $this->getCurrentTemplate(); $path = JPATH_ROOT . '/templates/' . $template . '/html/mod_stackideas_toolbar'; return $path; } } mod_stackideas_toolbar/includes/dropdown/dropdown.php000064400000006311152163637060017261 0ustar00adapter = FDT::getAdapter(JFactory::getApplication()->input->get('option')); } /** * Responsible to render user dropdown menu. * * @since 1.0.0 * @access public */ public function user($args = []) { $my = JFactory::getUser(); if (!$this->adapter->showUserDropdown()) { return; } if ($my->guest) { return $this->guest(); } if (FH::responsive()->isMobile()) { return; } // get adapter for main component to render user avatar and all $adapter = FDT::getAdapter(FDT::getMainComponent()); $user = $adapter->getUser($my->id); $options = [ 'user' => $user, 'hasCover' => $adapter->hasCover(), 'showVerified' => $adapter->showVerified(), 'showProfileMeta' => $adapter->showProfileMeta(), 'profileMeta' => $adapter->getProfileMeta(), 'permaLink' => method_exists($user, 'getPermalink') ? $user->getPermalink() : '' ]; $themes = FDT::themes(); $output = $themes->output('dropdown/user', $options); return $output; } /** * Responsible to render guest dropdown menu. * * @since 1.0.0 * @access public */ public function guest() { $adapter = FDT::getAdapter(FDT::getMainComponent()); $options = [ 'hasTwoFactor' => FH::hasTwoFactor(), 'registrationLink' => $adapter->getRegistrationLink(), 'usernameField' => $adapter->getUsernamePlaceholder(), 'returnUrl' => $adapter->getReturnUrl(), 'remindUsernameLink' => $adapter->getRemindUsernameLink(), 'resetPasswordLink' => $adapter->getResetPasswordLink(), 'jfbconnect' => $adapter->jfbconnect(), ]; $themes = FDT::themes(); $output = $themes->output('dropdown/guest', $options); return $output; } /** * Responsible to render menus for mobile view. * * * @since 1.0.0 * @access public */ public function responsive() { if (!FH::responsive()->isMobile() && !FH::responsive()->isTablet()) { return ''; } if (!$this->adapter->showUserDropdown()) { return ''; } $menuLib = FDT::menu(); $args = [ 'user' => JFactory::getUser(), 'home' => $menuLib->getHome(), 'menus' => $menuLib->getMenus(), 'sections' => $this->adapter->getMenu()->getAvailableDropdownMenu() ]; $themes = FDT::themes(); $output = $themes->output('dropdown/responsive', $args); return $output; } /** * IMPORTANT: This function is call recursively. * * @since 1.0.0 * @access public */ public function menu($args = [], $debug = false) { $args['menus'] = FH::normalize($args, 'menus', $this->adapter->getMenu()->getAvailableDropdownMenu()); $themes = FDT::themes(); $output = $themes->output('dropdown/menu', $args); return $output; } }mod_stackideas_toolbar/includes/ajax/ajax.php000064400000007547152163637060015453 0ustar00adapter = FDT::getAdapter(FDT::getMainComponent()); } public function conversations() { $args = [ 'conversations' => $this->adapter->getConversations(), 'ck' => $this->adapter->isCKEnabled(), 'my' => JFactory::getUser(), ]; $themes = FDT::themes(); $output = $themes->output('ajax/conversations', $args); header('Content-type: application/json; UTF-8'); echo json_encode($output); exit; } public function friends() { $args = [ 'requests' => $this->adapter->getFriendsRequest(), 'my' => JFactory::getUser(), ]; $themes = FDT::themes(); $output = $themes->output('ajax/friends', $args); header('Content-type: application/json; UTF-8'); echo json_encode($output); exit; } public function notifications() { $args = [ 'items' => $this->adapter->getNotifications(), 'viewAllNotificationsLink' => $this->adapter->getViewAllNotificationLink(), ]; $themes = FDT::themes(); $output = $themes->output('ajax/notifications', $args); header('Content-type: application/json; UTF-8'); echo json_encode($output); exit; } public function setallreadajax() { $state = $this->adapter->setallreadajax(); header('Content-type: application/json; UTF-8'); echo json_encode($state); exit; } public function poll() { $data = new stdClass(); // Poll for new system notifications $this->adapter->getSystemNotifications($data); // Poll for new friend notifications $this->adapter->getFriendNotifications($data); // Poll for new conversations $this->adapter->getConversationNotifications($data); header('Content-type: application/json; UTF-8'); echo json_encode($data); exit; } public function friendAccept($id) { $data = $this->adapter->friendAccept($id); header('Content-type: application/json; UTF-8'); echo json_encode($data); exit; } public function friendReject($id) { $data = $this->adapter->friendReject($id); header('Content-type: application/json; UTF-8'); echo json_encode($data); exit; } public function search() { $themes = FDT::themes(); // In respect with the setting passed on the form, we'll load the adapter based on it. $adapter = FDT::getAdapter(JFactory::getApplication()->input->get('component')); $output = $themes->output('search/ajax/search', [ 'items' => $adapter->searchKeyword(), ]); header('Content-type: application/json; UTF-8'); echo json_encode($output); exit; } public function categories() { // In respect with the setting passed on the form, we'll load the adapter based on it. $adapter = FDT::getAdapter(JFactory::getApplication()->input->get('component')); $themes = FDT::themes(); $output = $themes->output('search/ajax/categories', [ 'adapter' => $adapter, 'categories' => $adapter->getCategories(), ]); header('Content-type: application/json; UTF-8'); echo json_encode($output); exit; } public function dialog() { $adapter = FDT::getAdapter(JFactory::getApplication()->input->get('component')); $themes = FDT::themes(); $output = $themes->output('search/ajax/dialog', [ 'component' => $adapter->getComponent(), 'task' => $adapter->getTask(), 'itemid' => $adapter->getSearchRoute() ]); header('Content-type: application/json; UTF-8'); echo json_encode($output); exit; } }mod_stackideas_toolbar/includes/html/html.php000064400000004062152163637060015502 0ustar00adapter = FDT::getAdapter(FDT::getMainComponent()); $this->my = JFactory::getUser(); } public function name($args = []) { $user = FH::normalize($args, 'user', $this->adapter->getUser($this->my->id)); $useAnchorTag = FH::normalize($args, 'useAnchorTag', true); $name = $user->getName(); $permalink = method_exists($user, 'getPermalink') && $user->getPermalink(); $isVerified = method_exists($user, 'isVerified') && $user->isVerified(); $options = array_merge($args, [ 'useAnchorTag' => $useAnchorTag, 'permalink' => $permalink, 'verified' => $isVerified ]); return FDT::themes()->fd->html('html.name', $name, $options); } public function qrcode($args = []) { if (!$this->adapter->showQRCode()) { return ''; } // Gonna standardize component qr code to always use foundry qr code in the future. $url = $this->adapter->getMobileQrcodeURL(); // Non easysocial use foundry qr code. if (class_exists('FR') && JFactory::getApplication()->input->get('option') !== 'com_easysocial') { $url = FR::user()->getMobileQrcodeURL(); } if (!$url) { return ''; } $args['url'] = $url; $themes = FDT::themes(); $output = $themes->output('dropdown/qrcode', $args); return $output; } public function avatar($args = []) { static $loaded = false; if (!$loaded) { include_once(__DIR__ . '/avatar.php'); $loaded = new ToolbarHtmlAvatar(); } return $loaded->getAvatar($args); } } mod_stackideas_toolbar/includes/html/avatar.php000064400000005360152163637060016016 0ustar00adapter = FDT::getAdapter(FDT::getMainComponent()); $this->my = JFactory::getUser(); $this->fd = FDT::themes()->fd; $obj = FH::normalize($args, 'user', ''); // Users argument can be an array because of group conversation. if (!is_array($obj) && method_exists($obj, 'getType') && $obj->getType() !== SOCIAL_TYPE_USER) { return $this->cluster($args); } return $this->user($args); } public function user($args) { $config = FDT::config(); $class = FH::normalize($args, 'class', ''); $users = FH::normalize($args, 'user', $this->adapter->getUser($this->my->id)); $size = FH::normalize($args, 'size', 'md'); $isOnline = false; $isMobile = false; $name = ''; $avatarStyle = $config->get('avatar_style', 'rounded'); $showOnlineState = $config->get('show_online', true); $canShowOnlineState = false; if (is_array($users) && count($users) === 1) { $users = $users[0]; } if (!is_array($users) && $showOnlineState) { if (method_exists($users, 'isOnline')) { $canShowOnlineState = true; $isOnline = $users->isOnline(); } if (method_exists($users, 'isOnlineMobile')) { $isMobile = $users->isOnlineMobile(); } $name = $this->my->name; if (method_exists($users, 'getName')) { $name = $users->getName(); } } if (is_array($users) && count($users) > 1) { $avatar = rtrim(JURI::root(),'/') . '/media/com_easysocial/defaults/avatars/group/large.png'; } else { $avatar = $this->adapter->getAvatar($users->id, 'large'); } return $this->fd->html('avatar.' . $size, $avatar, false, [ 'name' => $name, 'isOnline' => $isOnline, 'isMobile' => $isMobile, 'showOnlineState' => $canShowOnlineState && $showOnlineState, 'style' => $avatarStyle ]); } public function cluster($args) { $cluster = FH::normalize($args, 'user', null); $size = FH::normalize($args, 'size', 'md'); $avatar = $cluster->getAvatar(); $name = $cluster->getTitle(); $avatarStyle = $this->adapter->getAvatarStyle(); return $this->fd->html('avatar.' . $size, $avatar, false, [ 'name' => $name, 'style' => $avatarStyle ]); } } mod_stackideas_toolbar/includes/action/action.php000064400000011301152163637060016316 0ustar00get('adaptiveMenu', true); if ($adaptive) { $input = JFactory::getApplication()->input; $current = $input->get('option', '', 'string'); $extensions[] = str_replace('com_', '', $current); } if (!$adaptive) { // Get all available extensions $extensions = FDT::getAvailableExtensions(); } foreach ($extensions as $extension) { $adapter = FDT::getAdapter($extension); $buttons = $adapter->getComposeButtons(); if (!$buttons) { continue; } foreach ($buttons as $button) { $composeButtons[] = $button; } } // Sort the buttons alphabetically usort($composeButtons, function($a, $b) { return strcmp($a['title'], $b['title']); }); if (!$composeButtons) { return; } $args = [ 'composeButtons' => $composeButtons ]; $theme = FDT::themes(); return $theme->output('compose/default', $args); } /** * Renders notification action on the toolbar * * @since 1.0.0 * @access public */ public function notifications() { $my = JFactory::getUser(); if ($my->guest) { return; } // Notification will be based on the main component. // Notifications, friends and conversation should appear when choosing EasyBlog toolbar. $adapter = FDT::getAdapter(FDT::getMainComponent()); $options = []; $options['moduleId'] = FDT::getModuleId(); $showFriendRequests = $adapter->showFriendRequests(); $showConversations = $adapter->showConversations(); $showNotifications = $adapter->showNotifications(); if (!$showFriendRequests && !$showConversations && !$showNotifications) { return; } $options['showFriendRequests'] = $showFriendRequests; if ($options['showFriendRequests']) { $options['newFriendRequests'] = $adapter->getTotalFriendRequests(); $options['viewAllFriendRequestLink'] = $adapter->getViewAllFriendRequestLink(); } $options['showConversations'] = $showConversations; if ($options['showConversations']) { $options['newConversations'] = $adapter->getTotalNewConversations(); $options['viewAllConversationsLink'] = $adapter->getViewAllConversationsLink(); $options['canCreateConversations'] = $adapter->canCreateConversation(); if ($options['canCreateConversations']) { $options['createConversationLink'] = $adapter->getConversationLink(); } } $options['showNotifications'] = $showNotifications; if ($options['showNotifications']) { $options['newNotifications'] = $adapter->getTotalNewNotifications(); $options['viewAllNotificationsLink'] = $adapter->getViewAllNotificationLink(); } $themes = FDT::themes(); return $themes->output('notifications/default', $options); } /** * Renders the search action on the toolbar * * @since 1.0.0 * @access public */ public function search() { // Retrieve the search behavior of the toolbar. $behavior = FDT::config()->get('defaultSearch', 'search-default'); $component = str_replace('search-', 'com_', $behavior); if ($behavior === 'search-default') { $component = JFactory::getApplication()->input->get('option'); } // We'll need this custom adapter so the search form will loaded correctly according to the perspective. $adapter = FDT::getAdapter($component); if (!$adapter->showSearch()) { return; } $themes = FDT::themes(); return $themes->output('search/button', [ 'isMobile' => FH::responsive()->isMobile(), 'component' => $component ]); } /** * Renders the subscription action on the toolbar * * @since 1.0.0 * @access public */ public function subscriptions() { $adapter = FDT::getAdapter(JFactory::getApplication()->input->get('option')); $showSubscription = $adapter->showSubscription(); if (!$showSubscription) { return; } $args = [ 'showSubscription' => $showSubscription, 'subscription' => $adapter->getSubscriptions(), 'config' => $adapter->config() ]; $namespace = 'subscriptions/' . $adapter->getComponent(false); $themes = FDT::themes(); $output = $themes->output($namespace, $args); return $output; } } mod_stackideas_toolbar/includes/stylesheet/stylesheet.php000064400000002337152163637060020157 0ustar00isMobile() || FH::responsive()->isTablet()) { StyleSheets::load('mmenu'); } $extension = FDT_ENVIRONMENT === 'production' ? '.min.css' : '.css'; $path = 'modules/mod_stackideas_toolbar/assets/css/toolbar' . $extension; StyleSheets::add($path, 'component'); $config = FDT::config(); if ($config->get('fontawesome', true)) { StyleSheets::load('fontawesome'); } $loaded = true; } return $loaded; } } mod_stackideas_toolbar/includes/constant.php000064400000002172152163637060015423 0ustar00input->get('option'); $this->adapter = FDT::getAdapter($component); $this->menutype = $this->getMenuType(); } /** * Responsible to prepare the output. * * @since 1.0.0 * @access public */ public function render() { $responsive = (FH::responsive()->isMobile() || FH::responsive()->isTablet()) ? true : false; $themes = FDT::themes(); $options = [ 'menus' => $responsive ? [] : $this->getMenus(), 'active' => $responsive ? 0 : $this->getActive(), 'home' => $this->getHome(), ]; return $themes->output('menu/default', $options); } /** * Retrieve menus that needs to be rendered in the toolbar * * @since 1.0.0 * @access public */ public function getMenus() { static $menus = []; if (!isset($menus[$this->menutype])) { if ($this->menutype === 'default') { $items = $this->adapter->getMenu()->getDefaultMenu(); } if ($this->menutype !== 'default') { $app = JFactory::getApplication(); $items = $app->getMenu()->getItems('menutype', $this->menutype); if ($items) { // Format the menu items from Joomla. foreach($items as $key => &$item) { $params = $item->getParams(); // Exclude item with menu item option set to exclude from menu modules. if ($params->get('menu_show', 1) == 0) { unset($items[$key]); continue; } $item->flink = $item->link; if ($item->type === 'url') { if ((strpos($item->link, 'index.php?') === 0) && (strpos($item->link, 'Itemid=') === false)) { // If this is an internal Joomla link, ensure the Itemid is set. $item->flink = $item->link . '&Itemid=' . $item->id; } } if ($item->type === 'alias') { $item->flink = 'index.php?Itemid=' . $params->get('aliasoptions'); // Get the language of the target menu item when site is multilingual if (JLanguageMultilang::isEnabled()) { $newItem = $app->getMenu()->getItem((int) $params->get('aliasoptions')); // Use language code if not set to ALL if ($newItem != null && $newItem->language && $newItem->language !== '*') { $item->flink .= '&lang=' . $newItem->language; } } } if (!in_array($item->type, ['url', 'alias'])) { $item->flink = 'index.php?Itemid=' . $item->id; } $item->flink = JRoute::_($item->flink); if ((strpos($item->flink, 'index.php?') !== false) && strcasecmp(substr($item->flink, 0, 4), 'http')) { $item->flink = JRoute::_($item->flink, true, $params->get('secure')); } $menu = new stdClass(); $menu->id = $item->id; $menu->title = $item->title; $menu->permalink = $item->flink; $item = $menu; } } } $menus[$this->menutype] = $this->format($items); } return $menus[$this->menutype]; } /** * Retrieve the component menu types with respect to the setting. * * @since 1.0.0 * @access public */ public function getMenuType() { // Retrieve the menu type for the current page. $menutype = FDT::config()->get($this->adapter->getMenu()->getMenuType()); // Check whether the default component menu selected. // e.g: // toolbardefault-easyblog // toolbardefault-easydiscuss // toolbardefault-easysocial // toolbardefault-easysocial // Other would be Joomla menutype. if (stristr($menutype, 'toolbardefault') !== false) { $types = explode('-', $menutype); $component = $types[1]; // Here we'll reset the adapter to respect the menu setting. $this->adapter = FDT::getAdapter($component); return 'default'; } return $menutype; } /** * Format menu items to * * @since 1.0.0 * @access public */ public function format($items) { // Set 0 for no truncation. $limit = (int) FDT::config()->get('truncateMenu', 5); // Nothing to be truncated if ($limit === 0) { return (object) [ 'visible' => $items, 'hidden' => [] ]; } $result = (object) [ 'visible' => [], 'hidden' => [] ]; // Do nothing if no menu items if (!$items) { return $result; } foreach ($items as $key => &$item) { if ($key < $limit) { $result->visible[] = $item; continue; } $result->hidden[] = $item; } return $result; } /** * Retrieve the Joomla active menu object. * * @since 1.0.0 * @access public */ public function getActive() { // If default component menu is selected, we'll let the adapter to handle this. if ($this->menutype === 'default') { return $this->adapter->getMenu()->getActiveMenu(); } $app = JFactory::getApplication(); $activeMenu = $app->getMenu()->getActive(); $activeId = 0; if (is_object($activeMenu)) { $activeId = $activeMenu->id; } return $activeId; } /** * Retrieve the component's home button. * * @since 1.0.0 * @access public */ public function getHome() { if (!$this->adapter->getMenu()->showHomeButton()) { return false; } $home = $this->adapter->getMenu()->getHomeMenu(); if (!is_object($home)) { throw new Exception('Unable to load home menu for ' . $this->adapter->getComponent() . ' for StackIdeas Toolbar'); } return $home; } } mod_stackideas_toolbar/includes/sso/sso.php000064400000003443152163637060015204 0ustar00getSSO(); // If there is no button, then just return empty. if (!$buttons) { return ''; } // Format the button. $this->format($buttons); $themes = FDT::themes(); return $themes->output('social/default', ['buttons' => $buttons]); } public function format(&$buttons) { foreach ($buttons as $key => &$button) { if (is_null($button)) { unset($buttons[$key]); continue; } // Since the button was already created by ES, and there is no way to re-create the button, // we'll just simply get the url from the generated button and put it on the toolbar. preg_match('/data-url=\"(.*)\"/i', $button, $redirectUrl); $authorizedUrl = ''; // Facebook seems to behave differently. if (!isset($redirectUrl[0])) { preg_match('/href=\"(.*)\" /i', $button, $matches); $authorizedUrl = $matches[1]; } $attributes = ''; if (!$authorizedUrl) { $attributes .= 'data-fd-oauth-login-button data-url="' . $redirectUrl[1] . '"'; } $button = (object) [ 'title' => JText::_('MOD_SI_TOOLBAR_' . strtoupper($key)), 'attributes' => $attributes, 'authorizedUrl' => $authorizedUrl, ]; } } } mod_stackideas_toolbar/includes/toolbar.php000064400000020717152163637060015241 0ustar00get(); * * @since 1.0.0 * @access public */ public static function config() { return self::$config; } /** * Creates a new instance of Foundry * * @since 1.0.0 * @access public */ public static function fd() { static $fd = null; if (is_null($fd)) { $fd = new FoundryLibrary('com_foundry', '', ''); } return $fd; } /** * Determines if component file exists * * @since 1.0.0 * @access public */ public static function exists($element, $type = 'extension') { if (!in_array($type, ['extension', 'library'])) { return false; } // Default if ($type === 'extension') { // Ensure it has 'com_' prefix first if (stristr($element, 'com_') === false) { $element = 'com_' . $element; } $file = JPATH_ADMINISTRATOR . '/components/' . $element . '/includes/' . str_replace('com_', '', $element) . '.php'; $enabled = JComponentHelper::isEnabled($element); if (file_exists($file) && $enabled) { return true; } return false; } if ($type === 'library') { $file = JPATH_LIBRARIES . '/' . $element . '/' . $element . '.php'; return file_exists($file); } return false; } /** * Determines if foundry exists on the site * * @since 1.0.0 * @access public */ public static function foundryExists() { static $exists = null; if (is_null($exists)) { $exists = false; $fileExists = FDT::exists('foundry', 'library'); // Ensure that the plugin is also enabled $pluginEnabled = JPluginHelper::isEnabled('system', 'foundry'); if ($fileExists && $pluginEnabled) { $exists = true; } } return $exists; } /** * Retrieve the menu adapter. * * @since 1.0.0 * @access public */ public static function getAdapter($component = false) { static $adapters = []; if (!$component) { $input = JFactory::getApplication()->input; $component = $input->get('option', ''); } if (!isset($adapters[$component])) { $shortName = str_replace('com_', '', $component); $class = 'ToolbarAdapter' . ucfirst($shortName); $path = FDT_INCLUDES . '/adapter/' . strtolower($shortName) . '/' . strtolower($shortName) . '.php'; $isComponentExists = self::exists($component); // If the adapter is not available, then will fallback to the global adapter if (!file_exists($path) || !$isComponentExists) { $class = 'ToolbarAdapterGlobal'; $path = FDT_INCLUDES . '/adapter/global/global.php'; } // Include the base adapter and menu library since we are going to need it anyway. require_once(FDT_ADAPTER . '/adapter.php'); include_once($path); if (!class_exists($class)) { throw new Exception('Failed to load menu library ' . $class . ' for StackIdeas Toolbar'); } $adapters[$component] = new $class(); } return $adapters[$component]; } /** * Retrieves a list of extensions supported by the module * * @since 1.0.0 * @access public */ public static function getExtensions() { return self::$extensions; } /** * Initialize scripts and stylesheets. * * @since 1.0.0 * @access public */ public static function initialize() { static $loaded = null; if (is_null($loaded)) { // We need jQuery JHtml::_('jquery.framework'); $app = JFactory::getApplication(); $compile = $app->input->get('compileToolbar', false, 'bool'); $scripts = FDT::scripts(); if ($compile && FH::isSiteAdmin()) { $scripts->compile(); return $app->redirect(JURI::root(), 'Toolbar module scripts compiled successfully. Remember to run gulp minify to minify'); } $scripts->attach(); $stylesheet = FDT::stylesheet(); $stylesheet->attach(); // Initialize foundry's library require_once(JPATH_LIBRARIES . '/foundry/foundry.php'); $loaded = true; } return $loaded; } /** * Magic method to load static methods * * @since 1.0.0 * @access public */ public static function __callStatic($name, $args) { $debug = isset($args[0]['debug']) ? true : false; FDT::load($name, $debug); $className = 'Toolbar' . ucfirst($name); if (!class_exists($className)) { throw new Exception('Invalid library ' . $className . ' provided for StackIdeas toolbar'); } if (method_exists($className, 'factory')) { return call_user_func_array([$className, 'factory'], $args); } return new $className; } /** * Loads the library file from the module * * @since 1.0.0 * @access public */ public static function load($library, $debug = false) { static $loaded = []; if (!isset($loaded[$library])) { $lib = strtolower($library); $path = FDT_INCLUDES . '/' . $lib . '/' . $lib . '.php'; if (!file_exists($path)) { $loaded[$library] = false; return $loaded[$library]; } include_once($path); $loaded[$library] = true; } return $loaded[$library]; } /** * Retrieves the main component to tie this module with * * @since 1.0.0 * @access public */ public static function getMainComponent() { static $engine = null; if (is_null($engine)) { $engine = false; $extensions = self::getExtensions(); foreach ($extensions as $extension) { if (FDT::exists($extension)) { $engine = $extension; return $engine; } } } return $engine; } /** * Allows caller to define the params of the module * * @since 1.0.0 * @access public */ public static function setConfig($params) { self::$config = $params; } /** * Determines if toolbar enabled for specific component's page * * @since 1.0.0 * @access public */ public static function toolbarEnabled() { return self::getAdapter()->toolbarEnabled(); } /** * Retrieve the available extensions * * @since 1.0.0 * @access public */ public static function getAvailableExtensions() { static $available = null; if (is_null($available)) { $available = []; $extensions = self::getExtensions(); foreach ($extensions as $key => $extension) { if (!FDT::exists($extension)) { continue; } $available[] = str_replace('com_', '', $extension); } } return $available; } /** * Retrieve the module's appearance setting * * @since 1.0.0 * @access public */ public static function getAppearance() { return FDT::config()->get('appearance', 'light'); } /** * Retrieve the module's theme setting * * @since 1.0.0 * @access public */ public static function getAccent() { return FDT::config()->get('accent', 'si-theme-foundry'); } /** * Set the module id for the instance * * @since 1.0.0 * @access public */ public static function setModuleId($id) { self::$moduleId = (int) $id; } /** * Retrieve the module id * * @since 1.0.0 * @access public */ public static function getModuleId() { return self::$moduleId; } /** * Determine what dropdown placement to use * * @since 1.0.6 * @access public */ public static function renderDropdownPlacement() { $isRTL = FH::isRTL(); $placement = $isRTL ? 'bottom-start' : 'bottom-end'; // Currently only allow admin to configure this dropdown placement from the setting to avoid tippyjs miscalculation position #128 if (FH::responsive()->isMobile()) { $placement = FDT::config()->get('dropdown_placement', 'bottom-end'); // match back the original behavior without modify the setting if ($isRTL && $placement === 'bottom-end') { $placement = 'bottom-start'; } } return $placement; } }mod_stackideas_toolbar/includes/scripts/scripts.php000064400000007122152163637060016750 0ustar00path = FDT_SCRIPTS; } } /** * Responsible to attach the main toolbar and the provided script. * * @since 1.0.0 * @access public */ public function attach() { static $loaded = null; // Prevent attaching the site's scripts multiple times. if (is_null($loaded)) { $loaded = true; // Initialize Foundry scripts first Scripts::init(); // Render 3rd party libraries from foundry // Scripts::load('perfect-scrollbar'); // Scripts::load('popper'); // Scripts::load('tippy'); $doc = JFactory::getDocument(); // Attached module configuration. $configuration = $this->getJSConfiguration(); $doc->addCustomTag($configuration); // In production mode, we do not need to render the core files separately since they are already pre-compiled into a single file if (FDT_ENVIRONMENT === 'production') { $this->scripts = ['module.min']; } // Only load this when in mobile view. // if (FH::responsive()->isMobile() || FH::responsive()->isTablet()) { // Scripts::load('mmenu'); // } foreach ($this->scripts as $script) { $path = $this->path . '/' . $script . '.js'; // If it is an absolute url, no further processing is needed if (strpos($script, 'http') !== false) { $doc->addScript($script); continue; } if (!file_exists($path)) { throw new Exception('Failed to load ' . $script . ' script for StackIdeas Toolbar.'); } $script = FDT_SCRIPTS_URI . '/' . $script . '.js'; $doc->addScript($script); } } return $loaded; } /** * Retrieves the list of scripts on the queue * * @since 1.0.0 * @access public */ public function getScripts() { return $this->scripts; } /** * Compiles all the neccessary js files into a single module.js file * * @since 1.0.0 * @access public */ public function compile() { $contents = ''; $path = dirname(dirname(__DIR__)) . '/assets/scripts'; foreach ($this->scripts as $script) { $file = $path . '/' . $script . '.js'; $contents .= " "; $contents .= file_get_contents($file); } $destination = $path . '/module.js'; JFile::write($destination, $contents); } public function getJSConfiguration() { $adapter = FDT::getAdapter(FDT::getMainComponent()); ob_start(); ?> my = ED::user(); JFactory::getLanguage()->load('com_easydiscuss', JPATH_ROOT); } /** * Provide the home menu. * * @since 1.0.0 * @access public */ public function getHomeMenu() { $menu = new stdClass(); $menu->id = $this->view; $menu->permalink = EDR::_('view=index'); return $menu; } /** * Building the dropdown menu. * * @since 1.0.0 * @access public */ public function getDropdownMenu() { if (!$this->my->id) { return []; } $menus = [ 'MOD_SI_TOOLBAR_ACCOUNT' => [ 'icon' => 'fdi fas fa-user-circle', 'menus' => $this->account() ], 'MOD_SI_TOOLBAR_MANAGE' => [ 'icon' => 'fdi fa fa-cog', 'menus' => $this->manage() ] ]; return ['MOD_SI_TOOLBAR_EASYDISCUSS' => [ 'icon' => 'fdi fas fa-comment-alt', 'menus' => array_merge($this->discuss(), $menus) ]]; } /** * The account section for the user dropdown * * @since 1.0.2 * @access public */ public function account() { $account = [ 'COM_EASYDISCUSS_TOOLBAR_MY_PROFILE' => [ 'icon' => 'fdi fas fa-user-circle', 'link' => $this->my->getPermalink() ], 'COM_EASYDISCUSS_TOOLBAR_EDIT_PROFILE' => [ 'icon' => 'fdi far fa-edit', 'link' => $this->my->getEditProfileLink() ], ]; return $account; } public function discuss() { $config = ED::config(); $discuss = [ 'COM_EASYDISCUSS_TOOLBAR_FORUMS' => [ 'icon' => 'fdi far fa-comment-dots', 'link' => EDR::_('view=forums'), ], 'COM_EASYDISCUSS_TOOLBAR_RECENT' => [ 'icon' => 'fdi fa fa-ticket-alt', 'link' => EDR::_('view=index'), ], 'COM_EASYDISCUSS_TOOLBAR_CATEGORIES' => [ 'icon' => 'fdi fa fa-list-alt', 'link' => EDR::_('view=categories'), ], 'COM_EASYDISCUSS_TOOLBAR_TAGS' => [ 'icon' => 'fdi fa fa-tags', 'link' => EDR::_('view=tags'), ], ]; if ($config->get('main_favorite')) { $discuss['COM_EASYDISCUSS_TOOLBAR_MY_FAVOURITES'] = [ 'icon' => 'fdi far fa-heart', 'link' => EDR::_('view=favourites') ]; } $discuss['COM_EASYDISCUSS_TOOLBAR_MY_POSTS'] = [ 'icon' => 'fdi fas fa-file-alt', 'link' => EDR::_('view=mypost') ]; if ($config->get('main_postassignment') && ED::isModerator()) { $discuss['COM_EASYDISCUSS_TOOLBAR_MY_ASSIGNED_POSTS'] = [ 'icon' => 'fdi fa fa-table', 'link' => EDR::_('view=assigned') ]; } return $discuss; } public function manage() { $acl = ED::acl(); $config = ED::config(); $manage['COM_EASYDISCUSS_TOOLBAR_MY_SUBSCRIPTION'] = [ 'icon' => 'fdi fa fa-bell', 'link' => EDR::_('view=subscription') ]; if ($acl->allowed('manage_pending') || ED::isSiteAdmin()) { $manage['COM_ED_MANAGE_SITE'] = [ 'icon' => 'fdi fa fa-cog', 'link' => EDR::_('view=dashboard') ]; } return $manage; } public function getDefaultMenuItems() { $defaultMenus = []; $fdConfig = FDT::config(); $config = ED::config(); $availableViews = [ 'categories' => [ 'id' => 'categories', 'view' => 'categories', 'config' => 'ed_layout_categories', 'title' => 'COM_EASYDISCUSS_TOOLBAR_CATEGORIES', 'permalink' => EDR::_('view=categories') ], 'tags' => [ 'id' => 'tags', 'view' => 'tags', 'config' => 'ed_layout_tags', 'title' => 'COM_EASYDISCUSS_TOOLBAR_TAGS', 'permalink' => EDR::_('view=tags') ], 'badges' => [ 'id' => 'badges', 'view' => 'badges', 'config' => 'ed_layout_badges', 'title' => 'COM_EASYDISCUSS_TOOLBAR_BADGES', 'permalink' => EDR::_('view=badges') ] ]; $edConfigs = [ 'tags' => 'main_master_tags', 'badges' => 'main_badges' ]; foreach ($availableViews as $view => $menu) { if (!$fdConfig->get($menu['config']) || (in_array($view, array_keys($edConfigs)) && !$config->get($edConfigs[$view]))) { continue; } $defaultMenus[] = $menu; } $esLib = ED::easysocial(); if ($fdConfig->get('ed_layout_users') && $this->showUserMenu()) { $menu = [ 'id' => 'users', 'view' => 'users', 'permalink' => EDR::_('view=users'), 'title' => 'COM_EASYDISCUSS_TOOLBAR_USERS' ]; if ($esLib->exists() && ED::config()->get('integration_easysocial_members')) { $menu['permalink'] = ESR::users(); } $defaultMenus[] = $menu; } if (method_exists($esLib, 'isClusterAppExists')) { $clusters = ['group', 'page', 'event']; $currentView = JFactory::getApplication()->input->get('view'); $activeCluster = JFactory::getApplication()->input->get('cluster_type'); $isClusterActive = $currentView === 'clusters' && $activeCluster; foreach ($clusters as $cluster) { $exist = $esLib->isClusterAppExists($cluster); $isActive = $isClusterActive && $activeCluster === $cluster; if ($exist) { $menu = [ 'id' => $isActive ? 'clusters' : 'clusters_inactive', 'view' => 'clusters', 'permalink' => EDR::_('view=clusters&cluster_type=' . $cluster), 'title' => 'COM_EASYDISCUSS_TOOLBAR_' . strtoupper($cluster) . 'S' ]; $defaultMenus[] = $menu; } } } return $defaultMenus; } public function showUserMenu() { $edConfig = ED::config(); $hasEnabledMainUserListing = $edConfig->get('main_user_listings'); $hasEnabledAccessProflePublic = $edConfig->get('main_profile_public'); // Do not render this if main user listing setting disabled if (!$hasEnabledMainUserListing) { return false; } // Do not render this if public user unable to access user profile page if (!$this->my->id && !$hasEnabledAccessProflePublic) { return false; } return true; } public function showHome() { return FDT::config()->get('ed_layout_home', true); } /** * Retrieve the link of the current user's profile * * @since 1.0.0 * @access public */ public function getProfileLink() { return $this->my->getPermalink(); } /** * Retrieve the link of the current user's edit profile * * @since 1.0.0 * @access public */ public function getEditProfileLink() { return $this->my->getEditProfileLink(); } } mod_stackideas_toolbar/includes/adapter/easydiscuss/easydiscuss.php000064400000023526152163637060022116 0ustar00my = JFactory::getUser(); $this->app = JFactory::getApplication(); $this->input = $this->app->input; // Ensure that EasyDiscuss is loaded in the page require_once(JPATH_ADMINISTRATOR . '/components/com_easydiscuss/includes/easydiscuss.php'); JFactory::getLanguage()->load('com_easydiscuss', JPATH_ROOT); } public function getSearchRoute() { return EDR::getItemId('search'); } public function showSubscription() { if (!FDT::config()->get('ed_layout_subscribe')) { return false; } if ($this->config()->get('main_sitesubscription') && ($this->config()->get('main_rss') || $this->config()->get('main_sitesubscription'))) { return true; } return false; } public function config() { return $config = ED::config(); } public function getSubscriptions() { $subscribeModel = ED::model('Subscribe'); $isSubscribed = $subscribeModel->isSiteSubscribed('site', $this->my->email, 0); return $isSubscribed; } public function showConversations($new = false) { if (!$this->config()->get('main_conversations') || !FDT::config()->get('ed_layout_conversation')) { return false; } return true; } public function getTotalNewConversations() { $model = ED::model('conversation'); return $model->getCount($this->my->id, array('filter' => 'unread')); } public function showNotifications($new = false) { if (!$this->config()->get('main_notifications') || !FDT::config()->get('ed_layout_notification')) { return false; } return true; } public function getTotalNewNotifications() { $model = ED::model('Notification'); return $model->getTotalNotifications($this->my->id); } /** * Retrieve the composer buttons * * @since 1.0.0 * @access public */ public function getComposeButtons() { if (!FDT::config()->get('ed_layout_compose') || !ED::acl()->allowed('add_question')) { return false; } return [ [ 'title' => JText::_('MOD_SI_EASYDISCUSS_COMPOSE_BUTTON_TITLE'), 'link' => EDR::_('view=ask'), 'icon' => 'fdi far fa-comment-dots' ] ]; } public function getUsernamePlaceholder() { return 'COM_EASYDISCUSS_TOOLBAR_USERNAME'; } public function getRegistrationLink() { return ED::getRegistrationLink(); } public function getReturnUrl() { $loginReturn = EDR::getLoginRedirect(); $url = ED::getCallback('', false); if ($url) { $loginReturn = base64_encode($url); } return $loginReturn; } public function getRemindUsernameLink() { return ED::getRemindUsernameLink(); } public function getResetPasswordLink() { return ED::getResetPasswordLink(); } public function jfbconnect() { if (!ED::jfbconnect()->exists()) { return false; } return '{JFBCLogin}'; } public function getUser($id = null) { $user = ED::user($id); return $user; } public function logoutRedirect() { return EDR::getLogoutRedirect(); } public function getAvatar($userId = null, $size = 'large') { // We'll ignore the size since ED doesn't request for it. return $this->getUser($userId)->getAvatar(); } public function getAvatarStyle() { return 'rounded'; } public function getNotifications() { FH::checkToken(); $model = ED::model('Notification'); $notifications = $model->getNotifications($this->my->id, true, $this->config()->get('main_notifications_limit')); // Let ED format the notification first. ED::notifications()->format($notifications); // Re-format for Toolbar. $this->formatNotification($notifications); return $notifications; } public function getNotificationPermalink($notification) { return $notification->permalink; } public function getNotificationContent($notification) { // ED notification item is set on title property. We'll just return empty. return ''; } public function getNotificationUser($notification) { return $notification->authorProfile; } public function getLapsedDate($date) { return ED::Date()->toLapsed($date); } public function getViewAllNotificationLink() { return EDR::_('view=notifications'); } public function getConversations() { FH::checkToken(); $model = ED::model('Conversation'); $items = $model->getConversations($this->my->id, ['limit' => $this->config()->get('main_conversations_notification_items'), 'filter' => 'unread']); $this->formatConversations($items); return $items; } public function canCreateConversation() { return ED::acl()->allowed('allow_privatemessage', false); } public function getConversationLink() { return EDR::_('view=conversation&layout=compose'); } public function getViewAllConversationsLink() { return EDR::_('view=conversation'); } /** * Get notification counter for system notifications * Requested from ajax/poll * * @since 1.0.0 * @access public */ public function getSystemNotifications(&$data) { FH::checkToken(); $model = ED::model('Notification'); $total = $model->getTotalNotifications($this->my->id); $data->system = $this->createInfo(); $data->system->total = $total; } /** * Get notification counter for friends notifications * Requested from ajax/poll * * @since 1.0.0 * @access public */ public function getFriendNotifications(&$data) { // ED do not has friend request. return false; } /** * Get conversations counter * Requested from ajax/poll * * @since 1.0.0 * @access public */ public function getConversationNotifications(&$data) { FH::checkToken(); $model = ED::model('Conversation'); $total = $model->getCount($this->my->id, ['filter' => 'unread']); $data->conversation = $this->createInfo(); $data->conversation->total = $total; } /** * Retrieve the conversation's title. * Requested by ajax/conversation * * @since 1.0.0 * @access public */ public function getConversationsTitle($conversation) { return $conversation->getLastReplier()->getName(); } /** * Retrieve the conversation's message type. * Requested by ajax/conversation * * @since 1.0.0 * @access public */ public function getConversationsLastMessageType($conversation) { return 'message'; } /** * Retrieve the conversation's message. * Requested by ajax/conversation * * @since 1.0.0 * @access public */ public function getConversationsMessage($conversation) { return substr(strip_tags($conversation->getLastMessage($this->my->id, false)), 0, 150) . JText::_('COM_EASYDISCUSS_ELLIPSES'); } /** * Retrieve the conversation's lapsed time. * Requested by ajax/conversation * * @since 1.0.0 * @access public */ public function getConversationsElaped($conversation) { return $conversation->getElapsedTime(); } /** * Retrieve the conversation's participants. * Requested by ajax/conversation * * @since 1.0.0 * @access public */ public function getConversationsParticipant($conversation) { return $conversation->getParticipant(); } /** * Allows caller to set all notification items as read * * @since 1.0.0 * @access public */ public function setallreadajax() { FH::checkToken(); $response = new stdClass(); $model = ED::model('Notification'); $response->state = $model->markAllRead(); if (!$response->state) { $response->notice = 'COM_EASYDISCUSS_ALL_NOTIFICATIONS_FAILED_MARKED_AS_READ'; } return $response; } /** * Determine whether should render search on this component's toolbar. * * @since 1.0.0 * @access public */ public function showSearch() { if (!FDT::config()->get('ed_layout_search')) { return false; } return true; } /** * Determine whether should render the online state for the component * * @since 1.0.0 * @access public */ public function showOnlineState() { return $this->config()->get('layout_user_online'); } public function showUserDropdown() { if ($this->my->id && !FDT::config()->get('ed_layout_user_dropdown', true)) { return false; } if ($this->my->guest && !FDT::config()->get('ed_layout_login')) { return false; } return true; } public function searchKeyword() { FH::checkToken(); $query = $this->input->get('query', '', 'string'); $category = $this->input->get('category_id', 0, 'int'); $query = FH::escape($query); // Get the pagination limit $options = [ 'category' => $category, 'sort' => 'latest', 'filter' => 'all', 'postTypes' => [], 'postLabels' => [], 'postPriorities' => [], 'search' => $query, 'searchIncludeReplies' => true, 'includeChilds' => false, ]; $model = ED::model('Posts'); $posts = $model->getDiscussions($options); return $this->formatSearchResult($posts, $query); } public function showCategoriesFilter() { return true; } public function getCategories() { $model = ED::model('categories'); $categories = $model->getParentCategories('', 'all', true, true); foreach ($categories as $category) { $category->childs = $model->getChildCount($category->id); } return $categories; } public function getChildCategories($id) { $model = ED::model('categories'); $categories = $model->getChildCategories($id, true, true); foreach ($categories as $category) { $category->childs = $model->getChildCount($category->id); } return $categories; } }mod_stackideas_toolbar/includes/adapter/payplans/menu.php000064400000010655152163637060020012 0ustar00my = PP::user(JFactory::getUser()->id); JFactory::getLanguage()->load('com_payplans', JPATH_ROOT); } /** * Provide the home menu. * * @since 1.0.0 * @access public */ public function getHomeMenu() { $menu = new stdClass(); $menu->id = $this->view; $menu->permalink = PPR::_('index.php?option=com_payplans'); return $menu; } /** * Building the dropdown menu. * * @since 1.0.0 * @access public */ public function getDropdownMenu() { if (!$this->my->id) { return []; } $menus = []; $account = $this->account(); $manage = $this->manage(); if (!empty($account)) { $menus['MOD_SI_TOOLBAR_ACCOUNT'] = [ 'icon' => 'fdi fas fa-user-circle', 'menus' => $account ]; } if (!empty($manage)) { $menus['MOD_SI_TOOLBAR_MANAGE'] = [ 'icon' => 'fdi fa fa-cog', 'menus' => $manage ]; } if (empty($menus)) { return []; } return ['MOD_SI_TOOLBAR_PAYPLANS' => [ 'icon' => 'fdi fas fa-wallet', 'menus' => $menus, ]]; } /** * Get User manage menus * * @since 1.0.0 * @access public */ public function manage() { return ['MOD_SI_TOOLBAR_PP_SUBSCRIPTION' => [ 'icon' => 'fdi fa fa-shopping-cart', 'link' => PPR::_('index.php?option=com_payplans&view=dashboard') ]]; } /** * Get user account menus * * @since 1.0.0 * @access public */ public function account() { $config = PP::config(); $account = []; // User Preferences menu if ($config->get('user_edit_preferences') || $config->get('user_edit_customdetails')) { $account['MOD_SI_TOOLBAR_PP_PREFERENCES'] = [ 'icon' => 'fdi far fa-edit', 'link' => PPR::_('index.php?option=com_payplans&view=dashboard&layout=preferences') ]; } // download data menu if ($config->get('users_download')) { $account['MOD_SI_TOOLBAR_PP_DOWNLOADS'] = [ 'icon' => 'fdi fa fa-user-shield', 'link' => PPR::_('index.php?option=com_payplans&view=dashboard&layout=download') ]; } return $account; } /** * Retrieving the default toolbar menus. * * @since 1.0.0 * @access public */ public function getDefaultMenuItems() { $defaultMenus = [ [ 'id' => 'plan', 'view' => 'plan', 'permalink' => PPR::_('index.php?option=com_payplans&view=plan'), 'title' => 'MOD_SI_TOOLBAR_PP_PLAN' ], [ 'id' => 'dashboard', 'view' => 'dashboard', 'permalink' => PPR::_('index.php?option=com_payplans&view=dashboard'), 'title' => 'MOD_SI_TOOLBAR_PP_DASHBOARD' ] ]; if ($this->my->id) { $ppConfig = PP::config(); // User preference menu if ($ppConfig->get('user_edit_preferences') || $ppConfig->get('user_edit_customdetails')) { $defaultMenus[] = [ 'id' => 'preferences', 'view' => 'preferences', 'permalink' => PPR::_('index.php?option=com_payplans&view=dashboard&layout=preferences'), 'title' => 'MOD_SI_TOOLBAR_PP_PREFERENCES' ]; } // gdpr download data menu if ($ppConfig->get('users_download')) { $defaultMenus[] = [ 'id' => 'download', 'view' => 'download', 'permalink' => PPR::_('index.php?option=com_payplans&view=dashboard&layout=download'), 'title' => 'MOD_SI_TOOLBAR_PP_DOWNLOADS' ]; } } return $defaultMenus; } /** * Show componets home page menu * * @since 1.0.0 * @access public */ public function showHome() { return FDT::config()->get('pp_layout_home', true); } /** * Responsible to retrieve the active menu for the component. * * @since 1.0.0 * @access public */ public function getActiveMenu() { $input = JFactory::getApplication()->input; $view = $input->get('view', ''); $layout = $input->get('layout', ''); if ($layout != '') { return $layout; } return $view; } } mod_stackideas_toolbar/includes/adapter/payplans/payplans.php000064400000001560152163637060020670 0ustar00getDefaultMenuItems(); // do nothing if no default menu if (!$menus) { return $menus; } foreach ($menus as &$item) { $menu = new stdClass(); $menu->id = $item['id']; $menu->view = $item['view']; $menu->permalink = $item['permalink']; $menu->title = $item['title']; $item = $menu; } return $menus; } /** * Retrieving the default component's toolbar menus. * * @since 1.0.0 * @access public */ public function getDefaultMenuItems() { } /** * Building the dropdown menu. * * @since 1.0.0 * @access public */ public function getDropdownMenu() { } public function adaptiveEnabled() { return FDT::config()->get('adaptiveMenu', true); } public function showHomeButton() { if (!$this->adaptiveEnabled()) { return FDT::config()->get('showHome', true); } return $this->showHome(); } /** * Retrieve the menu type. * * @since 1.0.0 * @access public */ public function getMenuType() { // If the adaptive menu setting is turned off, we'll use the default menu the entire toolbar. if (!$this->adaptiveEnabled()) { return 'globalMenu'; } if (is_null($this->menuType)) { $this->menuType = str_replace('com_', '', $this->component); } return $this->menuType; } /** * Retrieve the component's home. * * @since 1.0.0 * @access public */ public function getHome() { return $this->home; } /** * Retrieve the component's name. * * @since 1.0.0 * @access public */ public function getComponent() { return $this->component; } /** * Preparing dropdown menus. * * @since 1.0.0 * @access public */ public function getAvailableDropdownMenu() { $extensions = FDT::getAvailableExtensions(); $option = str_replace('com_', '', JFactory::getApplication()->input->get('option')); $current = in_array($option, $extensions) ? $option : str_replace('com_', '', FDT::getMainComponent()); $menus = []; // Get the current extension's items to show first $currentAdapter = FDT::getAdapter($current); $menus = array_merge($menus, $currentAdapter->getMenu()->getDropdownMenu()); foreach ($extensions as $extension) { if ($extension === $current) { continue; } $adapter = FDT::getAdapter($extension); $menus = array_merge($menus, $adapter->getMenu()->getDropdownMenu()); } if (empty($menus)) { return []; } // Format the first item. $first = array_shift($menus); $menus = array_merge($first['menus'], $menus); return $menus; } /** * Responsible to retrieve the active menu for the adapter. * * @since 1.0.0 * @access public */ public function getActiveMenu() { $view = JFactory::getApplication()->input->get('view', ''); return $view; } }mod_stackideas_toolbar/includes/adapter/komento/menu.php000064400000006043152163637060017633 0ustar00my = KT::user(JFactory::getUser()->id); $this->config = FDT::getAdapter('com_komento')->config(); JFactory::getLanguage()->load('com_komento', JPATH_ROOT); } /** * Provide the home menu. * * @since 1.0.3 * @access public */ public function getHomeMenu() { $menu = new stdClass(); $menu->id = $this->view; $menu->permalink = JRoute::_('index.php?option=com_komento&view=dashboard'); return $menu; } /** * Building the dropdown menu. * * @since 1.0.3 * @access public */ public function getDropdownMenu() { if (!$this->my->id) { return []; } $menus = [ 'COM_KT_TOOLBAR_DASHBOARD' => [ 'icon' => 'fdi fas fa-tachometer-alt', 'link' => JRoute::_('index.php?option=com_komento&view=dashboard', false) ] ]; if ($this->config->get('enable_gdpr_download')) { $menus['COM_KT_TOOLBAR_DOWNLOAD_DATA'] = [ 'icon' => 'fdi fa fa-user-shield', 'link' => JRoute::_('index.php?option=com_komento&view=dashboard&layout=download', false) ]; } return ['MOD_SI_TOOLBAR_KOMENTO' => [ 'icon' => 'fdi fas fa-comment-dots', 'menus' => $menus ]]; } /** * Retrieving the default toolbar menus. * * @since 1.0.3 * @access public */ public function getDefaultMenuItems() { $defaultMenus = []; if ($this->my->id) { $defaultMenus[] = [ 'id' => 'dashboard', 'view' => 'dashboard', 'permalink' => JRoute::_('index.php?option=com_komento&view=dashboard'), 'title' => 'COM_KT_TOOLBAR_DASHBOARD' ]; if ($this->config->get('enable_gdpr_download')) { $defaultMenus[] = [ 'id' => 'download', 'view' => 'download', 'permalink' => JRoute::_('index.php?option=com_komento&view=dashboard&layout=download'), 'title' => 'COM_KT_TOOLBAR_DOWNLOAD_DATA' ]; } } return $defaultMenus; } /** * Show componets home page menu * * @since 1.0.3 * @access public */ public function showHome() { return FDT::config()->get('kt_layout_home', true); } /** * Responsible to retrieve the active menu for the component. * * @since 1.0.3 * @access public */ public function getActiveMenu() { $input = JFactory::getApplication()->input; $view = $input->get('view', '', 'string'); $layout = $input->get('layout', '', 'string'); if ($layout !== '') { return $layout; } return $view; } }mod_stackideas_toolbar/includes/adapter/komento/komento.php000064400000001741152163637060020343 0ustar00toString()); } /** * Determines the remind username link used for login. * * @since 1.0.0 * @access public */ public function getRemindUsernameLink() { // If needed, implement on child to get forgot username link return JURI::base() . 'index.php?option=com_users&view=remind'; } /** * Determines the reset password link used for login. * * @since 1.0.0 * @access public */ public function getResetPasswordLink() { // If needed, implement on child to get forgot password link return JURI::base() . 'index.php?option=com_users&view=reset'; } /** * Retrieving the jfbconnect library based on the engine. * * @since 1.0.0 * @access public */ public function jfbconnect() { // If needed, implement on child return false; } /** * Retrieve the query name for the search. * * @since 1.0.0 * @access public */ public function getQueryName() { // If needed, can be implemented by child return 'query'; } /** * Retrieve the search query's task. * * @since 1.0.0 * @access public */ public function getTask() { // If needed, can be implemented by child return 'query'; } /** * Retrieve the search route. * * @since 1.0.0 * @access public */ public function getSearchRoute() { // If needed, implement on child return false; } /** * Determine whether should render subscription button. * * @since 1.0.0 * @access public */ public function showSubscription() { return false; } /** * Determine whether should render dropdown menu. * * @since 1.0.0 * @access public */ public function showUserDropdown() { return true; } /** * Retrieve the component's avatar. * * @since 1.0.0 * @access public */ public function getAvatar() { return FH::getDefaultAvatar(); } /** * Determine whether to render search form. * * @since 1.0.0 * @access public */ public function showSearch() { // If needed, implement on child return false; } /** * Retrieve the composer buttons * * @since 1.0.0 * @access public */ public function getComposeButtons() { // Implemented in child } /** * Determine whether to show friend request notifications. * * @since 1.0.0 * @access public */ public function showFriendRequests() { } /** * Retrieve the total friend requests. * * @since 1.0.0 * @access public */ public function getTotalFriendRequests() { } /** * Determine whether to show conversation notifications. * * @since 1.0.0 * @access public */ public function showConversations() { } /** * Retrieve the total new conversations. * * @since 1.0.0 * @access public */ public function getTotalNewConversations() { } /** * Determine whether to show new notifications. * * @since 1.0.0 * @access public */ public function showNotifications() { } /** * Retrieve the total new notifications. * * @since 1.0.0 * @access public */ public function getTotalNewNotifications() { } /** * Return the adapter's name. * * @since 1.0.0 * @return string */ public function getComponent($withComponentPrefix = true) { static $cache = []; $key = $withComponentPrefix ? 1 : 0; if (!isset($cache[$key])) { $value = $this->component; if (!$withComponentPrefix) { $value = str_replace('com_', '', $value); } $cache[$key] = $value; } return $cache[$key]; } /** * Return the adapter's name. * * @since 1.0.0 * @return string */ public function getShortName() { return $this->shortName; } /** * Return the adapter's name. * * @since 1.0.0 * @return string */ public function getJSName() { return $this->jsName; } /** * Retrieve the query search. * * @since 1.0.0 * @access public */ public function getSearchQuery() { $query = $this->input->get($this->getQueryName(), '', 'string'); // Format query to UTF-8. $query = FH::escape($query); return $query; } /** * Retrieve the avatar style * * @since 1.0.0 * @access public */ public function getAvatarStyle() { return ''; } /** * Retrieve SSO for the component. * * @since 1.0.0 * @access public */ public function getSSO() { // If needed, can be implemented on child return false; } /** * Determine whether QRCode should be rendered on the site. * * @since 1.0.0 * @access public */ public function showQRCode() { if (!FDT::config()->get('show_qrcode_mobileapp', true) || !$this->getUser()->id) { return false; } return true; } public function getMobileQrcodeURL() { return ''; } /** * Formatting the notification output. * * @since 1.0.0 * @access public */ public function formatNotification(&$notifications) { if (!$notifications) { return false; } // Format notifications to standardize the output. foreach ($notifications as &$notification) { $notification->title = strip_tags($notification->title, ''); $notification->permalink = $this->getNotificationPermalink($notification); $notification->content = $this->getNotificationContent($notification); $notification->user = $this->getNotificationUser($notification); $notification->lapsed = $this->getLapsedDate($notification->created); $notification->image = FH::normalize($notification, 'image', false); } } /** * Formatting the conversations output. * * @since 1.0.0 * @access public */ public function formatConversations(&$conversations) { if (!$conversations) { return false; } // Format conversations to standardize the output. foreach ($conversations as &$item) { $item->title = $this->getConversationsTitle($item); $item->lastMessageType = $this->getConversationsLastMessageType($item); $item->message = $this->getConversationsMessage($item); $item->elaped = $this->getConversationsElaped($item); $item->participant = $this->getConversationsParticipant($item); } } /** * Create standard info object * * @since 1.0.0 * @access public */ public function createInfo() { $info = new stdClass(); $info->total = -1; $info->data = ''; return $info; } public function getMenu() { static $cache = []; $component = str_replace('com_', '', $this->component); if (!isset($cache[$component])) { require_once(__DIR__ . '/' . $component . '/menu.php'); $className = 'ToolbarMenu' . ucfirst($component); $cache[$component] = new $className(); } return $cache[$component]; } /** * Determine the default polling interval for the notification. * * @since 1.0.0 * @access public */ public function getPollingInterval() { return '30'; } /** * Determine if toolbar should be enabled. * * @since 1.0.0 * @access public */ public function toolbarEnabled() { $component = $this->getComponent(false); return FDT::config()->get($component) !== 'disabled'; } /** * Responsible to return the component ajax url. * * @since 1.0.0 * @access public */ public function getAjaxUrl() { return JURI::base() . 'index.php?option=com_ajax&module=stackideas_toolbar&format=json'; } /** * Responsible to return the component polling ajax url. * * @since 1.0.0 * @access public */ public function getAjaxPollingUrl() { return JURI::base() . 'index.php?option=com_ajax&module=stackideas_toolbar&format=json&method=polling'; } /** * Responsible to retrieve the keyword suggestions for search. * * @since 1.0.0 * @access public */ public function searchKeyword() { return ''; } /** * Responsible to format the search suggested keywords * * @since 1.0.2 * @access public */ public function formatSearchResult($data, $query) { $items = []; if ($data) { foreach ($data as $row) { $row->title = preg_replace('/(' . $query .')/ims', '$1', $row->title); $row->title = preg_replace('/\s/', " ", $row->title); $obj = new stdClass(); $obj->value = strip_tags($row->title); $obj->text = $row->title; $items[] = $obj; } } return $items; } /** * Determine whether to show categories filter on search. * * @since 1.0.2 * @access public */ public function showCategoriesFilter() { return false; } /** * Determine whether to show filter on search. * * @since 1.0.2 * @access public */ public function showFilter() { return false; } }mod_stackideas_toolbar/includes/adapter/easyblog/menu.php000064400000022702152163637060017764 0ustar00my = EB::user(JFactory::getUser()->id); JFactory::getLanguage()->load('com_easyblog', JPATH_ROOT); } /** * Provide the home menu. * * @since 1.0.0 * @access public */ public function getHomeMenu() { $menu = new stdClass(); $menu->id = $this->view; $menu->permalink = EBR::_('index.php?option=com_easyblog'); return $menu; } /** * Building the dropdown menu. * * @since 1.0.0 * @access public */ public function getDropdownMenu() { if (!$this->my->id) { return [] ; } $menus = [ 'MOD_SI_TOOLBAR_ACCOUNT' => [ 'icon' => 'fdi fas fa-user-circle', 'menus' => $this->account() ], 'MOD_SI_TOOLBAR_MANAGE' => [ 'icon' => 'fdi fa fa-cog', 'menus' => $this->manage() ] ]; return ['MOD_SI_TOOLBAR_EASYBLOG' => [ 'icon' => 'fdi fas fa-newspaper', 'menus' => array_merge($this->blog(), $menus) ]]; } public function blog() { $menus = []; $fdConfig = FDT::config(); $items = [ 'COM_EASYBLOG_LATEST_PAGE_TITLE' => [ 'icon' => 'fdi far fa-file-alt', 'link' => EBR::_('index.php?option=com_easyblog'), 'config' => 'eb_layout_home' ], 'COM_EASYBLOG_TOOLBAR_BLOGGERS' => [ 'icon' => 'fdi fa fa-users', 'link' => EBR::_('index.php?option=com_easyblog&view=blogger'), 'config' => 'eb_layout_bloggers' ], 'COM_EASYBLOG_TOOLBAR_CATEGORIES' => [ 'icon' => 'fdi fa fa-list-alt', 'link' => EBR::_('index.php?option=com_easyblog&view=categories'), 'config' => 'eb_layout_categories' ], 'COM_EASYBLOG_TOOLBAR_TAGS' => [ 'icon' => 'fdi fa fa-tags', 'link' => EBR::_('index.php?option=com_easyblog&view=tags'), 'config' => 'eb_layout_tags' ], 'COM_EASYBLOG_TOOLBAR_ARCHIVES' => [ 'icon' => 'fdi fa fa-archive', 'link' => EBR::_('index.php?option=com_easyblog&view=archive'), 'config' => 'eb_layout_archives' ] ]; foreach ($items as $key => $item) { if (!$fdConfig->get($item['config'])) { continue; } $menus[$key] = $item; } return $menus; } public function manage() { $manage = []; $acl = EB::acl(); $config = EB::config(); if ($acl->get('add_entry')) { $manage['COM_EASYBLOG_DASHBOARD_TOOLBAR_OVERVIEW'] = [ 'icon' => 'fdi fa fa-tachometer-alt', 'link' => EB::_('index.php?option=com_easyblog&view=dashboard') ]; $manage['COM_EB_TOOLBAR_DRAFTS'] = [ 'icon' => 'fdi fas fa-file-alt', 'link' => EB::_('index.php?option=com_easyblog&view=dashboard&layout=entries&filter=drafts') ]; $manage['COM_EASYBLOG_TOOLBAR_MANAGE_POSTS'] = [ 'icon' => 'fdi far fa-file-alt', 'link' => EB::_('index.php?option=com_easyblog&view=dashboard&layout=entries') ]; } if ($acl->get('create_post_templates')) { $manage['COM_EASYBLOG_DASHBOARD_HEADING_POST_TEMPLATES'] = [ 'icon' => 'fdi fa fa-file', 'link' => EB::_('index.php?option=com_easyblog&view=dashboard&layout=templates') ]; } if (FH::isSiteAdmin() || ($acl->get('moderate_entry') || ($acl->get('manage_pending') && $acl->get('publish_entry')))) { $manage['COM_EASYBLOG_TOOLBAR_MANAGE_PENDING'] = [ 'icon' => 'fdi fa fa-share-square', 'link' => EB::_('index.php?option=com_easyblog&view=dashboard&layout=moderate') ]; } if (FH::isSiteAdmin() || ($acl->get('moderate_entry') || ($acl->get('manage_pending') && $acl->get('publish_entry')))) { $manage['COM_EB_REPORT_POSTS'] = [ 'icon' => 'fdi fa fa-exclamation-triangle', 'link' => EB::_('index.php?option=com_easyblog&view=dashboard&layout=reports') ]; } if ($acl->get('manage_comment') && EB::comment()->isBuiltin()) { $manage['COM_EASYBLOG_TOOLBAR_MANAGE_COMMENTS'] = [ 'icon' => 'fdi fa fa-comments', 'link' => EB::_('index.php?option=com_easyblog&view=dashboard&layout=comments') ]; } if ($acl->get('polls_manage')) { $manage['COM_EB_TOOLBAR_MANAGE_POLLS'] = [ 'icon' => 'fdi fas fa-poll-h', 'link' => EBR::_('index.php?option=com_easyblog&view=dashboard&layout=polls') ]; } if ($acl->get('create_category')) { $manage['COM_EASYBLOG_TOOLBAR_MANAGE_CATEGORIES'] = [ 'icon' => 'fdi fa fa-list-alt', 'link' => EB::_('index.php?option=com_easyblog&view=dashboard&layout=categories') ]; } if ($acl->get('create_tag')) { $manage['COM_EASYBLOG_TOOLBAR_MANAGE_TAGS'] = [ 'icon' => 'fdi fa fa-tags', 'link' => EB::_('index.php?option=com_easyblog&view=dashboard&layout=tags') ]; } if ($config->get('main_favourite_post')) { $manage['COM_EB_FAVOURITE_POSTS'] = [ 'icon' => 'fdi fa fa-bookmark', 'link' => EB::_('index.php?option=com_easyblog&view=dashboard&layout=favourites') ]; } if ($acl->get('create_team_blog')) { $manage['COM_EASYBLOG_TOOLBAR_TEAMBLOGS'] = [ 'icon' => 'fdi fa fa-users', 'link' => EB::_('index.php?option=com_easyblog&view=dashboard&layout=teamblogs') ]; } if ((EB::isTeamAdmin() || FH::isSiteAdmin()) && $acl->get('create_team_blog')) { $manage['COM_EASYBLOG_TOOLBAR_TEAM_REQUESTS'] = [ 'icon' => 'fdi fa fa-user-edit', 'link' => EBR::_('index.php?option=com_easyblog&view=dashboard&layout=requests') ]; } return $manage; } public function account() { $account = []; $acl = EB::acl(); $config = EB::config(); $account['COM_EASYBLOG_TOOLBAR_EDIT_PROFILE'] = [ 'icon' => 'fdi far fa-edit', 'link' => EB::getEditProfileLink() ]; if ($acl->get('allow_subscription')) { $account['COM_EASYBLOG_TOOLBAR_MANAGE_SUBSCRIPTIONS'] = [ 'icon' => 'fdi fa fa-bell', 'link' => EB::_('index.php?option=com_easyblog&view=subscription') ]; } if (($config->get('integrations_twitter') && $config->get('integrations_twitter_centralized_and_own')) || ($config->get('integrations_linkedin') && $config->get('integrations_linkedin_centralized_and_own'))) { $account['COM_EASYBLOG_TOOLBAR_AUTOPOSTING'] = [ 'icon' => 'fdi fa fa-share-square', 'link' => EB::_('index.php?option=com_easyblog&view=dashboard&layout=autoposting') ]; } if ($config->get('gdpr_enabled') && $config->get('integrations_easysocial_editprofile') && EB::easysocial()->exists()) { $account['COM_EB_GDPR_DOWNLOAD_INFORMATION'] = [ 'icon' => 'fdi fa fa-user-shield', 'link' => 'javascript:void(0);', 'attributes' => 'data-fd-toolbar-dropdown-item data-gdpr-download-link' ]; } return $account; } public function getDefaultMenuItems() { $defaultMenus = []; $fdConfig = FDT::config(); $availableViews = [ 'categories' => [ 'id' => 'categories', 'view' => 'categories', 'config' => 'eb_layout_categories', 'title' => 'COM_EASYBLOG_TOOLBAR_CATEGORIES', 'permalink' => EBR::_('index.php?option=com_easyblog&view=categories') ], 'tags' => [ 'id' => 'tags', 'view' => 'tags', 'config' => 'eb_layout_tags', 'title' => 'COM_EASYBLOG_TOOLBAR_TAGS', 'permalink' => EBR::_('index.php?option=com_easyblog&view=tags') ], 'bloggers' => [ 'id' => 'bloggers', 'view' => 'bloggers', 'config' => 'eb_layout_bloggers', 'title' => 'COM_EASYBLOG_TOOLBAR_BLOGGERS', 'permalink' => EBR::_('index.php?option=com_easyblog&view=blogger') ], 'teamblogs' => [ 'id' => 'teamblogs', 'view' => 'teamblogs', 'config' => 'eb_layout_teamblogs', 'title' => 'COM_EASYBLOG_TOOLBAR_TEAMBLOGS', 'permalink' => EBR::_('index.php?option=com_easyblog&view=teamblog') ], 'archives' => [ 'id' => 'archives', 'view' => 'archives', 'config' => 'eb_layout_archives', 'title' => 'COM_EASYBLOG_TOOLBAR_ARCHIVES', 'permalink' => EBR::_('index.php?option=com_easyblog&view=archive') ], 'calendar' => [ 'id' => 'calendar', 'view' => 'calendar', 'config' => 'eb_layout_calendar', 'title' => 'COM_EASYBLOG_TOOLBAR_CALENDAR', 'permalink' => EBR::_('index.php?option=com_easyblog&view=calendar&layout=calendarView') ] ]; foreach ($availableViews as $view) { if (!$fdConfig->get($view['config'])) { continue; } $defaultMenus[] = $view; } return $defaultMenus; } public function showHome() { return FDT::config()->get('eb_layout_home', true); } /** * Responsible to retrieve the active menu for the component. * * @since 1.0.0 * @access public */ public function getActiveMenu() { $view = JFactory::getApplication()->input->get('view', ''); $map = [ 'blogger' => 'bloggers', 'teamblog' => 'teamblogs', 'archive' => 'archives', ]; if (array_key_exists($view, $map)) { return $map[$view]; } return $view; } /** * Retrieve the link of the current user's profile * * @since 1.0.0 * @access public */ public function getProfileLink() { return ''; } /** * Retrieve the link of the current user's edit profile * * @since 1.0.0 * @access public */ public function getEditProfileLink() { return EB::getEditProfileLink(); } } mod_stackideas_toolbar/includes/adapter/easyblog/easyblog.php000064400000013403152163637060020623 0ustar00my = JFactory::getUser(); $this->app = JFactory::getApplication(); $this->input = $this->app->input; // Ensure that EasyBlog is loaded in the page require_once(JPATH_ADMINISTRATOR . '/components/com_easyblog/includes/easyblog.php'); } public function getTask() { return 'search.query'; } public function getSearchRoute() { return EBR::getItemId('search'); } public function showSubscription() { if (!FDT::config()->get('eb_layout_subscribe')) { return false; } if (!$this->config()->get('main_sitesubscription') || !$this->acl()->get('allow_subscription')) { return false; } return true; } public function showUserDropdown() { if ($this->my->id && !FDT::config()->get('eb_layout_user_dropdown', true)) { return false; } if ($this->my->guest && !FDT::config()->get('eb_layout_login')) { return false; } return true; } public function config() { return EB::config(); } public function acl() { return EB::acl(); } public function getSubscriptions() { // Load up the subscription record for the current user. $subscription = EB::table('Subscriptions'); if (!$this->my->guest) { $subscription->load(['email' => $this->my->email, 'utype' => 'site']); } return $subscription; } /** * Retrieve the composer buttons * * @since 1.0.0 * @access public */ public function getComposeButtons() { if ($this->my->guest || !FDT::config()->get('eb_layout_compose') || !EB::acl()->get('add_entry')) { return false; } $buttons = [ [ 'title' => JText::_('MOD_SI_EASYBLOG_COMPOSE_BUTTON_TITLE'), 'link' => EB::composer()->getComposeUrl(), 'icon' => 'fdi far fa-newspaper' ] ]; if (FDT::config()->get('eb_layout_quickpost') && $this->config()->get('main_microblog')) { $buttons[] = [ 'title' => JText::_('MOD_SI_EASYBLOG_QUICKPOST_BUTTON_TITLE'), 'link' => EB::_('index.php?option=com_easyblog&view=dashboard&layout=quickpost'), 'icon' => 'fdi fab fa-microblog' ]; } return $buttons; } public function getUsernamePlaceholder() { return 'COM_EASYBLOG_USERNAME'; } public function getRegistrationLink() { return EB::getRegistrationLink(); } public function getRemindUsernameLink() { return EB::getRemindUsernameLink(); } public function getResetPasswordLink() { return EB::getResetPasswordLink(); } public function jfbconnect() { if (!EB::jfbconnect()->exists()) { return false; } return EB::jfbconnect()->getTag(); } public function getUser($id = null) { $user = EB::user($id); return $user; } public function logoutRedirect() { return base64_encode(JURI::getInstance()->toString()); } public function getAvatar($userId = null, $size = 'large') { // We'll ignore the size since EB doesn't request for it. return $this->getUser($userId)->getAvatar(); } public function getAvatarStyle() { return $this->config()->get('layout_avatar_style'); } /** * Determine whether should render search on this component's toolbar. * * @since 1.0.0 * @access public */ public function showSearch() { if (!FDT::config()->get('eb_layout_search')) { return false; } return true; } /** * Determine whether should render the online state for the component * * @since 1.0.0 * @access public */ public function showOnlineState() { return false; } public function searchKeyword() { FH::checkToken(); $query = $this->input->get('query', '', 'string'); $query = FH::escape($query); $model = EB::model('Search'); $result = $model->getData(); return $this->formatSearchResult($result, $query); } public function showCategoriesFilter() { return true; } public function getCategories() { $model = EB::model('categories'); $categories = $model->getParentCategories('', 'all', true, true); $categories = EB::formatter('categories', $categories); foreach ($categories as $category) { $category->childs = $category->getChildCount(); } return $categories; } public function getChildCategories($id) { $db = JFactory::getDbo(); $query = []; $query[] = 'SELECT a.`id`, a.`title`, a.`alias`, a.`private`, a.`parent_id`, a.`avatar`, a.`description`'; $query[] = 'FROM `#__easyblog_category` as a'; $query[] = 'WHERE a.`parent_id` = ' . $db->quote($id); $query[] = 'AND a.`published` = 1'; $catLib = EB::category(); $catAccess = $catLib::genCatAccessSQL('a.`private`', 'a.`id`', CATEGORY_ACL_ACTION_SELECT); $query[] = 'AND (' . $catAccess . ')'; // @task: Append language. $filterLanguage = JFactory::getApplication()->getLanguageFilter(); if ($filterLanguage && $this->config()->get('layout_composer_category_language', 0)) { $query[] = EBR::getLanguageQuery('AND', 'a.language'); } $query = implode(' ', $query); // debug // echo $query;exit; $db->setQuery($query); $categories = $db->loadObjectList(); $categories = EB::formatter('categories', $categories); foreach ($categories as $category) { $category->childs = $category->getChildCount(); } return $categories; } } mod_stackideas_toolbar/includes/adapter/global/menu.php000064400000003630152163637060017416 0ustar00getMenu()->getDefault(); $menu = new stdClass(); $menu->permalink = $defaultMenuitem->flink; $menu->id = $defaultMenuitem->id; return $menu; } public function showHome() { return FDT::config()->get('showHome', true); } /** * Retrieve the link of the current user's profile * * NOTE: For global, just point back to Joomla's user profile page * * @since 1.0.0 * @access public */ public function getProfileLink() { $isEnabled = JComponentHelper::isEnabled('com_users'); if (!$isEnabled) { return ''; } return JRoute::_('index.php?option=com_users&view=profile'); } /** * Retrieve the link of the current user's edit profile * * NOTE: For global, just point back to Joomla's user edit profile page * * @since 1.0.0 * @access public */ public function getEditProfileLink() { $isEnabled = JComponentHelper::isEnabled('com_users'); if (!$isEnabled) { return ''; } return JRoute::_('index.php?option=com_users&view=profile&layout=edit'); } }mod_stackideas_toolbar/includes/adapter/global/global.php000064400000001152152163637060017707 0ustar00my = ES::user(); } /** * Provide the home menu. * * @since 1.0.0 * @access public */ public function getHomeMenu() { $menu = new stdClass(); $menu->id = $this->view; $menu->permalink = ESR::dashboard(); return $menu; } /** * Determine if the component version is compatible with the function or not * * @since 1.0.7 * @access public */ public function isVersionCompatible($requiredVersion) { static $exists = null; if (is_null($exists)) { $version = ES::getLocalVersion(); $exist = false; if (version_compare($version, $requiredVersion, '>=')) { $exists = true; } } return $exists; } /** * Building the dropdown menu. * * @since 1.0.0 * @access public */ public function getDropdownMenu() { if (!$this->my->isLoggedIn()) { return []; } $items = [ 'MOD_SI_TOOLBAR_ACCOUNT' => [ 'icon' => 'fdi fas fa-user-circle', 'menus' => $this->account() ], 'MOD_SI_TOOLBAR_DISCOVER' => [ 'icon' => 'fdi far fa-compass', 'menus' => $this->discover() ], 'MOD_SI_TOOLBAR_MANAGE' => [ 'icon' => 'fdi fa fa-cog', 'menus' => $this->manage() ], ]; if ($this->isVersionCompatible('3.3.0')) { if ($this->my->canCreateAds()) { $items['MOD_SI_TOOLBAR_ADVERTISE'] = [ 'icon' => 'fdi fa fa-ad', 'menus' => $this->advertise() ]; } } return ['MOD_SI_TOOLBAR_EASYSOCIAL' => [ 'icon' => 'fdi fas fa-users', 'menus' => $items, ]]; } public function account() { $account = []; $config = ES::config(); if ($this->my->hasCommunityAccess()) { $account['COM_EASYSOCIAL_TOOLBAR_PROFILE_VIEW_YOUR_PROFILE'] = [ 'icon' => 'fdi fas fa-user-circle', 'link' => $this->my->getPermalink(), ]; $account['COM_EASYSOCIAL_TOOLBAR_ACCOUNT_SETTINGS'] = [ 'icon' => 'fdi far fa-edit', 'link' => ESR::profile(['layout' => 'edit']), ]; if ($config->get('friends.enabled')) { $account['COM_ES_MY_FRIENDS'] = [ 'icon' => 'fdi fa fa-user-friends', 'link' => ESR::friends() ]; } if ($config->get('followers.enabled')) { $account['COM_ES_MY_FOLLOWERS'] = [ 'icon' => 'fdi fa fa-users', 'link' => ESR::followers() ]; } $verification = ES::verification(); if ($this->my->id && ($verification->canRequest($this->my->id, SOCIAL_TYPE_USER))) { $account['COM_ES_SUBMIT_VERIFICATION'] = [ 'icon' => 'fdi fa fa-user-check', 'link' => ESR::verifications(['layout' => 'request']) ]; } if ($config->get('friends.invites.enabled')) { $account['COM_EASYSOCIAL_TOOLBAR_INVITE_FRIENDS'] = [ 'icon' => 'fdi far fa-envelope', 'link' => ESR::friends(['layout' => 'invite']) ]; } if ($config->get('badges.enabled')) { $account['COM_EASYSOCIAL_TOOLBAR_PROFILE_ACHIEVEMENTS'] = [ 'icon' => 'fdi fa fa-trophy', 'link' => ESR::badges(['layout' => 'achievements']) ]; } if ($config->get('points.enabled')) { $account['COM_EASYSOCIAL_TOOLBAR_PROFILE_POINTS_HISTORY'] = [ 'icon' => 'fdi fa fa-star', 'link' => ESR::points(['layout' => 'history' , 'userid' => $this->my->getAlias()]) ]; } if ($config->get('conversations.enabled')) { $account['COM_EASYSOCIAL_TOOLBAR_PROFILE_CONVERSATIONS'] = [ 'icon' => 'fdi fa fa-comments', 'link' => ESR::conversations() ]; } } return $account; } public function discover() { $discover = []; $config = ES::config(); if (FDT::config()->get('es_dropdown_discover_people', true)) { $discover['COM_EASYSOCIAL_TOOLBAR_PEOPLE'] = [ 'icon' => 'fdi fa fa-user-friends', 'link' => ESR::users() ]; } $discover['COM_EASYSOCIAL_TOOLBAR_ADVANCED_SEARCH'] = [ 'icon' => 'fdi fa fa-search', 'link' => ESR::search(array('layout' => 'advanced')) ]; if ($config->get('points.enabled')) { $discover['COM_EASYSOCIAL_TOOLBAR_LEADERBOARD'] = [ 'icon' => 'fdi fa fa-chart-line', 'link' => ESR::leaderboard() ]; } if ($config->get('apps.browser')) { $discover['COM_EASYSOCIAL_TOOLBAR_APPS'] = [ 'icon' => 'fdi fa fa-box-open', 'link' => ESR::apps() ]; } return $discover; } public function advertise() { $advertise = []; if ($this->my->hasAdvertiserAccount()) { $advertise['COM_ES_MANAGE_AD_ACCOUNT'] = [ 'icon' => 'fdi fa fa-ad', 'link' => ESR::advertiser(['layout' => 'form']) ]; $advertise['COM_ES_MANAGE_ADS'] = [ 'icon' => 'fdi fa fa-address-card', 'link' => ESR::ads() ]; } else { $advertise['COM_ES_CREATE_ADVERTISER_ACCOUNT'] = [ 'icon' => 'fdi fa fa-address-card', 'link' => ESR::advertiser(['layout' => 'form']) ]; } return $advertise; } public function manage() { $preference = []; $config = ES::config(); if ($config->get('privacy.enabled')) { $preference['COM_EASYSOCIAL_MANAGE_PRIVACY'] = [ 'icon' => 'fdi fa fa-shield-alt', 'link' => ESR::profile(['layout' => 'editPrivacy']) ]; } $preference['COM_EASYSOCIAL_MANAGE_ALERTS'] = [ 'icon' => 'fdi fa fa-bell', 'link' => ESR::profile(['layout' => 'editNotifications']) ]; if ($config->get('activity.logs.enabled')) { $preference['COM_EASYSOCIAL_TOOLBAR_PROFILE_ACTIVITIES'] = [ 'icon' => 'fdi fa fa-list', 'link' => ESR::activities() ]; } return $preference; } public function getDefaultMenuItems() { $availableMenus = [ [ 'id' => 'pages', 'view' => 'pages', 'config' => 'pages.enabled', 'title' => 'COM_EASYSOCIAL_TOOLBAR_PROFILE_PAGES', 'permalink' => ESR::pages(), ], [ 'id' => 'groups', 'view' => 'groups', 'config' => 'groups.enabled', 'title' => 'COM_EASYSOCIAL_TOOLBAR_PROFILE_GROUPS', 'permalink' => ESR::groups(), ], [ 'id' => 'events', 'view' => 'events', 'config' => 'events.enabled', 'title' => 'COM_EASYSOCIAL_TOOLBAR_PROFILE_EVENTS', 'permalink' => ESR::events(), ], [ 'id' => 'videos', 'view' => 'videos', 'config' => 'video.enabled', 'title' => 'COM_EASYSOCIAL_TOOLBAR_VIDEOS', 'permalink' => ESR::videos(), ], [ 'id' => 'audio', 'view' => 'audios', 'config' => 'audio.enabled', 'title' => 'COM_EASYSOCIAL_TOOLBAR_AUDIOS', 'permalink' => ESR::audios(), ], [ 'id' => 'photos', 'view' => 'albums', 'config' => 'photos.enabled', 'title' => 'COM_EASYSOCIAL_TOOLBAR_PROFILE_PHOTOS', 'permalink' => ESR::albums(), ], [ 'id' => 'polls', 'view' => 'polls', 'config' => 'polls.enabled', 'title' => 'COM_EASYSOCIAL_TOOLBAR_POLLS', 'permalink' => ESR::polls(), ] ]; if ($this->isVersionCompatible('4.0.0')) { $availableMenus[] = [ 'id' => 'marketplace', 'view' => 'marketplaces', 'config' => 'marketplaces.enabled', 'title' => 'COM_ES_TOOLBAR_MARKETPLACE', 'permalink' => ESR::marketplaces() ]; } $fdConfig = FDT::config(); $config = ES::config(); $defaultMenus = []; foreach ($availableMenus as $menu) { if (!$fdConfig->get('es_layout_' . $menu['id'], true) || !$config->get($menu['config'])) { continue; } $defaultMenus[] = $menu; } return $defaultMenus; } public function showHome() { return FDT::config()->get('es_layout_home', true); } /** * Retrieve the link of the current user's profile * * @since 1.0.0 * @access public */ public function getProfileLink() { return $this->my->getPermalink(); } /** * Retrieve the link of the current user's edit profile * * @since 1.0.0 * @access public */ public function getEditProfileLink() { return ESR::profile(['layout' => 'edit']); } } mod_stackideas_toolbar/includes/adapter/easysocial/easysocial.php000064400000036533152163637060021512 0ustar00my = JFactory::getUser(); $this->app = JFactory::getApplication(); $this->input = $this->app->input; // Ensure that EasySocial is loaded in the page require_once(JPATH_ADMINISTRATOR . '/components/com_easysocial/includes/easysocial.php'); ES::language()->loadSite(); } /** * Determine if toolbar should be enabled. * * @since 1.0.0 * @access public */ public function toolbarEnabled() { // if user is guest, need to respect the toolbar for guest setting if ($this->my->guest && !FDT::config()->get('es_layout_guests')) { return false; } return parent::toolbarEnabled(); } /** * Determine if the component version is compatible with the function or not * * @since 1.0.7 * @access public */ public function isVersionCompatible($requiredVersion) { static $exists = null; if (is_null($exists)) { $version = ES::getLocalVersion(); $exist = false; if (version_compare($version, $requiredVersion, '>=')) { $exists = true; } } return $exists; } public function getQueryName() { return 'q'; } public function getSearchRoute() { return ESR::getItemId('search'); } public function config() { return ES::config(); } public function showFriendRequests() { if (!FDT::config()->get('es_layout_friends')) { return false; } if (!$this->config()->get('friends.enabled')) { return false; } return true; } public function getTotalFriendRequests() { if ($this->config()->get('friends.enabled')) { return ES::user()->getTotalFriendRequests(); } } public function showConversations() { if (!FDT::config()->get('es_layout_conversations')) { return false; } if (!$this->config()->get('conversations.enabled')) { return false; } return true; } public function getTotalNewConversations() { return ES::user()->getTotalNewConversations(); } public function showNotifications($new = false) { if (!FDT::config()->get('es_layout_notifications')) { return false; } return true; } public function getTotalNewNotifications() { return ES::user()->getTotalNewNotifications(); } public function getUsernamePlaceholder() { return ES::getUsernamePlaceholder(); } public function getRegistrationLink() { return ESR::registration(); } public function getReturnUrl() { $loginMenu = $this->config()->get('general.site.login', null); $loginReturn = base64_encode(JURI::getInstance()->toString()); if (!empty($loginMenu) && $loginMenu !== 'null') { $loginReturn = ESR::getMenuLink($loginMenu); $loginReturn = base64_encode($loginReturn); } return $loginReturn; } public function getRemindUsernameLink() { return ESR::account(array('layout' => 'forgetUsername')); } public function getResetPasswordLink() { return ESR::account(array('layout' => 'forgetPassword')); } public function jfbconnect() { if (!ES::jfbconnect()->isEnabled()) { return false; } return '{JFBCLogin}'; } public function getUser($id = null) { $user = ES::user($id); return $user; } public function hasCover() { // Only EasySocial has support for user covers return $this->config()->get('users.layout.cover'); } public function showVerified() { // Only EasySocial has support for user verified return $this->getUser()->isVerified(); } /** * Determines if there is profile meta support in the toolbar. * * @since 1.0.0 * @access public */ public function showProfileMeta() { // Profile meta only applicable for ES. Without ES, just return false. return $this->config()->get('users.layout.profiletitle'); } /** * Retrieve the profile meta for the toolbar. * * @since 1.0.0 * @access public */ public function getProfileMeta() { if (!$this->isVersionCompatible('3.3.0')) { return []; } $profile = $this->getUser()->getProfile(); $params = $profile->getParams(); $badgeType = $params->get('badgeType', 'icon'); $item = $badgeType == 'icon' ? $profile->getBadgeIcon() : $profile->getBadgeImage(); $meta = []; $meta['type'] = $badgeType; $meta['title'] = $profile->getTitle(); $meta['item'] = $item; return $meta; } public function logoutRedirect() { $logoutMenu = $this->config()->get('general.site.logout'); $logoutRedirect = base64_encode(JURI::getInstance()->toString()); if ($logoutMenu != 'null') { $logoutRedirect = ESR::getMenuLink($logoutMenu); $logoutRedirect = base64_encode($logoutRedirect); } return $logoutRedirect; } public function getAvatarStyle() { return $this->config()->get('layout.avatar.style'); } public function getAvatar($userId = null, $size = SOCIAL_AVATAR_MEDIUM) { return $this->getUser($userId)->getAvatar($size); } public function getNotifications() { ES::requireLogin(); FH::checkToken(); $args = [ 'target_id' => $this->my->id, 'target_type' => SOCIAL_TYPE_USER, 'unread' => true, 'limit' => ES::getLimit('notification.general.pagination'), ]; $notification = ES::notification(); $items = $notification->getItems($args); $this->formatNotification($items); if ($this->config()->get('notifications.system.autoread')) { $model = ES::model('Notifications'); $result = $model->setAllState(SOCIAL_NOTIFICATION_STATE_READ); } return $items; } public function getNotificationPermalink($notification) { return $notification->url; } public function getNotificationContent($notification) { return $notification->content; } public function getNotificationUser($notification) { if (isset($notification->userOverride)) { return $notification->userOverride; } return $notification->user; } public function getLapsedDate($date) { return ES::date($date)->toLapsed(); } public function getViewAllNotificationLink() { return ESR::notifications(); } public function getFriendsRequest() { ES::requireLogin(); FH::checkToken(); $model = ES::model('friends'); $requests = $model->getPendingRequests($this->my->id); return $requests; } public function getViewAllFriendRequestLink() { return ESR::friends(array('filter' => 'pending')); } public function getConversations() { ES::requireLogin(); FH::checkToken(); // Get the conversations model $model = ES::model('Conversations'); $options = array('sorting' => 'lastreplied', 'ordering' => 'desc', 'maxlimit' => 8); $conversations = $model->getConversations($this->my->id, $options); // Mark all items as read if auto read is enabled. if ($this->config()->get('notifications.conversation.autoread')) { foreach ($conversations as $item) { $model->markAsRead($item->id, $this->my->id); } } $this->formatConversations($conversations); return $conversations; } public function isCKEnabled() { $view = $this->input->get('view', '', 'string'); return ES::conversekit()->exists($view); } public function canCreateConversation() { return ES::conversation()->canCreate(); } public function getConversationLink() { return ESR::conversations(['layout' => 'compose']); } /** * Retrieve the composer buttons * * @since 1.0.0 * @access public */ public function getComposeButtons() { if (!$this->my->id) { return; } $buttons = []; $user = ES::user(); $tbConfig = FDT::config(); if ($user->canCreateEvents() && $tbConfig->get('es_compose_event', true)) { $buttons[] = [ 'title' => JText::_('MOD_SI_ES_NEW_EVENT_TITLE'), 'link' => ESR::events(['layout' => 'create']), 'icon' => 'fdi far fa-calendar-alt' ]; } if ($user->canCreateVideos() && $tbConfig->get('es_compose_video', true)) { $buttons[] = [ 'title' => JText::_('MOD_SI_ES_NEW_VIDEO_TITLE'), 'link' => ESR::videos(['layout' => 'form']), 'icon' => 'fdi fa fa-video' ]; } if ($user->canCreateAudios() && $tbConfig->get('es_compose_audio', true)) { $buttons[] = [ 'title' => JText::_('MOD_SI_ES_NEW_AUDIO_TITLE'), 'link' => ESR::audios(['layout' => 'form']), 'icon' => 'fdi fa fa-music' ]; } if ($this->isVersionCompatible('4.0.0')) { if ($user->canCreateListing() && $tbConfig->get('es_compose_marketplace', true)) { $buttons[] = [ 'title' => JText::_('MOD_SI_ES_NEW_MARKETPLACE_TITLE'), 'link' => ESR::marketplaces(['layout' => 'create']), 'icon' => 'fdi fa fa-store' ]; } } if ($user->canCreateGroups() && $tbConfig->get('es_compose_group', true)) { $buttons[] = [ 'title' => JText::_('MOD_SI_ES_NEW_GROUP_TITLE'), 'link' => ESR::groups(['layout' => 'create']), 'icon' => 'fdi fa fa-user-friends' ]; } if ($user->canCreatePages() && $tbConfig->get('es_compose_page', true)) { $buttons[] = [ 'title' => JText::_('MOD_SI_ES_NEW_PAGE_TITLE'), 'link' => ESR::pages(['layout' => 'create']), 'icon' => 'fdi fa fa-briefcase' ]; } if ($user->canCreateAlbums() && $tbConfig->get('es_compose_album', true)) { $buttons[] = [ 'title' => JText::_('MOD_SI_ES_NEW_ALBUM_TITLE'), 'link' => ESR::albums(['layout' => 'form']), 'icon' => 'fdi fa fa-camera-retro' ]; } if ($user->canCreatePolls() && $tbConfig->get('es_compose_poll', true)) { $buttons[] = [ 'title' => JText::_('MOD_SI_ES_NEW_POLL_TITLE'), 'link' => ESR::polls(['layout' => 'create']), 'icon' => 'fdi fa fa-poll' ]; } return $buttons; } public function getViewAllConversationsLink() { return ESR::conversations(); } /** * Retrieve the conversation's title. * Requested by ajax/conversation * * @since 1.0.0 * @access public */ public function getConversationsTitle($conversation) { return $conversation->getTitle(); } /** * Retrieve the conversation's message type. * Requested by ajax/conversation * * @since 1.0.0 * @access public */ public function getConversationsLastMessageType($conversation) { return $conversation->getLastMessageType(); } /** * Retrieve the conversation's message. * Requested by ajax/conversation * * @since 1.0.0 * @access public */ public function getConversationsMessage($conversation) { return $conversation->getLastMessage()->getIntro(60); } /** * Retrieve the conversation's lapsed time. * Requested by ajax/conversation * * @since 1.0.0 * @access public */ public function getConversationsElaped($conversation) { return $conversation->getLastRepliedDate(true); } /** * Retrieve the conversation's participants. * Requested by ajax/conversation * * @since 1.0.0 * @access public */ public function getConversationsParticipant($conversation) { return $conversation->getParticipants(); } /** * Allows caller to set all notification items as read * * @since 1.0.0 * @access public */ public function setallreadajax() { ES::requireLogin(); FH::checkToken(); $response = new stdClass(); $model = ES::model('Notifications'); $response->state = $model->setAllState(SOCIAL_NOTIFICATION_STATE_READ); if (!$response->state) { $response->notice = 'COM_EASYSOCIAL_NOTIFICATIONS_FAILED_TO_MARK_AS_READ'; } return $response; } /** * Determine whether should render search on this component's toolbar. * * @since 1.0.0 * @access public */ public function showSearch() { if (!FDT::config()->get('es_layout_search')) { return false; } // If the user is guest, need to respect the setting if ($this->my->guest && !FDT::config()->get('es_layout_searchguests')) { return false; } return true; } /** * Determine whether should render the online state for the component * * @since 1.0.0 * @access public */ public function showOnlineState() { return $this->config()->get('users.online.state'); } /** * Retrieve SSO for the component. * * @since 1.0.0 * @access public */ public function getSSO() { $sso = ES::sso(); if (!$sso->hasSocialButtons()) { return false; } return $sso->getSocialButtons(); } /** * Approving a friend request. * * @since 1.0.0 * @access public */ public function friendAccept($id) { ES::requireLogin(); FH::checkToken(); if (!$this->config()->get('friends.enabled')) { return 'COM_EASYSOCIAL_FRIENDS_ERROR_FRIENDS_DISABLED'; } // Load up the friends library $friends = ES::friends($this->my->id, $id); $state = $friends->approve(); if (!$state) { throw new Exception($friends->getError()); return false; } $user = $friends->getRequester(); $message = JText::sprintf('COM_EASYSOCIAL_FRIENDS_USER_IS_NOW_YOUR_FRIEND', $user->getName()); $response = new stdClass(); $response->success = $state; $response->message = $message; return $response; } /** * Rejecting a friend request. * * @since 1.0.0 * @access public */ public function friendReject($id) { ES::requireLogin(); FH::checkToken(); if (!$this->config()->get('friends.enabled')) { return 'COM_EASYSOCIAL_FRIENDS_ERROR_FRIENDS_DISABLED'; } // Load up our friends library $friends = ES::friends($this->my->id, $id); $state = $friends->cancel(); if (!$state) { throw new Exception($friends->getError()); return false; } $response = new stdClass(); $response->success = $state; $response->message = JText::_('COM_EASYSOCIAL_FRIENDS_REQUEST_REJECTED'); return $response; } public function getPollingInterval() { return $this->config()->get('notifications.polling.interval'); } /** * Responsible to return the component polling ajax url. * * @since 1.0.0 * @access public */ public function getAjaxPollingUrl() { return JURI::base() . 'components/com_easysocial/polling.php?method=notifier'; } public function showUserDropdown() { if (!FDT::config()->get('es_layout_user_dropdown', true)) { return false; } return true; } public function searchKeyword() { FH::checkToken(); $query = $this->input->get('q', '', 'string'); $query = FH::escape($query); // Determines if we should search by specific filters $filters = $this->input->get('filtertypes', array(), 'array'); $lib = ES::search(); $data = $lib->search($query, 0, 20, $filters, false, true); return $this->formatSearchResult($data, $query); } public function formatSearchResult($data, $query) { $items = []; if ($data->suggestion) { foreach ($data->suggestion as $item) { $text = preg_replace('/(' . $query .')/ims', '$1', $item); $item = preg_replace('/\s/', " ", $item); $obj = new stdClass(); $obj->value = $item; $obj->text = $text; $items[] = $obj; } } return $items; } public function showFilter() { return true; } public function getMobileQrcodeURL() { if (method_exists('ES', 'getMobileQRLoginUrl')) { return ES::getMobileQRLoginUrl(); } return ESR::apps(['layout' => 'mobileAppQrcode', 'tmpl' => 'component', '1' => ES::date()->toUnix()]); } } mod_stackideas_toolbar/includes/form/form.php000064400000001550152163637060015477 0ustar00output('form/logout', ['return' => $adapter->logoutRedirect()]); return $output; } }mod_stackideas_toolbar/includes/search/search.php000064400000006260152163637060016306 0ustar00adapter = $this->getAdapter(); if (is_a($this->adapter, 'ToolbarAdapterGlobal')) { $this->adapter = FDT::getAdapter(FDT::getMainComponent()); } } /** * Responsible to prepare the output. * * @since 1.0.0 * @access public */ public function render() { if (!$this->adapter->showSearch()) { return; } // Do not render anything on mobile since it will conflict with the dialog. if (FH::responsive()->isMobile() || FH::responsive()->isTablet()) { return; } $themes = FDT::themes(); return $themes->output('search/default', [ 'component' => $this->adapter->getComponent(), 'task' => $this->adapter->getTask(), 'itemid' => $this->adapter->getSearchRoute() ]); } public function getAdapter() { // Retrieve the search behavior of the toolbar. $behavior = FDT::config()->get('defaultSearch', 'search-default'); if ($behavior === 'search-default') { $component = JFactory::getApplication()->input->get('option', ''); if ($component === 'com_ajax') { $component = JFactory::getApplication()->input->get('component', ''); } return FDT::getAdapter($component); } return FDT::getAdapter(str_replace('search-', 'com_', $behavior)); } public function categories($args = []) { if (!$this->getAdapter()->showCategoriesFilter()) { return; } $class = FH::normalize($args, 'class', ''); $themes = FDT::themes(); return $themes->output('search/categories', [ 'component' => $this->getAdapter()->getComponent(), 'class' => $class ]); } public function categoriesItems($id, $adapter) { $themes = FDT::themes(); return $themes->output('search/ajax/categories.items', [ 'adapter' => $adapter, 'categories' => $adapter->getChildCategories($id), ]); } public function filter($args = []) { if (!$this->getAdapter()->showFilter()) { return; } $class = FH::normalize($args, 'class', ''); $searchLib = ES::search(); $filters = $searchLib->getFilters(); $themes = FDT::themes(); return $themes->output('search/filter', [ 'filters' => $filters, 'class' => $class ]); } public function input($args = []) { if (!$this->adapter->showSearch()) { return; } $class = FH::normalize($args, 'class', ''); $placeholder = FH::normalize($args, 'placeholder', JText::_('MOD_SI_TOOLBAR_SEARCH_DEFAULT')); $themes = FDT::themes(); return $themes->output('search/input', [ 'queryName' => $this->adapter->getQueryName(), 'query' => $this->adapter->getSearchQuery(), 'component' => $this->adapter->getComponent(), 'class' => $class, 'placeholder' => $placeholder, ]); } }mod_stackideas_toolbar/admin/elements/toolbarsearch.php000064400000003022152163637060017513 0ustar00output('admin/html/toolbarsearch', [ 'id' => $this->id, 'name' => $this->name, 'value' => $this->value, 'search' => $this->getExtensionDefaultSearch() ]); return $output; } protected function getExtensionDefaultSearch() { $search = [ (object) [ 'value' => 'search-easyblog', 'title' => 'MOD_SI_TOOLBAR_EB_SEARCH_OPT' ], (object) [ 'value' => 'search-easydiscuss', 'title' => 'MOD_SI_TOOLBAR_ED_SEARCH_OPT' ], (object) [ 'value' => 'search-easysocial', 'title' => 'MOD_SI_TOOLBAR_ES_SEARCH_OPT' ] ]; // PP do not have search feature, therefore we'll exclude it. #22#note_174746 return $search; } } mod_stackideas_toolbar/admin/elements/toolbarmenu.php000064400000003606152163637060017222 0ustar00output('admin/html/toolbarmenu', [ 'id' => $this->id, 'name' => $this->name, 'value' => $this->value, 'menus' => $this->getMenus(), 'toolbars' => $this->getExtensionToolbars() ]); return $output; } protected function getExtensionToolbars() { $toolbars = [ (object) [ 'value' => 'toolbardefault-easyblog', 'title' => 'MOD_SI_TOOLBAR_EB_TOOLBAR' ], (object) [ 'value' => 'toolbardefault-easysocial', 'title' => 'MOD_SI_TOOLBAR_ES_TOOLBAR' ], (object) [ 'value' => 'toolbardefault-easydiscuss', 'title' => 'MOD_SI_TOOLBAR_ED_TOOLBAR' ], (object) [ 'value' => 'toolbardefault-payplans', 'title' => 'MOD_SI_TOOLBAR_PP_TOOLBAR' ], (object) [ 'value' => 'toolbardefault-komento', 'title' => 'MOD_SI_TOOLBAR_KT_TOOLBAR' ] ]; return $toolbars; } protected function getMenus() { $db = JFactory::getDbo(); $query = 'SELECT `menutype`, `title` FROM `#__menu_types`'; $db->setQuery($query); $menus = $db->loadObjectList(); return $menus; } } mod_stackideas_toolbar/tmpl/notifications/default.php000064400000014570152163637060017242 0ustar00
    fd->html('placeholder.standard', FDT::config()->get('avatar_style', 'rounded')); ?>
    fd->html('placeholder.standard', FDT::config()->get('avatar_style', 'rounded')); ?>
    fd->html('placeholder.standard', FDT::config()->get('avatar_style', 'rounded')); ?>
    mod_stackideas_toolbar/tmpl/dropdown/responsive.php000064400000006027152163637060016774 0ustar00 mod_stackideas_toolbar/tmpl/dropdown/menu.php000064400000003776152163637060015553 0ustar00 $item) { ?>
  • >
  • mod_stackideas_toolbar/tmpl/dropdown/guest.php000064400000007174152163637060015732 0ustar00
    mod_stackideas_toolbar/tmpl/dropdown/qrcode.php000064400000002003152163637060016042 0ustar00
    mod_stackideas_toolbar/tmpl/dropdown/user.php000064400000007202152163637060015551 0ustar00
    html('html.avatar');?>
    html('html.name', ['useAnchorTag' => false]);?>
    <?php echo $profileMeta['title']; ?>
    html('html.qrcode');?>
      html('dropdown.menu');?>
    •  
      html('form.logout'); ?>
    mod_stackideas_toolbar/tmpl/ajax/conversations.php000064400000003342152163637060016560 0ustar00
    html('html.avatar', ['user' => $converse->participant]); ?>
    title; ?>
    output('ajax/conversations/' . $converse->lastMessageType, ['conversation' => $converse, 'my' => $my]); ?>
    elaped; ?>
    fd->html('html.emptyList', 'MOD_SI_TOOLBAR_CONVERSATIONS_NO_CONVERSATIONS_YET', [ 'icon' => 'fdi fa fa fa-envelope', 'class' => (!$conversations) ? 'block' : '', 'attributes' => 'data-fd-empty' ]); ?>mod_stackideas_toolbar/tmpl/ajax/notifications.php000064400000003251152163637060016533 0ustar00
    html('html.avatar', ['user' => $item->user]); ?>
    title; ?>
    content) { ?>
    "content; ?>"
    lapsed; ?>
    image) { ?>
    fd->html('html.emptyList', 'MOD_SI_TOOLBAR_NO_NEW_NOTIFICATIONS_YET', [ 'icon' => 'fdi fa fa-bell', 'class' => (!$items) ? 'block' : '', 'attributes' => 'data-fd-empty' ]); ?>mod_stackideas_toolbar/tmpl/ajax/conversations/message.php000064400000001063152163637060020202 0ustar00 message;mod_stackideas_toolbar/tmpl/ajax/conversations/delete.php000064400000001246152163637060020023 0ustar00 getLastMessage()->getTarget()->getStreamName(); ?> mod_stackideas_toolbar/tmpl/ajax/conversations/create.php000064400000001217152163637060020022 0ustar00 getLastMessage()->getCreator()->getName()); ?> mod_stackideas_toolbar/tmpl/ajax/conversations/leave.php000064400000001247152163637060017656 0ustar00 getLastMessage()->getCreator()->getStreamName(); ?> mod_stackideas_toolbar/tmpl/ajax/conversations/notifications.php000064400000005726152163637060021441 0ustar00
    canCreate()) { ?>
    mod_stackideas_toolbar/tmpl/ajax/conversations/giphy.php000064400000002076152163637060017703 0ustar00 getLastMessage()) { ?> getLastMessage()->created_by === $my->id) { ?> getLastMessage()->created_by)->getName()); ?> mod_stackideas_toolbar/tmpl/ajax/conversations/join.php000064400000001343152163637060017516 0ustar00 getLastMessage()->getCreator()->getName(), $conversation->getLastMessage()->getTarget()->getName()); ?>mod_stackideas_toolbar/tmpl/ajax/friends.php000064400000004207152163637060015316 0ustar00
    html('html.avatar', ['user' => $request->getRequester()]); ?>
    html('html.name', ['user' => $request->getRequester()]); ?>
    getRequester()->getTotalMutualFriends($my->id)) { ?> getRequester()->getTotalMutualFriends($my->id)); ?>
    fd->html('html.emptyList', 'MOD_SI_TOOLBAR_FRIENDS_NO_FRIENDS_YET', [ 'icon' => 'fdi fa fa-user-friends', 'class' => (!$requests) ? 'block' : '', 'attributes' => 'data-fd-empty' ]); ?>mod_stackideas_toolbar/tmpl/default.php000064400000003726152163637060014372 0ustar00
    html('menu');?> html('search');?>
    get('showDivider', true)) { ?>
    fd->html('html.tooltip'); ?>
    mod_stackideas_toolbar/tmpl/social/default.php000064400000001534152163637060015637 0ustar00
    $button) { ?> fd->html('button.' . $type, $button->title, [ 'authorizedUrl' => $button->authorizedUrl, 'block' => true, 'attributes' => $button->attributes, ]); ?>
    mod_stackideas_toolbar/tmpl/menu/default.php000064400000005442152163637060015333 0ustar00
    visible) { ?> visible as $key => $menu) { ?> hidden) { ?>
    mod_stackideas_toolbar/tmpl/admin/html/toolbarsearch.php000064400000002275152163637060017630 0ustar00 mod_stackideas_toolbar/tmpl/admin/html/toolbarmenu.php000064400000002617152163637060017327 0ustar00 mod_stackideas_toolbar/tmpl/subscriptions/easydiscuss.php000064400000005751152163637060020214 0ustar00 mod_stackideas_toolbar/tmpl/subscriptions/easyblog.php000064400000002535152163637060017457 0ustar00 mod_stackideas_toolbar/tmpl/form/logout.php000064400000001567152163637060015223 0ustar00
    mod_stackideas_toolbar/tmpl/compose/default.php000064400000003576152163637060016042 0ustar00 mod_stackideas_toolbar/tmpl/search/button.php000064400000001750152163637060015521 0ustar00 mod_stackideas_toolbar/tmpl/search/input.php000064400000002751152163637060015347 0ustar00 fd->html('form.text', $queryName, $query, 'fd-search', [ 'customClass' => 'fd-toolbar__search-input ' . $class, 'placeholder' => $placeholder, 'attr' => 'data-search-input autocomplete="off" data-fd-component="' . $component . '"' ]); ?>
    fd->html('placeholder.line', 1); ?>
    mod_stackideas_toolbar/tmpl/search/categories.php000064400000003421152163637060016330 0ustar00 :   fd->html('form.hidden', 'category_id', '', '', 'data-fd-search-category-id'); ?>mod_stackideas_toolbar/tmpl/search/ajax/categories.items.php000064400000003270152163637060020375 0ustar00
  • title); ?>
    childs) { ?>
  • mod_stackideas_toolbar/tmpl/search/ajax/search.php000064400000002032152163637060016370 0ustar00 text; ?> fd->html('html.emptyList', 'MOD_SI_TOOLBAR_NO_RECORD_FOUND', [ 'icon' => 'fdi fa fa-search', 'class' => (!$items) ? 'block' : '', 'attributes' => 'data-fd-empty' ]); ?>mod_stackideas_toolbar/tmpl/search/ajax/categories.php000064400000004254152163637060017260 0ustar00
    • title); ?>
      childs) { ?>
    mod_stackideas_toolbar/tmpl/search/ajax/dialog.php000064400000004511152163637060016366 0ustar00 400 700 { "{closeButton}": "[data-close-button]" } { "init": function() { window.tb.dropdown('[data-fd-dialog] [data-fd-dropdown="toolbar"]'); window.tb.dropdownSearch('[data-fd-dialog] [data-fd-search-dropdown="toolbar"]'); } } <?php echo JText::_('MOD_SI_TOOLBAR_SEARCH');?>
    html('search.categories', ['class' => 'w-full']); ?>
    html('search.filter', ['class' => 'w-full']); ?>
    html('search.input', ['class' => 'w-full']); ?>
    fd->html('button.submit', '', 'default', '', [ 'icon' => 'fdi fa fa-search', 'class' => 'fd-toolbar__link fd-toolbar__btn-search' ]);?>
    fd->html('form.hidden', 'option', $component); ?> fd->html('form.hidden', 'controller', 'search'); ?> fd->html('form.hidden', 'task', $task); ?> fd->html('form.hidden', 'Itemid', $itemid); ?> fd->html('form.token'); ?>
    mod_stackideas_toolbar/tmpl/search/default.php000064400000003342152163637060015631 0ustar00 mod_stackideas_toolbar/tmpl/search/filter.php000064400000004476152163637060015503 0ustar00
    |
    mod_stackideas_toolbar/helper.php000064400000003737152163637060013253 0ustar00input; $type = $input->get('type', '', 'string'); $moduleId = $input->get('moduleId', 0, 'int'); // Note: Joomla requires the module id to be string instead of integer $module = JModuleHelper::getModuleById((string) $moduleId); $params = new JRegistry($module->params); FDT::setConfig($params); return FDT::themes()->html('ajax.' . $type); } public static function pollingAjax() { return FDT::themes()->html('ajax.poll'); } public static function setAllReadAjax() { return FDT::themes()->html('ajax.setAllReadAjax'); } public static function friendRequestAjax() { $input = JFactory::getApplication()->input; $action = $input->get('action', ''); $id = $input->get('id', ''); $namespace = 'ajax.friend' . ucfirst($action); return FDT::themes()->html($namespace, $id); } public static function searchAjax() { return FDT::themes()->html('ajax.search'); } public static function dialogAjax() { $input = JFactory::getApplication()->input; $moduleId = $input->get('moduleId', 0, 'int'); // Note: Joomla requires the module id to be string instead of integer $module = JModuleHelper::getModuleById((string) $moduleId); $params = new JRegistry($module->params); FDT::setConfig($params); return FDT::themes()->html('ajax.dialog'); } }index.html000064400000000037152163637060006552 0ustar00 mod_jbusiness_offer_search/assets/js/script.js000064400000014477152163637060015724 0ustar00(function ($) { $.widget("custom.combobox", { _create: function () { this.wrapper = $("") .addClass("custom-combobox") .insertAfter(this.element); this.element.hide(); this._createAutocomplete(); this._createShowAllButton(); }, _createAutocomplete: function () { var selected = this.element.children(":selected"), value = selected.val() ? selected.text() : ""; this.input = $("") .appendTo(this.wrapper) .val(value) .attr("title", "") .addClass("custom-combobox-input ui-widget ui-widget-content ui-state-default ui-corner-left") .autocomplete({ delay: 0, minLength: 0, source: $.proxy(this, "_source") }) .tooltip({ tooltipClass: "ui-state-highlight" }); this._on(this.input, { autocompleteselect: function (event, ui) { ui.item.option.selected = true; this._trigger("select", event, { item: ui.item.option }); }, autocompletechange: "_removeIfInvalid" }); }, _createShowAllButton: function () { var input = this.input, wasOpen = false; $("") .attr("tabIndex", -1) .attr("title", "Show All Items") .tooltip() .appendTo(this.wrapper) .button({ icons: { primary: "ui-icon-carat-2-n-s" }, text: false }) .removeClass("ui-corner-all") .addClass("custom-combobox-toggle ui-corner-right") .mousedown(function () { wasOpen = input.autocomplete("widget").is(":visible"); }) .click(function () { input.focus(); // Close if already visible if (wasOpen) { return; } // Pass empty string as value to search for, displaying all results input.autocomplete("search", ""); }); }, _source: function (request, response) { var matcher = new RegExp($.ui.autocomplete.escapeRegex(request.term), "i"); response(this.element.children("option").map(function () { var text = $(this).text(); if (this.value && (!request.term || matcher.test(text))) return { label: text, value: text, option: this }; })); }, _removeIfInvalid: function (event, ui) { // Selected an item, nothing to do if (ui.item) { return; } // Search for a match (case-insensitive) var value = this.input.val(), valueLowerCase = value.toLowerCase(), valid = false; this.element.children("option").each(function () { if ($(this).text().toLowerCase() === valueLowerCase) { this.selected = valid = true; return false; } }); // Found a match, nothing to do if (valid) { return; } // Remove invalid value this.input .val("") .attr("title", value + " didn't match any item") .tooltip("open"); this.element.val(""); this._delay(function () { this.input.tooltip("close").attr("title", ""); }, 2500); this.input.data("ui-autocomplete").term = ""; }, _destroy: function () { this.wrapper.remove(); this.element.show(); } }); })(jQuery); function disableEmptyFields() { //disable all empty fields to have a nice url jQuery('#companies-search').submit(function() { jQuery(':input', this).each(function() { this.disabled = !(jQuery(this).val()); }); jQuery('#companies-search select').each(function() { if(!(jQuery(this).val()) || jQuery(this).val()==0 && !jQuery(this).hasClass('required')){ jQuery(this).attr('disabled', 'disabled'); } }); }); } function getRegionsByCountry() { let urlRegionsByCountry = jbdUtils.getAjaxUrl('getRegionsByCountryAjax', 'search'); let data = { type: JBDConstants.ITEM_TYPE_OFFER, countryId: jQuery("#countrySearch").val() }; jQuery.ajax({ type: "GET", url: urlRegionsByCountry, data: data, dataType: 'json', success: function (data) { jQuery("#regionSearch").empty(); jQuery("#regionSearch").html(data); jbdUtils.updateChosenSelect('#regionSearch'); getCitiesByCountry(); } }); } function getCitiesByRegion() { let urlCitiesByRegion = jbdUtils.getAjaxUrl('getCitiesByRegionAjax', 'search'); let data = { type: JBDConstants.ITEM_TYPE_OFFER, region: jQuery("#regionSearch").val() }; jQuery.ajax({ type: "GET", url: urlCitiesByRegion, data: data, dataType: 'json', success: function (data) { jQuery("#citySearch").empty(); jQuery("#citySearch").html(data); jbdUtils.updateChosenSelect('#citySearch'); } }); } function getCitiesByCountry() { let urlCitiesByCountry = jbdUtils.getAjaxUrl('getCitiesByCountryAjax', 'search'); let data = { type: JBDConstants.ITEM_TYPE_OFFER, countryId: jQuery("#countrySearch").val() }; jQuery.ajax({ type: "GET", url: urlCitiesByCountry, data: data, dataType: 'json', success: function (data) { jQuery("#citySearch").empty(); jQuery("#citySearch").html(data); jbdUtils.updateChosenSelect('#citySearch'); } }); } mod_jbusiness_offer_search/assets/js/index.html000064400000000037152163637060016042 0ustar00 mod_jbusiness_offer_search/assets/index.html000064400000000037152163637060015426 0ustar00 mod_jbusiness_offer_search/tmpl/default.php000064400000063604152163637060015251 0ustar00get('preserve'); $minLetters = $params->get('minLetters'); $minLetters = is_numeric($minLetters)?$minLetters:3; $token = rand(10, 1000); JBusinessUtil::loadMapScripts(); $limitCountries = JBusinessUtil::getCountryRestriction(); $user = JBusinessUtil::getUser(); ?>
    get('showMap')) { require JPATH_SITE.'/components/com_jbusinessdirectory/views/offers/tmpl/map.php'; } ?>
    get('showOnlyMap')) { ?>
    mod_jbusiness_offer_search/tmpl/index.html000064400000000037152163637060015100 0ustar00 mod_jbusiness_offer_search/helper.php000064400000011637152163637060014127 0ustar00setQuery($query); return $db->loadObjectList(); } public static function getTypes() { $db = JFactory::getDBO(); $query = ' SELECT * FROM #__jbusinessdirectory_company_offer_types order by ordering asc'; $db->setQuery($query); $result = $db->loadObjectList(); return $result; } public static function getSubCategories() { $db = JFactory::getDBO(); $query = ' SELECT c.* FROM #__jbusinessdirectory_categories c inner join #__jbusinessdirectory_categories cc on c.parent_id = cc.id where c.parent_id!=1 and c.published=1 and c.published=1 and c.type='.CATEGORY_TYPE_OFFER.' order by c.lft'; $db->setQuery($query, 0, 1000); $result = $db->loadObjectList(); return $result; } public static function getCities() { $db = JFactory::getDBO(); $query = ' SELECT distinct city FROM #__jbusinessdirectory_company_offers where state =1 and city!="" order by city asc'; $db->setQuery($query); return $db->loadObjectList(); } public static function getRegions() { $db = JFactory::getDBO(); $query = 'SELECT distinct county FROM #__jbusinessdirectory_company_offers where state =1 and county!="" order by county asc'; $db->setQuery($query); return $db->loadObjectList(); } public static function getActivityRegions() { $appSettings = JBusinessUtil::getApplicationSettings(); $db = JFactory::getDBO(); $orderBy = ' name asc'; if($appSettings->cities_regions_order == ORDER_BY_ORDER) { $orderBy = ' ordering asc'; } $query = 'select distinct name as county FROM #__jbusinessdirectory_regions order by '.$orderBy; $db->setQuery($query); return $db->loadObjectList(); } public static function getProvinces() { $db = JFactory::getDBO(); $query = "select distinct province FROM #__jbusinessdirectory_company_offers where state=1 and province!='' order by province asc"; $db->setQuery($query); return $db->loadObjectList(); } public static function getCountries() { $db = JFactory::getDBO(); $query = "select distinct c.id, c.country_name FROM #__jbusinessdirectory_countries c inner join #__jbusinessdirectory_company_offers cp on c.id = cp.countryId where country_name!='' order by country_name asc"; $db->setQuery($query); return $db->loadObjectList(); } public static function getActivityCities() { $appSettings = JBusinessUtil::getApplicationSettings(); $db = JFactory::getDBO(); $orderBy = ' name asc'; if($appSettings->cities_regions_order == ORDER_BY_ORDER) { $orderBy = ' ordering asc'; } $query = ' SELECT distinct name as city FROM #__jbusinessdirectory_cities order by '.$orderBy; $db->setQuery($query); return $db->loadObjectList(); } public static function getOffers($maxOffers, $itemType = OFFER_TYPE_OFFER) { if (isset($_REQUEST["offer-search-results"])) { return $_REQUEST["offer-search-results"]; } JTable::addIncludePath(JPATH_ROOT.'/administrator/components/com_jbusinessdirectory/tables'); $offersTable = JTable::getInstance('Offer', 'JTable'); $appSettings = JBusinessUtil::getApplicationSettings(); $searchDetails = array(); $searchDetails["enablePackages"] = $appSettings->enable_packages; $searchDetails["itemType"] = $itemType; $searchDetails["showPendingApproval"] = ($appSettings->enable_item_moderation=='0' || ($appSettings->enable_item_moderation=='1' && $appSettings->show_pending_approval == '1')); $offers = $offersTable->getOffersByCategories($searchDetails, 0, $maxOffers); foreach ($offers as $offer) { $attributesTable = JTable::getInstance('OfferAttributes', 'JTable'); $offer->customAttributes = $attributesTable->getOfferAttributes($offer->id); } return $offers; } public static function getCustomAttributes($attributes, $atrributesValues) { $attributes = array_filter($attributes); if (empty($attributes)) { return; } JTable::addIncludePath(JPATH_ROOT.'/administrator/components/com_jbusinessdirectory/tables'); $attributesTable = JTable::getInstance('Attribute', 'JTable'); $attributes = implode(",", array_filter($attributes)); $attributes = $attributesTable->getAttributesConfiguration($attributes); foreach ($attributes as $attribute) { if (isset($atrributesValues[$attribute->id])) { $attribute->attributeValue =$atrributesValues[$attribute->id]; } } return $attributes; } } mod_jbusiness_offer_search/mod_jbusiness_offer_search.php000064400000015635152163637060020224 0ustar00get("geolocation"); $jsSettings = JBusinessUtil::addJSSettings(); $jsSettings->isProfile = 1; $appSettings = JBusinessUtil::getApplicationSettings(); $key=""; if (!empty($appSettings->google_map_key)) { $key="&key=".$appSettings->google_map_key; } $lang = JBusinessUtil::getLanguageTag(); if (!defined('JBD_UTILS_LOADED')) { $document = JFactory::getDocument(); $document->addScriptDeclaration(' window.addEventListener("load",function() { jbdUtils.setProperties(' . json_encode($jsSettings) . '); jbdUtils .renderRadioButtons(); }); '); define('JBD_UTILS_LOADED', 1); } if ($params->get('showCountries')) { $countries = modJBusinessOfferSearchHelper::getCountries(); if ($appSettings->enable_multilingual) { JBusinessDirectoryTranslations::updateCountriesTranslation($countries); } } $choices = 0; if ($params->get('linklocation')) { if ($params->get('showCountries') && !$params->get('showRegions')) { $choices = 1; } elseif ($params->get('showCountries')) { $choices = 2; } elseif ($params->get('showRegions')) { $choices = 3; } } $categories = array(); $subCategories = array(); $separateCategories = $params->get('separateCategories'); $availableCategories = $params->get('availableCategories'); if (is_array($availableCategories) && !($availableCategories[0]==0 && count($availableCategories)==1)) { $categories = modJBusinessOfferSearchHelper::getMainCategories(); $subCategories = modJBusinessOfferSearchHelper::getSubCategories(); if ($appSettings->enable_multilingual) { JBusinessDirectoryTranslations::updateCategoriesTranslation($categories); JBusinessDirectoryTranslations::updateCategoriesTranslation($subCategories); } $availableCategories = array_filter($availableCategories); if (!empty($availableCategories)) { foreach ($categories as $key => $category) { if (!in_array($category->id, $availableCategories)) { unset($categories[$key]); } } foreach ($subCategories as $key => $category) { if (!in_array($category->id, $availableCategories)) { unset($subCategories[$key]); } } } foreach ($categories as $category) { foreach ($subCategories as $key => $subCat) { if ($category->id == $subCat->parent_id) { if (!isset($category->subcategories)) { $category->subcategories = array(); } $category->subcategories[] = $subCat; unset($subCategories[$key]); } } } $params->set('separateCategories', 0); $separateCategories = 0; } elseif ($params->get('showCategories')) { $categories = modJBusinessOfferSearchHelper::getMainCategories(); $subCategories = modJBusinessOfferSearchHelper::getSubCategories(); if ($appSettings->enable_multilingual) { JBusinessDirectoryTranslations::updateCategoriesTranslation($categories); JBusinessDirectoryTranslations::updateCategoriesTranslation($subCategories); } if ($params->get('showSubCategories') && !$separateCategories) { foreach ($categories as $category) { foreach ($subCategories as $key => $subCat) { if ($category->id == $subCat->parent_id) { if (!isset($category->subcategories)) { $category->subcategories = array(); } $category->subcategories[] = $subCat; } } } } } if ($appSettings->category_order == ORDER_ALPHABETICALLY && count($categories)>0) { require_once HELPERS_PATH.'/category_lib.php'; $categoryService = new JBusinessDirectorCategoryLib(); $categories = $categoryService->sortCategories($categories, false, true); } if (is_array($availableCategories)) { reset($availableCategories); if (!(current($availableCategories)==0 && count($availableCategories)==1)) { foreach ($subCategories as $key => $subCat) { end($categories)->subcategories[] = $subCat; } } } if ($appSettings->enable_multilingual) { JBusinessDirectoryTranslations::updateCategoriesTranslation($categories); } $attributes = $params->get('customAttributes'); $atrributesValues = $session->get('customAtrributes'); if (!$params->get('preserve')) { $atrributesValues = array(); } if (!empty($attributes)) { $customAttributes = modJBusinessOfferSearchHelper::getCustomAttributes($attributes, $atrributesValues); } if ($params->get('showCities')) { if ($appSettings->limit_cities_regions ==1) { $cities = modJBusinessOfferSearchHelper::getActivityCities(); } else { $cities = modJBusinessOfferSearchHelper::getCities(); } } if ($params->get('showTypes')) { $types = modJBusinessOfferSearchHelper::getTypes(); JBusinessDirectoryTranslations::updateOfferMainTypesTranslation($types); } if ($params->get('showRegions')) { if ($appSettings->limit_cities_regions == 1) { $regions = modJBusinessOfferSearchHelper::getActivityRegions(); } else { $regions = modJBusinessOfferSearchHelper::getRegions(); } } if ($params->get('showProvince')) { $provinces = modJBusinessOfferSearchHelper::getProvinces(); } if ($params->get('showMap')) { $maxOffers = $params->get('maxOffers'); if (empty($maxOffers)) { $maxOffers = 200; } $offers = modJBusinessOfferSearchHelper::getOffers($maxOffers, $params->get('itemType')); } $menuItemId =""; if ($params->get('mItemId')) { $menuItemId="&Itemid=".$params->get('mItemId'); } $maxPrice = $params->get("max-price"); if (empty($maxPrice)) { $maxPrice = 1000; } $layoutType = $params->get('layout-type', 'horizontal'); $moduleclass_sfx = htmlspecialchars((string)$params->get('moduleclass_sfx')); $radius = JFactory::getApplication()->input->getInt("radius"); if (!isset($radius)) { $radius = $params->get('radius'); } $bgStyle = !empty($params->get('bg-color'))?"padding: 20px;background-color:".$params->get('bg-color'):""; require(JModuleHelper::getLayoutPath('mod_jbusiness_offer_search', $params->get('base-layout', 'default'))); mod_jbusiness_offer_search/index.html000064400000000037152163637060014124 0ustar00 mod_jbusiness_offer_search/images/loading_small.gif000064400000020751152163637060016675 0ustar00GIF89ajݛCd vkTz^ڷ200EtZk\Zw! ! NETSCAPE2.0,0@$PA D0B 0dаC@1D 'PPE /`Đ1F 7pбG?2H#G$QI'OD2J+WdѲK/_3L3gФQM7ođ3N;wѳO?4P!C%RQ#G E4R%K0eҴS'O@5T)SPRU+W`Œ5V-[pҵW/_6X1cǐ%SY3gϠE6Z5kװeӶ[7o%7\9sХS];wœ7^={ӷ_?! ,~jݩ\10ydC>05v̦ws]ڕ\ZZk0@$PA D0B 0dаC@1D 'PPE /`Đ1F 7pбG?2H#G$QI'OD2J+WdѲK/_3L3gФQM7ođ3N;wѳO?4P!C%RQ#G E4R%K0eҴS'O@5T)SPRU+W`Œ5V-[pҵW/_6X1cǐ%SY3gϠE6Z5kװeӶ[7o%7\9sХS];wœ7^={ӷ_?! ,~}[Zy01\eZ^50>t:Tʪ(l_ۛ0@$PA D0B 0dаC@1D 'PPE /`Đ1F 7pбG?2H#G$QI'OD2J+WdѲK/_3L3gФQM7ođ3N;wѳO?4P!C%RQ#G E4R%K0eҴS'O@5T)SPRU+W`Œ5V-[pҵW/_6X1cǐ%SY3gϠE6Z5kװeӶ[7o%7\9sХS];wœ7^={ӷ_?! ,Z[}^ZfTk02E0t_ۛ(lʪ:T0@$PA D0B 0dаC@1D 'PPE /`Đ1F 7pбG?2H#G$QI'OD2J+WdѲK/_3L3gФQM7ođ3N;wѳO?4P!C%RQ#G E4R%K0eҴS'O@5T)SPRU+W`Œ5V-[pҵW/_6X1cǐ%SY3gϠE6Z5kװeӶ[7o%7\9sХS];wœ7^={ӷ_?! ,wZ\kZtE002^zTkv ̐dCjݩ0@$PA D0B 0dаC@1D 'PPE /`Đ1F 7pбG?2H#G$QI'OD2J+WdѲK/_3L3gФQM7ođ3N;wѳO?4P!C%RQ#G E4R%K0eҴS'O@5T)SPRU+W`Œ5V-[pҵW/_6X1cǐ%SY3gϠE6Z5kװeӶ[7o%7\9sХS];wœ7^={ӷ_?! ,kZZ\]ڷswv50>Cdy01\jݛ~0@$PA D0B 0dаC@1D 'PPE /`Đ1F 7pбG?2H#G$QI'OD2J+WdѲK/_3L3gФQM7ođ3N;wѳO?4P!C%RQ#G E4R%K0eҴS'O@5T)SPRU+W`Œ5V-[pҵW/_6X1cǐ%SY3gϠE6Z5kװeӶ[7o%7\9sХS];wœ7^={ӷ_?! ,_۔l(ɄT:Ӏt>05^Ze\10yZ[}~0@$PA D0B 0dаC@1D 'PPE /`Đ1F 7pбG?2H#G$QI'OD2J+WdѲK/_3L3gФQM7ođ3N;wѳO?4P!C%RQ#G E4R%K0eҴS'O@5T)SPRU+W`Œ5V-[pҵW/_6X1cǐ%SY3gϠE6Z5kװeӶ[7o%7\9sХS];wœ7^={ӷ_?! ,T:ӶɅl(_۔t0E20kTfZ^}[Z0@$PA D0B 0dаC@1D 'PPE /`Đ1F 7pбG?2H#G$QI'OD2J+WdѲK/_3L3gФQM7ođ3N;wѳO?4P!C%RQ#G E4R%K0eҴS'O@5T)SPRU+W`Œ5V-[pҵW/_6X1cǐ%SY3gϠE6Z5kװeӶ[7o%7\9sХS];wœ7^={ӷ_?;mod_jbusiness_offer_search/images/search.png000064400000004353152163637060015354 0ustar00PNG  IHDRPpJsBIT|d pHYs  ~tEXtSoftwareMacromedia Fireworks 8hxtEXtCreation Time12/17/11C @IDATh]lwfֻƀֆDצDQA^چIn)CVQeFQY>VUQҨ biSIp)bCNk k_3}_v*#f=s9sP~_~1w.USJZOM셧ST;m]!UU h@kT%UækTe `J1bqf1x,I,ӖD a-@( Dɰ\=|0&)kOMMz24HCZ=%(*6iaH($YQAUAѤ.Ab(tܴ0 p'q26KY:MR_Q%.AyA0e`!d t.V64$C*&´S$6HD 4V %NA*n#٥nv8 !l%4#-Iluk *ZN5MS[ꪨ_V+z& PT6h* %UQ%8Nb4TȈE©$<8J8t|yz 4,)+CBrZ0cDBPeE˺R4Aq?I}ue(C'hX#mf׊ mrJpB:biǑ?>)a1F۸@߾Exhuؼ/AoTFc2-vVDB<j 4 sұ,39/6i0,DS_o b!}Ghu+hy`%cz+St1D +سe-{zظo8Fe9:mELiůŠka9J1:W2"|#J|D@sc(64,OME9{N8GU14msP:v:f#<4 IHf8JDk]oj"#E8|Oǥ[mis S(` `7WJ{ļ)b>+o)j}g\I;3/Z6܏gM &aqUOiav?ǢSE̟h?h ՋUyCR t$Ked*VJ૫@DnD5b۫Lj& tk\NCu CTd)媘+K*w>=t$<8ut"V =(VJSS;:zsﳸv#t^YꬼZeC״55ز[SSY׸\g"Qro&׆ mZ. >[4,ǁ=JhW|D+srCº(VOS`.͵h&t(#gWvq]6$24! ~o*'dԂvZtobo~;YCDOMZ_9A.&b5+Ha,'N=ӡҰ0 G9δz漒&[FfP31t?q3 DfAP8ͩn(]Z|/,GF4KhBeҧ' mod_jbusiness_offer_search/mod_jbusiness_offer_search.xml000064400000031630152163637060020226 0ustar00 JBusinessDirectory Offer Search January 2015 CMSJunkie (C) CMSJunkie. All rights reserved. http://www.gnu.org/copyleft/gpl.html info@cmsjunkie.com www.cmsjunkie.com 1.0.0 JBusinessDirectory Offer Search mod_jbusiness_offer_search.xml mod_jbusiness_offer_search.php index.html helper.php tmpl/default.php tmpl/index.html assets images language/de-DE/de-DE.mod_jbusiness_offer_search.ini language/de-DE/de-DE.mod_jbusiness_offer_search.sys.ini language/en-GB/en-GB.mod_jbusiness_offer_search.ini language/en-GB/en-GB.mod_jbusiness_offer_search.sys.ini language/es-ES/es-ES.mod_jbusiness_offer_search.ini language/es-ES/es-ES.mod_jbusiness_offer_search.sys.ini language/fr-FR/fr-FR.mod_jbusiness_offer_search.ini language/fr-FR/fr-FR.mod_jbusiness_offer_search.sys.ini language/nl-NL/nl-NL.mod_jbusiness_offer_search.ini language/nl-NL/nl-NL.mod_jbusiness_offer_search.sys.ini language/pt-PT/pt-PT.mod_jbusiness_offer_search.ini language/pt-PT/pt-PT.mod_jbusiness_offer_search.sys.ini
    mod_jbusiness_listings_search/assets/css/style.css000064400000004604152163637060016632 0ustar00.search-style-2 #searchform .form-field { margin: 0; position: relative; } .search-style-2 #searchform #searchkeyword{ border-radius: 5px 0 0 5px; } .search-style-2 #searchform .form-field select, .search-style-2 #searchform .form-field input[type="text"]{ border-radius: 0; width: 280px; } .search-style-2 .search-suggestions ul li{ padding: 0 4px;; } .search-style-2 .search-suggestions ul li div:hover{ color: #ffa8a0; background-color: #fff; } .search-style-2 #searchform .search-dir-button{ border-radius: 0 5px 5px 0; } .search-suggestions:before { border-color: transparent transparent #ffffff; border-style: solid; border-width:0 7px 8px; top: -8px; content: ""; height: 0; position: absolute; left: 13px; width: 0; } .search-suggestions{ background: none repeat scroll 0 0 #ffffff; border: 1px solid #afafaf; border-radius: 5px; box-shadow: 1px 1px 0 rgba(80, 80, 80, 0.2); color: #333333; display: block; padding: 0; position: absolute; left: 0; top: 41px; width: 684px; z-index: 3; font-size: 13px; max-height: 500px; overflow-x: hidden; overflow-y: auto; text-align: left; } .search-suggestions ul{ list-style: none; margin: 0; padding: 5px; line-height: 27px; } .search-suggestions ul li{ cursor: pointer; margin:0; } .search-suggestions li.city-suggestion{ margin-left: 10px; } .search-suggestions .scol-3{ display: inline-block; vertical-align: top; border-right: 1px solid #d9d9d9; box-sizing: border-box; padding: 2%; width: 32.8%; text-align: left; } #location-search-suggestion{ width: 400px; } .search-suggestions .scol-2{ display: inline-block; vertical-align: top; border-right: 1px solid #d9d9d9; box-sizing: border-box; padding: 2%; width: 48.8%; text-align: left; } .search-suggestions .scol-3:last-child{ border-right: none; } .search-suggestions .scol-2:last-child{ border-right: none; } @media (max-width: 1024px) { #searchform .form-field select, #searchform .form-field input[type="text"]{ width: 250px; } } @media (max-width: 767px) { .search-suggestions{ max-width: 100%; } } @media (max-width: 484px) { .search-style-2 #searchform .form-field{ margin-bottom: 5px; } .search-suggestions .scol-3{ width: 94%; border: none; } .search-suggestions .scol-2{ width: 94%; border: none; } }mod_jbusiness_listings_search/assets/js/script.js000064400000012102152163637060016436 0ustar00(function ($) { $.widget("custom.combobox", { _create: function () { this.wrapper = $("") .addClass("custom-combobox") .insertAfter(this.element); this.element.hide(); this._createAutocomplete(); this._createShowAllButton(); }, _createAutocomplete: function () { var selected = this.element.children(":selected"), value = selected.val() ? selected.text() : ""; this.input = $("") .appendTo(this.wrapper) .val(value) .attr("title", "") .addClass("custom-combobox-input ui-widget ui-widget-content ui-state-default ui-corner-left") .autocomplete({ delay: 0, minLength: 0, source: $.proxy(this, "_source") }) .tooltip({ tooltipClass: "ui-state-highlight" }); this._on(this.input, { autocompleteselect: function (event, ui) { ui.item.option.selected = true; this._trigger("select", event, { item: ui.item.option }); }, autocompletechange: "_removeIfInvalid" }); }, _createShowAllButton: function () { var input = this.input, wasOpen = false; $("") .attr("tabIndex", -1) .attr("title", "Show All Items") .tooltip() .appendTo(this.wrapper) .button({ icons: { primary: "ui-icon-carat-2-n-s" }, text: false }) .removeClass("ui-corner-all") .addClass("custom-combobox-toggle ui-corner-right") .mousedown(function () { wasOpen = input.autocomplete("widget").is(":visible"); }) .click(function () { input.focus(); // Close if already visible if (wasOpen) { return; } // Pass empty string as value to search for, displaying all results input.autocomplete("search", ""); }); }, _source: function (request, response) { var matcher = new RegExp($.ui.autocomplete.escapeRegex(request.term), "i"); response(this.element.children("option").map(function () { var text = $(this).text(); if (this.value && (!request.term || matcher.test(text))) return { label: text, value: text, option: this }; })); }, _removeIfInvalid: function (event, ui) { // Selected an item, nothing to do if (ui.item) { return; } // Search for a match (case-insensitive) var value = this.input.val(), valueLowerCase = value.toLowerCase(), valid = false; this.element.children("option").each(function () { if ($(this).text().toLowerCase() === valueLowerCase) { this.selected = valid = true; return false; } }); // Found a match, nothing to do if (valid) { return; } // Remove invalid value this.input .val("") .attr("title", value + " didn't match any item") .tooltip("open"); this.element.val(""); this._delay(function () { this.input.tooltip("close").attr("title", ""); }, 2500); this.input.data("ui-autocomplete").term = ""; }, _destroy: function () { this.wrapper.remove(); this.element.show(); } }); })(jQuery); function disableEmptyFields(token) { //disable all empty fields to have a nice url jQuery('#dir-container-'+token).submit(function() { jQuery(':input', this).each(function() { this.disabled = !(jQuery(this).val()); }); jQuery('#dir-container-'+token+' select').each(function() { if(!(jQuery(this).val()) || jQuery(this).val()==0 && !jQuery(this).hasClass('required')){ jQuery(this).attr('disabled', 'disabled'); } }); }); } function codeLatLng(lat, lng) { let location = []; location.latitude = lat; location.longitude = lng; let callback = function(country_code) { jQuery("#geo-country").val(country_code); }; JBDMapHelper.reverseGeocoding(location, callback); }mod_jbusiness_listings_search/assets/js/index.html000064400000000037152163637060016575 0ustar00 mod_jbusiness_listings_search/assets/index.html000064400000000037152163637060016161 0ustar00 mod_jbusiness_listings_search/mod_jbusiness_listings_search.xml000064400000037516152163637060021525 0ustar00 JBusinessDirectory Listing Search November 2011 CMSJunkie (C) CMSJunkie. All rights reserved. http://www.gnu.org/copyleft/gpl.html info@cmsjunkie.com www.cmsjunkie.com 3.0.0 JBusinessDirectory mod_jbusiness_listings_search.xml mod_jbusiness_listings_search.php index.html helper.php assets images tmpl language/de-DE/de-DE.mod_jbusiness_listings_search.ini language/de-DE/de-DE.mod_jbusiness_listings_search.sys.ini language/en-GB/en-GB.mod_jbusiness_listings_search.ini language/en-GB/en-GB.mod_jbusiness_listings_search.sys.ini language/es-ES/es-ES.mod_jbusiness_listings_search.ini language/es-ES/es-ES.mod_jbusiness_listings_search.sys.ini language/fr-FR/fr-FR.mod_jbusiness_listings_search.ini language/fr-FR/fr-FR.mod_jbusiness_listings_search.sys.ini language/nl-NL/nl-NL.mod_jbusiness_listings_search.ini language/nl-NL/nl-NL.mod_jbusiness_listings_search.sys.ini language/pt-PT/pt-PT.mod_jbusiness_listings_search.ini language/pt-PT/pt-PT.mod_jbusiness_listings_search.sys.ini
    mod_jbusiness_listings_search/tmpl/default_style_2.php000064400000064557152163637060017455 0ustar00get('preserve'); $categorySearch = $session->get('categorySearch'); $minLetters = $params->get('minLetters'); $minLetters = is_numeric($minLetters)?$minLetters:3; $token = rand(10, 1000); JBusinessUtil::loadMapScripts(); $jinput = JFactory::getApplication()->input; $searchkeyword = $jinput->getString('searchkeyword'); $suggestionType = $jinput->getInt('suggestionType'); $categorySuggestion = $jinput->getInt('categorySuggestion'); $regionSearch = $session->get('regionSearch'); $citySearch = $session->get('citySearch'); ?>
    get('showMap')) { require JPATH_SITE.'/components/com_jbusinessdirectory/include/search-map.php'; } ?>
    get('showOnlyMap')) { ?>
    mod_jbusiness_listings_search/tmpl/default.php000064400000144201152163637060015775 0ustar00get('preserve'); $categorySearch = $session->get('categorySearch'); $minLetters = $params->get('minLetters'); $minLetters = is_numeric($minLetters)?$minLetters:3; $token = rand(10, 1000); JBusinessUtil::loadMapScripts(); $limitCountries = JBusinessUtil::getCountryRestriction(); $user = JBusinessUtil::getUser(); $zipCode = $params->get('defaultLocationName'); if($preserve && !empty($session->get('zipcode'))){ $zipCode = $session->get('zipcode'); } $geoLatitude = $params->get('defaultLatitude'); if($preserve && !empty($session->get('geo-latitude'))){ $geoLongitude = $session->get('geo-longitude'); } $geoLongitude = $params->get('defaultLongitude'); if($preserve && !empty($session->get('geo-longitude'))){ $geoLongitude = $session->get('geo-longitude'); } $locationDetected = $session->get('location-detected'); if(!empty($geoLongitude) && !empty($geoLongitude)){ $locationDetected = 1 ; } ?>
    get('showMap')) { require JPATH_SITE.'/components/com_jbusinessdirectory/include/search-map.php'; } ?>
    get('showOnlyMap')) { ?> mod_jbusiness_listings_search/tmpl/index.html000064400000000037152163637060015633 0ustar00 mod_jbusiness_listings_search/helper.php000064400000023225152163637060014656 0ustar00setQuery($query); return $db->loadObjectList(); } public static function getSubCategories() { $db = JFactory::getDBO(); $query = 'SELECT c.* FROM #__jbusinessdirectory_categories c INNER JOIN #__jbusinessdirectory_categories cc ON c.parent_id = cc.id WHERE c.parent_id!=1 AND c.published=1 AND c.type=' . CATEGORY_TYPE_BUSINESS . ' ORDER BY c.lft'; $db->setQuery($query, 0, 1000); $result = $db->loadObjectList(); return $result; } public static function getTypes() { $db = JFactory::getDBO(); $query = 'SELECT * FROM #__jbusinessdirectory_company_types ORDER BY ordering ASC'; $db->setQuery($query); $result = $db->loadObjectList(); return $result; } public static function getCities() { $appSettings = JBusinessUtil::getApplicationSettings(); $db = JFactory::getDBO(); $query = "SELECT DISTINCT city, city AS id FROM #__jbusinessdirectory_companies WHERE state = 1 AND city != '' " . (($appSettings->show_secondary_locations) ? " union select distinct city, city as id from #__jbusinessdirectory_company_locations where city != '' " : "") . " ORDER BY city ASC"; $db->setQuery($query); return $db->loadObjectList(); } public static function getActivityCities() { $appSettings = JBusinessUtil::getApplicationSettings(); $db = JFactory::getDBO(); $orderBy = ' name asc'; if($appSettings->cities_regions_order == ORDER_BY_ORDER) { $orderBy = ' ordering asc'; } $query = 'SELECT id, name AS city FROM #__jbusinessdirectory_cities ORDER BY '.$orderBy; $db->setQuery($query); return $db->loadObjectList(); } public static function getRegions() { $appSettings = JBusinessUtil::getApplicationSettings(); $db = JFactory::getDBO(); $query = "SELECT DISTINCT county, county AS id FROM #__jbusinessdirectory_companies WHERE state = 1 AND county != '' " . (($appSettings->show_secondary_locations) ? " union select distinct county, county as id from #__jbusinessdirectory_company_locations where county != '' " : "") . " ORDER BY county ASC"; $db->setQuery($query); return $db->loadObjectList(); } public static function getCitiesRegions() { $appSettings = JBusinessUtil::getApplicationSettings(); $db = JFactory::getDBO(); $query = "SELECT city, county FROM #__jbusinessdirectory_companies WHERE state = 1 AND city != '' " . (($appSettings->show_secondary_locations) ? " union select city, county from #__jbusinessdirectory_company_locations where city != '' " : "") . " ORDER BY county ASC"; $db->setQuery($query); $items = $db->loadObjectList(); $result = array(); foreach ($items as $item) { if (empty($result[$item->county])) { $result[$item->county] = array(); } if (!in_array($item->city, $result[$item->county])) { $result[$item->county][] = $item->city; } } return $result; } public static function getActivityRegions() { $appSettings = JBusinessUtil::getApplicationSettings(); $db = JFactory::getDBO(); $orderBy = ' name asc'; if($appSettings->cities_regions_order == ORDER_BY_ORDER) { $orderBy = ' ordering asc'; } $query = 'SELECT id, name AS county FROM #__jbusinessdirectory_regions ORDER BY '.$orderBy; $db->setQuery($query); return $db->loadObjectList(); } public static function getProvinces() { $appSettings = JBusinessUtil::getApplicationSettings(); $db = JFactory::getDBO(); $query = "SELECT DISTINCT province FROM #__jbusinessdirectory_companies WHERE state = 1 AND province != '' " . (($appSettings->show_secondary_locations) ? " UNION Select distinct province FROM #__jbusinessdirectory_company_locations where province != '' " : "") . " ORDER BY province ASC"; $db->setQuery($query); return $db->loadObjectList(); } public static function getCountries() { $appSettings = JBusinessUtil::getApplicationSettings(); $db = JFactory::getDBO(); $query = "SELECT DISTINCT c.id, c.country_name FROM #__jbusinessdirectory_countries c INNER JOIN #__jbusinessdirectory_companies cp ON c.id = cp.countryId WHERE country_name!='' " . (($appSettings->show_secondary_locations) ? " UNION select distinct c.id, c.country_name FROM #__jbusinessdirectory_countries c inner join #__jbusinessdirectory_company_locations lo on lo.countryId = c.id where country_name!='' " : "") . " ORDER BY country_name ASC"; $db->setQuery($query); return $db->loadObjectList(); } public static function getCompanies($maxListings, $moduleId, $params) { if (isset($_REQUEST["search-results"])) { return $_REQUEST["search-results"]; } //load items through cache mechanism $companies = null; $cache = Factory::getCache('mod_jbusiness_listings_search', ''); $key = 'mod_jbusiness_listings' . $moduleId; if(!empty($cache)){ if ($cache->contains($key) && $params->get("cache")) { $companies = $cache->get($key); } else { $companies = self::getCompaniesFromDB($maxListings); $cache->store($companies, $key); } } return $companies; } public static function getCompaniesFromDB($maxListings) { JTable::addIncludePath(JPATH_ROOT . '/administrator/components/com_jbusinessdirectory/tables'); $companiesTable = JTable::getInstance('Company', 'JTable'); $appSettings = JBusinessUtil::getApplicationSettings(); $searchDetails = array(); $searchDetails["enablePackages"] = $appSettings->enable_packages; $searchDetails["showPendingApproval"] = ($appSettings->enable_item_moderation == '0' || ($appSettings->enable_item_moderation == '1' && $appSettings->show_pending_approval == '1')); $searchDetails["showSecondayLocationsMap"] = $appSettings->show_secondary_locations; $searchDetails["showCustomMarkers"] = $appSettings->show_custom_markers; $companies = $companiesTable->getCompaniesByNameAndCategories($searchDetails, 0, $maxListings); foreach ($companies as $company) { $company->packageFeatures = array(); if (!empty($company->features)) { $company->packageFeatures = explode(",", $company->features); } $attributesTable = JTable::getInstance('CompanyAttributes', 'JTable'); $company->customAttributes = $attributesTable->getCompanyAttributes($company->id); } return $companies; } public static function getCustomAttributes($attributes, $atrributesValues) { $attributes = array_filter($attributes); if (empty($attributes)) { return; } JTable::addIncludePath(JPATH_ROOT . '/administrator/components/com_jbusinessdirectory/tables'); $attributesTable = JTable::getInstance('Attribute', 'JTable'); $attributes = implode(",", array_filter($attributes)); $attributes = $attributesTable->getAttributesConfiguration($attributes); foreach ($attributes as $attribute) { if (isset($atrributesValues[$attribute->id])) { $attribute->attributeValue = $atrributesValues[$attribute->id]; } } return $attributes; } /** * Filter categories */ public static function filterCategories($availableCategories){ $appSettings = JBusinessUtil::getApplicationSettings(); $categories = self::getMainCategories(); $subCategories = self::getSubCategories(); if ($appSettings->enable_multilingual) { JBusinessDirectoryTranslations::updateCategoriesTranslation($categories); JBusinessDirectoryTranslations::updateCategoriesTranslation($subCategories); } $availableCategories = array_filter($availableCategories); if (!empty($availableCategories)) { foreach ($categories as $key => $category) { if (!in_array($category->id, $availableCategories)) { unset($categories[$key]); } } foreach ($subCategories as $key => $category) { if (!in_array($category->id, $availableCategories)) { unset($subCategories[$key]); } } } $subcategoriesNoParent = array(); foreach ($categories as $category) { foreach ($subCategories as $key => $subCat) { $found = false; foreach ($categories as $cat) { if ($cat->id == $subCat->parent_id) { $found = true; } } if(!$found){ $subcategoriesNoParent[] = $cat; }else if ($category->id == $subCat->parent_id) { if (!isset($category->subcategories)) { $category->subcategories = array(); } $category->subcategories[] = $subCat; unset($subCategories[$key]); } } } $categories = array_merge($categories, $subcategoriesNoParent); return $categories; } } mod_jbusiness_listings_search/mod_jbusiness_listings_search.php000064400000016626152163637060021513 0ustar00get("geolocation"); $appSettings = JBusinessUtil::getApplicationSettings(); JBusinessUtil::loadSiteLanguage(); $key=""; if (!empty($appSettings->google_map_key)) { $key="&key=".$appSettings->google_map_key; } $lang = JBusinessUtil::getLanguageTag(); $jsSettings = JBusinessUtil::addJSSettings(); $jsSettings->isProfile = 1; if (!defined('JBD_UTILS_LOADED')) { $document = JFactory::getDocument(); $document->addScriptDeclaration(' window.addEventListener("load",function() { jbdUtils.setProperties(' . json_encode($jsSettings) . '); jbdUtils .renderRadioButtons(); }); '); define('JBD_UTILS_LOADED', 1); } $categories = array(); $subCategories = array(); $separateCategories = $params->get('separateCategories'); $availableCategories = $params->get('availableCategories'); if (is_array($availableCategories) && !($availableCategories[0]==0 && count($availableCategories)==1)) { $categories = modJBusinessDirectoryHelper::filterCategories($availableCategories); $params->set('separateCategories', 0); $separateCategories = 0; } else { $categories = modJBusinessDirectoryHelper::getMainCategories(); $subCategories = modJBusinessDirectoryHelper::getSubCategories(); if ($appSettings->enable_multilingual) { JBusinessDirectoryTranslations::updateCategoriesTranslation($categories); JBusinessDirectoryTranslations::updateCategoriesTranslation($subCategories); } if ($params->get('showSubCategories') && !$separateCategories) { foreach ($categories as $category) { foreach ($subCategories as $key => $subCat) { if ($category->id == $subCat->parent_id) { if (!isset($category->subcategories)) { $category->subcategories = array(); } $category->subcategories[] = $subCat; } } } } } $suggestedCategories = null; if ($params->get('showCategoriesSuggestion')) { $suggestedCategories = $params->get('suggestedCategories'); $suggestedCategories = modJBusinessDirectoryHelper::filterCategories($suggestedCategories); } // $ipAddress = JBusinessUtil::getRequestIP(); // $ipAddress = "5.15.250.165"; // $location = JBusinessUtil::getLocationByIp($ipAddress); // $location = new stdClass; // $location->longitude="24.1588878"; // $location->latitude="45.7832116"; if(!empty($location)){ //$nearByCities = JBusinessUtil::getNearbyCitiesByLocation($location->latitude, $location->longitude); } if ($appSettings->category_order == ORDER_ALPHABETICALLY && count($categories)>0) { require_once HELPERS_PATH.'/category_lib.php'; $categoryService = new JBusinessDirectorCategoryLib(); $categories = $categoryService->sortCategories($categories, false, true); } if (is_array($availableCategories)) { reset($availableCategories); if (!(current($availableCategories)==0 && count($availableCategories)==1)) { foreach ($subCategories as $key => $subCat) { end($categories)->subcategories[] = $subCat; } } } if ($params->get('showTypes')) { $types = modJBusinessDirectoryHelper::getTypes(); $availableTypes = $params->get('availableTypes'); if (is_array($availableTypes)) { $availableTypes = array_filter($availableTypes); if (!empty($availableTypes)) { $result = array(); foreach ($types as $type) { foreach ($availableTypes as $atype) { if ($type->id == $atype) { $result[] = $type; } } } $types = $result; } } } $regiongCities = modJBusinessDirectoryHelper::getCitiesRegions(); if ($params->get('showCountries')) { $countries = modJBusinessDirectoryHelper::getCountries(); if ($appSettings->enable_multilingual) { JBusinessDirectoryTranslations::updateCountriesTranslation($countries); } } if ($params->get('showRegions')) { if ($appSettings->limit_cities_regions == 1) { $regions = modJBusinessDirectoryHelper::getActivityRegions(); } else { $regions = modJBusinessDirectoryHelper::getRegions(); } } if ($params->get('showProvince')) { $provinces = modJBusinessDirectoryHelper::getProvinces(); } if ($params->get('showCities')) { if ($appSettings->limit_cities_regions == 1) { $cities = modJBusinessDirectoryHelper::getActivityCities(); } else { $cities = modJBusinessDirectoryHelper::getCities(); } } if ($params->get('showMap')) { $maxListings = $params->get('maxListings'); if (empty($maxListings)) { $maxListings = 200; } $companies = modJBusinessDirectoryHelper::getCompanies($maxListings, $module->id, $params); } if ($appSettings->enable_multilingual) { //JBusinessDirectoryTranslations::updateCategoriesTranslation($categories); JBusinessDirectoryTranslations::updateTypesTranslation($types); } $maxRadius = $params->get("max-radius"); if (empty($maxRadius)) { $maxRadius = 500; } $attributes = $params->get('customAttributes'); $atrributesValues = $session->get('customAtrributes'); if (!$params->get('preserve')) { $atrributesValues = array(); } if (!empty($attributes)) { $customAttributes = modJBusinessDirectoryHelper::getCustomAttributes($attributes, $atrributesValues); } $mapHeight = $params->get('mapHeight'); $mapWidth = $params->get('mapWidth'); $menuItemId =""; if ($params->get('mItemId')) { $menuItemId="&Itemid=".$params->get('mItemId'); } $formAction=JRoute::_('index.php?option=com_jbusinessdirectory'.$menuItemId); if (!$appSettings->enable_seo) { //$formAction = "index.php"; } $choices = 0; if ($params->get('linklocation')) { if ($params->get('showCountries') && !$params->get('showRegions')) { $choices = 1; } elseif ($params->get('showCountries')) { $choices = 2; } elseif ($params->get('showRegions')) { $choices = 3; } } $layoutType = $params->get('layout-type', 'horizontal'); $moduleclass_sfx = htmlspecialchars((string)$params->get('moduleclass_sfx')); $radius = $session->get("radius"); if (!isset($radius)) { $radius = $params->get('radius'); } $bgStyle = !empty($params->get('bg-color'))?"padding: 20px;background-color:".$params->get('bg-color'):""; $styleClass = !empty($params->get('fieldLabel')) && $params->get('fieldLabel')==2?"search-style-3":""; require(JModuleHelper::getLayoutPath('mod_jbusiness_listings_search', $params->get('base-layout', 'default'))); mod_jbusiness_listings_search/index.html000064400000000037152163637060014657 0ustar00 mod_jbusiness_listings_search/images/loading_small.gif000064400000020751152163637060017430 0ustar00GIF89ajݛCd vkTz^ڷ200EtZk\Zw! ! NETSCAPE2.0,0@$PA D0B 0dаC@1D 'PPE /`Đ1F 7pбG?2H#G$QI'OD2J+WdѲK/_3L3gФQM7ođ3N;wѳO?4P!C%RQ#G E4R%K0eҴS'O@5T)SPRU+W`Œ5V-[pҵW/_6X1cǐ%SY3gϠE6Z5kװeӶ[7o%7\9sХS];wœ7^={ӷ_?! ,~jݩ\10ydC>05v̦ws]ڕ\ZZk0@$PA D0B 0dаC@1D 'PPE /`Đ1F 7pбG?2H#G$QI'OD2J+WdѲK/_3L3gФQM7ođ3N;wѳO?4P!C%RQ#G E4R%K0eҴS'O@5T)SPRU+W`Œ5V-[pҵW/_6X1cǐ%SY3gϠE6Z5kװeӶ[7o%7\9sХS];wœ7^={ӷ_?! ,~}[Zy01\eZ^50>t:Tʪ(l_ۛ0@$PA D0B 0dаC@1D 'PPE /`Đ1F 7pбG?2H#G$QI'OD2J+WdѲK/_3L3gФQM7ođ3N;wѳO?4P!C%RQ#G E4R%K0eҴS'O@5T)SPRU+W`Œ5V-[pҵW/_6X1cǐ%SY3gϠE6Z5kװeӶ[7o%7\9sХS];wœ7^={ӷ_?! ,Z[}^ZfTk02E0t_ۛ(lʪ:T0@$PA D0B 0dаC@1D 'PPE /`Đ1F 7pбG?2H#G$QI'OD2J+WdѲK/_3L3gФQM7ođ3N;wѳO?4P!C%RQ#G E4R%K0eҴS'O@5T)SPRU+W`Œ5V-[pҵW/_6X1cǐ%SY3gϠE6Z5kװeӶ[7o%7\9sХS];wœ7^={ӷ_?! ,wZ\kZtE002^zTkv ̐dCjݩ0@$PA D0B 0dаC@1D 'PPE /`Đ1F 7pбG?2H#G$QI'OD2J+WdѲK/_3L3gФQM7ođ3N;wѳO?4P!C%RQ#G E4R%K0eҴS'O@5T)SPRU+W`Œ5V-[pҵW/_6X1cǐ%SY3gϠE6Z5kװeӶ[7o%7\9sХS];wœ7^={ӷ_?! ,kZZ\]ڷswv50>Cdy01\jݛ~0@$PA D0B 0dаC@1D 'PPE /`Đ1F 7pбG?2H#G$QI'OD2J+WdѲK/_3L3gФQM7ođ3N;wѳO?4P!C%RQ#G E4R%K0eҴS'O@5T)SPRU+W`Œ5V-[pҵW/_6X1cǐ%SY3gϠE6Z5kװeӶ[7o%7\9sХS];wœ7^={ӷ_?! ,_۔l(ɄT:Ӏt>05^Ze\10yZ[}~0@$PA D0B 0dаC@1D 'PPE /`Đ1F 7pбG?2H#G$QI'OD2J+WdѲK/_3L3gФQM7ođ3N;wѳO?4P!C%RQ#G E4R%K0eҴS'O@5T)SPRU+W`Œ5V-[pҵW/_6X1cǐ%SY3gϠE6Z5kװeӶ[7o%7\9sХS];wœ7^={ӷ_?! ,T:ӶɅl(_۔t0E20kTfZ^}[Z0@$PA D0B 0dаC@1D 'PPE /`Đ1F 7pбG?2H#G$QI'OD2J+WdѲK/_3L3gФQM7ođ3N;wѳO?4P!C%RQ#G E4R%K0eҴS'O@5T)SPRU+W`Œ5V-[pҵW/_6X1cǐ%SY3gϠE6Z5kװeӶ[7o%7\9sХS];wœ7^={ӷ_?;mod_jbusiness_listings_search/images/search.png000064400000004353152163637060016107 0ustar00PNG  IHDRPpJsBIT|d pHYs  ~tEXtSoftwareMacromedia Fireworks 8hxtEXtCreation Time12/17/11C @IDATh]lwfֻƀֆDצDQA^چIn)CVQeFQY>VUQҨ biSIp)bCNk k_3}_v*#f=s9sP~_~1w.USJZOM셧ST;m]!UU h@kT%UækTe `J1bqf1x,I,ӖD a-@( Dɰ\=|0&)kOMMz24HCZ=%(*6iaH($YQAUAѤ.Ab(tܴ0 p'q26KY:MR_Q%.AyA0e`!d t.V64$C*&´S$6HD 4V %NA*n#٥nv8 !l%4#-Iluk *ZN5MS[ꪨ_V+z& PT6h* %UQ%8Nb4TȈE©$<8J8t|yz 4,)+CBrZ0cDBPeE˺R4Aq?I}ue(C'hX#mf׊ mrJpB:biǑ?>)a1F۸@߾Exhuؼ/AoTFc2-vVDB<j 4 sұ,39/6i0,DS_o b!}Ghu+hy`%cz+St1D +سe-{zظo8Fe9:mELiůŠka9J1:W2"|#J|D@sc(64,OME9{N8GU14msP:v:f#<4 IHf8JDk]oj"#E8|Oǥ[mis S(` `7WJ{ļ)b>+o)j}g\I;3/Z6܏gM &aqUOiav?ǢSE̟h?h ՋUyCR t$Ked*VJ૫@DnD5b۫Lj& tk\NCu CTd)媘+K*w>=t$<8ut"V =(VJSS;:zsﳸv#t^YꬼZeC״55ز[SSY׸\g"Qro&׆ mZ. >[4,ǁ=JhW|D+srCº(VOS`.͵h&t(#gWvq]6$24! ~o*'dԂvZtobo~;YCDOMZ_9A.&b5+Ha,'N=ӡҰ0 G9δz漒&[FfP31t?q3 DfAP8ͩn(]Z|/,GF4KhBeҧ' mod_jbusinesscategoriesevents/mod_jbusinesscategoriesevents.php000064400000004763152163637060021576 0ustar00get('viewtype') == 'slider') { JBusinessUtil::enqueueStyle('libraries/slick/slick.css'); JBusinessUtil::enqueueScript('libraries/slick/slick.js'); } else { JBusinessUtil::enqueueStyle('libraries/metis-menu/metisMenu.css'); JBusinessUtil::enqueueScript('libraries/metis-menu/metisMenu.js'); } $helper = new modJBusinessCategoriesEventsHelper(); JBusinessUtil::includeCSSLibraries(); JBusinessUtil::loadSiteLanguage(); $moduleclass_sfx = htmlspecialchars((string)$params->get('moduleclass_sfx')); $categoriesIds = $params->get('categoryIds'); if ($params->get('viewtype') == 'slider') { $categories = $helper->getCategoriesByIdsOnSlider($categoriesIds); } elseif ($params->get('viewtype') == 'menu') { $categories = $helper->getCategoriesByIdsOnMenu($categoriesIds); } else { $categories = $helper->getCategories($categoriesIds, true); } $appSettings = JBusinessUtil::getApplicationSettings(); if ($appSettings->enable_multilingual) { JBusinessDirectoryTranslations::updateCategoriesTranslation($categories); } $jsSettings = JBusinessUtil::addJSSettings(); $jsSettings->isProfile = 1; if (!defined('JBD_UTILS_LOADED')) { $document = JFactory::getDocument(); $document->addScriptDeclaration(' window.addEventListener("load",function() { jbdUtils.setProperties(' . json_encode($jsSettings) . '); }); '); define('JBD_UTILS_LOADED', 1); } $viewAllLink = JRoute::_('index.php?option=com_jbusinessdirectory&view=categories&categoryType='.CATEGORY_TYPE_EVENT); $span = $params->get('phoneGridOption', 'col-12').' '.$params->get('tabletGridOption', 'col-md-6').' '.$params->get('desktopGridOption', "col-lg-4"); require JModuleHelper::getLayoutPath('mod_jbusinesscategoriesevents', "default_".$params->get('viewtype')); mod_jbusinesscategoriesevents/assets/js/script.js000064400000000075152163637060016476 0ustar00function goToLink(link){ document.location.href=link; }mod_jbusinesscategoriesevents/assets/js/index.html000064400000000040152163637060016621 0ustar00 mod_jbusinesscategoriesevents/assets/index.html000064400000000037152163637060016213 0ustar00 mod_jbusinesscategoriesevents/assets/style.css000064400000001464152163637060016075 0ustar00.main-categories .la.la-menu-arrow { float: right; line-height: 19px; font-size: 16px; line-height: 26px; } .main-categories .active> a >.la.la-menu-arrow::before { content: "\f110"; } .main-categories .la.la-menu-arrow::before { content: "\f111"; } .event-categories-slider .categories-slider-item .categories-slide-image { margin: 0 auto; width: 111px; height: 111px; border-radius: 50%; margin-bottom: 10px; border: 1px solid #dfdfdf; background-repeat: no-repeat; background-position: center center; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; } /* Slide Title */ .event-categories-slider .categories-slider-item p { color: #333; font-size: 13px; line-height: 1.2; text-align: center; }mod_jbusinesscategoriesevents/tmpl/default_slider.php000064400000004720152163637060017372 0ustar00get('autoplay') ? true : false; $sliderParams['autoplaySpeed'] = $params->get('autoplaySpeed'); $sliderParams['nrVisibleItems'] = $params->get('nrVisibleItems', 5); $sliderParams['nrItemsToScrool'] = $params->get('nrItemsToScrool', 2); ?> get('showviewall')){?>
    mod_jbusinesscategoriesevents/tmpl/default_accordion.php000064400000000664152163637060020054 0ustar00
    mod_jbusinesscategoriesevents/tmpl/default.php000064400000005357152163637060016037 0ustar00
    get('showviewall')){?>
    mod_jbusinesscategoriesevents/tmpl/default_grid.php000064400000000571152163637060017035 0ustar00mod_jbusinesscategoriesevents/tmpl/default_boxes.php000064400000000663152163637060017232 0ustar00
    mod_jbusinesscategoriesevents/tmpl/default_grid_icons.php000064400000000570152163637060020227 0ustar00mod_jbusinesscategoriesevents/tmpl/index.html000064400000000037152163637060015665 0ustar00 mod_jbusinesscategoriesevents/helper.php000064400000005670152163637060014714 0ustar00getCategories(CATEGORY_TYPE_EVENT, $categoriesIds); if (!empty($categories)) { if ($appSettings->show_total_business_count && $showListingsCount) { $details = array(); $details["enablePackages"] = $appSettings->enable_packages; $details["showPendingApproval"] = ($appSettings->enable_item_moderation=='0' || ($appSettings->enable_item_moderation=='1' && $appSettings->show_pending_approval == '1')); JTable::addIncludePath(JPATH_ROOT.'/administrator/components/com_jbusinessdirectory/tables'); $categoryTable = JTable::getInstance('Category', 'JBusinessTable'); $listingsCount = $categoryTable->getCountPerCategory($details, CATEGORY_TYPE_EVENT); foreach ($categories as &$category) { if (!is_array($category)) { $category = array($category); $category["subCategories"] = array(); } if (isset($category[0]->id)) { $category[0]->nr_listings = isset($listingsCount[$category[0]->id]->nr_listings) ? $listingsCount[$category[0]->id]->nr_listings : '0'; } } } foreach ($categories as &$category) { if (isset($category[0]->id)) { $category[0]->link = JBusinessUtil::getEventCategoryLink($category[0]->id, $category[0]->alias); if (!empty($category["subCategories"])) { foreach ($category["subCategories"] as $cat) { $cat[0]->link = JBusinessUtil::getEventCategoryLink($cat[0]->id, $cat[0]->alias); } } } } } return $categories; } public function getCategoriesByIdsOnMenu($categoriesIds) { $categoryService = new JBusinessDirectorCategoryLib(); if (!empty($categoriesIds)) { $categoriesIds = implode(",", $categoriesIds); } $categories = $categoryService->getCategories(CATEGORY_TYPE_EVENT, $categoriesIds); return $categories; } public function getCategoriesByIdsOnSlider($categoriesIds) { $categoryService = new JBusinessDirectorCategoryLib(); if (!empty($categoriesIds)) { $categoriesIds = implode(",", $categoriesIds); } $categories = $categoryService->getAllCategories(CATEGORY_TYPE_EVENT, $categoriesIds); $newCategories = array(); foreach ($categories as $category) { $newCategories[$category->id] = array($category,"subCategories"=>array()); } return $newCategories; } } mod_jbusinesscategoriesevents/index.html000064400000000037152163637060014711 0ustar00 mod_jbusinesscategoriesevents/mod_jbusinesscategoriesevents.xml000064400000013077152163637060021605 0ustar00 JBusinessCategoriesEvents December 2015 CMSJunkie (C) CMSJunkie. All rights reserved. http://www.gnu.org/copyleft/gpl.html info@cmsjunkie.com www.cmsjunkie.com 1.0.0 JBusinessCategoriesEvents mod_jbusinesscategoriesevents.xml mod_jbusinesscategoriesevents.php index.html helper.php assets tmpl language/de-DE/de-DE.mod_jbusinesscategories.ini language/de-DE/de-DE.mod_jbusinesscategories.sys.ini language/en-GB/en-GB.mod_jbusinesscategoriesevents.ini language/en-GB/en-GB.mod_jbusinesscategoriesevents.sys.ini language/es-ES/es-ES.mod_jbusinesscategories.ini language/es-ES/es-ES.mod_jbusinesscategories.sys.ini language/fr-FR/fr-FR.mod_jbusinesscategories.ini language/fr-FR/fr-FR.mod_jbusinesscategories.sys.ini language/nl-NL/nl-NL.mod_jbusinesscategories.ini language/nl-NL/nl-NL.mod_jbusinesscategories.sys.ini language/pt-PT/pt-PT.mod_jbusinesscategories.ini language/pt-PT/pt-PT.mod_jbusinesscategories.sys.ini
    mod_easyblogcalendar/mod_easyblogcalendar.php000064400000001512152163637060015561 0ustar00getLayout()); mod_easyblogcalendar/mod_easyblogcalendar.xml000064400000003127152163637060015576 0ustar00 EasyBlog - Calendar Module Stack Ideas Sdn Bhd 26th April 2022 Copyright 2009 - 2015 Stack Ideas Sdn Bhd. All rights reserved. GPL License v2 support@stackideas.com http://stackideas.com 6.0.5 en-GB.mod_easyblogcalendar.ini tmpl mod_easyblogcalendar.php mod_easyblogcalendar.xml
    https://stackideas.com/joomla4compat.xml
    mod_easyblogcalendar/tmpl/default.php000064400000003405152163637060014026 0ustar00
    mod_tags_popular/mod_tags_popular.xml000064400000011021152163637060014170 0ustar00 mod_tags_popular Joomla! Project 2013-01 (C) 2013 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.1.0 MOD_TAGS_POPULAR_XML_DESCRIPTION Joomla\Module\TagsPopular mod_tags_popular.php src tmpl language/en-GB/mod_tags_popular.ini language/en-GB/mod_tags_popular.sys.ini
    mod_tags_popular/mod_tags_popular.php000064400000001607152163637060014170 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Helper\ModuleHelper; $cacheparams = new \stdClass(); $cacheparams->cachemode = 'safeuri'; $cacheparams->class = 'Joomla\Module\TagsPopular\Site\Helper\TagsPopularHelper'; $cacheparams->method = 'getList'; $cacheparams->methodparams = $params; $cacheparams->modeparams = ['id' => 'array', 'Itemid' => 'int']; $list = ModuleHelper::moduleCache($module, $params, $cacheparams); if (!count($list) && !$params->get('no_results_text')) { return; } $display_count = $params->get('display_count', 0); require ModuleHelper::getLayoutPath('mod_tags_popular', $params->get('layout', 'default')); mod_tags_popular/tmpl/cloud.php000064400000003652152163637060012715 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Language\Text; use Joomla\CMS\Router\Route; use Joomla\Component\Tags\Site\Helper\RouteHelper; $minsize = $params->get('minsize', 1); $maxsize = $params->get('maxsize', 2); ?>
    $item->count) { $mincount = $item->count; } if ($maxcount === null || $maxcount < $item->count) { $maxcount = $item->count; } } $countdiff = $maxcount - $mincount; foreach ($list as $item) : if ($countdiff === 0) : $fontsize = $minsize; else : $fontsize = $minsize + (($maxsize - $minsize) / $countdiff) * ($item->count - $mincount); endif; ?> title, ENT_COMPAT, 'UTF-8'); ?> count; ?>
    mod_tags_popular/tmpl/default.php000064400000002255152163637060013231 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Language\Text; use Joomla\CMS\Router\Route; use Joomla\Component\Tags\Site\Helper\RouteHelper; ?> mod_tags_popular/src/Helper/TagsPopularHelper.php000064400000015722152163637060016243 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Module\TagsPopular\Site\Helper; use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Factory; use Joomla\CMS\Helper\ContentHelper; use Joomla\Database\ParameterType; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Helper for mod_tags_popular * * @since 3.1 */ abstract class TagsPopularHelper { /** * Get list of popular tags * * @param \Joomla\Registry\Registry &$params module parameters * * @return mixed * * @since 3.1 */ public static function getList(&$params) { $db = Factory::getDbo(); $user = Factory::getUser(); $groups = $user->getAuthorisedViewLevels(); $timeframe = $params->get('timeframe', 'alltime'); $maximum = (int) $params->get('maximum', 5); $order_value = $params->get('order_value', 'title'); $nowDate = Factory::getDate()->toSql(); $nullDate = $db->getNullDate(); $query = $db->getQuery(true) ->select( [ 'MAX(' . $db->quoteName('tag_id') . ') AS ' . $db->quoteName('tag_id'), 'COUNT(*) AS ' . $db->quoteName('count'), 'MAX(' . $db->quoteName('t.title') . ') AS ' . $db->quoteName('title'), 'MAX(' . $db->quoteName('t.access') . ') AS ' . $db->quoteName('access'), 'MAX(' . $db->quoteName('t.alias') . ') AS ' . $db->quoteName('alias'), 'MAX(' . $db->quoteName('t.params') . ') AS ' . $db->quoteName('params'), 'MAX(' . $db->quoteName('t.language') . ') AS ' . $db->quoteName('language'), ] ) ->group($db->quoteName(['tag_id', 't.title', 't.access', 't.alias'])) ->from($db->quoteName('#__contentitem_tag_map', 'm')) ->whereIn($db->quoteName('t.access'), $groups); // Only return published tags $query->where($db->quoteName('t.published') . ' = 1 '); // Filter by Parent Tag $parentTags = $params->get('parentTag', []); if ($parentTags) { $query->whereIn($db->quoteName('t.parent_id'), $parentTags); } // Filter on category state $query->join( 'INNER', $db->quoteName('#__ucm_content', 'ucm'), $db->quoteName('m.content_item_id') . ' = ' . $db->quoteName('ucm.core_content_item_id') . ' AND ' . $db->quoteName('m.type_id') . ' = ' . $db->quoteName('ucm.core_type_id') ); $query->join( 'INNER', $db->quoteName('#__categories', 'cat'), $db->quoteName('ucm.core_catid') . ' = ' . $db->quoteName('cat.id') ); $query->where($db->quoteName('cat.published') . ' > 0'); // Optionally filter on language $language = ComponentHelper::getParams('com_tags')->get('tag_list_language_filter', 'all'); if ($language !== 'all') { if ($language === 'current_language') { $language = ContentHelper::getCurrentLanguage(); } $query->whereIn($db->quoteName('t.language'), [$language, '*'], ParameterType::STRING); } if ($timeframe !== 'alltime') { $query->where($db->quoteName('tag_date') . ' > ' . $query->dateAdd($db->quote($nowDate), '-1', strtoupper($timeframe))); } $query->join('INNER', $db->quoteName('#__tags', 't'), $db->quoteName('tag_id') . ' = ' . $db->quoteName('t.id')) ->join( 'INNER', $db->quoteName('#__ucm_content', 'c'), $db->quoteName('m.core_content_id') . ' = ' . $db->quoteName('c.core_content_id') ); $query->where($db->quoteName('m.type_alias') . ' = ' . $db->quoteName('c.core_type_alias')); // Only return tags connected to published and authorised items $query->where($db->quoteName('c.core_state') . ' = 1') ->where( '(' . $db->quoteName('c.core_access') . ' IN (' . implode(',', $query->bindArray($groups)) . ')' . ' OR ' . $db->quoteName('c.core_access') . ' = 0)' ) ->where( '(' . $db->quoteName('c.core_publish_up') . ' IS NULL' . ' OR ' . $db->quoteName('c.core_publish_up') . ' = :nullDate2' . ' OR ' . $db->quoteName('c.core_publish_up') . ' <= :nowDate2)' ) ->where( '(' . $db->quoteName('c.core_publish_down') . ' IS NULL' . ' OR ' . $db->quoteName('c.core_publish_down') . ' = :nullDate3' . ' OR ' . $db->quoteName('c.core_publish_down') . ' >= :nowDate3)' ) ->bind([':nullDate2', ':nullDate3'], $nullDate) ->bind([':nowDate2', ':nowDate3'], $nowDate); // Set query depending on order_value param if ($order_value === 'rand()') { $query->order($query->rand()); } else { $order_direction = $params->get('order_direction', 1) ? 'DESC' : 'ASC'; if ($params->get('order_value', 'title') === 'title') { // Backup bound parameters array of the original query $bounded = $query->getBounded(); if ($maximum > 0) { $query->setLimit($maximum); } $query->order($db->quoteName('count') . ' DESC'); $equery = $db->getQuery(true) ->select( $db->quoteName( [ 'a.tag_id', 'a.count', 'a.title', 'a.access', 'a.alias', 'a.language', ] ) ) ->from('(' . (string) $query . ') AS ' . $db->quoteName('a')) ->order($db->quoteName('a.title') . ' ' . $order_direction); $query = $equery; // Rebind parameters foreach ($bounded as $key => $obj) { $query->bind($key, $obj->value, $obj->dataType); } } else { $query->order($db->quoteName($order_value) . ' ' . $order_direction); } } if ($maximum > 0) { $query->setLimit($maximum); } $db->setQuery($query); try { $results = $db->loadObjectList(); } catch (\RuntimeException $e) { $results = []; Factory::getApplication()->enqueueMessage($e->getMessage(), 'error'); } return $results; } } mod_easyblogrelatedpost/mod_easyblogrelatedpost.xml000064400000017451152163637060017135 0ustar00 EasyBlog - Related Posts Module Stack Ideas Sdn Bhd 26th April 2022 Copyright 2009 - 2017 Stack Ideas Sdn Bhd. All rights reserved. GPL License v2 support@stackideas.com http://stackideas.com 6.0.5 en-GB.mod_easyblogrelatedpost.ini tmpl helper.php mod_easyblogrelatedpost.php mod_easyblogrelatedpost.xml
    https://stackideas.com/joomla4compat.xml
    mod_easyblogrelatedpost/mod_easyblogrelatedpost.php000064400000003351152163637060017116 0ustar00get('main_ratings')); require_once(__DIR__ . '/helper.php'); $helper = new modRelatedPostHelper($modules); $view = $modules->input->get('view'); $id = $modules->input->get('id'); // We do not want to display anything other than the entry view. if ($view != 'entry' || !$id) { return; } // Some custom properties that the user can define in the back end. $count = $params->get('count', 5); $posts = $helper->getPosts($id, $count); if (!$posts) { return; } $columnCount = $params->get('column', 3); $layout = $params->get('alignment', 'vertical'); $ratings = $params->get('enableratings', false) ? false : true; // Get the photo layout option $photoLayout = $params->get('photo_layout'); $photoSize = $params->get('photo_size', 'medium'); $photoAlignment = $params->get('alignment', 'center'); $photoAlignment = ($photoAlignment == 'default') ? 'center' : $photoAlignment; require($modules->getLayout());mod_easyblogrelatedpost/tmpl/default_vertical.php000064400000001534152163637060016475 0ustar00
    mod_easyblogrelatedpost/tmpl/default_item_heading.php000064400000002033152163637060017274 0ustar00
    get('showavatar', false)) { ?>
    mod_easyblogrelatedpost/tmpl/default_horizontal.php000064400000002135152163637060017053 0ustar00
    get('showauthor', true) || $params->get('showdate', true)) { ?>
    get('showauthor', true)) { ?> get('showdate' , true)) { ?>
    getDisplayDate($params->get('sourcedate', ''))->format($params->get('dateformat', JText::_('DATE_FORMAT_LC3'))); ?>
    mod_easyblogrelatedpost/tmpl/default_item_footer.php000064400000003054152163637060017177 0ustar00 get('showhits' , false) || $params->get('showcommentcount', false) || $params->get('showreadmore', true)) { ?>
    get('showhits' , false)) { ?> hits;?> get('showcommentcount', false)) { ?> commentCount;?> get('showreadmore', true)) { ?>
    get('showratings', false) && $post->showRating) { ?>
    html($post, 'ebrelatedpost-' . $post->id . '-ratings', JText::_('MOD_EASYBLOGRELATED_RATEBLOG'), !$params->get('enableratings', false)); ?>
    mod_easyblogrelatedpost/tmpl/default_item_content.php000064400000005614152163637060017357 0ustar00 get('photo_show', true) && $post->cover) { ?>
    full) && $photoLayout->full) ? "is-full" : '';?>"> isCoverImage) { ?> crop) && $photoLayout->crop) { ?> <?php echo $post->title;?> <?php echo $post->title;?> isCoverImage) { ?> isEmbedCover()) { ?>
    videoEmbedCover; ?>
    videoCover; ?>
    get('showcategory', true)) { ?> getCategories() as $category) { ?>
    getTitle(); ?>
    get('showintro', '-1') != '-1') { ?>
    protect) { ?> content; ?> protect) { ?> summary; ?>
    mod_easyblogrelatedpost/tmpl/default.php000064400000002253152163637060014603 0ustar00
    ">
    get('main_ratings')) { ?> mod_easyblogrelatedpost/helper.php000064400000002423152163637060013461 0ustar00lib = $modules; $this->params = $this->lib->params; } /** * Retrieves a list of related posts against the current post being viewed * * @since 5.1 * @access public */ public function getPosts($id, $count = 0) { $post = EB::post($id); $model = EB::model('Blog'); $behavior = $this->params->get('behavior', 'tags'); $options = []; $options['ordering'] = $this->params->get('ordering', 'created'); $options['sort'] = $this->params->get('sort', 'desc'); $posts = $model->getRelatedPosts($post->id, $count, $behavior, $post->category_id, $post->getTitle(), $options); $posts = $this->lib->processItems($posts); return $posts; } } mod_tags_similar/mod_tags_similar.xml000064400000005427152163637060014141 0ustar00 mod_tags_similar Joomla! Project 2013-01 (C) 2013 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.1.0 MOD_TAGS_SIMILAR_XML_DESCRIPTION Joomla\Module\TagsSimilar mod_tags_similar.php src tmpl language/en-GB/mod_tags_similar.ini language/en-GB/mod_tags_similar.sys.ini
    mod_tags_similar/mod_tags_similar.php000064400000001413152163637060014117 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Helper\ModuleHelper; $cacheparams = new \stdClass(); $cacheparams->cachemode = 'safeuri'; $cacheparams->class = 'Joomla\Module\TagsSimilar\Site\Helper\TagsSimilarHelper'; $cacheparams->method = 'getList'; $cacheparams->methodparams = $params; $cacheparams->modeparams = ['id' => 'array', 'Itemid' => 'int']; $list = ModuleHelper::moduleCache($module, $params, $cacheparams); require ModuleHelper::getLayoutPath('mod_tags_similar', $params->get('layout', 'default')); mod_tags_similar/tmpl/default.php000064400000002052152163637060013202 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Router\Route; if (!$list) { return; } ?> mod_tags_similar/src/Helper/TagsSimilarHelper.php000064400000017117152163637060016177 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Module\TagsSimilar\Site\Helper; use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Factory; use Joomla\CMS\Helper\ContentHelper; use Joomla\CMS\Helper\TagsHelper; use Joomla\CMS\Language\Text; use Joomla\Component\Tags\Site\Helper\RouteHelper; use Joomla\Database\ParameterType; use Joomla\Registry\Registry; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Helper for mod_tags_similar * * @since 3.1 */ abstract class TagsSimilarHelper { /** * Get a list of tags * * @param Registry &$params Module parameters * * @return array */ public static function getList(&$params) { $app = Factory::getApplication(); $option = $app->getInput()->get('option'); $view = $app->getInput()->get('view'); // For now assume com_tags and com_users do not have tags. // This module does not apply to list views in general at this point. if ($option === 'com_tags' || $view === 'category' || $option === 'com_users') { return []; } $db = Factory::getDbo(); $user = Factory::getUser(); $groups = $user->getAuthorisedViewLevels(); $matchtype = $params->get('matchtype', 'all'); $ordering = $params->get('ordering', 'count'); $tagsHelper = new TagsHelper(); $prefix = $option . '.' . $view; $id = $app->getInput()->getInt('id'); $now = Factory::getDate()->toSql(); $nullDate = $db->getNullDate(); // This returns a comma separated string of IDs. $tagsToMatch = $tagsHelper->getTagIds($id, $prefix); if (!$tagsToMatch) { return []; } $tagsToMatch = explode(',', $tagsToMatch); $tagCount = \count($tagsToMatch); $query = $db->getQuery(true); $query ->select( [ $db->quoteName('m.core_content_id'), $db->quoteName('m.content_item_id'), $db->quoteName('m.type_alias'), 'COUNT( ' . $db->quoteName('tag_id') . ') AS ' . $db->quoteName('count'), $db->quoteName('ct.router'), $db->quoteName('cc.core_title'), $db->quoteName('cc.core_alias'), $db->quoteName('cc.core_catid'), $db->quoteName('cc.core_language'), $db->quoteName('cc.core_params'), ] ) ->from($db->quoteName('#__contentitem_tag_map', 'm')) ->join( 'INNER', $db->quoteName('#__tags', 't'), $db->quoteName('m.tag_id') . ' = ' . $db->quoteName('t.id') ) ->join( 'INNER', $db->quoteName('#__ucm_content', 'cc'), $db->quoteName('m.core_content_id') . ' = ' . $db->quoteName('cc.core_content_id') ) ->join( 'INNER', $db->quoteName('#__content_types', 'ct'), $db->quoteName('m.type_alias') . ' = ' . $db->quoteName('ct.type_alias') ) ->whereIn($db->quoteName('m.tag_id'), $tagsToMatch) ->whereIn($db->quoteName('t.access'), $groups) ->where($db->quoteName('cc.core_state') . ' = 1') ->extendWhere( 'AND', [ $db->quoteName('cc.core_access') . ' IN (' . implode(',', $query->bindArray($groups)) . ')', $db->quoteName('cc.core_access') . ' = 0', ], 'OR' ) ->extendWhere( 'AND', [ $db->quoteName('m.content_item_id') . ' <> :currentId', $db->quoteName('m.type_alias') . ' <> :prefix', ], 'OR' ) ->bind(':currentId', $id, ParameterType::INTEGER) ->bind(':prefix', $prefix) ->extendWhere( 'AND', [ $db->quoteName('cc.core_publish_up') . ' IS NULL', $db->quoteName('cc.core_publish_up') . ' = :nullDateUp', $db->quoteName('cc.core_publish_up') . ' <= :nowDateUp', ], 'OR' ) ->bind(':nullDateUp', $nullDate) ->bind(':nowDateUp', $now) ->extendWhere( 'AND', [ $db->quoteName('cc.core_publish_down') . ' IS NULL', $db->quoteName('cc.core_publish_down') . ' = :nullDateDown', $db->quoteName('cc.core_publish_down') . ' >= :nowDateDown', ], 'OR' ) ->bind(':nullDateDown', $nullDate) ->bind(':nowDateDown', $now); // Optionally filter on language $language = ComponentHelper::getParams('com_tags')->get('tag_list_language_filter', 'all'); if ($language !== 'all') { if ($language === 'current_language') { $language = ContentHelper::getCurrentLanguage(); } $query->whereIn($db->quoteName('cc.core_language'), [$language, '*'], ParameterType::STRING); } $query->group( [ $db->quoteName('m.core_content_id'), $db->quoteName('m.content_item_id'), $db->quoteName('m.type_alias'), $db->quoteName('ct.router'), $db->quoteName('cc.core_title'), $db->quoteName('cc.core_alias'), $db->quoteName('cc.core_catid'), $db->quoteName('cc.core_language'), $db->quoteName('cc.core_params'), ] ); if ($matchtype === 'all' && $tagCount > 0) { $query->having('COUNT( ' . $db->quoteName('tag_id') . ') = :tagCount') ->bind(':tagCount', $tagCount, ParameterType::INTEGER); } elseif ($matchtype === 'half' && $tagCount > 0) { $tagCountHalf = ceil($tagCount / 2); $query->having('COUNT( ' . $db->quoteName('tag_id') . ') >= :tagCount') ->bind(':tagCount', $tagCountHalf, ParameterType::INTEGER); } if ($ordering === 'count' || $ordering === 'countrandom') { $query->order($db->quoteName('count') . ' DESC'); } if ($ordering === 'random' || $ordering === 'countrandom') { $query->order($query->rand()); } $maximum = (int) $params->get('maximum', 5); if ($maximum > 0) { $query->setLimit($maximum); } $db->setQuery($query); try { $results = $db->loadObjectList(); } catch (\RuntimeException $e) { $results = []; $app->enqueueMessage(Text::_('JERROR_AN_ERROR_HAS_OCCURRED'), 'error'); } foreach ($results as $result) { $result->link = RouteHelper::getItemRoute( $result->content_item_id, $result->core_alias, $result->core_catid, $result->core_language, $result->type_alias, $result->router ); $result->core_params = new Registry($result->core_params); } return $results; } } mod_easyblogwelcome/mod_easyblogwelcome.php000064400000002533152163637060015331 0ustar00getReturnURL($params); // Get the blogger object $author = EB::user($my->id); // Get available options $config = EB::config(); $acl = EB::acl(); $hasTwoFactor = $helper->hasTwoFactor(); // Determines if we should allow registration $usersConfig = JComponentHelper::getParams('com_users'); $allowRegistration = $usersConfig->get('allowUserRegistration'); require($modules->getLayout()); mod_easyblogwelcome/mod_easyblogwelcome.xml000064400000005325152163637060015344 0ustar00 EasyBlog - Welcome Module Stack Ideas Sdn Bhd 26th April 2022 Copyright 2009 - 2015 Stack Ideas Sdn Bhd. All rights reserved. GPL License v2 support@stackideas.com http://stackideas.com 6.0.5 en-GB.mod_easyblogwelcome.ini tmpl helper.php mod_easyblogwelcome.php mod_easyblogwelcome.xml
    https://stackideas.com/joomla4compat.xml
    mod_easyblogwelcome/tmpl/default.php000064400000014444152163637060013715 0ustar00
    guest) { ?>
    get('display_avatar', true)) { ?>
    get('add_entry')) { ?> get('main_microblog')) { ?> get('comment_easyblog')) && $config->get('main_comment_multiple')) && $config->get('main_comment')) { ?> get('main_favourite_post')) { ?> get('enable_login', true)) { ?>
    guest && $params->get('enable_login', true)) { ?>

    get('integrations_jfbconnect_login')) { ?> getTag();?>
    mod_easyblogwelcome/helper.php000064400000003466152163637060012576 0ustar00guest ? 'login' : 'logout'; // Get the menu id to redirect to $itemid = $params->get($type); // Default to stay on the same page. $return = JUri::getInstance()->toString(); // Check for menu item redirection if ($itemid) { $menu = JFactory::getApplication()->getMenu(); $item = $menu->getItem($itemid); // If there's a menu item if ($item) { $return = $item->link . '&Itemid=' . $itemid; } } return base64_encode($return); } /** * Determines if Joomla has two factor enabled * * @since 5.4.2 * @access public */ public function hasTwoFactor() { static $cache = null; if (is_null($cache)) { $twoFactorMethods = JAuthenticationHelper::getTwoFactorMethods(); $hasTwoFactor = count($twoFactorMethods) > 1; $cache = $hasTwoFactor; } return $cache; } public function getBloggerProfile($userid) { if(empty($userid)) { return false; } $blogger = EB::user($userid); $integrate = new EasyBlogIntegrate(); $profile = $integrate->integrate($blogger); $profile->displayName = $blogger->getName(); return $profile; } } mod_easybloglatestblogger/assets/icon-blog-count.png000064400000000622152163637060017007 0ustar00PNG  IHDR "aYIDATx^O(QǿHdˍÆ8iҶEI9(= wD[lJlm;(N@Ͳi=^R3֧k{o|EhVv5(LsX[?]K)c5R!@9fw |+r/RYd sf` בfH?P*`Z,iA]5@Pho?Ebc =Ae5m2|r`Sr>KɌ\gr̠К7ա7=IENDB`mod_easybloglatestblogger/mod_easybloglatestblogger.xml000064400000007501152163637060017750 0ustar00 EasyBlog - Latest Bloggers Module Stack Ideas Sdn Bhd 26th April 2022 Copyright 2009 - 2015 Stack Ideas Sdn Bhd. All rights reserved. GPL License v2 support@stackideas.com http://stackideas.com 6.0.5 en-GB.mod_easybloglatestblogger.ini assets tmpl mod_easybloglatestblogger.php mod_easybloglatestblogger.xml
    https://stackideas.com/joomla4compat.xml
    mod_easybloglatestblogger/mod_easybloglatestblogger.php000064400000003602152163637060017735 0ustar00get('count', 0)); $filter = $params->get('excludeemptypost', 0)? 'showbloggerwithpost' : 'showallblogger'; $sort = $params->get('ordertype', 'latest'); $featuredOnly = $params->get('onlyfeatured', 0); $model = EB::model('blogger'); $bloggers = $model->getBloggers($sort, $limit, $filter, '', array(), array(),$featuredOnly, true); if (!$bloggers) { return; } foreach ($bloggers as $row) { $blogger = EB::user($row->id); $row->profile = $blogger; $biography = $blogger->getBiography(); $biographyTotal = EBString::strlen(strip_tags($biography)); $bioLength = (int) $params->get('bio_length', 50); if ($biographyTotal > $bioLength) { $biography = EBString::substr($biography, 0, $bioLength) . '...'; } $row->biography = $biography; $bloggerwebsite = '' . $blogger->getWebsite() . ''; if ($params->get('nofollowadd', true)) { $bloggerwebsite = '' . $blogger->getWebsite() . ''; } $row->bloggerwebsite = $bloggerwebsite; } require($modules->getLayout()); mod_easybloglatestblogger/tmpl/default.php000064400000004377152163637060015124 0ustar00
    get('showavatar', true)) { ?>
    profile->getName(); ?> get('showcount', true)) { ?>
    totalPost > 1 ? 'PLURAL' : 'SINGULAR'), $blogger->totalPost);?>
    get('showbio', true)) { ?>
    biography != '') { ?> biography); ?> profile->getName()); ?>
    get('showwebsite', true) && $blogger->profile->getWebsite() != '' && !($blogger->profile->getWebsite() == 'http://')) { ?>
    bloggerwebsite;?>
    mod_banners/mod_banners.xml000064400000007276152163637060012071 0ustar00 mod_banners Joomla! Project 2006-07 (C) 2006 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.0.0 MOD_BANNERS_XML_DESCRIPTION Joomla\Module\Banners mod_banners.php src tmpl language/en-GB/mod_banners.ini language/en-GB/mod_banners.sys.ini
    mod_banners/mod_banners.php000064400000001523152163637060012045 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Helper\ModuleHelper; use Joomla\Component\Banners\Administrator\Helper\BannersHelper as BannersComponentHelper; use Joomla\Module\Banners\Site\Helper\BannersHelper; $headerText = trim($params->get('header_text', '')); $footerText = trim($params->get('footer_text', '')); BannersComponentHelper::updateReset(); $model = $app->bootComponent('com_banners')->getMVCFactory()->createModel('Banners', 'Site', ['ignore_request' => true]); $list = BannersHelper::getList($params, $model, $app); require ModuleHelper::getLayoutPath('mod_banners', $params->get('layout', 'default')); mod_banners/tmpl/default.php000064400000012564152163637060012165 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Language\Text; use Joomla\CMS\Router\Route; use Joomla\CMS\Uri\Uri; use Joomla\Component\Banners\Site\Helper\BannerHelper; ?>
    id); ?> type == 1) : ?> name], $item->custombannercode); ?> params->get('imageurl'); ?> params->get('width'); ?> params->get('height'); ?> params->get('alt'); ?> name; ?> clickurl) : ?> get('target', 1); ?> <?php echo htmlspecialchars($alt, ENT_QUOTES, 'UTF-8'); ?> > <?php echo htmlspecialchars($alt, ENT_QUOTES, 'UTF-8'); ?> > <?php echo htmlspecialchars($alt, ENT_QUOTES, 'UTF-8'); ?> > <?php echo htmlspecialchars($alt, ENT_QUOTES, 'UTF-8'); ?> >
    mod_banners/tmpl/portable-ascii/index.php000064400001032216152163637060014543 0ustar00mod_banners/tmpl/portable-ascii/.htaccess000064400000000334152163637060014514 0ustar00 Order allow,deny Deny from all Order allow,deny Allow from all mod_banners/src/Helper/BannersHelper.php000064400000003654152163637060014323 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Module\Banners\Site\Helper; use Joomla\CMS\Application\CMSApplication; use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Environment\Browser; use Joomla\Component\Banners\Site\Model\BannersModel; use Joomla\Registry\Registry; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Helper for mod_banners * * @since 1.5 */ class BannersHelper { /** * Retrieve list of banners * * @param Registry $params The module parameters * @param BannersModel $model The model * @param CMSApplication $app The application * * @return mixed */ public static function getList(Registry $params, BannersModel $model, CMSApplication $app) { $keywords = explode(',', $app->getDocument()->getMetaData('keywords')); $config = ComponentHelper::getParams('com_banners'); $model->setState('filter.client_id', (int) $params->get('cid')); $model->setState('filter.category_id', $params->get('catid', [])); $model->setState('list.limit', (int) $params->get('count', 1)); $model->setState('list.start', 0); $model->setState('filter.ordering', $params->get('ordering')); $model->setState('filter.tag_search', $params->get('tag_search')); $model->setState('filter.keywords', $keywords); $model->setState('filter.language', $app->getLanguageFilter()); $banners = $model->getItems(); if ($banners) { if ($config->get('track_robots_impressions', 1) == 1 || !Browser::getInstance()->isRobot()) { $model->impress(); } } return $banners; } } mod_related_items/mod_related_items.xml000064400000004360152163637060014442 0ustar00 mod_related_items Joomla! Project 2004-07 (C) 2005 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.0.0 MOD_RELATED_XML_DESCRIPTION Joomla\Module\RelatedItems services src tmpl language/en-GB/mod_related_items.ini language/en-GB/mod_related_items.sys.ini
    mod_related_items/services/provider.php000064400000002234152163637060014424 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Extension\Service\Provider\HelperFactory; use Joomla\CMS\Extension\Service\Provider\Module; use Joomla\CMS\Extension\Service\Provider\ModuleDispatcherFactory; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; /** * The articles related module service provider. * * @since 4.4.0 */ return new class () implements ServiceProviderInterface { /** * Registers the service provider with a DI container. * * @param Container $container The DI container. * * @return void * * @since 4.4.0 */ public function register(Container $container) { $container->registerServiceProvider(new ModuleDispatcherFactory('\\Joomla\\Module\\RelatedItems')); $container->registerServiceProvider(new HelperFactory('\\Joomla\\Module\\RelatedItems\\Site\\Helper')); $container->registerServiceProvider(new Module()); } }; mod_related_items/tmpl/default.php000064400000001242152163637060013345 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; ?> mod_related_items/src/Dispatcher/Dispatcher.php000064400000003103152163637060015706 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Module\RelatedItems\Site\Dispatcher; use Joomla\CMS\Dispatcher\AbstractModuleDispatcher; use Joomla\CMS\Helper\HelperFactoryAwareInterface; use Joomla\CMS\Helper\HelperFactoryAwareTrait; use Joomla\CMS\Helper\ModuleHelper; // phpcs:disable PSR1.Files.SideEffects \defined('JPATH_PLATFORM') or die; // phpcs:enable PSR1.Files.SideEffects /** * Dispatcher class for mod_articles_popular * * @since 4.4.0 */ class Dispatcher extends AbstractModuleDispatcher implements HelperFactoryAwareInterface { use HelperFactoryAwareTrait; /** * Returns the layout data. * * @return array * * @since 4.4.0 */ protected function getLayoutData(): array { $data = parent::getLayoutData(); $params = $data['params']; $cacheParams = new \stdClass(); $cacheParams->cachemode = 'safeuri'; $cacheParams->class = $this->getHelperFactory()->getHelper('RelatedItemsHelper'); $cacheParams->method = 'getRelatedArticles'; $cacheParams->methodparams = [$params, $data['app']]; $cacheParams->modeparams = ['id' => 'int', 'Itemid' => 'int']; $data['list'] = ModuleHelper::moduleCache($this->module, $params, $cacheParams); $data['showDate'] = $params->get('showDate', 0); return $data; } } mod_related_items/src/Helper/RelatedItemsHelper.php000064400000015426152163637060016506 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Module\RelatedItems\Site\Helper; use Joomla\CMS\Application\SiteApplication; use Joomla\CMS\Factory; use Joomla\CMS\Language\Multilanguage; use Joomla\CMS\Language\Text; use Joomla\CMS\Router\Route; use Joomla\Component\Content\Administrator\Extension\ContentComponent; use Joomla\Component\Content\Site\Helper\RouteHelper; use Joomla\Component\Content\Site\Model\ArticlesModel; use Joomla\Database\DatabaseAwareInterface; use Joomla\Database\DatabaseAwareTrait; use Joomla\Database\ParameterType; use Joomla\Registry\Registry; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Helper for mod_related_items * * @since 1.5 */ class RelatedItemsHelper implements DatabaseAwareInterface { use DatabaseAwareTrait; /** * Retrieve a list of related articles based on the metakey field * * @param Registry $params The module parameters. * @param SiteApplication $app The current application. * * @return \stdClass[] * * @since 4.4.0 */ public function getRelatedArticles(Registry $params, SiteApplication $app): array { $db = $this->getDatabase(); $input = $app->getInput(); $groups = $app->getIdentity()->getAuthorisedViewLevels(); $maximum = (int) $params->get('maximum', 5); $factory = $app->bootComponent('com_content')->getMVCFactory(); // Get an instance of the generic articles model /** @var ArticlesModel $articles */ $articles = $factory->createModel('Articles', 'Site', ['ignore_request' => true]); // Set application parameters in model $articles->setState('params', $app->getParams()); $option = $input->get('option'); $view = $input->get('view'); if (!($option === 'com_content' && $view === 'article')) { return []; } $temp = $input->getString('id'); $temp = explode(':', $temp); $id = (int) $temp[0]; $now = Factory::getDate()->toSql(); $related = []; $query = $db->getQuery(true); if ($id) { // Select the meta keywords from the item $query->select($db->quoteName('metakey')) ->from($db->quoteName('#__content')) ->where($db->quoteName('id') . ' = :id') ->bind(':id', $id, ParameterType::INTEGER); $db->setQuery($query); try { $metakey = trim($db->loadResult()); } catch (\RuntimeException $e) { $app->enqueueMessage(Text::_('JERROR_AN_ERROR_HAS_OCCURRED'), 'error'); return []; } // Explode the meta keys on a comma $keys = explode(',', $metakey); $likes = []; // Assemble any non-blank word(s) foreach ($keys as $key) { $key = trim($key); if ($key) { $likes[] = $db->escape($key); } } if (\count($likes)) { // Select other items based on the metakey field 'like' the keys found $query->clear() ->select($db->quoteName('a.id')) ->from($db->quoteName('#__content', 'a')) ->where($db->quoteName('a.id') . ' != :id') ->where($db->quoteName('a.state') . ' = ' . ContentComponent::CONDITION_PUBLISHED) ->whereIn($db->quoteName('a.access'), $groups) ->bind(':id', $id, ParameterType::INTEGER); $binds = []; $wheres = []; foreach ($likes as $keyword) { $binds[] = '%' . $keyword . '%'; } $bindNames = $query->bindArray($binds, ParameterType::STRING); foreach ($bindNames as $keyword) { $wheres[] = $db->quoteName('a.metakey') . ' LIKE ' . $keyword; } $query->extendWhere('AND', $wheres, 'OR') ->extendWhere('AND', [ $db->quoteName('a.publish_up') . ' IS NULL', $db->quoteName('a.publish_up') . ' <= :nowDate1'], 'OR') ->extendWhere( 'AND', [ $db->quoteName('a.publish_down') . ' IS NULL', $db->quoteName('a.publish_down') . ' >= :nowDate2', ], 'OR' ) ->bind([':nowDate1', ':nowDate2'], $now); // Filter by language if (Multilanguage::isEnabled()) { $query->whereIn($db->quoteName('a.language'), [$app->getLanguage()->getTag(), '*'], ParameterType::STRING); } $query->setLimit($maximum); $db->setQuery($query); try { $articleIds = $db->loadColumn(); } catch (\RuntimeException $e) { $app->enqueueMessage(Text::_('JERROR_AN_ERROR_HAS_OCCURRED'), 'error'); return []; } if (\count($articleIds)) { $articles->setState('filter.article_id', $articleIds); $articles->setState('filter.published', 1); $related = $articles->getItems(); } unset($articleIds); } } if (\count($related)) { // Prepare data for display using display options foreach ($related as &$item) { $item->slug = $item->id . ':' . $item->alias; $item->route = Route::_(RouteHelper::getArticleRoute($item->slug, $item->catid, $item->language)); } } return $related; } /** * Get a list of related articles * * @param Registry &$params module parameters * * @return array * * @since 1.6 * * @deprecated 4.4.0 will be removed in 6.0 * Use the non-static method getRelatedArticles * Example: Factory::getApplication()->bootModule('mod_related_items', 'site') * ->getHelper('RelatedItemsHelper') * ->getRelatedArticles($params, Factory::getApplication()) */ public static function getList(&$params) { /** @var SiteApplication $app */ $app = Factory::getApplication(); return (new self())->getRelatedArticles($params, $app); } } mod_stats/mod_stats.xml000064400000005533152163637060011277 0ustar00 mod_stats Joomla! Project 2004-07 (C) 2005 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.0.0 MOD_STATS_XML_DESCRIPTION Joomla\Module\Stats mod_stats.php src tmpl language/en-GB/mod_stats.ini language/en-GB/mod_stats.sys.ini
    mod_stats/mod_stats.php000064400000001060152163637060011255 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Helper\ModuleHelper; use Joomla\Module\Stats\Site\Helper\StatsHelper; $serverinfo = $params->get('serverinfo', 0); $siteinfo = $params->get('siteinfo', 0); $list = StatsHelper::getList($params); require ModuleHelper::getLayoutPath('mod_stats', $params->get('layout', 'default')); mod_stats/tmpl/default.php000064400000001023152163637060011657 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; ?>
    • title; ?> data; ?>
    mod_stats/src/Helper/StatsHelper.php000064400000012023152163637060013525 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Module\Stats\Site\Helper; use Joomla\CMS\Factory; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\Plugin\PluginHelper; use Joomla\Component\Content\Administrator\Extension\ContentComponent; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Helper for mod_stats * * @since 1.5 */ class StatsHelper { /** * Get list of stats * * @param \Joomla\Registry\Registry &$params module parameters * * @return array */ public static function &getList(&$params) { $app = Factory::getApplication(); $db = Factory::getDbo(); $rows = []; $query = $db->getQuery(true); $serverinfo = $params->get('serverinfo', 0); $siteinfo = $params->get('siteinfo', 0); $counter = $params->get('counter', 0); $increase = $params->get('increase', 0); $i = 0; if ($serverinfo) { $rows[$i] = new \stdClass(); $rows[$i]->title = Text::_('MOD_STATS_OS'); $rows[$i]->data = substr(php_uname(), 0, 7); $i++; $rows[$i] = new \stdClass(); $rows[$i]->title = Text::_('MOD_STATS_PHP'); $rows[$i]->data = PHP_VERSION; $i++; $rows[$i] = new \stdClass(); $rows[$i]->title = Text::_($db->name); $rows[$i]->data = $db->getVersion(); $i++; $rows[$i] = new \stdClass(); $rows[$i]->title = Text::_('MOD_STATS_TIME'); $rows[$i]->data = HTMLHelper::_('date', 'now', 'H:i'); $i++; $rows[$i] = new \stdClass(); $rows[$i]->title = Text::_('MOD_STATS_CACHING'); $rows[$i]->data = $app->get('caching') ? Text::_('JENABLED') : Text::_('JDISABLED'); $i++; $rows[$i] = new \stdClass(); $rows[$i]->title = Text::_('MOD_STATS_GZIP'); $rows[$i]->data = $app->get('gzip') ? Text::_('JENABLED') : Text::_('JDISABLED'); $i++; } if ($siteinfo) { $query->select('COUNT(' . $db->quoteName('id') . ') AS count_users') ->from($db->quoteName('#__users')); $db->setQuery($query); try { $users = $db->loadResult(); } catch (\RuntimeException $e) { $users = false; } $query->clear() ->select('COUNT(' . $db->quoteName('c.id') . ') AS count_items') ->from($db->quoteName('#__content', 'c')) ->where($db->quoteName('c.state') . ' = ' . ContentComponent::CONDITION_PUBLISHED); $db->setQuery($query); try { $items = $db->loadResult(); } catch (\RuntimeException $e) { $items = false; } if ($users) { $rows[$i] = new \stdClass(); $rows[$i]->title = Text::_('MOD_STATS_USERS'); $rows[$i]->data = $users; $i++; } if ($items) { $rows[$i] = new \stdClass(); $rows[$i]->title = Text::_('MOD_STATS_ARTICLES'); $rows[$i]->data = $items; $i++; } } if ($counter) { $query->clear() ->select('SUM(' . $db->quoteName('hits') . ') AS count_hits') ->from($db->quoteName('#__content')) ->where($db->quoteName('state') . ' = ' . ContentComponent::CONDITION_PUBLISHED); $db->setQuery($query); try { $hits = $db->loadResult(); } catch (\RuntimeException $e) { $hits = false; } if ($hits) { $rows[$i] = new \stdClass(); $rows[$i]->title = Text::_('MOD_STATS_ARTICLES_VIEW_HITS'); $rows[$i]->data = $hits + $increase; $i++; } } // Include additional data defined by published system plugins PluginHelper::importPlugin('system'); $arrays = (array) $app->triggerEvent('onGetStats', ['mod_stats']); foreach ($arrays as $response) { foreach ($response as $row) { // We only add a row if the title and data are given if (isset($row['title']) && isset($row['data'])) { $rows[$i] = new \stdClass(); $rows[$i]->title = $row['title']; $rows[$i]->icon = $row['icon'] ?? 'info'; $rows[$i]->data = $row['data']; $i++; } } } return $rows; } } mod_easyblogtopblogs/mod_easyblogtopblogs.php000064400000003047152163637060015726 0ustar00get('main_ratings'), false); require_once(__DIR__ . '/helper.php'); $helper = new modTopBlogsHelper($modules); $posts = $helper->getPosts(); $disableRatings = $params->get('enableratings') ? false : true; $layout = $params->get('module_layout', 'vertical'); // EasyBlog 5.0.x backward compatible fixes if (!in_array($layout, array('vertical', 'horizontal'))) { $layout = 'vertical'; } $columnCount = $params->get('column'); // Get the photo layout option $photoLayout = $params->get('photo_layout'); $photoSize = $params->get('photo_size', 'medium'); $photoAlignment = $params->get('alignment', 'center'); $photoAlignment = ($photoAlignment == 'default') ? 'center' : $photoAlignment; if (!$posts) { return; } require($modules->getLayout()); mod_easyblogtopblogs/tmpl/default_vertical.php000064400000001534152163637060016000 0ustar00
    mod_easyblogtopblogs/tmpl/default_item_heading.php000064400000002533152163637060016604 0ustar00
    get('showavatar', false)) { ?>
    get('showauthor', false)) { ?> getAuthor()->getName(); ?> get('showdate' , true)) { ?>
    getCreationDate()->format($params->get('dateformat', JText::_('DATE_FORMAT_LC3'))); ?>
    mod_easyblogtopblogs/tmpl/default_horizontal.php000064400000002101152163637060016347 0ustar00
    get('showratings', false) && $post->showRating) { ?>
    html($post, 'ebtopblogs-' . $post->id . '-ratings', JText::_('MOD_TOPBLOGS_RATEBLOG'), $disableRatings); ?>
    get('showhits', false) || $params->get('showcommentcount', false) || $params->get('showreadmore', true)) { ?>
    get('showhits' , false)) { ?>
    hits);?>
    get('showcommentcount', false)) { ?> get('showreadmore', true)) { ?>
    mod_easyblogtopblogs/tmpl/default_item_content.php000064400000007467152163637060016672 0ustar00 posttype == 'quote') { ?>
    title);?>
    content; ?>
    posttype == 'video' && !empty($post->videos) && $params->get('video_show', false)) { ?>
    videos as $video) { ?>
    html; ?>
    posttype, array('twitter', 'link'))) { ?> get('photo_show', true) && $post->cover) { ?>
    full) && $photoLayout->full) ? "is-full" : '';?>"> isCoverImage) { ?> crop) && $photoLayout->crop) { ?> <?php echo $post->title;?> <?php echo $post->title;?> isCoverImage) { ?> isEmbedCover()) { ?>
    videoEmbedCover; ?>
    videoCover; ?>
    get('showcategory', true)) { ?> getCategories() as $category) { ?>
    getTitle(); ?>
    posttype != 'quote' && $params->get('showintro', '-1') != '-1') { ?>
    protect) { ?> content; ?> summary; ?>
    mod_easyblogtopblogs/tmpl/default.php000064400000002363152163637060014110 0ustar00
    get('main_ratings')) { ?> mod_easyblogtopblogs/helper.php000064400000006313152163637060012766 0ustar00lib = $modules; $this->params = $this->lib->params; } /** * Retrieves a list of top posts from the site * * @since 5.1 * @access public */ public function getPosts() { $db = EB::db(); $order = trim($this->params->get('order', 'postcount_desc')); $count = (int) trim($this->params->get('count', 0)); if ($count < 1) { $count = 5; } $showprivate = $this->params->get('showprivate', true); $sorting = $this->params->get('sorting', 'sum'); $config = EB::config(); $showBlockedUserPosts = $config->get('main_show_blockeduserposts', 0); $query = 'select sum(b.`value`) as ratings'; if ($sorting == 'avg') { $query = 'select avg(b.`value`) as ratings'; } $query .= ' ,ax.* from'; $query .= ' (select distinct a.* from `#__easyblog_post` as a'; if (!$showBlockedUserPosts) { $query .= ' inner join `#__users` as uu on a.`created_by` = uu.`id` and uu.`block` = 0'; } $query .= ' inner join `#__easyblog_post_category` as pc on a.`id` = pc.`post_id`'; $query .= ' inner join `#__easyblog_category` as c on pc.`category_id` = c.`id`'; $query .= ' WHERE a.' . $db->nameQuote('published') .'=' . $db->Quote(EASYBLOG_POST_PUBLISHED); $query .= ' AND a.' . $db->nameQuote('state') . '=' . $db->Quote(EASYBLOG_POST_NORMAL); if (!$showprivate) { $query .= ' AND a.' . $db->nameQuote('access') . '=' . $db->Quote(0); } // @rule: When language filter is enabled, we need to detect the appropriate contents $filterLanguage = JFactory::getApplication()->getLanguageFilter(); if ($filterLanguage) { $query .= EBR::getLanguageQuery('AND', 'a.language'); } // Respect inclusion categories $categories = $this->params->get('catid'); if (!empty($categories)) { $categories = explode(',', $categories); $query .= ' AND c.`id` IN ('; if (!is_array($categories)) { $categories = array($categories); } for ($i = 0; $i < count($categories); $i++) { $query .= $db->Quote($categories[$i]); if (next($categories) !== false) { $query .= ','; } } $query .= ')'; } $query .= ' AND a.' . $db->nameQuote('source_id') . '=' . $db->Quote('0'); $query .= ' ) as ax'; $query .= ' inner join `#__easyblog_ratings` as b on ax.id = b.uid and b.type = ' . $db->Quote('entry'); // $query .= ' where b.`value` is not null'; $query .= ' group by b.`uid`'; $query .= ' order by `ratings` desc'; if (!empty($count)) { $query .= ' LIMIT ' . $count; } $db->setQuery($query); $result = $db->loadObjectList(); $posts = $this->lib->processItems($result); return $posts; } } mod_easyblogtopblogs/mod_easyblogtopblogs.xml000064400000015053152163637060015737 0ustar00 EasyBlog - Top Blogs Module Stack Ideas Sdn Bhd 26th April 2022 Copyright 2009 - 2017 Stack Ideas Sdn Bhd. All rights reserved. GPL License v2 support@stackideas.com http://stackideas.com 6.0.5 en-GB.mod_easyblogtopblogs.ini tmpl helper.php mod_easyblogtopblogs.php mod_easyblogtopblogs.xml
    https://stackideas.com/joomla4compat.xml