ビデオライブラリ用のモジュールの新規作成
Showing
8 changed files
with
247 additions
and
0 deletions
1 | ; Joomla! Project | ||
2 | ; Copyright (C) 2005 - 2019 Open Source Matters. All rights reserved. | ||
3 | ; License GNU General Public License version 2 or later; see LICENSE.txt | ||
4 | ; Note : All ini files need to be saved as UTF-8 | ||
5 | |||
6 | MOD_ARTICLES_CATEGORY_CUSTOM="Articles - Category" | ||
7 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_ARTICLEGROUPING_DESC="Select how you would like the articles to be grouped." | ||
8 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_ARTICLEGROUPING_LABEL="Article Grouping" | ||
9 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_ARTICLEGROUPINGDIR_DESC="Select the direction you would like the Article Groupings to be ordered by." | ||
10 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_ARTICLEGROUPINGDIR_LABEL="Grouping Direction" | ||
11 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_ARTICLEORDERING_DESC="Select which field you would like Articles to be ordered by. Featured Ordering should only be used when Filtering Option for Featured Articles is set to 'Only'." | ||
12 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_ARTICLEORDERING_LABEL="Article Field to Order By" | ||
13 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_ARTICLEORDERINGDIR_DESC="Select the direction you would like Articles to be ordered by." | ||
14 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_ARTICLEORDERINGDIR_LABEL="Ordering Direction" | ||
15 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_AUTHOR_DESC="Select one or more authors from the list below." | ||
16 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_AUTHOR_LABEL="Authors" | ||
17 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_AUTHORALIAS_DESC="Select one or more author aliases from the list below." | ||
18 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_AUTHORALIAS_LABEL="Author Aliases" | ||
19 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_AUTHORALIASFILTERING_DESC="Select Inclusive to Include the Selected Author Aliases, Exclusive to Exclude the Selected Author Aliases." | ||
20 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_AUTHORALIASFILTERING_LABEL="Author Alias Filtering Type" | ||
21 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_AUTHORFILTERING_DESC="Select Inclusive to Include the Selected Authors, Exclusive to Exclude the Selected Authors." | ||
22 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_AUTHORFILTERING_LABEL="Author Filtering Type" | ||
23 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_CATDEPTH_DESC="The number of child category levels to return." | ||
24 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_CATDEPTH_LABEL="Category Depth" | ||
25 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_CATEGORY_DESC="Please select one or more categories." | ||
26 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_CATFILTERINGTYPE_DESC="Select Inclusive to Include the Selected Categories, Exclusive to Exclude the Selected Categories." | ||
27 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_CATFILTERINGTYPE_LABEL="Category Filtering Type" | ||
28 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_COUNT_DESC="The number of items to display. The default value of 0 will display all articles." | ||
29 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_COUNT_LABEL="Count" | ||
30 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_DATERANGEFIELD_DESC="Select which date field you want the date range to be applied to." | ||
31 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_DATERANGEFIELD_LABEL="Date Range Field" | ||
32 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_DATEFIELD_DESC="Select which date field you want to display." | ||
33 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_DATEFIELD_LABEL="Date Field" | ||
34 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_DATEFIELDFORMAT_DESC="Please enter in a valid date format. See: https://php.net/date for formatting information." | ||
35 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_DATEFIELDFORMAT_LABEL="Date Format" | ||
36 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_DATEFILTERING_DESC="Select Date Filtering Type." | ||
37 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_DATEFILTERING_LABEL="Date Filtering" | ||
38 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_DATEGROUPINGFIELD_DESC="Select which date field you want the date grouping to be applied to." | ||
39 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_DATEGROUPINGFIELD_LABEL="Date Grouping Field" | ||
40 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_ENDDATE_DESC="Please enter an End Date." | ||
41 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_ENDDATE_LABEL="To Date" | ||
42 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_EXCLUDEDARTICLES_DESC="Please enter each Article ID on a new line." | ||
43 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_EXCLUDEDARTICLES_LABEL="Article IDs to Exclude" | ||
44 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_GROUP_DISPLAY_LABEL="Display Options" | ||
45 | ; The following string is deprecated and will be removed with 4.0 | ||
46 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_GROUP_DYNAMIC_LABEL="Dynamic Mode Options" | ||
47 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_GROUP_FILTERING_LABEL="Filtering Options" | ||
48 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_GROUP_GROUPING_LABEL="Grouping Options" | ||
49 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_GROUP_ORDERING_LABEL="Ordering Options" | ||
50 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_INTROTEXTLIMIT_DESC="Please enter in a numeric character limit value. The introtext will be trimmed to the number of characters you enter." | ||
51 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_INTROTEXTLIMIT_LABEL="Introtext Limit" | ||
52 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_LINKTITLES_LABEL="Linked Titles" | ||
53 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_LINKTITLES_DESC="Linked titles." | ||
54 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_MODE_DESC="Please select the mode you would like to use. If Normal Mode is chosen, then configure the module and it will display a static list of Articles on the menu items you assign the module to. If Dynamic Mode is chosen, then you can still configure the module normally, however now the Category option will no longer be used. Instead, the module will dynamically detect if you are on a Category view and will display the list of articles within that Category. When Dynamic Mode is chosen, it is best to leave the module set to display on all pages, as it will decide to display anything dynamically." | ||
55 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_MODE_LABEL="Mode" | ||
56 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_MONTHYEARFORMAT_DESC="Please enter in a valid date format. See: https://php.net/date for formatting information." | ||
57 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_MONTHYEARFORMAT_LABEL="Month and Year Display Format" | ||
58 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_RELATIVEDATE_DESC="Please enter a numeric value. Results will be retrieved relative to the current date and the value you enter." | ||
59 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_RELATIVEDATE_LABEL="Relative Date" | ||
60 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_SHOWAUTHOR_DESC="Select Show if you would like the author (or author alias instead, if available) to be displayed." | ||
61 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_SHOWCATEGORY_DESC="Select Show if you would like the category name displayed." | ||
62 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_SHOWCHILDCATEGORYARTICLES_DESC="Include or Exclude Articles from Child Categories." | ||
63 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_SHOWCHILDCATEGORYARTICLES_LABEL="Child Category Articles" | ||
64 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_SHOWDATE_DESC="Select Show if you would like the date displayed." | ||
65 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_SHOWFEATURED_DESC="Select to Show, Hide, or Only display Featured Articles." | ||
66 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_SHOWFEATURED_LABEL="Featured Articles" | ||
67 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_SHOWHITS_DESC="Select Show if you would like the hits for each article to be displayed." | ||
68 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_SHOWHITS_LABEL="Hits" | ||
69 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_SHOWINTROTEXT_DESC="Select Show if you would like the introtext to be displayed." | ||
70 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_SHOWINTROTEXT_LABEL="Introtext" | ||
71 | MOD_ARTICLES_CATEGORY_CUSTOM_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." | ||
72 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_SHOWONARTICLEPAGE_LABEL="Show on Article Page" | ||
73 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_SHOWTAGS_DESC="Show the tags for each article." | ||
74 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_STARTDATE_DESC="Please enter a Starting Date." | ||
75 | MOD_ARTICLES_CATEGORY_CUSTOM_FIELD_STARTDATE_LABEL="Start Date Range" | ||
76 | MOD_ARTICLES_CATEGORY_CUSTOM_OPTION_ASCENDING_VALUE="Ascending" | ||
77 | MOD_ARTICLES_CATEGORY_CUSTOM_OPTION_CREATED_VALUE="Created Date" | ||
78 | MOD_ARTICLES_CATEGORY_CUSTOM_OPTION_DATERANGE_VALUE="Date Range" | ||
79 | MOD_ARTICLES_CATEGORY_CUSTOM_OPTION_DESCENDING_VALUE="Descending" | ||
80 | MOD_ARTICLES_CATEGORY_CUSTOM_OPTION_DYNAMIC_VALUE="Dynamic" | ||
81 | MOD_ARTICLES_CATEGORY_CUSTOM_OPTION_EXCLUDE_VALUE="Exclude" | ||
82 | MOD_ARTICLES_CATEGORY_CUSTOM_OPTION_EXCLUSIVE_VALUE="Exclusive" | ||
83 | MOD_ARTICLES_CATEGORY_CUSTOM_OPTION_HITS_VALUE="Hits" | ||
84 | MOD_ARTICLES_CATEGORY_CUSTOM_OPTION_ID_VALUE="ID" | ||
85 | MOD_ARTICLES_CATEGORY_CUSTOM_OPTION_INCLUDE_VALUE="Include" | ||
86 | MOD_ARTICLES_CATEGORY_CUSTOM_OPTION_INCLUSIVE_VALUE="Inclusive" | ||
87 | MOD_ARTICLES_CATEGORY_CUSTOM_OPTION_MODIFIED_VALUE="Modified Date" | ||
88 | MOD_ARTICLES_CATEGORY_CUSTOM_OPTION_MONTHYEAR_VALUE="Month and Year" | ||
89 | MOD_ARTICLES_CATEGORY_CUSTOM_OPTION_NORMAL_VALUE="Normal" | ||
90 | MOD_ARTICLES_CATEGORY_CUSTOM_OPTION_OFF_VALUE="Off" | ||
91 | MOD_ARTICLES_CATEGORY_CUSTOM_OPTION_ONLYFEATURED_VALUE="Only" | ||
92 | MOD_ARTICLES_CATEGORY_CUSTOM_OPTION_ORDERING_VALUE="Article Order" | ||
93 | MOD_ARTICLES_CATEGORY_CUSTOM_OPTION_ORDERINGFEATURED_VALUE="Featured Articles Order" | ||
94 | MOD_ARTICLES_CATEGORY_CUSTOM_OPTION_RANDOM_VALUE="Random" | ||
95 | MOD_ARTICLES_CATEGORY_CUSTOM_OPTION_RATING_VALUE="Rating" | ||
96 | MOD_ARTICLES_CATEGORY_CUSTOM_OPTION_RELATIVEDAY_VALUE="Relative Date" | ||
97 | MOD_ARTICLES_CATEGORY_CUSTOM_OPTION_STARTPUBLISHING_VALUE="Start Publishing Date" | ||
98 | MOD_ARTICLES_CATEGORY_CUSTOM_OPTION_FINISHPUBLISHING_VALUE="Finish Publishing Date" | ||
99 | MOD_ARTICLES_CATEGORY_CUSTOM_OPTION_VOTE_VALUE="Vote" | ||
100 | MOD_ARTICLES_CATEGORY_CUSTOM_OPTION_YEAR_VALUE="Year" | ||
101 | MOD_ARTICLES_CATEGORY_CUSTOM_READ_MORE="Read more: " | ||
102 | MOD_ARTICLES_CATEGORY_CUSTOM_READ_MORE_TITLE="Read More ..." | ||
103 | MOD_ARTICLES_CATEGORY_CUSTOM_REGISTER_TO_READ_MORE="Register to read more" | ||
104 | MOD_ARTICLES_CATEGORY_CUSTOM_UNTAGGED="Untagged" | ||
105 | MOD_ARTICLES_CATEGORY_CUSTOM_XML_DESCRIPTION="This module displays a list of articles from one or more categories." |
1 | ; Joomla! Project | ||
2 | ; Copyright (C) 2005 - 2019 Open Source Matters. All rights reserved. | ||
3 | ; License GNU General Public License version 2 or later; see LICENSE.txt | ||
4 | ; Note : All ini files need to be saved as UTF-8 | ||
5 | |||
6 | MOD_ARTICLES_CATEGORY_CUSTOM="Articles - Category" | ||
7 | MOD_ARTICLES_CATEGORY_CUSTOM_XML_DESCRIPTION="This module displays a list of articles from one or more categories." | ||
8 | MOD_ARTICLES_CATEGORY_CUSTOM_LAYOUT_DEFAULT="Default" | ||
9 |
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
1 | ; Joomla! Project | ||
2 | ; Copyright (C) 2005 - 2017 Open Source Matters. All rights reserved. | ||
3 | ; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php | ||
4 | ; Note : All ini files need to be saved as UTF-8 | ||
5 | |||
6 | MOD_ARTICLES_CATEGORY_CUSTOM="ビデオライブラリ - カテゴリ" | ||
7 | MOD_ARTICLES_CATEGORY_CUSTOM_XML_DESCRIPTION="1つまたは複数のカテゴリから記事一覧を表示します。(ビデオライブラリ専用のモジュールです)" | ||
8 | MOD_ARTICLES_CATEGORY_CUSTOM_LAYOUT_DEFAULT="標準" |
1 | <?php | ||
2 | /** | ||
3 | * @package Joomla.Site | ||
4 | * @subpackage mod_articles_category_custom | ||
5 | * | ||
6 | * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. | ||
7 | * @license GNU General Public License version 2 or later; see LICENSE.txt | ||
8 | */ | ||
9 | |||
10 | defined('_JEXEC') or die; | ||
11 | |||
12 | // Include the helper functions only once | ||
13 | JLoader::register('ModArticlesCategoryCustomHelper', __DIR__ . '/helper.php'); | ||
14 | |||
15 | $input = JFactory::getApplication()->input; | ||
16 | |||
17 | // Prep for Normal or Dynamic Modes | ||
18 | $mode = $params->get('mode', 'normal'); | ||
19 | $idbase = null; | ||
20 | |||
21 | switch ($mode) | ||
22 | { | ||
23 | case 'dynamic' : | ||
24 | $option = $input->get('option'); | ||
25 | $view = $input->get('view'); | ||
26 | |||
27 | if ($option === 'com_content') | ||
28 | { | ||
29 | switch ($view) | ||
30 | { | ||
31 | case 'category' : | ||
32 | $idbase = $input->getInt('id'); | ||
33 | break; | ||
34 | case 'categories' : | ||
35 | $idbase = $input->getInt('id'); | ||
36 | break; | ||
37 | case 'article' : | ||
38 | if ($params->get('show_on_article_page', 1)) | ||
39 | { | ||
40 | $idbase = $input->getInt('catid'); | ||
41 | } | ||
42 | break; | ||
43 | } | ||
44 | } | ||
45 | break; | ||
46 | case 'normal' : | ||
47 | default: | ||
48 | $idbase = $params->get('catid'); | ||
49 | break; | ||
50 | } | ||
51 | |||
52 | $cacheid = md5(serialize(array ($idbase, $module->module, $module->id))); | ||
53 | |||
54 | $cacheparams = new stdClass; | ||
55 | $cacheparams->cachemode = 'id'; | ||
56 | $cacheparams->class = 'ModArticlesCategoryCustomHelper'; | ||
57 | $cacheparams->method = 'getList'; | ||
58 | $cacheparams->methodparams = $params; | ||
59 | $cacheparams->modeparams = $cacheid; | ||
60 | |||
61 | $list = JModuleHelper::moduleCache($module, $params, $cacheparams); | ||
62 | |||
63 | if (!empty($list)) | ||
64 | { | ||
65 | $grouped = false; | ||
66 | $article_grouping = $params->get('article_grouping', 'none'); | ||
67 | $article_grouping_direction = $params->get('article_grouping_direction', 'ksort'); | ||
68 | $moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx'), ENT_COMPAT, 'UTF-8'); | ||
69 | $item_heading = $params->get('item_heading'); | ||
70 | |||
71 | if ($article_grouping !== 'none') | ||
72 | { | ||
73 | $grouped = true; | ||
74 | |||
75 | switch ($article_grouping) | ||
76 | { | ||
77 | case 'year' : | ||
78 | case 'month_year' : | ||
79 | $list = ModArticlesCategoryCustomHelper::groupByDate( | ||
80 | $list, | ||
81 | $article_grouping, | ||
82 | $article_grouping_direction, | ||
83 | $params->get('month_year_format', 'F Y'), | ||
84 | $params->get('date_grouping_field', 'created') | ||
85 | ); | ||
86 | break; | ||
87 | case 'author' : | ||
88 | case 'category_title' : | ||
89 | $list = ModArticlesCategoryCustomHelper::groupBy($list, $article_grouping, $article_grouping_direction); | ||
90 | break; | ||
91 | case 'tags' : | ||
92 | $list = ModArticlesCategoryCustomHelper::groupByTags($list, $article_grouping_direction); | ||
93 | break; | ||
94 | default: | ||
95 | break; | ||
96 | } | ||
97 | } | ||
98 | |||
99 | require JModuleHelper::getLayoutPath('mod_articles_category_custom', $params->get('layout', 'default')); | ||
100 | } |
This diff is collapsed.
Click to expand it.
1 | <?php | ||
2 | |||
3 | /** | ||
4 | * @package Joomla.Site | ||
5 | * @subpackage mod_articles_category_custom | ||
6 | * | ||
7 | * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. | ||
8 | * @license GNU General Public License version 2 or later; see LICENSE.txt | ||
9 | */ | ||
10 | |||
11 | defined('_JEXEC') or die; | ||
12 | $catid = JRequest::getInt('catid'); | ||
13 | error_log(print_r($list, true) . "\n", 3, '/var/www/html/debug.log'); | ||
14 | ?> | ||
15 | <!-- 記事カテゴリーの表示 --> | ||
16 | <h3><?php echo $list[0]->category_title; ?></h3> | ||
17 | <ul class="category-module-custom videos-custom-item-wrapper <?php echo $moduleclass_sfx; ?>"> | ||
18 | <?php foreach ($list as $item) : ?> | ||
19 | <li> | ||
20 | <p class="mod-articles-category-introtext"> | ||
21 | <?php echo $item->displayIntrotext; ?> | ||
22 | </p> | ||
23 | </li> | ||
24 | <?php endforeach; ?> | ||
25 | </ul> |
-
Please register or sign in to post a comment