805d0dd5 by TaishiTokudome

Merge branch 'master' into 'deployment/production'

本番反映 : 月次アーカイブページに関する変更

See merge request !11
2 parents 90bbb365 3534b0b0
Showing 33 changed files with 1810 additions and 41 deletions
...@@ -14,3 +14,12 @@ https://project.lilli.co.jp/oki/kanoya-univercity-docker ...@@ -14,3 +14,12 @@ https://project.lilli.co.jp/oki/kanoya-univercity-docker
14 ## DB/アップロードファイルのバックアップについて 14 ## DB/アップロードファイルのバックアップについて
15 ec2-uesrのホームディレクトリに毎週日曜に1度だけ取るようにしてます。 15 ec2-uesrのホームディレクトリに毎週日曜に1度だけ取るようにしてます。
16 ~/backup.sh をcron実行しています。 16 ~/backup.sh をcron実行しています。
17
18 ## インストールを必要とするモジュール、コンポーネントについて
19 srcディレクトリにて、インストールして追加したモジュール、コンポーネントのソースコードを管理しています。
20 追加したモジュール、コンポーネントについての詳細は各モジュール、コンポーネントディレクトリに有るREADME.mdをご覧ください。
21
22 Joomlaのアップデートをした際に、アップデートの内容によっては追加したモジュール、コンポーネントが正常に動作しなくなる場合があります。
23 その際は、適宜、モジュール、コンポーネントを修正してください。
24
25 再度、モジュール、コンポーネントをインストールする場合は、それぞれのREADMEに記述してある手順でインストールしてください。
...\ No newline at end of file ...\ No newline at end of file
......
1 # 月次アーカイブ用コンポーネント
2 過去に投稿された記事をカテゴリー別に絞り込み、月間アーカイブを表示するコンポーネントです。
3 インストールしていない場合は、管理画面よりインストールする必要があります。
4
5 ## インストール手順
6 1. 管理画面ログイン
7 2. エクステンション配下の管理を選択
8 3. (フォルダからインストール)を選択
9 4. フォームにインストールするモジュールまたは、コンポーネントのフォルダを指定(例:/var/www/html/src/com/com_hoge)
10 5. チェックしてインストール
...\ No newline at end of file ...\ No newline at end of file
1 <?php
2 echo "<p>カスタムアーカイブコンポーネントです。</p>";
3 echo "\n";
4 echo "<P>このページから設定する項目はありません。</P>";
...\ No newline at end of file ...\ No newline at end of file
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 COM_CONTENT_CUSTOM="archive_custom_component"
7 COM_CONTENT_CUSTOM_ATTRIBS_ARTICLE_SETTINGS_LABEL="Options"
8 COM_CONTENT_CUSTOM_FIELD_INFOBLOCK_POSITION_LABEL="Position of Article Info"
9 COM_CONTENT_CUSTOM_XML_DESCRIPTION="It is a component that narrows down articles posted in the past by category and displays a monthly archive."
10 COM_CONTENT_CUSTOM_FIELD_INFOBLOCK_POSITION_DESC="Puts the article information block above or below the text or splits it into two separate blocks, one above and the other below."
11 COM_CONTENT_CUSTOM_FIELD_VALUE_USE_ARTICLE_SETTINGS="Use Article Settings"
12 COM_CONTENT_CUSTOM_FIELD_OPTION_ABOVE="Above"
13 COM_CONTENT_CUSTOM_FIELD_OPTION_BELOW="Below"
14 COM_CONTENT_CUSTOM_FIELD_OPTION_SPLIT="Split"
15 COM_CONTENT_CUSTOM_ARCHIVE_VIEW_DEFAULT_TITLE="Archived Articles"
16 COM_CONTENT_CUSTOM_ARCHIVE_VIEW_DEFAULT_OPTION="Default"
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 COM_CONTENT_CUSTOM="archive_custom_component"
7 COM_CONTENT_CUSTOM_XML_DESCRIPTION="It is a component that narrows down articles posted in the past by category and displays a monthly archive."
8 COM_CONTENT_CUSTOM_FIELD_OPTION_ABOVE="Above"
9 COM_CONTENT_CUSTOM_FIELD_OPTION_BELOW="Below"
10 COM_CONTENT_CUSTOM_FIELD_OPTION_SPLIT="Split"
11 COM_CONTENT_CUSTOM_ARCHIVE_VIEW_DEFAULT_TITLE="Archived Articles"
12 COM_CONTENT_CUSTOM_ARCHIVE_VIEW_DEFAULT_OPTION="Default"
...\ No newline at end of file ...\ No newline at end of file
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 COM_CONTENT_CUSTOM="カスタムアーカイブ(コンポーネント)"
7 COM_CONTENT_CUSTOM_ATTRIBS_ARTICLE_SETTINGS_LABEL="オプション"
8 COM_CONTENT_CUSTOM_FIELD_INFOBLOCK_POSITION_LABEL="記事情報の位置"
9 COM_CONTENT_CUSTOM_XML_DESCRIPTION="過去に投稿された記事をカテゴリー別に絞り込み、月間アーカイブを表示するコンポーネントです。"
10 COM_CONTENT_CUSTOM_FIELD_INFOBLOCK_POSITION_DESC="記事情報のブロックをテキストの上か下に追加します。または1つは上、その他は下へ2つのブロックに分けます。"
11 COM_CONTENT_CUSTOM_FIELD_VALUE_USE_ARTICLE_SETTINGS="記事設定の使用"
12 COM_CONTENT_CUSTOM_FIELD_OPTION_ABOVE="上"
13 COM_CONTENT_CUSTOM_FIELD_OPTION_BELOW="下"
14 COM_CONTENT_CUSTOM_FIELD_OPTION_SPLIT="分割"
15 COM_CONTENT_CUSTOM_ARCHIVE_VIEW_DEFAULT_TITLE="アーカイブ記事"
16 COM_CONTENT_CUSTOM_ARCHIVE_VIEW_DEFAULT_OPTION="標準"
...\ No newline at end of file ...\ No newline at end of file
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 COM_CONTENT_CUSTOM="カスタムアーカイブ(コンポーネント)"
7 COM_CONTENT_CUSTOM_XML_DESCRIPTION="過去に投稿された記事をカテゴリー別に絞り込み、月間アーカイブを表示するコンポーネントです。"
8 COM_CONTENT_CUSTOM_FIELD_OPTION_ABOVE="上"
9 COM_CONTENT_CUSTOM_FIELD_OPTION_BELOW="下"
10 COM_CONTENT_CUSTOM_FIELD_OPTION_SPLIT="分割"
11 COM_CONTENT_CUSTOM_ARCHIVE_VIEW_DEFAULT_TITLE="アーカイブ記事"
12 COM_CONTENT_CUSTOM_ARCHIVE_VIEW_DEFAULT_OPTION="標準"
...\ No newline at end of file ...\ No newline at end of file
1 <?xml version="1.0" encoding="utf-8"?>
2 <extension type="component" version="3.0" method="upgrade">
3 <name>COM_CONTENT_CUSTOM</name>
4 <author>T.Tokudome</author>
5 <creationDate>July 2020</creationDate>
6 <copyright></copyright>
7 <license></license>
8 <authorEmail>tokudome@lilli.co.jp</authorEmail>
9 <authorUrl></authorUrl>
10 <version>0.0.1</version>
11 <description>COM_CONTENT_CUSTOM_XML_DESCRIPTION</description>
12
13 <update>
14 <schemas>
15 <schemapath type="mysql">sql/updates/mysql</schemapath>
16 </schemas>
17 </update>
18
19 <files folder="site">
20 <filename>index.html</filename>
21 <filename>content_custom.php</filename>
22 <filename>controller.php</filename>
23 <folder>views</folder>
24 <folder>helpers</folder>
25 <folder>models</folder>
26 </files>
27 <languages folder="site">
28 <language tag="en-GB">language/en-GB.com_content_custom.ini</language>
29 <language tag="ja-JP">language/ja-JP.com_content_custom.ini</language>
30 </languages>
31 <administration>
32 <menu link='index.php?option=com_content_custom'>カスタムアーカイブ</menu>
33 <files folder="admin">
34 <filename>index.html</filename>
35 <filename>content_custom.php</filename>
36 <folder>sql</folder>
37 </files>
38 <languages folder="admin">
39 <language tag="en-GB">language/en-GB.com_content_custom.ini</language>
40 <language tag="ja-JP">language/ja-JP.com_content_custom.ini</language>
41 <language tag="en-GB">language/en-GB.com_content_custom.sys.ini</language>
42 <language tag="ja-JP">language/ja-JP.com_content_custom.sys.ini</language>
43 </languages>
44 </administration>
45
46 </extension>
...\ No newline at end of file ...\ No newline at end of file
1 <?php
2 /**
3 * @package Joomla.Site
4 * @subpackage com_content_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 JLoader::register('ContentCustomHelperRoute', JPATH_SITE . '/components/com_content_custom/helpers/route.php');
13 JLoader::register('ContentCustomHelperQuery', JPATH_SITE . '/components/com_content_custom/helpers/query.php');
14
15 $input = JFactory::getApplication()->input;
16 $user = JFactory::getUser();
17
18 $controller = JControllerLegacy::getInstance('Content');
19
20 $controller->execute(JFactory::getApplication()->input->get('task'));
21 $controller->redirect();
1 <?php
2 /**
3 * @package Joomla.Site
4 * @subpackage com_content_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 use Joomla\CMS\Component\ComponentHelper;
13
14 /**
15 * Content Component Controller
16 *
17 * @since 1.5
18 */
19 class ContentController extends JControllerLegacy
20 {
21 /**
22 * Constructor.
23 *
24 * @param array $config An optional associative array of configuration settings.
25 * Recognized key values include 'name', 'default_task', 'model_path', and
26 * 'view_path' (this list is not meant to be comprehensive).
27 *
28 * @since 3.0.1
29 */
30 public function __construct($config = array())
31 {
32 $this->input = JFactory::getApplication()->input;
33
34 // Article frontpage Editor pagebreak proxying:
35 if ($this->input->get('view') === 'article' && $this->input->get('layout') === 'pagebreak')
36 {
37 $config['base_path'] = JPATH_COMPONENT_ADMINISTRATOR;
38 }
39 // Article frontpage Editor article proxying:
40 elseif ($this->input->get('view') === 'articles' && $this->input->get('layout') === 'modal')
41 {
42 JHtml::_('stylesheet', 'system/adminlist.css', array('version' => 'auto', 'relative' => true));
43 $config['base_path'] = JPATH_COMPONENT_ADMINISTRATOR;
44 }
45
46 parent::__construct($config);
47 }
48
49 /**
50 * Method to display a view.
51 *
52 * @param boolean $cachable If true, the view output will be cached.
53 * @param boolean $urlparams An array of safe URL parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
54 *
55 * @return JController This object to support chaining.
56 *
57 * @since 1.5
58 */
59 public function display($cachable = false, $urlparams = false)
60 {
61 $cachable = true;
62
63 /**
64 * Set the default view name and format from the Request.
65 * Note we are using a_id to avoid collisions with the router and the return page.
66 * Frontend is a bit messier than the backend.
67 */
68 $id = $this->input->getInt('a_id');
69 $vName = $this->input->getCmd('view', 'categories');
70 $this->input->set('view', $vName);
71 $user = JFactory::getUser();
72
73 if ($user->get('id')
74 || ($this->input->getMethod() === 'POST'
75 && (($vName === 'category' && $this->input->get('layout') !== 'blog') || $vName === 'archive' )))
76 {
77 $cachable = false;
78 }
79
80 $safeurlparams = array(
81 'catid' => 'INT',
82 'id' => 'INT',
83 'cid' => 'ARRAY',
84 'year' => 'INT',
85 'month' => 'INT',
86 'limit' => 'UINT',
87 'limitstart' => 'UINT',
88 'showall' => 'INT',
89 'return' => 'BASE64',
90 'filter' => 'STRING',
91 'filter_order' => 'CMD',
92 'filter_order_Dir' => 'CMD',
93 'filter-search' => 'STRING',
94 'print' => 'BOOLEAN',
95 'lang' => 'CMD',
96 'Itemid' => 'INT');
97
98 parent::display($cachable, $safeurlparams);
99
100 return $this;
101 }
102 }
1 <?php
2 /**
3 * @package Joomla.Site
4 * @subpackage com_content_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 /**
13 * Content Component Query Helper
14 *
15 * @since 1.5
16 */
17 class ContentCustomHelperQuery
18 {
19 /**
20 * Translate an order code to a field for secondary category ordering.
21 *
22 * @param string $orderby The ordering code.
23 * @param string $orderDate The ordering code for the date.
24 *
25 * @return string The SQL field(s) to order by.
26 *
27 * @since 1.5
28 */
29 public static function orderbySecondary($orderby, $orderDate = 'created')
30 {
31 $queryDate = self::getQueryDate($orderDate);
32
33 switch ($orderby)
34 {
35 case 'date' :
36 $orderby = $queryDate;
37 break;
38
39 case 'rdate' :
40 $orderby = $queryDate . ' DESC ';
41 break;
42
43 case 'alpha' :
44 $orderby = 'a.title';
45 break;
46
47 case 'ralpha' :
48 $orderby = 'a.title DESC';
49 break;
50
51 case 'hits' :
52 $orderby = 'a.hits DESC';
53 break;
54
55 case 'rhits' :
56 $orderby = 'a.hits';
57 break;
58
59 case 'order' :
60 $orderby = 'a.ordering';
61 break;
62
63 case 'rorder' :
64 $orderby = 'a.ordering DESC';
65 break;
66
67 case 'author' :
68 $orderby = 'author';
69 break;
70
71 case 'rauthor' :
72 $orderby = 'author DESC';
73 break;
74
75 case 'front' :
76 $orderby = 'a.featured DESC, fp.ordering, ' . $queryDate . ' DESC ';
77 break;
78
79 case 'random' :
80 $orderby = JFactory::getDbo()->getQuery(true)->Rand();
81 break;
82
83 case 'vote' :
84 $orderby = 'a.id DESC ';
85
86 if (JPluginHelper::isEnabled('content', 'vote'))
87 {
88 $orderby = 'rating_count DESC ';
89 }
90 break;
91
92 case 'rvote' :
93 $orderby = 'a.id ASC ';
94
95 if (JPluginHelper::isEnabled('content', 'vote'))
96 {
97 $orderby = 'rating_count ASC ';
98 }
99 break;
100
101 case 'rank' :
102 $orderby = 'a.id DESC ';
103
104 if (JPluginHelper::isEnabled('content', 'vote'))
105 {
106 $orderby = 'rating DESC ';
107 }
108 break;
109
110 case 'rrank' :
111 $orderby = 'a.id ASC ';
112
113 if (JPluginHelper::isEnabled('content', 'vote'))
114 {
115 $orderby = 'rating ASC ';
116 }
117 break;
118
119 default :
120 $orderby = 'a.ordering';
121 break;
122 }
123
124 return $orderby;
125 }
126
127 /**
128 * Translate an order code to a field for primary category ordering.
129 *
130 * @param string $orderDate The ordering code.
131 *
132 * @return string The SQL field(s) to order by.
133 *
134 * @since 1.6
135 */
136 public static function getQueryDate($orderDate)
137 {
138 $db = JFactory::getDbo();
139
140 switch ($orderDate)
141 {
142 case 'modified' :
143 $queryDate = ' CASE WHEN a.modified = ' . $db->quote($db->getNullDate()) . ' THEN a.created ELSE a.modified END';
144 break;
145
146 // Use created if publish_up is not set
147 case 'published' :
148 $queryDate = ' CASE WHEN a.publish_up = ' . $db->quote($db->getNullDate()) . ' THEN a.created ELSE a.publish_up END ';
149 break;
150
151 case 'unpublished' :
152 $queryDate = ' CASE WHEN a.publish_down = ' . $db->quote($db->getNullDate()) . ' THEN a.created ELSE a.publish_down END ';
153 break;
154 case 'created' :
155 default :
156 $queryDate = ' a.created ';
157 break;
158 }
159
160 return $queryDate;
161 }
162
163 }
1 <?php
2 /**
3 * @package Joomla.Site
4 * @subpackage com_content_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 /**
13 * Content Component Route Helper.
14 *
15 * @since 1.5
16 */
17 abstract class ContentCustomHelperRoute
18 {
19 /**
20 * Get the article route.
21 *
22 * @param integer $id The route of the content item.
23 * @param integer $catid The category ID.
24 * @param integer $language The language code.
25 * @param string $layout The layout value.
26 *
27 * @return string The article route.
28 *
29 * @since 1.5
30 */
31 public static function getArticleRoute($id, $catid = 0, $language = 0, $layout = null)
32 {
33 // Create the link
34 $link = 'index.php?option=com_content&view=article&id=' . $id;
35
36 if ((int) $catid > 1)
37 {
38 $link .= '&catid=' . $catid;
39 }
40
41 if ($language && $language !== '*' && JLanguageMultilang::isEnabled())
42 {
43 $link .= '&lang=' . $language;
44 }
45
46 if ($layout)
47 {
48 $link .= '&layout=' . $layout;
49 }
50
51 return $link;
52 }
53
54 /**
55 * Get the category route.
56 *
57 * @param integer $catid The category ID.
58 * @param integer $language The language code.
59 * @param string $layout The layout value.
60 *
61 * @return string The article route.
62 *
63 * @since 1.5
64 */
65 public static function getCategoryRoute($catid, $language = 0, $layout = null)
66 {
67 if ($catid instanceof JCategoryNode)
68 {
69 $id = $catid->id;
70 }
71 else
72 {
73 $id = (int) $catid;
74 }
75
76 if ($id < 1)
77 {
78 return '';
79 }
80
81 $link = 'index.php?option=com_content&view=category&id=' . $id;
82
83 if ($language && $language !== '*' && JLanguageMultilang::isEnabled())
84 {
85 $link .= '&lang=' . $language;
86 }
87
88 if ($layout)
89 {
90 $link .= '&layout=' . $layout;
91 }
92
93 return $link;
94 }
95
96 }
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 COM_CONTENT_CUSTOM_ARTICLE_HITS="Hits: %s"
7 COM_CONTENT_CUSTOM_ARTICLE_INFO="Details"
8 COM_CONTENT_CUSTOM_CATEGORY="Category: %s"
9 COM_CONTENT_CUSTOM_CREATED_DATE_ON="Created: %s"
10 COM_CONTENT_CUSTOM_LAST_UPDATED="Last Updated: %s"
11 COM_CONTENT_CUSTOM_MONTH="Month"
12 COM_CONTENT_CUSTOM_PARENT="Parent Category: %s"
13 COM_CONTENT_CUSTOM_PUBLISHED_DATE_ON="Published: %s"
14 COM_CONTENT_CUSTOM_WRITTEN_BY="Written by %s"
15 COM_CONTENT_CUSTOM_FIELD_OPTION_ABOVE="Above"
16 COM_CONTENT_CUSTOM_FIELD_OPTION_BELOW="Below"
17 COM_CONTENT_CUSTOM_FIELD_OPTION_SPLIT="Split"
18 COM_CONTENT_CUSTOM_ARCHIVE_VIEW_DEFAULT_TITLE="Archived Articles"
19 COM_CONTENT_CUSTOM_ARCHIVE_VIEW_DEFAULT_OPTION="Default"
...\ No newline at end of file ...\ No newline at end of file
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 COM_CONTENT_CUSTOM_ARTICLE_HITS="参照数: %s"
7 COM_CONTENT_CUSTOM_ARTICLE_INFO="詳細"
8 COM_CONTENT_CUSTOM_CATEGORY="カテゴリ: %s"
9 COM_CONTENT_CUSTOM_CREATED_DATE_ON="作成日:%s"
10 COM_CONTENT_CUSTOM_LAST_UPDATED="最終更新日:%s"
11 COM_CONTENT_CUSTOM_MONTH="月"
12 COM_CONTENT_CUSTOM_PARENT="親カテゴリ: %s"
13 COM_CONTENT_CUSTOM_PUBLISHED_DATE_ON="公開日:%s"
14 COM_CONTENT_CUSTOM_WRITTEN_BY="投稿者: %s"
15 COM_CONTENT_CUSTOM_FIELD_OPTION_ABOVE="上"
16 COM_CONTENT_CUSTOM_FIELD_OPTION_BELOW="下"
17 COM_CONTENT_CUSTOM_FIELD_OPTION_SPLIT="分割"
18 COM_CONTENT_CUSTOM_ARCHIVE_VIEW_DEFAULT_TITLE="アーカイブ記事"
19 COM_CONTENT_CUSTOM_ARCHIVE_VIEW_DEFAULT_OPTION="標準"
...\ No newline at end of file ...\ No newline at end of file
1 <?php
2 /**
3 * @package Joomla.Site
4 * @subpackage com_content_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 use Joomla\Utilities\ArrayHelper;
13
14 JLoader::register('ContentModelArticles', __DIR__ . '/articles.php');
15
16 /**
17 * Content Component Archive Model
18 *
19 * @since 1.5
20 */
21 class ContentModelArchive extends ContentModelArticles
22 {
23 /**
24 * Model context string.
25 *
26 * @var string
27 */
28 public $_context = 'com_content_custom.archive';
29
30 /**
31 * Method to auto-populate the model state.
32 *
33 * Note. Calling getState in this method will result in recursion.
34 *
35 * @param string $ordering The field to order on.
36 * @param string $direction The direction to order on.
37 *
38 * @return void
39 *
40 * @since 1.6
41 */
42 protected function populateState($ordering = null, $direction = null)
43 {
44 parent::populateState();
45
46 $app = JFactory::getApplication();
47
48 // Add archive properties
49 $params = $this->state->params;
50
51 // Filter on archived articles
52 $this->setState('filter.published', 1);
53
54 // Filter on month, year
55 $this->setState('filter.month', $app->input->getInt('month'));
56 $this->setState('filter.year', $app->input->getInt('year'));
57
58 // Optional filter text
59 $this->setState('list.filter', $app->input->getString('filter-search'));
60
61 // Get list limit
62 $itemid = $app->input->get('Itemid', 0, 'int');
63 $limit = $app->getUserStateFromRequest('com_content_custom.archive.list' . $itemid . '.limit', 'limit', $params->get('display_num'), 'uint');
64 $this->setState('list.limit', $limit);
65
66 // Set the archive ordering
67 $articleOrderby = $params->get('orderby_sec', 'rdate');
68 $articleOrderDate = $params->get('order_date');
69
70 // No category ordering
71 $secondary = ContentCustomHelperQuery::orderbySecondary($articleOrderby, $articleOrderDate);
72
73 $this->setState('list.ordering', $secondary . ', a.created DESC');
74 $this->setState('list.direction', '');
75 }
76
77 /**
78 * Get the master query for retrieving a list of articles subject to the model state.
79 *
80 * @return JDatabaseQuery
81 *
82 * @since 1.6
83 */
84 protected function getListQuery()
85 {
86 $params = $this->state->params;
87 $app = JFactory::getApplication('site');
88 $catids = ArrayHelper::toInteger($app->input->get('catid', array(), 'array'));
89 $catids = array_values(array_diff($catids, array(0)));
90 $articleOrderDate = $params->get('order_date');
91
92 // Create a new query object.
93 $query = parent::getListQuery();
94
95 // Add routing for archive
96 // Sqlsrv changes
97 $case_when = ' CASE WHEN ';
98 $case_when .= $query->charLength('a.alias', '!=', '0');
99 $case_when .= ' THEN ';
100 $a_id = $query->castAsChar('a.id');
101 $case_when .= $query->concatenate(array($a_id, 'a.alias'), ':');
102 $case_when .= ' ELSE ';
103 $case_when .= $a_id . ' END as slug';
104
105 $query->select($case_when);
106
107 $case_when = ' CASE WHEN ';
108 $case_when .= $query->charLength('c.alias', '!=', '0');
109 $case_when .= ' THEN ';
110 $c_id = $query->castAsChar('c.id');
111 $case_when .= $query->concatenate(array($c_id, 'c.alias'), ':');
112 $case_when .= ' ELSE ';
113 $case_when .= $c_id . ' END as catslug';
114 $query->select($case_when);
115
116 // Filter on month, year
117 // First, get the date field
118 $queryDate = ContentCustomHelperQuery::getQueryDate($articleOrderDate);
119
120 if ($month = $this->getState('filter.month'))
121 {
122 $query->where($query->month($queryDate) . ' = ' . $month);
123 }
124
125 if ($year = $this->getState('filter.year'))
126 {
127 $query->where($query->year($queryDate) . ' = ' . $year);
128 }
129
130 if (count($catids) > 0)
131 {
132 $query->where('c.id IN (' . implode(', ', $catids) . ')');
133 }
134
135 return $query;
136 }
137
138 /**
139 * Method to get the archived article list
140 *
141 * @access public
142 * @return array
143 */
144 public function getData()
145 {
146 $app = JFactory::getApplication();
147
148 // Lets load the content if it doesn't already exist
149 if (empty($this->_data))
150 {
151 // Get the page/component configuration
152 $params = $app->getParams();
153
154 // Get the pagination request variables
155 $limit = $app->input->get('limit', $params->get('display_num', 20), 'uint');
156 $limitstart = $app->input->get('limitstart', 0, 'uint');
157
158 $query = $this->_buildQuery();
159
160 $this->_data = $this->_getList($query, $limitstart, $limit);
161 }
162
163 return $this->_data;
164 }
165
166 /**
167 * JModelLegacy override to add alternating value for $odd
168 *
169 * @param string $query The query.
170 * @param integer $limitstart Offset.
171 * @param integer $limit The number of records.
172 *
173 * @return array An array of results.
174 *
175 * @since 3.0.1
176 * @throws RuntimeException
177 */
178 protected function _getList($query, $limitstart=0, $limit=0)
179 {
180 $result = parent::_getList($query, $limitstart, $limit);
181
182 $odd = 1;
183
184 foreach ($result as $k => $row)
185 {
186 $result[$k]->odd = $odd;
187 $odd = 1 - $odd;
188 }
189
190 return $result;
191 }
192 }
1 <?php
2 /**
3 * @package Joomla.Site
4 * @subpackage com_content_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 JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');
13 JHtml::_('formbehavior.chosen', 'select');
14 JHtml::_('behavior.caption');
15 ?>
16 <div class="archive-custom<?php echo $this->pageclass_sfx; ?>">
17 <?php if ($this->params->get('show_page_heading')) : ?>
18 <div class="page-header">
19 <h1>
20 <?php echo $this->escape($this->params->get('page_heading')); ?>
21 </h1>
22 </div>
23 <?php endif; ?>
24 <?php echo $this->loadTemplate('items'); ?>
25 </div>
1 <?xml version="1.0" encoding="utf-8"?>
2 <metadata>
3 <layout title="COM_CONTENT_CUSTOM_ARCHIVE_VIEW_DEFAULT_TITLE" option="COM_CONTENT_CUSTOM_ARCHIVE_VIEW_DEFAULT_OPTION">
4 <help
5 key = "JHELP_MENUS_MENU_ITEM_ARTICLE_ARCHIVED"
6 />
7 <message>
8 <![CDATA[COM_CONTENT_CUSTOM_XML_DESCRIPTION]]>
9 </message>
10 </layout>
11
12 <!-- Add fields to the request variables for the layout. -->
13 <fields name="request">
14 <fieldset name="request"
15 addfieldpath="/administrator/components/com_categories/models/fields"
16 >
17 <field
18 name="catid"
19 type="category"
20 extension="com_content"
21 multiple="true"
22 size="5"
23 label="JCATEGORY"
24 description="JFIELD_CATEGORY_DESC"
25 >
26 <option value="">JOPTION_ALL_CATEGORIES</option>
27 </field>
28 </fieldset>
29 </fields>
30
31 <!-- Add fields to the parameters object for the layout. -->
32 <fields name="params">
33
34 <!-- Basic options. -->
35 <fieldset name="basic" label="JGLOBAL_ARCHIVE_OPTIONS"
36 >
37
38 <field
39 name="orderby_sec"
40 type="list"
41 label="JGLOBAL_ARTICLE_ORDER_LABEL"
42 description="JGLOBAL_ARTICLE_ORDER_DESC"
43 default="rdate"
44 >
45 <option value="date">JGLOBAL_OLDEST_FIRST</option>
46 <option value="rdate">JGLOBAL_MOST_RECENT_FIRST</option>
47 <option value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option>
48 <option value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option>
49 <option value="author">JGLOBAL_AUTHOR_ALPHABETICAL</option>
50 <option value="rauthor">JGLOBAL_AUTHOR_REVERSE_ALPHABETICAL</option>
51 <option value="hits">JGLOBAL_MOST_HITS</option>
52 <option value="rhits">JGLOBAL_LEAST_HITS</option>
53 <option value="order">JGLOBAL_ARTICLE_MANAGER_ORDER</option>
54 <option value="vote" requires="vote">JGLOBAL_VOTES_DESC</option>
55 <option value="rvote" requires="vote">JGLOBAL_VOTES_ASC</option>
56 <option value="rank" requires="vote">JGLOBAL_RATINGS_DESC</option>
57 <option value="rrank" requires="vote">JGLOBAL_RATINGS_ASC</option>
58 </field>
59
60 <field
61 name="order_date"
62 type="list"
63 label="JGLOBAL_ORDERING_DATE_LABEL"
64 description="JGLOBAL_ORDERING_DATE_DESC"
65 default="published"
66 >
67 <option value="created">JGLOBAL_Created</option>
68 <option value="modified">JGLOBAL_Modified</option>
69 <option value="published">JPUBLISHED</option>
70 </field>
71
72 <field
73 name="display_num"
74 type="list"
75 label="JGLOBAL_NUMBER_ITEMS_LIST_LABEL"
76 description="JGLOBAL_NUMBER_ITEMS_LIST_DESC"
77 default="5"
78 >
79 <option value="5">J5</option>
80 <option value="10">J10</option>
81 <option value="15">J15</option>
82 <option value="20">J20</option>
83 <option value="25">J25</option>
84 <option value="30">J30</option>
85 <option value="50">J50</option>
86 <option value="100">J100</option>
87 <option value="0">JALL</option>
88 </field>
89
90 <field
91 name="filter_field"
92 type="list"
93 label="JGLOBAL_FILTER_FIELD_LABEL"
94 description="JGLOBAL_FILTER_FIELD_DESC"
95 default=""
96 useglobal="true"
97 >
98 <option value="hide">JHIDE</option>
99 <option value="1">JSHOW</option>
100 </field>
101
102 <field
103 name="introtext_limit"
104 type="number"
105 label="JGLOBAL_ARCHIVE_ARTICLES_FIELD_INTROTEXTLIMIT_LABEL"
106 description="JGLOBAL_ARCHIVE_ARTICLES_FIELD_INTROTEXTLIMIT_DESC"
107 default="1000"
108 />
109
110 </fieldset>
111
112 <!-- Articles options. -->
113 <fieldset name="articles"
114 label="COM_CONTENT_CUSTOM_ATTRIBS_ARTICLE_SETTINGS_LABEL"
115 >
116
117 <field
118 name="show_intro"
119 type="list"
120 label="JGLOBAL_SHOW_INTRO_LABEL"
121 description="JGLOBAL_SHOW_INTRO_DESC"
122 class="chzn-color"
123 default="1"
124 >
125 <option value="0">JHIDE</option>
126 <option value="1">JSHOW</option>
127 </field>
128
129 <field
130 name="info_block_position"
131 type="list"
132 label="COM_CONTENT_CUSTOM_FIELD_INFOBLOCK_POSITION_LABEL"
133 description="COM_CONTENT_CUSTOM_FIELD_INFOBLOCK_POSITION_DESC"
134 default=""
135 useglobal="true"
136 class="chzn-color"
137 >
138 <option value="use_article">COM_CONTENT_CUSTOM_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
139 <option value="0">COM_CONTENT_CUSTOM_FIELD_OPTION_ABOVE</option>
140 <option value="1">COM_CONTENT_CUSTOM_FIELD_OPTION_BELOW</option>
141 <option value="2">COM_CONTENT_CUSTOM_FIELD_OPTION_SPLIT</option>
142 </field>
143
144 <field
145 name="show_category"
146 type="list"
147 label="JGLOBAL_SHOW_CATEGORY_LABEL"
148 description="JGLOBAL_SHOW_CATEGORY_DESC"
149 useglobal="true"
150 class="chzn-color"
151 >
152 <option value="0">JHIDE</option>
153 <option value="1">JSHOW</option>
154 </field>
155
156 <field
157 name="link_category"
158 type="list"
159 label="JGLOBAL_LINK_CATEGORY_LABEL"
160 description="JGLOBAL_LINK_CATEGORY_DESC"
161 useglobal="true"
162 class="chzn-color"
163 >
164 <option value="0">JNO</option>
165 <option value="1">JYES</option>
166 </field>
167
168 <field
169 name="show_parent_category"
170 type="list"
171 label="JGLOBAL_SHOW_PARENT_CATEGORY_LABEL"
172 description="JGLOBAL_SHOW_PARENT_CATEGORY_DESC"
173 useglobal="true"
174 >
175 <option value="0">JHIDE</option>
176 <option value="1">JSHOW</option>
177 </field>
178
179 <field
180 name="link_parent_category"
181 type="list"
182 label="JGLOBAL_LINK_PARENT_CATEGORY_LABEL"
183 description="JGLOBAL_LINK_PARENT_CATEGORY_DESC"
184 useglobal="true"
185 >
186 <option value="0">JNO</option>
187 <option value="1">JYES</option>
188 </field>
189
190 <field
191 name="link_titles"
192 type="list"
193 label="JGLOBAL_LINKED_TITLES_LABEL"
194 description="JGLOBAL_LINKED_TITLES_DESC"
195 class="chzn-color"
196 default="1"
197 >
198 <option value="0">JNO</option>
199 <option value="1">JYES</option>
200 </field>
201
202 <field
203 name="show_author"
204 type="list"
205 label="JGLOBAL_SHOW_AUTHOR_LABEL"
206 description="JGLOBAL_SHOW_AUTHOR_DESC"
207 useglobal="true"
208 class="chzn-color"
209 >
210 <option value="0">JHIDE</option>
211 <option value="1">JSHOW</option>
212 </field>
213
214 <field
215 name="link_author"
216 type="list"
217 label="JGLOBAL_LINK_AUTHOR_LABEL"
218 description="JGLOBAL_LINK_AUTHOR_DESC"
219 useglobal="true"
220 >
221 <option value="0">JNO</option>
222 <option value="1">JYES</option>
223 </field>
224
225 <field
226 name="show_create_date"
227 type="list"
228 label="JGLOBAL_SHOW_CREATE_DATE_LABEL"
229 description="JGLOBAL_SHOW_CREATE_DATE_DESC"
230 useglobal="true"
231 class="chzn-color"
232 >
233 <option value="0">JHIDE</option>
234 <option value="1">JSHOW</option>
235 </field>
236
237 <field
238 name="show_modify_date"
239 type="list"
240 label="JGLOBAL_SHOW_MODIFY_DATE_LABEL"
241 description="JGLOBAL_SHOW_MODIFY_DATE_DESC"
242 useglobal="true"
243 class="chzn-color"
244 >
245 <option value="0">JHIDE</option>
246 <option value="1">JSHOW</option>
247 </field>
248
249 <field
250 name="show_publish_date"
251 type="list"
252 label="JGLOBAL_SHOW_PUBLISH_DATE_LABEL"
253 description="JGLOBAL_SHOW_PUBLISH_DATE_DESC"
254 class="chzn-color"
255 default="1"
256 >
257 <option value="0">JHIDE</option>
258 <option value="1">JSHOW</option>
259 </field>
260
261 <field
262 name="show_hits"
263 type="list"
264 label="JGLOBAL_SHOW_HITS_LABEL"
265 description="JGLOBAL_SHOW_HITS_DESC"
266 useglobal="true"
267 class="chzn-color"
268 >
269 <option value="0">JHIDE</option>
270 <option value="1">JSHOW</option>
271 </field>
272 </fieldset>
273
274 </fields>
275 </metadata>
1 <?php
2 /**
3 * @package Joomla.Site
4 * @subpackage com_content_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 JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');
13 $params = $this->params;
14 ?>
15
16 <div id="archive-items">
17 <?php foreach ($this->items as $i => $item) : ?>
18 <?php $info = $item->params->get('info_block_position', 0); ?>
19 <div class="row<?php echo $i % 2; ?>" itemscope itemtype="https://schema.org/Article">
20 <div class="page-header">
21 <h2 itemprop="headline">
22 <?php if ($params->get('link_titles')) : ?>
23 <?php
24 $url = JRoute::_(ContentCustomHelperRoute::getArticleRoute($item->slug, $item->catid, $item->language));
25 $url = "information/" . end(explode("/", $url));
26 ?>
27 <a href="<?php echo $url; ?>" itemprop="url">
28 <?php echo $this->escape($item->title); ?>
29 </a>
30 <?php else : ?>
31 <?php echo $this->escape($item->title); ?>
32 <?php endif; ?>
33 </h2>
34
35 <?php // Content is generated by content plugin event "onContentAfterTitle" ?>
36 <?php echo $item->event->afterDisplayTitle; ?>
37
38 <?php if ($params->get('show_author') && !empty($item->author )) : ?>
39 <div class="createdby" itemprop="author" itemscope itemtype="https://schema.org/Person">
40 <?php $author = $item->created_by_alias ?: $item->author; ?>
41 <?php $author = '<span itemprop="name">' . $author . '</span>'; ?>
42 <?php if (!empty($item->contact_link) && $params->get('link_author') == true) : ?>
43 <?php echo JText::sprintf('COM_CONTENT_CUSTOM_WRITTEN_BY', JHtml::_('link', $this->item->contact_link, $author, array('itemprop' => 'url'))); ?>
44 <?php else : ?>
45 <?php echo JText::sprintf('COM_CONTENT_CUSTOM_WRITTEN_BY', $author); ?>
46 <?php endif; ?>
47 </div>
48 <?php endif; ?>
49 </div>
50 <?php $useDefList = ($params->get('show_modify_date') || $params->get('show_publish_date') || $params->get('show_create_date')
51 || $params->get('show_hits') || $params->get('show_category') || $params->get('show_parent_category')); ?>
52 <?php if ($useDefList && ($info == 0 || $info == 2)) : ?>
53 <div class="article-info muted">
54 <dl class="article-info">
55 <dt class="article-info-term">
56 <?php echo JText::_('COM_CONTENT_CUSTOM_ARTICLE_INFO'); ?>
57 </dt>
58
59 <?php if ($params->get('show_parent_category') && !empty($item->parent_slug)) : ?>
60 <dd>
61 <div class="parent-category-name">
62 <?php $title = $this->escape($item->parent_title); ?>
63 <?php if ($params->get('link_parent_category') && !empty($item->parent_slug)) : ?>
64 <?php $url = '<a href="' . JRoute::_(ContentCustomHelperRoute::getCategoryRoute($item->parent_slug)) . '" itemprop="genre">' . $title . '</a>'; ?>
65 <?php echo JText::sprintf('COM_CONTENT_CUSTOM_PARENT', $url); ?>
66 <?php else : ?>
67 <?php echo JText::sprintf('COM_CONTENT_CUSTOM_PARENT', '<span itemprop="genre">' . $title . '</span>'); ?>
68 <?php endif; ?>
69 </div>
70 </dd>
71 <?php endif; ?>
72 <?php if ($params->get('show_category')) : ?>
73 <dd>
74 <div class="category-name">
75 <?php $title = $this->escape($item->category_title); ?>
76 <?php if ($params->get('link_category') && $item->catslug) : ?>
77 <?php $url = '<a href="' . JRoute::_(ContentCustomHelperRoute::getCategoryRoute($item->catslug)) . '" itemprop="genre">' . $title . '</a>'; ?>
78 <?php echo JText::sprintf('COM_CONTENT_CUSTOM_CATEGORY', $url); ?>
79 <?php else : ?>
80 <?php echo JText::sprintf('COM_CONTENT_CUSTOM_CATEGORY', '<span itemprop="genre">' . $title . '</span>'); ?>
81 <?php endif; ?>
82 </div>
83 </dd>
84 <?php endif; ?>
85
86 <?php if ($params->get('show_publish_date')) : ?>
87 <dd>
88 <div class="published">
89 <span class="icon-calendar" aria-hidden="true"></span>
90 <time datetime="<?php echo JHtml::_('date', $item->publish_up, 'c'); ?>" itemprop="datePublished">
91 <?php echo JText::sprintf('COM_CONTENT_CUSTOM_PUBLISHED_DATE_ON', JHtml::_('date', $item->publish_up, JText::_('DATE_FORMAT_LC3'))); ?>
92 </time>
93 </div>
94 </dd>
95 <?php endif; ?>
96
97 <?php if ($info == 0) : ?>
98 <?php if ($params->get('show_modify_date')) : ?>
99 <dd>
100 <div class="modified">
101 <span class="icon-calendar" aria-hidden="true"></span>
102 <time datetime="<?php echo JHtml::_('date', $item->modified, 'c'); ?>" itemprop="dateModified">
103 <?php echo JText::sprintf('COM_CONTENT_CUSTOM_LAST_UPDATED', JHtml::_('date', $item->modified, JText::_('DATE_FORMAT_LC3'))); ?>
104 </time>
105 </div>
106 </dd>
107 <?php endif; ?>
108 <?php if ($params->get('show_create_date')) : ?>
109 <dd>
110 <div class="create">
111 <span class="icon-calendar" aria-hidden="true"></span>
112 <time datetime="<?php echo JHtml::_('date', $item->created, 'c'); ?>" itemprop="dateCreated">
113 <?php echo JText::sprintf('COM_CONTENT_CUSTOM_CREATED_DATE_ON', JHtml::_('date', $item->created, JText::_('DATE_FORMAT_LC3'))); ?>
114 </time>
115 </div>
116 </dd>
117 <?php endif; ?>
118
119 <?php if ($params->get('show_hits')) : ?>
120 <dd>
121 <div class="hits">
122 <span class="icon-eye-open"></span>
123 <meta itemprop="interactionCount" content="UserPageVisits:<?php echo $item->hits; ?>" />
124 <?php echo JText::sprintf('COM_CONTENT_CUSTOM_ARTICLE_HITS', $item->hits); ?>
125 </div>
126 </dd>
127 <?php endif; ?>
128 <?php endif; ?>
129 </dl>
130 </div>
131 <?php endif; ?>
132
133 <?php // Content is generated by content plugin event "onContentBeforeDisplay" ?>
134 <?php echo $item->event->beforeDisplayContent; ?>
135 <?php if ($params->get('show_intro')) : ?>
136 <div class="intro" itemprop="articleBody"> <?php echo JHtml::_('string.truncateComplex', $item->introtext, $params->get('introtext_limit')); ?> </div>
137 <?php endif; ?>
138
139 <?php if ($useDefList && ($info == 1 || $info == 2)) : ?>
140 <div class="article-info muted">
141 <dl class="article-info">
142 <dt class="article-info-term"><?php echo JText::_('COM_CONTENT_CUSTOM_ARTICLE_INFO'); ?></dt>
143
144 <?php if ($info == 1) : ?>
145 <?php if ($params->get('show_parent_category') && !empty($item->parent_slug)) : ?>
146 <dd>
147 <div class="parent-category-name">
148 <?php $title = $this->escape($item->parent_title); ?>
149 <?php if ($params->get('link_parent_category') && $item->parent_slug) : ?>
150 <?php $url = '<a href="' . JRoute::_(ContentCustomHelperRoute::getCategoryRoute($item->parent_slug)) . '" itemprop="genre">' . $title . '</a>'; ?>
151 <?php echo JText::sprintf('COM_CONTENT_CUSTOM_PARENT', $url); ?>
152 <?php else : ?>
153 <?php echo JText::sprintf('COM_CONTENT_CUSTOM_PARENT', '<span itemprop="genre">' . $title . '</span>'); ?>
154 <?php endif; ?>
155 </div>
156 </dd>
157 <?php endif; ?>
158 <?php if ($params->get('show_category')) : ?>
159 <dd>
160 <div class="category-name">
161 <?php $title = $this->escape($item->category_title); ?>
162 <?php if ($params->get('link_category') && $item->catslug) : ?>
163 <?php $url = '<a href="' . JRoute::_(ContentCustomHelperRoute::getCategoryRoute($item->catslug)) . '" itemprop="genre">' . $title . '</a>'; ?>
164 <?php echo JText::sprintf('COM_CONTENT_CUSTOM_CATEGORY', $url); ?>
165 <?php else : ?>
166 <?php echo JText::sprintf('COM_CONTENT_CUSTOM_CATEGORY', '<span itemprop="genre">' . $title . '</span>'); ?>
167 <?php endif; ?>
168 </div>
169 </dd>
170 <?php endif; ?>
171 <?php if ($params->get('show_publish_date')) : ?>
172 <dd>
173 <div class="published">
174 <span class="icon-calendar" aria-hidden="true"></span>
175 <time datetime="<?php echo JHtml::_('date', $item->publish_up, 'c'); ?>" itemprop="datePublished">
176 <?php echo JText::sprintf('COM_CONTENT_CUSTOM_PUBLISHED_DATE_ON', JHtml::_('date', $item->publish_up, JText::_('DATE_FORMAT_LC3'))); ?>
177 </time>
178 </div>
179 </dd>
180 <?php endif; ?>
181 <?php endif; ?>
182
183 <?php if ($params->get('show_create_date')) : ?>
184 <dd>
185 <div class="create">
186 <span class="icon-calendar" aria-hidden="true"></span>
187 <time datetime="<?php echo JHtml::_('date', $item->created, 'c'); ?>" itemprop="dateCreated">
188 <?php echo JText::sprintf('COM_CONTENT_CUSTOM_CREATED_DATE_ON', JHtml::_('date', $item->modified, JText::_('DATE_FORMAT_LC3'))); ?>
189 </time>
190 </div>
191 </dd>
192 <?php endif; ?>
193 <?php if ($params->get('show_modify_date')) : ?>
194 <dd>
195 <div class="modified">
196 <span class="icon-calendar" aria-hidden="true"></span>
197 <time datetime="<?php echo JHtml::_('date', $item->modified, 'c'); ?>" itemprop="dateModified">
198 <?php echo JText::sprintf('COM_CONTENT_CUSTOM_LAST_UPDATED', JHtml::_('date', $item->modified, JText::_('DATE_FORMAT_LC3'))); ?>
199 </time>
200 </div>
201 </dd>
202 <?php endif; ?>
203 <?php if ($params->get('show_hits')) : ?>
204 <dd>
205 <div class="hits">
206 <span class="icon-eye-open"></span>
207 <meta content="UserPageVisits:<?php echo $item->hits; ?>" itemprop="interactionCount" />
208 <?php echo JText::sprintf('COM_CONTENT_CUSTOM_ARTICLE_HITS', $item->hits); ?>
209 </div>
210 </dd>
211 <?php endif; ?>
212 </dl>
213 </div>
214 <?php endif; ?>
215 <?php // Content is generated by content plugin event "onContentAfterDisplay" ?>
216 <?php echo $item->event->afterDisplayContent; ?>
217 </div>
218 <?php endforeach; ?>
219 </div>
220 <div class="pagination">
221 <p class="counter pull-right"> <?php echo $this->pagination->getPagesCounter(); ?> </p>
222 <?php echo $this->pagination->getPagesLinks(); ?>
223 </div>
1 <?php
2 /**
3 * @package Joomla.Site
4 * @subpackage com_conten_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 /**
13 * HTML View class for the Content component
14 *
15 * @since 1.5
16 */
17 class ContentViewArchive extends JViewLegacy
18 {
19 protected $state = null;
20
21 protected $item = null;
22
23 protected $items = null;
24
25 protected $pagination = null;
26
27 /**
28 * Execute and display a template script.
29 *
30 * @param string $tpl The name of the template file to parse; automatically searches through the template paths.
31 *
32 * @return mixed A string if successful, otherwise an Error object.
33 */
34 public function display($tpl = null)
35 {
36 $user = JFactory::getUser();
37 $state = $this->get('State');
38 $items = $this->get('Items');
39 $pagination = $this->get('Pagination');
40
41 // Flag indicates to not add limitstart=0 to URL
42 $pagination->hideEmptyLimitstart = true;
43
44 // Get the page/component configuration
45 $params = &$state->params;
46
47 JPluginHelper::importPlugin('content_custom');
48
49 foreach ($items as $item)
50 {
51 $item->catslug = $item->category_alias ? ($item->catid . ':' . $item->category_alias) : $item->catid;
52 $item->parent_slug = $item->parent_alias ? ($item->parent_id . ':' . $item->parent_alias) : $item->parent_id;
53
54 // No link for ROOT category
55 if ($item->parent_alias === 'root')
56 {
57 $item->parent_slug = null;
58 }
59
60 $item->event = new stdClass;
61
62 $dispatcher = JEventDispatcher::getInstance();
63
64 // Old plugins: Ensure that text property is available
65 if (!isset($item->text))
66 {
67 $item->text = $item->introtext;
68 }
69
70 $dispatcher->trigger('onContentPrepare', array ('com_content_custom.archive', &$item, &$item->params, 0));
71
72 // Old plugins: Use processed text as introtext
73 $item->introtext = $item->text;
74
75 $results = $dispatcher->trigger('onContentAfterTitle', array('com_content_custom.archive', &$item, &$item->params, 0));
76 $item->event->afterDisplayTitle = trim(implode("\n", $results));
77
78 $results = $dispatcher->trigger('onContentBeforeDisplay', array('com_content_custom.archive', &$item, &$item->params, 0));
79 $item->event->beforeDisplayContent = trim(implode("\n", $results));
80
81 $results = $dispatcher->trigger('onContentAfterDisplay', array('com_content_custom.archive', &$item, &$item->params, 0));
82 $item->event->afterDisplayContent = trim(implode("\n", $results));
83 }
84
85 $this->filter = $state->get('list.filter');
86 $this->items = &$items;
87 $this->params = &$params;
88 $this->user = &$user;
89 $this->pagination = &$pagination;
90 $this->pagination->setAdditionalUrlParam('month', $state->get('filter.month'));
91 $this->pagination->setAdditionalUrlParam('year', $state->get('filter.year'));
92
93 $this->_prepareDocument();
94
95 parent::display($tpl);
96 }
97
98 /**
99 * Prepares the document
100 *
101 * @return void
102 */
103 protected function _prepareDocument()
104 {
105 $app = JFactory::getApplication();
106 $menus = $app->getMenu();
107 $title = null;
108
109 // Because the application sets a default page title,
110 // we need to get it from the menu item itself
111 $menu = $menus->getActive();
112
113 if ($menu)
114 {
115 $this->params->def('page_heading', $this->params->get('page_title', $menu->title));
116 }
117 else
118 {
119 $this->params->def('page_heading', JText::_('JGLOBAL_ARTICLES'));
120 }
121
122 $title = $this->params->get('page_title', '');
123
124 if (empty($title))
125 {
126 $title = $app->get('sitename');
127 }
128 elseif ($app->get('sitename_pagetitles', 0) == 1)
129 {
130 $title = JText::sprintf('JPAGETITLE', $app->get('sitename'), $title);
131 }
132 elseif ($app->get('sitename_pagetitles', 0) == 2)
133 {
134 $title = JText::sprintf('JPAGETITLE', $title, $app->get('sitename'));
135 }
136
137 $this->document->setTitle($title);
138
139 if ($this->params->get('menu-meta_description'))
140 {
141 $this->document->setDescription($this->params->get('menu-meta_description'));
142 }
143
144 if ($this->params->get('menu-meta_keywords'))
145 {
146 $this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords'));
147 }
148
149 if ($this->params->get('robots'))
150 {
151 $this->document->setMetadata('robots', $this->params->get('robots'));
152 }
153 }
154 }
1 # 月次アーカイブ用モジュール
2 公開状態になっている記事を含むカレンダー月の一覧を表示します。公開状態になっている記事を作成すると、この一覧は自動的に生成されます。
3 インストールしていない場合は、管理画面よりインストールする必要があります。
4
5 ## インストール手順
6 1. 管理画面ログイン
7 2. エクステンション配下の管理を選択
8 3. (フォルダからインストール)を選択
9 4. フォームにインストールするモジュールまたは、コンポーネントのフォルダを指定(例:/var/www/html/src/com/com_hoge)
10 5. チェックしてインストール
...\ No newline at end of file ...\ No newline at end of file
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_ARCHIVE_CUSTOM="Articles - Archived - custom"
7 MOD_ARTICLES_ARCHIVE_CUSTOM_FIELD_COUNT_LABEL="# of Months"
8 MOD_ARTICLES_ARCHIVE_CUSTOM_FIELD_COUNT_DESC="The number of months to display (the default is 10)."
9 MOD_ARTICLES_ARCHIVE_CUSTOM_XML_DESCRIPTION="Display a list of calendar months, including published articles. This list is automatically generated when you create a published article."
10 MOD_ARTICLES_ARCHIVE_CUSTOM_DATE="%1$s, %2$s"
...\ No newline at end of file ...\ No newline at end of file
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_ARCHIVE_CUSTOM="Articles - Archived - custom"
7 MOD_ARTICLES_ARCHIVE_CUSTOM_XML_DESCRIPTION="Display a list of calendar months, including published articles. This list is automatically generated when you create a published article."
8 MOD_ARTICLES_ARCHIVE_CUSTOM_LAYOUT_DEFAULT="Default"
...\ No newline at end of file ...\ No newline at end of file
1 <?php
2 /**
3 * @package Joomla.Site
4 * @subpackage mod_articles_archive
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 /**
13 * Helper for mod_articles_archive
14 *
15 * @since 1.5
16 */
17 class ModArchiveHelper
18 {
19 /**
20 * Retrieve list of archived articles
21 *
22 * @param \Joomla\Registry\Registry &$params module parameters
23 *
24 * @return array
25 *
26 * @since 1.5
27 */
28 public static function getList(&$params)
29 {
30 // Get database
31 $db = JFactory::getDbo();
32 $query = $db->getQuery(true);
33 $query->select($query->month($db->quoteName('created')) . ' AS created_month')
34 ->select('MIN(' . $db->quoteName('created') . ') AS created')
35 ->select($query->year($db->quoteName('created')) . ' AS created_year')
36 ->from('#__content')
37 ->where('state = 1')
38 ->group($query->year($db->quoteName('created')) . ', ' . $query->month($db->quoteName('created')))
39 ->order($query->year($db->quoteName('created')) . ' DESC, ' . $query->month($db->quoteName('created')) . ' DESC');
40
41 // Filter by language
42 if (JFactory::getApplication()->getLanguageFilter())
43 {
44 $query->where('language in (' . $db->quote(JFactory::getLanguage()->getTag()) . ',' . $db->quote('*') . ')');
45 }
46
47 $db->setQuery($query, 0, (int) $params->get('count'));
48
49 try
50 {
51 $rows = (array) $db->loadObjectList();
52 }
53 catch (RuntimeException $e)
54 {
55 JFactory::getApplication()->enqueueMessage(JText::_('JERROR_AN_ERROR_HAS_OCCURRED'), 'error');
56
57 return array();
58 }
59
60 $app = JFactory::getApplication();
61 $menu = $app->getMenu();
62 $item = $menu->getItems('link', 'index.php?option=com_content_custom&view=archive', true);
63 $itemid = (isset($item) && !empty($item->id)) ? '&Itemid=' . $item->id : '';
64
65 $i = 0;
66 $lists = array();
67
68 foreach ($rows as $row)
69 {
70 $date = JFactory::getDate($row->created);
71
72 $createdMonth = $date->format('n');
73 $createdYear = $date->format('Y');
74
75 $createdYearCal = JHtml::_('date', $row->created, 'Y') . "年";
76 $monthNameCal = JHtml::_('date', $row->created, 'F');
77 $createdDateCal = $createdYearCal . $monthNameCal;
78
79 $lists[$i] = new stdClass;
80
81 $lists[$i]->link = JRoute::_('index.php?option=com_content_custom&view=archive&year=' . $createdYear . '&month=' . $createdMonth . $itemid);
82 $lists[$i]->text = JText::sprintf($createdDateCal);
83
84 $i++;
85 }
86
87 return $lists;
88 }
89 }
...\ No newline at end of file ...\ No newline at end of file
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_ARCHIVE_CUSTOM="カスタムアーカイブ(モジュール)"
7 MOD_ARTICLES_ARCHIVE_CUSTOM_FIELD_COUNT_LABEL="表示月数"
8 MOD_ARTICLES_ARCHIVE_CUSTOM_FIELD_COUNT_DESC="表示する月数(標準は10)です。"
9 MOD_ARTICLES_ARCHIVE_CUSTOM_XML_DESCRIPTION="公開状態になっている記事を含むカレンダー月の一覧を表示します。公開状態になっている記事を作成すると、この一覧は自動的に生成されます。"
10 MOD_ARTICLES_ARCHIVE_CUSTOM_DATE="%1$s, %2$s"
...\ No newline at end of file ...\ No newline at end of file
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_ARCHIVE_CUSTOM="カスタムアーカイブ(モジュール)"
7 MOD_ARTICLES_ARCHIVE_CUSTOM_XML_DESCRIPTION="公開状態になっている記事を含むカレンダー月の一覧を表示します。公開状態になっている記事を作成すると、この一覧は自動的に生成されます。"
8 MOD_ARTICLES_ARCHIVE_CUSTOM_LAYOUT_DEFAULT="標準"
...\ No newline at end of file ...\ No newline at end of file
1 <?php
2 /**
3 * @package Joomla.Site
4 * @subpackage mod_articles_archive
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 archive functions only once
13 JLoader::register('ModArchiveHelper', __DIR__ . '/helper.php');
14
15 $params->def('count', 10);
16 $moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx'), ENT_COMPAT, 'UTF-8');
17 $list = ModArchiveHelper::getList($params);
18
19 require JModuleHelper::getLayoutPath('mod_articles_archive_custom', $params->get('layout', 'default'));
...\ No newline at end of file ...\ No newline at end of file
1 <?xml version="1.0" encoding="utf-8"?>
2 <extension type="module" version="3.1" client="site" method="upgrade">
3 <name>MOD_ARTICLES_ARCHIVE_CUSTOM</name>
4 <author>T.Tokudome</author>
5 <creationDate>June 2020</creationDate>
6 <copyright></copyright>
7 <license></license>
8 <authorEmail>tokudome@lilli.co.jp</authorEmail>
9 <authorUrl></authorUrl>
10 <version>0.0.1</version>
11 <description>MOD_ARTICLES_ARCHIVE_CUSTOM_XML_DESCRIPTION</description>
12 <files>
13 <filename module="mod_articles_archive_custom">mod_articles_archive_custom.php</filename>
14 <folder>tmpl</folder>
15 <filename>helper.php</filename>
16 </files>
17 <languages>
18 <language tag="en-GB">en-GB.mod_articles_archive_custom.ini</language>
19 <language tag="en-GB">en-GB.mod_articles_archive_custom.sys.ini</language>
20 <language tag="ja-JP">ja-JP.mod_articles_archive_custom.ini</language>
21 <language tag="ja-JP">ja-JP.mod_articles_archive_custom.sys.ini</language>
22 </languages>
23 <help key="JHELP_EXTENSIONS_MODULE_MANAGER_ARTICLES_ARCHIVE" />
24 <config>
25 <fields name="params">
26 <fieldset name="basic">
27 <field
28 name="count"
29 type="number"
30 label="MOD_ARTICLES_ARCHIVE_CUSTOM_FIELD_COUNT_LABEL"
31 description="MOD_ARTICLES_ARCHIVE_CUSTOM_FIELD_COUNT_DESC"
32 default="120"
33 filter="integer"
34 />
35 </fieldset>
36
37 <fieldset name="advanced">
38 <field
39 name="layout"
40 type="modulelayout"
41 label="JFIELD_ALT_LAYOUT_LABEL"
42 description="JFIELD_ALT_MODULE_LAYOUT_DESC"
43 />
44
45 <field
46 name="moduleclass_sfx"
47 type="textarea"
48 label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL"
49 description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC"
50 rows="3"
51 />
52
53 <field
54 name="cache"
55 type="list"
56 label="COM_MODULES_FIELD_CACHING_LABEL"
57 description="COM_MODULES_FIELD_CACHING_DESC"
58 default="1"
59 filter="integer"
60 >
61 <option value="1">JGLOBAL_USE_GLOBAL</option>
62 <option value="0">COM_MODULES_FIELD_VALUE_NOCACHING</option>
63 </field>
64
65 <field
66 name="cache_time"
67 type="number"
68 label="COM_MODULES_FIELD_CACHE_TIME_LABEL"
69 description="COM_MODULES_FIELD_CACHE_TIME_DESC"
70 default="900"
71 filter="integer"
72 />
73
74 <field
75 name="cachemode"
76 type="hidden"
77 default="static"
78 >
79 <option value="static"></option>
80 </field>
81 </fieldset>
82 </fields>
83 </config>
84 </extension>
...\ No newline at end of file ...\ No newline at end of file
1 <?php
2 /**
3 * @package Joomla.Site
4 * @subpackage mod_articles_archive
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 <?php if (!empty($list)) : ?>
13 <ul class="archive-module-custom<?php echo $moduleclass_sfx; ?> mod-list">
14 <?php foreach ($list as $item) : ?>
15 <li>
16 <a href="<?php echo $item->link; ?>">
17 <?php echo $item->text; ?>
18 </a>
19 </li>
20 <?php endforeach; ?>
21 </ul>
22 <?php endif; ?>
...@@ -62,7 +62,8 @@ a.outlink { ...@@ -62,7 +62,8 @@ a.outlink {
62 color: #009fa8; 62 color: #009fa8;
63 } 63 }
64 .item-page h4 a, 64 .item-page h4 a,
65 .blog h4 a { 65 .blog h4 a,
66 .archive-custom h4 a {
66 background: url(../images/bg_arrow01.png) no-repeat left 4px; 67 background: url(../images/bg_arrow01.png) no-repeat left 4px;
67 min-height: 20px; 68 min-height: 20px;
68 padding-left: 25px; 69 padding-left: 25px;
...@@ -75,7 +76,11 @@ a.outlink { ...@@ -75,7 +76,11 @@ a.outlink {
75 .blog h4 a:link, 76 .blog h4 a:link,
76 .blog h4 a:active, 77 .blog h4 a:active,
77 .blog h4 a:hover, 78 .blog h4 a:hover,
78 .blog h4 a:visited { 79 .blog h4 a:visited,
80 .archive-custom h4 a:link,
81 .archive-custom h4 a:active,
82 .archive-custom h4 a:hover,
83 .archive-custom h4 a:visited {
79 color: #fff !important; 84 color: #fff !important;
80 } 85 }
81 .sp, .sp_gnavi { 86 .sp, .sp_gnavi {
...@@ -88,7 +93,8 @@ a.outlink { ...@@ -88,7 +93,8 @@ a.outlink {
88 display: none; 93 display: none;
89 } 94 }
90 .item-page .icons, 95 .item-page .icons,
91 .blog .icons { 96 .blog .icons,
97 .archive-custom .icons {
92 /*display: none;*/ 98 /*display: none;*/
93 } 99 }
94 table { 100 table {
...@@ -274,6 +280,7 @@ h1, h2, h3, h4, h5, h6, .site-title { ...@@ -274,6 +280,7 @@ h1, h2, h3, h4, h5, h6, .site-title {
274 line-height: 1; 280 line-height: 1;
275 margin: 0; 281 margin: 0;
276 } 282 }
283 /* 記述エラーで機能していないため、コメントアウト
277 .item-page h2, 284 .item-page h2,
278 .item-page h3, 285 .item-page h3,
279 .item-page h4, 286 .item-page h4,
...@@ -284,16 +291,23 @@ h1, h2, h3, h4, h5, h6, .site-title { ...@@ -284,16 +291,23 @@ h1, h2, h3, h4, h5, h6, .site-title {
284 .blog h4, 291 .blog h4,
285 .blog h5, 292 .blog h5,
286 293
294 .archive-custom h2,
295 .archive-custom h3,
296 .archive-custom h4,
297 .archive-custom h5,
298
287 #content h2, 299 #content h2,
288 #content h3, 300 #content h3,
289 #content h4, 301 #content h4,
290 #content h5, { 302 #content h5, {
291 line-height: 1.3; 303 line-height: 1.3;
292 } 304 } */
293 .item-page h2, 305 .item-page h2,
294 body.com_monthlyarchive h2, 306 body.com_monthlyarchive h2,
295 .blog .page-header h2, 307 .blog .page-header h2,
296 .blog h2 { 308 .blog h2,
309 .archive-custom .page-header h2,
310 .archive-custom h2 {
297 font-size: 150%; 311 font-size: 150%;
298 color: #222; 312 color: #222;
299 font-weight: normal; 313 font-weight: normal;
...@@ -305,7 +319,7 @@ body.com_monthlyarchive h2, ...@@ -305,7 +319,7 @@ body.com_monthlyarchive h2,
305 .uk-scope .uk-margin-top { 319 .uk-scope .uk-margin-top {
306 margin-top: 9px !important; 320 margin-top: 9px !important;
307 } 321 }
308 #content h3, .item-page h3, .blog h3 { 322 #content h3, .item-page h3, .blog h3, .archive-custom h3 {
309 border-left: 5px solid #003894; 323 border-left: 5px solid #003894;
310 font-size: 130%; 324 font-size: 130%;
311 font-weight: normal; 325 font-weight: normal;
...@@ -314,7 +328,7 @@ body.com_monthlyarchive h2, ...@@ -314,7 +328,7 @@ body.com_monthlyarchive h2,
314 margin-top: 20px; 328 margin-top: 20px;
315 padding: 10px 0 10px 15px; 329 padding: 10px 0 10px 15px;
316 } 330 }
317 .item-page h4, .blog h4 { 331 .item-page h4, .blog h4, .archive-custom h4 {
318 background-color: #00857F; 332 background-color: #00857F;
319 color: #fff; 333 color: #fff;
320 font-size: 110%; 334 font-size: 110%;
...@@ -323,7 +337,7 @@ body.com_monthlyarchive h2, ...@@ -323,7 +337,7 @@ body.com_monthlyarchive h2,
323 margin-top: 50px; 337 margin-top: 50px;
324 padding: 7px 10px; 338 padding: 7px 10px;
325 } 339 }
326 .item-page h5, .blog h5 { 340 .item-page h5, .blog h5, .archive-custom h5 {
327 font-size: 120%; 341 font-size: 120%;
328 font-weight: normal; 342 font-weight: normal;
329 background: url(../images/bg_h5.png) no-repeat left center; 343 background: url(../images/bg_h5.png) no-repeat left center;
...@@ -540,14 +554,19 @@ div.search input.button { ...@@ -540,14 +554,19 @@ div.search input.button {
540 554
541 .blog .subnavi01 ol, 555 .blog .subnavi01 ol,
542 .blog .subnavi01 ul, 556 .blog .subnavi01 ul,
543 .blog .subnavi01 ul.style01 { 557 .blog .subnavi01 ul.style01,
558 .archive-custom .subnavi01 ol,
559 .archive-custom .subnavi01 ul,
560 .archive-custom .subnavi01 ul.style01 {
544 overflow: hidden; 561 overflow: hidden;
545 margin: 0; 562 margin: 0;
546 } 563 }
547 .item-page .subnavi01 ol li, 564 .item-page .subnavi01 ol li,
548 .item-page .subnavi01 ul li, 565 .item-page .subnavi01 ul li,
549 .blog .subnavi01 ol li, 566 .blog .subnavi01 ol li,
550 .blog .subnavi01 ul li { 567 .blog .subnavi01 ul li,
568 .archive-custom.subnavi01 ol li,
569 .archive-custom .subnavi01 ul li {
551 float: left; 570 float: left;
552 list-style-type: none; 571 list-style-type: none;
553 width: 33.3%; 572 width: 33.3%;
...@@ -559,24 +578,29 @@ div.search input.button { ...@@ -559,24 +578,29 @@ div.search input.button {
559 .item-page .subnavi01 ul.style01 li, 578 .item-page .subnavi01 ul.style01 li,
560 .item-page .subnavi01 ol.style01 li, 579 .item-page .subnavi01 ol.style01 li,
561 .blog .subnavi01 ul.style01 li, 580 .blog .subnavi01 ul.style01 li,
562 .blog .subnavi01 ol.style01 li { 581 .blog .subnavi01 ol.style01 li,
582 .archive-custom .subnavi01 ul.style01 li,
583 .archive-custom .subnavi01 ol.style01 li {
563 width: 50%; 584 width: 50%;
564 padding-right: 20px; 585 padding-right: 20px;
565 box-sizing: border-box; 586 box-sizing: border-box;
566 } 587 }
567 .item-page .subnavi01 ol.style01 li, 588 .item-page .subnavi01 ol.style01 li,
568 .blog .subnavi01 ol.style01 li { 589 .blog .subnavi01 ol.style01 li,
590 .archive-custom .subnavi01 ol.style01 li {
569 border: none; 591 border: none;
570 padding-bottom: inherit; 592 padding-bottom: inherit;
571 margin-bottom: 15px; 593 margin-bottom: 15px;
572 } 594 }
573 595
574 .item-page .subnavi01 ul.style02 li, 596 .item-page .subnavi01 ul.style02 li,
575 .blog .subnavi01 ul.style02 li { 597 .blog .subnavi01 ul.style02 li,
598 .archive-custom .subnavi01 ul.style02 li {
576 width: inherit; 599 width: inherit;
577 } 600 }
578 .item-page .subnavi01 ul.style03 li, 601 .item-page .subnavi01 ul.style03 li,
579 .blog .subnavi01 ul.style03 li { 602 .blog .subnavi01 ul.style03 li,
603 .archive-custom .subnavi01 ul.style03 li {
580 width: auto; 604 width: auto;
581 float: none; 605 float: none;
582 } 606 }
...@@ -1098,7 +1122,8 @@ div#n2-ss-64 .n2-ss-slide { ...@@ -1098,7 +1122,8 @@ div#n2-ss-64 .n2-ss-slide {
1098 overflow: hidden; 1122 overflow: hidden;
1099 } 1123 }
1100 .item-page #topinfo_twitarea h2, 1124 .item-page #topinfo_twitarea h2,
1101 .blog #topinfo_twitarea h2 { 1125 .blog #topinfo_twitarea h2,
1126 .archive-custom #topinfo_twitarea h2 {
1102 border: none; 1127 border: none;
1103 text-align: center; 1128 text-align: center;
1104 margin: 0 0 20px; 1129 margin: 0 0 20px;
...@@ -1476,7 +1501,8 @@ table.Cindex .ph { ...@@ -1476,7 +1501,8 @@ table.Cindex .ph {
1476 margin-bottom: 15px; 1501 margin-bottom: 15px;
1477 } 1502 }
1478 .item-page table.Cindex ul, 1503 .item-page table.Cindex ul,
1479 .blog table.Cindex ul{ 1504 .blog table.Cindex ul,
1505 .archive-custom table.Cindex ul {
1480 margin: 0; 1506 margin: 0;
1481 font-size: 90%; 1507 font-size: 90%;
1482 } 1508 }
...@@ -1529,7 +1555,8 @@ td.num01 { ...@@ -1529,7 +1555,8 @@ td.num01 {
1529 } 1555 }
1530 1556
1531 .item-page table ul, 1557 .item-page table ul,
1532 .blog table ul { 1558 .blog table ul,
1559 .archive-custom table ul {
1533 margin: 0 0 0 15px; 1560 margin: 0 0 0 15px;
1534 } 1561 }
1535 1562
...@@ -1576,16 +1603,19 @@ table.style01 th.group { ...@@ -1576,16 +1603,19 @@ table.style01 th.group {
1576 width: 12%; 1603 width: 12%;
1577 } 1604 }
1578 .item-page table.style01 ul li, 1605 .item-page table.style01 ul li,
1579 .blog table.style01 ul li { 1606 .blog table.style01 ul li,
1607 .archive-custom table.style01 ul li {
1580 list-style-type: none; 1608 list-style-type: none;
1581 margin: 0; 1609 margin: 0;
1582 } 1610 }
1583 .item-page table.style01 ul.mark, 1611 .item-page table.style01 ul.mark,
1584 .blog table.style01 ul.mark { 1612 .blog table.style01 ul.mark,
1613 .archive-custom table.style01 ul.mark {
1585 margin-left: 20px; 1614 margin-left: 20px;
1586 } 1615 }
1587 .item-page table.style01 ul.mark li, 1616 .item-page table.style01 ul.mark li,
1588 .blog table.style01 ul.mark li { 1617 .blog table.style01 ul.mark li,
1618 .archive-custom table.style01 ul.mark li {
1589 list-style-type: disc; 1619 list-style-type: disc;
1590 margin-bottom: 7px; 1620 margin-bottom: 7px;
1591 } 1621 }
...@@ -1696,33 +1726,40 @@ address .title { ...@@ -1696,33 +1726,40 @@ address .title {
1696 ul, ol { 1726 ul, ol {
1697 } 1727 }
1698 .item-page ul, .item-page ol, 1728 .item-page ul, .item-page ol,
1699 .blog ul, .blog ol { 1729 .blog ul, .blog ol,
1730 .archive-custom ul, .archive-custom ol {
1700 margin-bottom: 30px; 1731 margin-bottom: 30px;
1701 } 1732 }
1702 .item-page ul ul, .item-page ol ul, 1733 .item-page ul ul, .item-page ol ul,
1703 .item-page ul ol, .item-page ol ol, 1734 .item-page ul ol, .item-page ol ol,
1704 .blog ul ul, .blog ol ul, 1735 .blog ul ul, .blog ol ul,
1705 .blog ul ol, .blog ol ul { 1736 .blog ul ol, .blog ol ul,
1737 .archive-custom ul ul, .archive-custom ol ul,
1738 .archive-custom ul ol, .archive-custom ol ul {
1706 margin-left: 20px; 1739 margin-left: 20px;
1707 margin-top: 10px; 1740 margin-top: 10px;
1708 } 1741 }
1709 .item-page ul li, .item-page ol li, 1742 .item-page ul li, .item-page ol li,
1710 .blog ul li, .blog ol li { 1743 .blog ul li, .blog ol li,
1744 .archive-custom ul li, .archive-custom ol li {
1711 margin-bottom: 12px; 1745 margin-bottom: 12px;
1712 1746
1713 margin-bottom: 15px; 1747 margin-bottom: 15px;
1714 } 1748 }
1715 .item-page ul li, 1749 .item-page ul li,
1716 .blog ul li { 1750 .blog ul li,
1751 .archive-custom ul li {
1717 list-style-type: disc; 1752 list-style-type: disc;
1718 line-height: 1.5; 1753 line-height: 1.5;
1719 } 1754 }
1720 .item-page li ul 1755 .item-page li ul
1721 .blog li ul { 1756 .blog li ul,
1757 .archive-custom li ul {
1722 margin-top: 15px; 1758 margin-top: 15px;
1723 } 1759 }
1724 .item-page ul.kome, 1760 .item-page ul.kome,
1725 .blog ul.kome { 1761 .blog ul.kome,
1762 .archive-custom ul.kome {
1726 /*margin-left: 10px;*/ 1763 /*margin-left: 10px;*/
1727 } 1764 }
1728 .item-page ul.kome li, 1765 .item-page ul.kome li,
...@@ -1740,17 +1777,20 @@ ol li .title { ...@@ -1740,17 +1777,20 @@ ol li .title {
1740 padding-bottom: 5px; 1777 padding-bottom: 5px;
1741 } 1778 }
1742 .item-page ol.style01 li, 1779 .item-page ol.style01 li,
1743 .blog ol.style01 li { 1780 .blog ol.style01 li,
1781 .archive-custom ol.style01 li {
1744 border-bottom: 1px solid #b3caf0; 1782 border-bottom: 1px solid #b3caf0;
1745 padding-bottom: 10px; 1783 padding-bottom: 10px;
1746 margin-bottom: 20px; 1784 margin-bottom: 20px;
1747 } 1785 }
1748 .item-page ol.style01 li ul, 1786 .item-page ol.style01 li ul,
1749 .blog ol.style01 li ul { 1787 .blog ol.style01 li ul,
1788 .archive-custom ol.style01 li ul {
1750 margin-bottom: 0; 1789 margin-bottom: 0;
1751 } 1790 }
1752 .item-page ol.style01 li li, 1791 .item-page ol.style01 li li,
1753 .blog ol.style01 li li { 1792 .blog ol.style01 li li,
1793 .archive-custom ol.style01 li li {
1754 border: none; 1794 border: none;
1755 margin-bottom: 10px; 1795 margin-bottom: 10px;
1756 } 1796 }
...@@ -1921,7 +1961,8 @@ dl.article-info dd.create { ...@@ -1921,7 +1961,8 @@ dl.article-info dd.create {
1921 margin-bottom: 20px; 1961 margin-bottom: 20px;
1922 } 1962 }
1923 .item-page .bikoubox01 ul.kome, 1963 .item-page .bikoubox01 ul.kome,
1924 .blog .bikoubox01 ul.kome { 1964 .blog .bikoubox01 ul.kome,
1965 .archive-custom .bikoubox01 ul.kome {
1925 margin-left: 0; 1966 margin-left: 0;
1926 } 1967 }
1927 .bikoubox01 .title { 1968 .bikoubox01 .title {
...@@ -2103,7 +2144,13 @@ table.listimg td { ...@@ -2103,7 +2144,13 @@ table.listimg td {
2103 .blog .wrap_fac .subnavi02 ul li a:link, 2144 .blog .wrap_fac .subnavi02 ul li a:link,
2104 .blog .wrap_fac .subnavi02 ul li a:active, 2145 .blog .wrap_fac .subnavi02 ul li a:active,
2105 .blog .wrap_fac .subnavi02 ul li a:hover, 2146 .blog .wrap_fac .subnavi02 ul li a:hover,
2106 .blog .wrap_fac .subnavi02 ul li a:visited { 2147 .blog .wrap_fac .subnavi02 ul li a:visited,
2148
2149 .archive-custom .wrap_fac .subnavi02 ul li a,
2150 .archive-custom .wrap_fac .subnavi02 ul li a:link,
2151 .archive-custom .wrap_fac .subnavi02 ul li a:active,
2152 .archive-custom .wrap_fac .subnavi02 ul li a:hover,
2153 .archive-custom .wrap_fac .subnavi02 ul li a:visited {
2107 color: #333 !important; 2154 color: #333 !important;
2108 } 2155 }
2109 2156
...@@ -2211,7 +2258,8 @@ table.listimg td { ...@@ -2211,7 +2258,8 @@ table.listimg td {
2211 /*競技成績一覧ページ 2258 /*競技成績一覧ページ
2212 https://www.nifs-k.ac.jp/campus-life/activities/record.html 2259 https://www.nifs-k.ac.jp/campus-life/activities/record.html
2213 */ 2260 */
2214 body.itemid-795 .blog .cat-children { 2261 body.itemid-795 .blog .cat-children,
2262 body.itemid-795 .archive-custom .cat-children {
2215 display: none; 2263 display: none;
2216 } 2264 }
2217 2265
...@@ -2273,7 +2321,19 @@ body.itemid-795 .blog .cat-children { ...@@ -2273,7 +2321,19 @@ body.itemid-795 .blog .cat-children {
2273 .blog #wrap_sitemap a:link, 2321 .blog #wrap_sitemap a:link,
2274 .blog #wrap_sitemap a:active, 2322 .blog #wrap_sitemap a:active,
2275 .blog #wrap_sitemap a:hover, 2323 .blog #wrap_sitemap a:hover,
2276 .blog #wrap_sitemap a:visited { 2324 .blog #wrap_sitemap a:visited,
2325
2326 .archive-custom #wrap_sitemap ul li a,
2327 .archive-custom #wrap_sitemap ul li a:link,
2328 .archive-custom #wrap_sitemap ul li a:active,
2329 .archive-custom #wrap_sitemap ul li a:hover,
2330 .archive-custom #wrap_sitemap ul li a:visited,
2331
2332 .archive-custom #wrap_sitemap a,
2333 .archive-custom #wrap_sitemap a:link,
2334 .archive-custom #wrap_sitemap a:active,
2335 .archive-custom #wrap_sitemap a:hover,
2336 .archive-custom #wrap_sitemap a:visited {
2277 color: #003894; 2337 color: #003894;
2278 } 2338 }
2279 2339
...@@ -2351,17 +2411,20 @@ body.itemid-795 .blog .cat-children { ...@@ -2351,17 +2411,20 @@ body.itemid-795 .blog .cat-children {
2351 /* ------------------------------------------------------------------------- 2411 /* -------------------------------------------------------------------------
2352 ブログ系(information) 2412 ブログ系(information)
2353 ------------------------------------------------------------------------- */ 2413 ------------------------------------------------------------------------- */
2354 /*.blog .page-header h2 { 2414 /*.blog .page-header h2,
2415 .archive-custom .page-header h2 {
2355 margin-top: 30px; 2416 margin-top: 30px;
2356 font-size: 130%; 2417 font-size: 130%;
2357 padding-bottom: 17px; 2418 padding-bottom: 17px;
2358 padding-top: 17px; 2419 padding-top: 17px;
2359 }*/ 2420 }*/
2360 .blog a:link, .blog a:active, .blog a:hover, .blog a:visited { 2421 .blog a:link, .blog a:active, .blog a:hover, .blog a:visited,
2422 .archive-custom a:link, .archive-custom a:active, .archive-custom a:hover, .archive-custom a:visited {
2361 color: #009fa8; 2423 color: #009fa8;
2362 } 2424 }
2363 2425
2364 body.itemid-792 .blog .cat-children { 2426 body.itemid-792 .blog .cat-children,
2427 body.itemid-792 .archive-custom .cat-children {
2365 display: none; 2428 display: none;
2366 } 2429 }
2367 2430
...@@ -3040,12 +3103,14 @@ body.itemid-132 table { ...@@ -3040,12 +3103,14 @@ body.itemid-132 table {
3040 } 3103 }
3041 3104
3042 .item-page .subnavi01 ol li, .item-page .subnavi01 ul li, 3105 .item-page .subnavi01 ol li, .item-page .subnavi01 ul li,
3043 .blog .subnavi01 ol li, .blog .subnavi01 ul li { 3106 .blog .subnavi01 ol li, .blog .subnavi01 ul li,
3107 .archive-custom .subnavi01 ol li, .archive-custom .subnavi01 ul li {
3044 width: auto; 3108 width: auto;
3045 margin-right: 30px; 3109 margin-right: 30px;
3046 } 3110 }
3047 .item-page .subnavi01 ul.style01 li, .item-page .subnavi01 ol.style01 li, 3111 .item-page .subnavi01 ul.style01 li, .item-page .subnavi01 ol.style01 li,
3048 .blog .subnavi01 ul.style01 li, .blog .subnavi01 ol.style01 li { 3112 .blog .subnavi01 ul.style01 li, .blog .subnavi01 ol.style01 li,
3113 .archive-custom .subnavi01 ul.style01 li, .archive-custom .subnavi01 ol.style01 li {
3049 width: 100%; 3114 width: 100%;
3050 float: none; 3115 float: none;
3051 } 3116 }
...@@ -3187,7 +3252,7 @@ body.itemid-132 table { ...@@ -3187,7 +3252,7 @@ body.itemid-132 table {
3187 } 3252 }
3188 3253
3189 /*見出し*/ 3254 /*見出し*/
3190 .item-page h2, body.com_monthlyarchive h2, .blog .page-header h2, .blog h2 { 3255 .item-page h2, body.com_monthlyarchive h2, .blog .page-header h2, .blog h2, .archive-custom .page-header h2, .archive-custom h2 {
3191 font-size: 130%; 3256 font-size: 130%;
3192 padding-bottom: 20px; 3257 padding-bottom: 20px;
3193 padding-top: 20px; 3258 padding-top: 20px;
...@@ -3272,12 +3337,12 @@ body.itemid-132 table { ...@@ -3272,12 +3337,12 @@ body.itemid-132 table {
3272 } 3337 }
3273 3338
3274 @media (max-width: 400px) { 3339 @media (max-width: 400px) {
3275 .item-page h2, .blog h2 { 3340 .item-page h2, .blog h2, .archive-custom h2 {
3276 font-size: 140%; 3341 font-size: 140%;
3277 padding-top: 20px; 3342 padding-top: 20px;
3278 padding-bottom: 20px; 3343 padding-bottom: 20px;
3279 } 3344 }
3280 .item-page h3, .blog h3 { 3345 .item-page h3, .blog h3, .archive-custom h3 {
3281 margin-bottom: 15px; 3346 margin-bottom: 15px;
3282 padding-left: 10px; 3347 padding-left: 10px;
3283 font-size: 120%; 3348 font-size: 120%;
...@@ -3362,5 +3427,35 @@ body.itemid-132 table { ...@@ -3362,5 +3427,35 @@ body.itemid-132 table {
3362 } 3427 }
3363 } 3428 }
3364 3429
3430 /* -------------------------------------------------------------------------
3431  app/modules/mod_articles_archive_custom/tmpl/default.phpのスタイルを変更
3432 ------------------------------------------------------------------------- */
3433 .archive-module-custom {
3434 height: 460px;
3435 overflow: auto;
3436 }
3365 3437
3438 #aside > .custom-archive-module {
3439 position: relative;
3440 }
3366 3441
3442 #aside > .custom-archive-module:after {
3443 content: ' ';
3444 position: absolute;
3445 bottom: 12px;
3446 left: calc(50% - 6px);
3447 display: block;
3448 width: 12px;
3449 height: 12px;
3450 border: 2px solid;
3451 border-color: transparent transparent #009fa8 #009fa8;
3452 transform: rotate(-45deg);
3453 opacity: 0.6;
3454 border-radius: 4px;
3455 }
3456
3457 @media (max-width: 980px) {
3458 #aside > .custom-archive-module:after {
3459 bottom: 47px;
3460 }
3461 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!