diff --git a/administrator/components/com_modules/views/module/tmpl/edit.php b/administrator/components/com_modules/views/module/tmpl/edit.php index 21f1b5dc8d788..8c30971ee588d 100644 --- a/administrator/components/com_modules/views/module/tmpl/edit.php +++ b/administrator/components/com_modules/views/module/tmpl/edit.php @@ -17,6 +17,8 @@ JHtml::_('formbehavior.chosen', '#jform_position', null, array('disable_search_threshold' => 0 )); JHtml::_('formbehavior.chosen', '.multipleCategories', null, array('placeholder_text_multiple' => JText::_('JOPTION_SELECT_CATEGORY'))); JHtml::_('formbehavior.chosen', '.multipleTags', null, array('placeholder_text_multiple' => JText::_('JOPTION_SELECT_TAG'))); +JHtml::_('formbehavior.chosen', '.multipleAuthors', null, array('placeholder_text_multiple' => JText::_('JOPTION_SELECT_AUTHOR'))); +JHtml::_('formbehavior.chosen', '.multipleAuthorAliases', null, array('placeholder_text_multiple' => JText::_('JOPTION_SELECT_AUTHOR_ALIAS'))); JHtml::_('formbehavior.chosen', 'select'); $hasContent = empty($this->item->module) || isset($this->item->xml->customContent); diff --git a/language/en-GB/en-GB.mod_articles_category.ini b/language/en-GB/en-GB.mod_articles_category.ini index bdcce35170e3d..9bdfc15ff81ee 100644 --- a/language/en-GB/en-GB.mod_articles_category.ini +++ b/language/en-GB/en-GB.mod_articles_category.ini @@ -27,6 +27,8 @@ MOD_ARTICLES_CATEGORY_FIELD_CATFILTERINGTYPE_DESC="Select Inclusive to Include t MOD_ARTICLES_CATEGORY_FIELD_CATFILTERINGTYPE_LABEL="Category Filtering Type" MOD_ARTICLES_CATEGORY_FIELD_COUNT_DESC="The number of items to display. The default value of 0 will display all articles." MOD_ARTICLES_CATEGORY_FIELD_COUNT_LABEL="Count" +MOD_ARTICLES_CATEGORY_FIELD_DATEGROUPINGFIELD_DESC="Select the date field to group by." +MOD_ARTICLES_CATEGORY_FIELD_DATEGROUPINGFIELD_LABEL="Date Grouping Field" MOD_ARTICLES_CATEGORY_FIELD_DATERANGEFIELD_DESC="Select which date field you want the date range to be applied to." MOD_ARTICLES_CATEGORY_FIELD_DATERANGEFIELD_LABEL="Date Range Field" MOD_ARTICLES_CATEGORY_FIELD_DATEFIELD_DESC="Select which date field you want to display." @@ -35,11 +37,12 @@ MOD_ARTICLES_CATEGORY_FIELD_DATEFIELDFORMAT_DESC="Please enter in a valid date f MOD_ARTICLES_CATEGORY_FIELD_DATEFIELDFORMAT_LABEL="Date Format" MOD_ARTICLES_CATEGORY_FIELD_DATEFILTERING_DESC="Select Date Filtering Type." MOD_ARTICLES_CATEGORY_FIELD_DATEFILTERING_LABEL="Date Filtering" -MOD_ARTICLES_CATEGORY_FIELD_ENDDATE_DESC="If Date Range is selected above, please enter an End Date." +MOD_ARTICLES_CATEGORY_FIELD_ENDDATE_DESC="Please enter an End Date." MOD_ARTICLES_CATEGORY_FIELD_ENDDATE_LABEL="To Date" MOD_ARTICLES_CATEGORY_FIELD_EXCLUDEDARTICLES_DESC="Please enter each Article ID on a new line." MOD_ARTICLES_CATEGORY_FIELD_EXCLUDEDARTICLES_LABEL="Article IDs to Exclude" MOD_ARTICLES_CATEGORY_FIELD_GROUP_DISPLAY_LABEL="Display Options" +; The following string is deprecated and will be removed with 4.0. MOD_ARTICLES_CATEGORY_FIELD_GROUP_DYNAMIC_LABEL="Dynamic Mode Options" MOD_ARTICLES_CATEGORY_FIELD_GROUP_FILTERING_LABEL="Filtering Options" MOD_ARTICLES_CATEGORY_FIELD_GROUP_GROUPING_LABEL="Grouping Options" @@ -52,7 +55,7 @@ MOD_ARTICLES_CATEGORY_FIELD_MODE_DESC="Please select the mode you would like to MOD_ARTICLES_CATEGORY_FIELD_MODE_LABEL="Mode" MOD_ARTICLES_CATEGORY_FIELD_MONTHYEARFORMAT_DESC="Please enter in a valid date format. See: http://php.net/date for formatting information." MOD_ARTICLES_CATEGORY_FIELD_MONTHYEARFORMAT_LABEL="Month and Year Display Format" -MOD_ARTICLES_CATEGORY_FIELD_RELATIVEDATE_DESC="If Relative Date is selected above, please enter in a numeric day value. Results will be retrieved relative to the current date and the value you enter." +MOD_ARTICLES_CATEGORY_FIELD_RELATIVEDATE_DESC="Please enter in a numeric day value. Results will be retrieved relative to the current date and the value you enter." MOD_ARTICLES_CATEGORY_FIELD_RELATIVEDATE_LABEL="Relative Date" MOD_ARTICLES_CATEGORY_FIELD_SHOWAUTHOR_DESC="Select Show if you would like the author (or author alias instead, if available) to be displayed." MOD_ARTICLES_CATEGORY_FIELD_SHOWCATEGORY_DESC="Select Show if you would like the category name displayed." @@ -67,8 +70,11 @@ MOD_ARTICLES_CATEGORY_FIELD_SHOWINTROTEXT_DESC="Select Show if you would like th MOD_ARTICLES_CATEGORY_FIELD_SHOWINTROTEXT_LABEL="Introtext" MOD_ARTICLES_CATEGORY_FIELD_SHOWONARTICLEPAGE_DESC="Select to Show or hide Article List from Article Pages. This means that the module will only display itself dynamically on Category Pages." MOD_ARTICLES_CATEGORY_FIELD_SHOWONARTICLEPAGE_LABEL="Show on Article Page" -MOD_ARTICLES_CATEGORY_FIELD_STARTDATE_DESC="If Date Range is selected above, please enter a Starting Date." +MOD_ARTICLES_CATEGORY_FIELD_SHOWTAGS_DESC="Select Show if you would like the tags for each article to be displayed." +MOD_ARTICLES_CATEGORY_FIELD_STARTDATE_DESC="Please enter a Starting Date." MOD_ARTICLES_CATEGORY_FIELD_STARTDATE_LABEL="Start Date Range" +MOD_ARTICLES_CATEGORY_NO_AUTHOR="No Author" +MOD_ARTICLES_CATEGORY_NO_TAG="No Tag" MOD_ARTICLES_CATEGORY_OPTION_ASCENDING_VALUE="Ascending" MOD_ARTICLES_CATEGORY_OPTION_CREATED_VALUE="Created Date" MOD_ARTICLES_CATEGORY_OPTION_DATERANGE_VALUE="Date Range" @@ -97,4 +103,4 @@ MOD_ARTICLES_CATEGORY_OPTION_YEAR_VALUE="Year" MOD_ARTICLES_CATEGORY_READ_MORE="Read more: " MOD_ARTICLES_CATEGORY_READ_MORE_TITLE="Read More ..." MOD_ARTICLES_CATEGORY_REGISTER_TO_READ_MORE="Register to read more" -MOD_ARTICLES_CATEGORY_XML_DESCRIPTION="This module displays a list of articles from one or more categories." \ No newline at end of file +MOD_ARTICLES_CATEGORY_XML_DESCRIPTION="This module displays a list of articles from one or more categories." diff --git a/modules/mod_articles_category/helper.php b/modules/mod_articles_category/helper.php index d046a8fb0e97e..2779fd575175c 100644 --- a/modules/mod_articles_category/helper.php +++ b/modules/mod_articles_category/helper.php @@ -11,10 +11,9 @@ use Joomla\String\StringHelper; -$com_path = JPATH_SITE . '/components/com_content/'; - -JLoader::register('ContentHelperRoute', $com_path . 'helpers/route.php'); -JModelLegacy::addIncludePath($com_path . 'models', 'ContentModel'); +$comPath = JPATH_SITE . '/components/com_content/'; +JLoader::register('ContentHelperRoute', $comPath . 'helpers/route.php'); +JModelLegacy::addIncludePath($comPath . 'models', 'ContentModel'); /** * Helper for mod_articles_category @@ -28,7 +27,7 @@ abstract class ModArticlesCategoryHelper * * @param \Joomla\Registry\Registry &$params object holding the models parameters * - * @return mixed + * @return array * * @since 1.6 */ @@ -47,8 +46,8 @@ public static function getList(&$params) $articles->setState('list.limit', (int) $params->get('count', 0)); $articles->setState('filter.published', 1); - // This module does not use tags data - $articles->setState('load_tags', $params->get('filter_tag', '') !== '' ? true : false); + // Load tags only when needed + $articles->setState('load_tags', $params->get('show_tags', 0) || $params->get('article_grouping', 'none') === 'tags' ? true : false); // Access filter $access = !JComponentHelper::getParams('com_content')->get('show_noauth'); @@ -61,71 +60,73 @@ public static function getList(&$params) switch ($mode) { case 'dynamic' : - $option = $app->input->get('option'); - $view = $app->input->get('view'); + $option = $app->input->getCmd('option'); + $view = $app->input->getCmd('view'); if ($option === 'com_content') { switch ($view) { case 'category' : + $catIds = array($app->input->getInt('id')); + break; case 'categories' : - $catids = array($app->input->getInt('id')); + $catIds = array($app->input->getInt('id')); break; case 'article' : if ($params->get('show_on_article_page', 1)) { - $article_id = $app->input->getInt('id'); - $catid = $app->input->getInt('catid'); + $articleId = $app->input->getInt('id'); + $catId = $app->input->getInt('catid'); - if (!$catid) + if (!$catId) { // Get an instance of the generic article model $article = JModelLegacy::getInstance('Article', 'ContentModel', array('ignore_request' => true)); $article->setState('params', $appParams); $article->setState('filter.published', 1); - $article->setState('article.id', (int) $article_id); + $article->setState('article.id', (int) $articleId); $item = $article->getItem(); - $catids = array($item->catid); + $catIds = array($item->catid); } else { - $catids = array($catid); + $catIds = array($catId); } } else { // Return right away if show_on_article_page option is off - return; + return array(); } break; case 'featured' : default: // Return right away if not on the category or article views - return; + return array(); } } else { // Return right away if not on a com_content page - return; + return array(); } break; case 'normal' : default: - $catids = $params->get('catid'); + $catIds = $params->get('catid'); $articles->setState('filter.category_id.include', (bool) $params->get('category_filtering_type', 1)); break; } // Category filter - if ($catids) + if ($catIds) { - if ($params->get('show_child_category_articles', 0) && (int) $params->get('levels', 0) > 0) + if ($params->get('show_child_category_articles', 0) && (int) $params->get('levels', 1) > 0) { // Get an instance of the generic categories model $categories = JModelLegacy::getInstance('Categories', 'ContentModel', array('ignore_request' => true)); @@ -134,11 +135,11 @@ public static function getList(&$params) $categories->setState('filter.get_children', $levels); $categories->setState('filter.published', 1); $categories->setState('filter.access', $access); - $additional_catids = array(); + $additionalCatIds = array(); - foreach ($catids as $catid) + foreach ($catIds as $catId) { - $categories->setState('filter.parentId', $catid); + $categories->setState('filter.parentId', $catId); $recursive = true; $items = $categories->getItems($recursive); @@ -150,16 +151,16 @@ public static function getList(&$params) if ($condition) { - $additional_catids[] = $category->id; + $additionalCatIds[] = $category->id; } } } } - $catids = array_unique(array_merge($catids, $additional_catids)); + $catIds = array_unique(array_merge($catIds, $additionalCatIds)); } - $articles->setState('filter.category_id', $catids); + $articles->setState('filter.category_id', $catIds); } // Ordering @@ -193,26 +194,26 @@ public static function getList(&$params) $articles->setState('filter.tag', $params->get('filter_tag', array())); $articles->setState('filter.featured', $params->get('show_front', 'show')); - $articles->setState('filter.author_id', $params->get('created_by', '')); + $articles->setState('filter.author_id', $params->get('created_by', array())); $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', $params->get('created_by_alias', array())); $articles->setState('filter.author_alias.include', $params->get('author_alias_filtering_type', 1)); - $excluded_articles = $params->get('excluded_articles', ''); + $excludedArticles = $params->get('excluded_articles', ''); - if ($excluded_articles) + if ($excludedArticles) { - $excluded_articles = explode("\r\n", $excluded_articles); - $articles->setState('filter.article_id', $excluded_articles); + $excludedArticles = explode("\r\n", $excludedArticles); + $articles->setState('filter.article_id', $excludedArticles); // Exclude $articles->setState('filter.article_id.include', false); } - $date_filtering = $params->get('date_filtering', 'off'); + $dateFiltering = $params->get('date_filtering', 'off'); - if ($date_filtering !== 'off') + if ($dateFiltering !== 'off') { - $articles->setState('filter.date_filtering', $date_filtering); + $articles->setState('filter.date_filtering', $dateFiltering); $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')); @@ -225,34 +226,34 @@ public static function getList(&$params) $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); + $showDate = $params->get('show_date', 0); + $showDateField = $params->get('show_date_field', 'created'); + $showDateFormat = $params->get('show_date_format', 'Y-m-d H:i:s'); + $showCategory = $params->get('show_category', 0); + $showHits = $params->get('show_hits', 0); + $showAuthor = $params->get('show_author', 0); + $showIntrotext = $params->get('show_introtext', 0); + $introtextLimit = $params->get('introtext_limit', 100); // Find current Article ID if on an article page - $option = $app->input->get('option'); - $view = $app->input->get('view'); + $option = $app->input->getCmd('option'); + $view = $app->input->getCmd('view'); if ($option === 'com_content' && $view === 'article') { - $active_article_id = $app->input->getInt('id'); + $activeArticleId = $app->input->getInt('id'); } else { - $active_article_id = 0; + $activeArticleId = 0; } // Prepare data for display using display options foreach ($items as &$item) { - $item->slug = $item->id . ':' . $item->alias; + $item->slug = $item->id . ':' . $item->alias; - /** @deprecated Catslug is deprecated, use catid instead. 4.0 */ + /** @deprecated Catslug is deprecated, use catid instead. 4.0 **/ $item->catslug = $item->catid . ':' . $item->category_alias; if ($access || in_array($item->access, $authorised)) @@ -263,50 +264,46 @@ public static function getList(&$params) else { $menu = $app->getMenu(); - $menuitems = $menu->getItems('link', 'index.php?option=com_users&view=login'); + $menuItems = $menu->getItems('link', 'index.php?option=com_users&view=login'); - if (isset($menuitems[0])) + if (isset($menuItems[0])) { - $Itemid = $menuitems[0]->id; + $itemId = $menuItems[0]->id; } elseif ($app->input->getInt('Itemid') > 0) { // Use Itemid from requesting page only if there is no existing menu - $Itemid = $app->input->getInt('Itemid'); + $itemId = $app->input->getInt('Itemid'); } - $item->link = JRoute::_('index.php?option=com_users&view=login&Itemid=' . $Itemid); + $item->link = JRoute::_('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 = JHtml::_('date', $item->$show_date_field, $show_date_format); - } + $item->active = $item->id == $activeArticleId ? 'active' : ''; + + $item->displayDate = $showDate ? JHtml::_('date', $item->$showDateField, $showDateFormat) : ''; if ($item->catid) { $item->displayCategoryLink = JRoute::_(ContentHelperRoute::getCategoryRoute($item->catid)); - $item->displayCategoryTitle = $show_category ? '' . $item->category_title . '' : ''; + $item->displayCategoryTitle = $showCategory ? '' . $item->category_title . '' : ''; } else { - $item->displayCategoryTitle = $show_category ? $item->category_title : ''; + $item->displayCategoryTitle = $showCategory ? $item->category_title : ''; } - $item->displayHits = $show_hits ? $item->hits : ''; - $item->displayAuthorName = $show_author ? $item->author : ''; + $item->displayHits = $showHits ? $item->hits : ''; + $item->displayAuthorName = $showAuthor ? $item->author : ''; - if ($show_introtext) + if ($showIntrotext) { $item->introtext = JHtml::_('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->displayIntrotext = $showIntrotext ? self::truncate($item->introtext, $introtextLimit) : ''; $item->displayReadmore = $item->alternative_readmore; } @@ -383,49 +380,34 @@ public static function truncate($html, $maxLength = 0) /** * Groups items by field * - * @param array $list list of items - * @param string $fieldName name of field that is used for grouping - * @param string $article_grouping_direction ordering direction - * @param null $fieldNameToKeep field name to keep + * @param array $list list of items + * @param string $fieldName name of field that is used for grouping + * @param string $direction ordering direction * * @return array * * @since 1.6 */ - public static function groupBy($list, $fieldName, $article_grouping_direction, $fieldNameToKeep = null) + public static function groupBy($list, $fieldName, $direction) { - $grouped = array(); - - if (!is_array($list)) - { - if ($list == '') - { - return $grouped; - } - - $list = array($list); - } + $grouped = array(); + $noAuthor = JText::_('MOD_ARTICLES_CATEGORY_NO_AUTHOR'); foreach ($list as $key => $item) { - if (!isset($grouped[$item->$fieldName])) - { - $grouped[$item->$fieldName] = array(); - } - - if ($fieldNameToKeep === null) + if ($item->$fieldName !== null) { $grouped[$item->$fieldName][$key] = $item; } - else + elseif ($fieldName === 'author') { - $grouped[$item->$fieldName][$key] = $item->$fieldNameToKeep; + $grouped[$noAuthor][$key] = $item; } unset($list[$key]); } - $article_grouping_direction($grouped); + $direction($grouped); return $grouped; } @@ -433,47 +415,32 @@ public static function groupBy($list, $fieldName, $article_grouping_direction, $ /** * Groups items by date * - * @param array $list list of items - * @param string $type type of grouping - * @param string $article_grouping_direction ordering direction - * @param string $month_year_format date format to use + * @param array $list list of items + * @param string $type type of grouping + * @param string $direction ordering direction + * @param string $monthYearFormat date format to use + * @param string $dateField date field to group by * * @return array * * @since 1.6 */ - public static function groupByDate($list, $type = 'year', $article_grouping_direction, $month_year_format = 'F Y') + public static function groupByDate($list, $type = 'year', $direction, $monthYearFormat = 'F Y', $dateField = 'created') { $grouped = array(); - if (!is_array($list)) - { - if ($list == '') - { - return $grouped; - } - - $list = array($list); - } - foreach ($list as $key => $item) { switch ($type) { case 'month_year' : - $month_year = StringHelper::substr($item->created, 0, 7); - - if (!isset($grouped[$month_year])) - { - $grouped[$month_year] = array(); - } - - $grouped[$month_year][$key] = $item; + $monthYear = StringHelper::substr($item->$dateField, 0, 7); + $grouped[$monthYear][$key] = $item; break; case 'year' : default: - $year = StringHelper::substr($item->created, 0, 4); + $year = StringHelper::substr($item->$dateField, 0, 4); if (!isset($grouped[$year])) { @@ -487,15 +454,15 @@ public static function groupByDate($list, $type = 'year', $article_grouping_dire unset($list[$key]); } - $article_grouping_direction($grouped); + $direction($grouped); if ($type === 'month_year') { foreach ($grouped as $group => $items) { - $date = new JDate($group); - $formatted_group = $date->format($month_year_format); - $grouped[$formatted_group] = $items; + $date = new JDate($group); + $formattedGroup = $date->format($monthYearFormat); + $grouped[$formattedGroup] = $items; unset($grouped[$group]); } @@ -503,4 +470,40 @@ public static function groupByDate($list, $type = 'year', $article_grouping_dire return $grouped; } + + /** + * Groups items by tags + * + * @param array $list list of items + * @param string $direction ordering direction + * + * @return array + * + * @since __DEPLOY_VERSION__ + */ + public static function groupByTags($list, $direction) + { + $grouped = array(); + $noTag = JText::_('MOD_ARTICLES_CATEGORY_NO_TAG'); + + foreach ($list as $key => $item) + { + if (!empty($item->tags->itemTags)) + { + foreach ($item->tags->itemTags as $tag) + { + $grouped[$tag->title][$key] = $item; + } + unset($list[$key]); + } + else + { + $grouped[$noTag][$key] = $item; + } + } + + $direction($grouped); + + return $grouped; + } } diff --git a/modules/mod_articles_category/mod_articles_category.php b/modules/mod_articles_category/mod_articles_category.php index ed1d05a6c0780..6ff2570c0c60f 100644 --- a/modules/mod_articles_category/mod_articles_category.php +++ b/modules/mod_articles_category/mod_articles_category.php @@ -21,8 +21,8 @@ switch ($mode) { case 'dynamic' : - $option = $input->get('option'); - $view = $input->get('view'); + $option = $input->getCmd('option'); + $view = $input->getCmd('view'); if ($option === 'com_content') { @@ -66,7 +66,9 @@ $article_grouping = $params->get('article_grouping', 'none'); $article_grouping_direction = $params->get('article_grouping_direction', 'ksort'); $moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx'), ENT_COMPAT, 'UTF-8'); - $item_heading = $params->get('item_heading'); + + // @deprecated 4.0 + $item_heading = $params->get('item_heading'); if ($article_grouping !== 'none') { @@ -76,7 +78,16 @@ { case 'year' : case 'month_year' : - $list = ModArticlesCategoryHelper::groupByDate($list, $article_grouping, $article_grouping_direction, $params->get('month_year_format', 'F Y')); + $list = ModArticlesCategoryHelper::groupByDate( + $list, + $article_grouping, + $article_grouping_direction, + $params->get('month_year_format', 'F Y'), + $params->get('date_grouping_field', 'created') + ); + break; + case 'tags' : + $list = ModArticlesCategoryHelper::groupByTags($list, $article_grouping_direction); break; case 'author' : case 'category_title' : diff --git a/modules/mod_articles_category/mod_articles_category.xml b/modules/mod_articles_category/mod_articles_category.xml index b165a209000ff..eecd5a5339d5f 100644 --- a/modules/mod_articles_category/mod_articles_category.xml +++ b/modules/mod_articles_category/mod_articles_category.xml @@ -32,20 +32,16 @@ - - -
@@ -63,6 +59,7 @@ label="MOD_ARTICLES_CATEGORY_FIELD_COUNT_LABEL" description="MOD_ARTICLES_CATEGORY_FIELD_COUNT_DESC" default="0" + filter="integer" /> @@ -100,12 +98,11 @@ type="category" label="JCATEGORY" description="MOD_ARTICLES_CATEGORY_FIELD_CATEGORY_DESC" - extension="com_content" + filter="int_array" multiple="true" - size="5" - > - - + extension="com_content" + class="multipleCategories" + /> @@ -125,6 +123,7 @@ label="MOD_ARTICLES_CATEGORY_FIELD_CATDEPTH_LABEL" description="MOD_ARTICLES_CATEGORY_FIELD_CATDEPTH_DESC" default="1" + filter="integer" /> @@ -154,8 +154,9 @@ type="radio" label="MOD_ARTICLES_CATEGORY_FIELD_AUTHORFILTERING_LABEL" description="MOD_ARTICLES_CATEGORY_FIELD_AUTHORFILTERING_DESC" - class="btn-group btn-group-yesno" default="1" + filter="integer" + class="btn-group btn-group-yesno" > @@ -163,16 +164,14 @@ - + @@ -199,13 +199,11 @@ label="MOD_ARTICLES_CATEGORY_FIELD_AUTHORALIAS_LABEL" description="MOD_ARTICLES_CATEGORY_FIELD_AUTHORALIAS_DESC" multiple="true" - size="5" query="select distinct(created_by_alias) from #__content where created_by_alias != '' order by created_by_alias ASC" key_field="created_by_alias" value_field="created_by_alias" - > - - + class="multipleAuthorAliases" + />
@@ -344,28 +347,45 @@ + + + + + + + + + -
@@ -391,6 +412,7 @@ label="JDATE" description="MOD_ARTICLES_CATEGORY_FIELD_SHOWDATE_DESC" default="0" + filter="integer" class="btn-group btn-group-yesno" > @@ -403,6 +425,7 @@ label="MOD_ARTICLES_CATEGORY_FIELD_DATEFIELD_LABEL" description="MOD_ARTICLES_CATEGORY_FIELD_DATEFIELD_DESC" default="created" + showon="show_date:1" > @@ -415,6 +438,7 @@ label="MOD_ARTICLES_CATEGORY_FIELD_DATEFIELDFORMAT_LABEL" description="MOD_ARTICLES_CATEGORY_FIELD_DATEFIELDFORMAT_DESC" default="Y-m-d H:i:s" + showon="show_date:1" /> @@ -435,6 +460,7 @@ label="MOD_ARTICLES_CATEGORY_FIELD_SHOWHITS_LABEL" description="MOD_ARTICLES_CATEGORY_FIELD_SHOWHITS_DESC" default="0" + filter="integer" class="btn-group btn-group-yesno" > @@ -447,6 +473,20 @@ label="JAUTHOR" description="MOD_ARTICLES_CATEGORY_FIELD_SHOWAUTHOR_DESC" default="0" + filter="integer" + class="btn-group btn-group-yesno" + > + + + + + @@ -459,6 +499,7 @@ label="MOD_ARTICLES_CATEGORY_FIELD_SHOWINTROTEXT_LABEL" description="MOD_ARTICLES_CATEGORY_FIELD_SHOWINTROTEXT_DESC" default="0" + filter="integer" class="btn-group btn-group-yesno" > @@ -471,6 +512,8 @@ label="MOD_ARTICLES_CATEGORY_FIELD_INTROTEXTLIMIT_LABEL" description="MOD_ARTICLES_CATEGORY_FIELD_INTROTEXTLIMIT_DESC" default="100" + filter="integer" + showon="show_introtext:1" /> @@ -491,7 +535,9 @@ label="JGLOBAL_SHOW_READMORE_TITLE_LABEL" description="JGLOBAL_SHOW_READMORE_TITLE_DESC" default="1" + filter="integer" class="btn-group btn-group-yesno" + showon="show_readmore:1" > @@ -503,6 +549,8 @@ label="JGLOBAL_SHOW_READMORE_LIMIT_LABEL" description="JGLOBAL_SHOW_READMORE_LIMIT_DESC" default="15" + filter="integer" + showon="show_readmore:1[AND]show_readmore_title:1" />
@@ -530,6 +578,7 @@ label="COM_MODULES_FIELD_CACHING_LABEL" description="COM_MODULES_FIELD_CACHING_DESC" default="1" + filter="integer" > @@ -541,6 +590,7 @@ label="COM_MODULES_FIELD_CACHE_TIME_LABEL" description="COM_MODULES_FIELD_CACHE_TIME_DESC" default="900" + filter="integer" /> diff --git a/modules/mod_articles_category/tmpl/default.php b/modules/mod_articles_category/tmpl/default.php index f591878406aab..41b181523c322 100644 --- a/modules/mod_articles_category/tmpl/default.php +++ b/modules/mod_articles_category/tmpl/default.php @@ -9,133 +9,23 @@ defined('_JEXEC') or die; +$tagLayout = $params->get('show_tags', 0) ? new JLayoutFile('joomla.content.tags') : null; + ?> diff --git a/modules/mod_articles_category/tmpl/default_items.php b/modules/mod_articles_category/tmpl/default_items.php new file mode 100644 index 0000000000000..e230d32700401 --- /dev/null +++ b/modules/mod_articles_category/tmpl/default_items.php @@ -0,0 +1,72 @@ + + +
  • + get('link_titles', 1)) : ?> + + title; ?> + + + title; ?> + + get('show_hits', 0)) : ?> + + (hits; ?>) + + + get('show_author', 0)) : ?> + + displayAuthorName; ?> + + + get('show_category', 0)) : ?> + + (displayCategoryTitle; ?>) + + + get('show_date', 0)) : ?> + + displayDate; ?> + + + get('show_tags', 0) && $item->tags->itemTags) : ?> +
    + render($item->tags->itemTags); ?> +
    + + get('show_introtext', 0)) : ?> +

    + displayIntrotext; ?> +

    + + get('show_readmore', 0)) : ?> +

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

    + +
  • +