Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Articles Module #43738

Merged
merged 43 commits into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
ea0ab8f
First draft
drmenzelit Jul 2, 2024
6a4d6bc
Refactor introtext and exclude function, add include only function, c…
drmenzelit Jul 3, 2024
23b3fc3
Change parameters order
drmenzelit Jul 3, 2024
65eb95c
Change none heading
drmenzelit Jul 3, 2024
7846ca6
Change order of use
drmenzelit Jul 3, 2024
0b244d0
Lint css
drmenzelit Jul 3, 2024
3277bf7
Order of elements, corrected descriptions
drmenzelit Jul 3, 2024
039ed45
Changed name for layout, corrected PHPCS
drmenzelit Jul 3, 2024
227278f
Showon for info layout corrected
drmenzelit Jul 3, 2024
a382ca8
Merge branch '5.2-dev' into mod_articles
LadySolveig Jul 4, 2024
7097f14
Changed element for container-type
drmenzelit Jul 5, 2024
9a08f63
[Cypress] Fix api test for module types site
LadySolveig Jul 5, 2024
802a8e0
Merge pull request #37 from LadySolveig/cypress/mod-articles-pr43738
drmenzelit Jul 5, 2024
656bc31
Added fields descriptions, changed fields to list if not "yes/no" or …
drmenzelit Jul 6, 2024
b7ed36e
Spelling correction
drmenzelit Jul 7, 2024
554c9d4
Spelling correction
drmenzelit Jul 7, 2024
050c6d4
Details list as dl. Added icons. Refactored ArticlesHelper (removed H…
drmenzelit Jul 8, 2024
4cfd968
Merge branch '5.2-dev' into mod_articles
drmenzelit Jul 10, 2024
467790f
Merge branch '5.2-dev' into mod_articles
obuisard Jul 29, 2024
9027c59
Modified Blog Sample Data
drmenzelit Aug 8, 2024
206b919
Merge branch '5.2-dev' into mod_articles
drmenzelit Aug 8, 2024
7af2991
Correct indenting and layout line
drmenzelit Aug 8, 2024
988f3b2
PHPCS
drmenzelit Aug 8, 2024
0c3ebcf
Display article images only when introtext is not truncated
drmenzelit Aug 8, 2024
c31b4ed
Removed category link if card style, added card classes, corrected ar…
drmenzelit Aug 9, 2024
8fbff7d
Merge branch '5.2-dev' into mod_articles
drmenzelit Aug 13, 2024
72b0303
Merge branch '5.2-dev' into mod_articles
drmenzelit Aug 16, 2024
9113a5d
Update language/en-GB/mod_articles.ini
Hackwar Aug 17, 2024
a06704d
Merge branch '5.2-dev' into mod_articles
drmenzelit Aug 17, 2024
56845d4
Corrected display options
drmenzelit Aug 17, 2024
f1c3fcc
Merge branch '5.2-dev' into mod_articles
drmenzelit Aug 18, 2024
4662b96
Corrected caption for article full image
drmenzelit Aug 18, 2024
c993def
Correct name of the sql script
drmenzelit Aug 20, 2024
de33cc1
Modified query for image caption
drmenzelit Aug 21, 2024
de11924
Some code cleanups and improvements for layout (#38)
bembelimen Aug 24, 2024
440a856
Logic article image
drmenzelit Aug 24, 2024
b0b5c2a
Merge branch 'mod_articles' of github.com:drmenzelit/joomla-cms into …
drmenzelit Aug 24, 2024
9a4c317
phpcs
drmenzelit Aug 24, 2024
30a7ce8
Merge branch '5.2-dev' into mod_articles
QuyTon Aug 26, 2024
b694f88
Merge branch '5.2-dev' into mod_articles
QuyTon Aug 27, 2024
3b272c6
Merge branch '5.2-dev' into mod_articles
QuyTon Aug 28, 2024
24b6dba
Merge branch '5.2-dev' into mod_articles
QuyTon Aug 29, 2024
d884e10
Merge branch '5.2-dev' into mod_articles
Hackwar Aug 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-- Add mod_articles module
INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `locked`, `manifest_cache`, `params`, `custom_data`) VALUES
(0, 'mod_articles', 'module', 'mod_articles', '', 0, 1, 0, 0, 1, '', '', '');
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-- Add mod_articles module
INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "locked", "manifest_cache", "params", "custom_data", "ordering", "state") VALUES
(0, 'mod_articles', 'module', 'mod_articles', '', 0, 1, 0, 0, 1, '', '', '', 0, 0);
79 changes: 79 additions & 0 deletions build/media_source/mod_articles/css/mod-articles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
.mod-articles-item-card .mod-articles-link::before {
position: absolute;
z-index: 1;
content: "";
inset: 0;
}
.mod-articles-item-card {
position: relative;
}
.mod-articles-item-card:focus-within {
box-shadow: 0 0 0 var(--focus-ring-width) var(--focus-ring-color);
}
.mod-articles-item-card:focus-within :focus {
border: none;
outline: none;
box-shadow: none;
}
.mod-articles-item-card:hover {
box-shadow: 1px 1px 4px #0000001a;
}
.mod-articles-item {
display: flex;
flex-direction: column;
}
.mod-articles-item .mod-articles-item-content {
order: 1;
}
.mod-articles-image {
margin-bottom: .5rem;
}
@supports (container-type: inline-size) {
div:has(.mod-articles-grid),
section:has(.mod-articles-grid) {
container-type: inline-size;
}
}
.grid-cols-2 {
--grid-column-count: 2;
}
.grid-cols-3 {
--grid-column-count: 3;
}
.grid-cols-4 {
--grid-column-count: 4;
}
.mod-articles-grid {
--grid-layout-gap: 2rem;
--grid-item--min-width: 100px;
--gap-count: calc(var(--grid-column-count) - 1);
--total-gap-width: calc(var(--gap-count) * var(--grid-layout-gap));
--grid-item--max-width: calc((100% - var(--total-gap-width)) / var(--grid-column-count));

display: grid;
grid-template-columns: 1fr;
grid-gap: var(--grid-layout-gap);
}
@container (min-width: 768px) {
.mod-articles-grid {
grid-template-columns: 1fr 1fr;
}
}
@container (min-width: 992px) {
.mod-articles-grid {
grid-template-columns: repeat(auto-fill, minmax(max(var(--grid-item--min-width), var(--grid-item--max-width)), 1fr));
}
}

@supports not (container-type: inline-size) {
@media (min-width: 768px) {
.mod-articles-grid {
grid-template-columns: 1fr 1fr;
}
}
@media (min-width: 992px) {
.mod-articles-grid {
grid-template-columns: repeat(auto-fill, minmax(max(var(--grid-item--min-width), var(--grid-item--max-width)), 1fr));
}
}
}
3 changes: 2 additions & 1 deletion installation/sql/mysql/base.sql
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,8 @@ INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`,
(0, 'mod_articles_category', 'module', 'mod_articles_category', '', 0, 1, 1, 0, 1, '', '', ''),
(0, 'mod_articles_categories', 'module', 'mod_articles_categories', '', 0, 1, 1, 0, 1, '', '', ''),
(0, 'mod_languages', 'module', 'mod_languages', '', 0, 1, 1, 0, 1, '', '', ''),
(0, 'mod_finder', 'module', 'mod_finder', '', 0, 1, 0, 0, 1, '', '', '');
(0, 'mod_finder', 'module', 'mod_finder', '', 0, 1, 0, 0, 1, '', '', ''),
(0, 'mod_articles', 'module', 'mod_articles', '', 0, 1, 0, 0, 1, '', '', '');

-- Modules: Administrator
INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `locked`, `manifest_cache`, `params`, `custom_data`) VALUES
Expand Down
3 changes: 2 additions & 1 deletion installation/sql/postgresql/base.sql
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,8 @@ INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder",
(0, 'mod_articles_category', 'module', 'mod_articles_category', '', 0, 1, 1, 0, 1, '', '', '', 0, 0),
(0, 'mod_articles_categories', 'module', 'mod_articles_categories', '', 0, 1, 1, 0, 1, '', '', '', 0, 0),
(0, 'mod_languages', 'module', 'mod_languages', '', 0, 1, 1, 0, 1, '', '', '', 0, 0),
(0, 'mod_finder', 'module', 'mod_finder', '', 0, 1, 0, 0, 1, '', '', '', 0, 0);
(0, 'mod_finder', 'module', 'mod_finder', '', 0, 1, 0, 0, 1, '', '', '', 0, 0),
(0, 'mod_articles', 'module', 'mod_articles', '', 0, 1, 0, 0, 1, '', '', '', 0, 0);

-- Modules: Administrator
INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "locked", "manifest_cache", "params", "custom_data", "ordering", "state") VALUES
Expand Down
100 changes: 100 additions & 0 deletions language/en-GB/mod_articles.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
; Joomla! Project
; (C) 2024 Open Source Matters, Inc. <https://www.joomla.org>
; License GNU General Public License version 2 or later; see LICENSE.txt
; Note : All ini files need to be saved as UTF-8

MOD_ARTICLES="Articles"
MOD_ARTICLES_FIELD_ARTICLEGROUPINGDIR_LABEL="Grouping Direction"
MOD_ARTICLES_FIELD_ARTICLEGROUPING_LABEL="Article Grouping"
MOD_ARTICLES_FIELD_ARTICLEORDERINGDIR_LABEL="Ordering Direction"
MOD_ARTICLES_FIELD_ARTICLEORDERING_LABEL="Article Field to Order By"
MOD_ARTICLES_FIELD_AUTHORALIASFILTERING_LABEL="Author Alias Filtering Type"
MOD_ARTICLES_FIELD_AUTHORALIAS_LABEL="Author Aliases"
MOD_ARTICLES_FIELD_AUTHORFILTERING_LABEL="Author Filtering Type"
MOD_ARTICLES_FIELD_AUTHOR_LABEL="Authors"
MOD_ARTICLES_FIELD_CATDEPTH_LABEL="Category Depth"
MOD_ARTICLES_FIELD_CATFILTERINGTYPE_DESC="Include or exclude the selected categories."
MOD_ARTICLES_FIELD_CATFILTERINGTYPE_LABEL="Category Filtering Type"
MOD_ARTICLES_FIELD_COUNT_DESC="The number of items to display. The default value of 0 will display all articles."
MOD_ARTICLES_FIELD_COUNT_LABEL="Articles to Display"
MOD_ARTICLES_FIELD_DATEFIELDFORMAT_DESC="Please enter in a valid date format. See: https://php.net/date for formatting information."
MOD_ARTICLES_FIELD_DATEFIELDFORMAT_LABEL="Date Format"
MOD_ARTICLES_FIELD_DATEFIELD_LABEL="Date Field"
MOD_ARTICLES_FIELD_DATEFILTERING_LABEL="Date Filtering"
MOD_ARTICLES_FIELD_DATEGROUPINGFIELD_DESC="Select which date field you want the date grouping to be applied to."
MOD_ARTICLES_FIELD_DATEGROUPINGFIELD_LABEL="Date Grouping Field"
MOD_ARTICLES_FIELD_DATERANGEFIELD_LABEL="Date Range Field"
MOD_ARTICLES_FIELD_ENDDATE_LABEL="To Date"
MOD_ARTICLES_FIELD_EXCLUDEDARTICLES_LABEL="Article IDs to Exclude"
MOD_ARTICLES_FIELD_EXCLUDE_CURRENT_LABEL="Exclude Current Article"
MOD_ARTICLES_FIELD_GROUP_DISPLAY_LABEL="Display Options"
MOD_ARTICLES_FIELD_GROUP_FILTERING_LABEL="Filtering Options"
MOD_ARTICLES_FIELD_GROUP_GROUPING_LABEL="Grouping Options"
MOD_ARTICLES_FIELD_GROUP_ORDERING_LABEL="Ordering Options"
MOD_ARTICLES_FIELD_IMAGES_ARTICLE_LABEL="Show Intro/Full Image"
MOD_ARTICLES_FIELD_IMAGES_DESC="Show the images that are inside the text of the article."
MOD_ARTICLES_FIELD_IMAGES_LABEL="Show Article Images"
MOD_ARTICLES_FIELD_INCLUDEDARTICLES_LABEL="Article IDs to Include"
MOD_ARTICLES_FIELD_INFOLAYOUT_DESC="Layout for the Articles Info (Date, Hits, Category, Author)."
MOD_ARTICLES_FIELD_INFOLAYOUT_LABEL="Articles Info Layout"
MOD_ARTICLES_FIELD_INTROTEXTLIMIT_DESC="Truncate Introtext to a specified number of characters. Set to 0 to disable truncation."
MOD_ARTICLES_FIELD_INTROTEXTLIMIT_LABEL="Introtext Limit (characters)"
MOD_ARTICLES_FIELD_LAYOUT_COL_LABEL="Max. Number of Columns"
MOD_ARTICLES_FIELD_LAYOUT_DESC="Display articles vertical or horizontal."
Hackwar marked this conversation as resolved.
Show resolved Hide resolved
MOD_ARTICLES_FIELD_LAYOUT_HOR="Horizontal"
MOD_ARTICLES_FIELD_LAYOUT_LABEL="Layout"
MOD_ARTICLES_FIELD_LAYOUT_MULTILINE="Multiline"
MOD_ARTICLES_FIELD_LAYOUT_SINGLELINE="Single Line"
MOD_ARTICLES_FIELD_LAYOUT_VERT="Vertical"
MOD_ARTICLES_FIELD_LINKCARD_DESC="The whole article will be linked."
MOD_ARTICLES_FIELD_LINKCARD_LABEL="Card Style"
MOD_ARTICLES_FIELD_LINKTITLES_LABEL="Title Link"
MOD_ARTICLES_FIELD_MONTHYEARFORMAT_DESC="Please enter in a valid date format. See: https://php.net/date for formatting information."
MOD_ARTICLES_FIELD_MONTHYEARFORMAT_LABEL="Month and Year Display Format"
MOD_ARTICLES_FIELD_ONLYARCHIVED_LABEL="Archived Articles"
MOD_ARTICLES_FIELD_RELATIVEDATE_LABEL="Relative Date"
MOD_ARTICLES_FIELD_SHOWCATEGORYLINK_LABEL="Category Link"
MOD_ARTICLES_FIELD_SHOWCHILDCATEGORYARTICLES_DESC="Include or exclude articles in the child categories of the selected ones."
MOD_ARTICLES_FIELD_SHOWCHILDCATEGORYARTICLES_LABEL="Child Category Articles"
MOD_ARTICLES_FIELD_SHOWFEATURED_LABEL="Featured Articles"
MOD_ARTICLES_FIELD_SHOWHITS_LABEL="Hits"
MOD_ARTICLES_FIELD_SHOWINTROTEXT_LABEL="Introtext"
MOD_ARTICLES_FIELD_STARTDATE_LABEL="Start Date Range"
MOD_ARTICLES_FIELD_TITLEONLY_LABEL="Title Only (lists)"
MOD_ARTICLES_FIELD_TITLE_HEADING="Header Level"
MOD_ARTICLES_FIELD_TITLE_HEADING_NONE="None"
MOD_ARTICLES_FIELD_TITLE_LABEL="Article Title"
MOD_ARTICLES_INFO="Details"
MOD_ARTICLES_OPTION_ASCENDING_VALUE="Ascending"
MOD_ARTICLES_OPTION_CREATED_VALUE="Created Date"
MOD_ARTICLES_OPTION_DATERANGE_VALUE="Date Range"
MOD_ARTICLES_OPTION_DESCENDING_VALUE="Descending"
MOD_ARTICLES_OPTION_EXCLUDE_VALUE="Exclude"
MOD_ARTICLES_OPTION_EXCLUSIVE_VALUE="Exclusive"
MOD_ARTICLES_OPTION_FINISHPUBLISHING_VALUE="Finish Publishing Date"
MOD_ARTICLES_OPTION_FULLIMAGE="Full Image"
MOD_ARTICLES_OPTION_HITS_VALUE="Hits"
MOD_ARTICLES_OPTION_ID_VALUE="ID"
MOD_ARTICLES_OPTION_INCLUDE_VALUE="Include"
MOD_ARTICLES_OPTION_INCLUSIVE_VALUE="Inclusive"
MOD_ARTICLES_OPTION_INTROIMAGE="Intro Image"
MOD_ARTICLES_OPTION_MODIFIED_VALUE="Modified Date"
MOD_ARTICLES_OPTION_MONTHYEAR_VALUE="Month and Year"
MOD_ARTICLES_OPTION_NORMAL_VALUE="Normal"
MOD_ARTICLES_OPTION_OFF_VALUE="Off"
MOD_ARTICLES_OPTION_ONLYARCHIVEDHIDE_VALUE="None"
MOD_ARTICLES_OPTION_ONLYARCHIVEDSHOW_VALUE="Only"
MOD_ARTICLES_OPTION_ONLYFEATURED_VALUE="Only"
MOD_ARTICLES_OPTION_ORDERINGFEATURED_VALUE="Featured Articles Order"
MOD_ARTICLES_OPTION_ORDERING_VALUE="Article Order"
MOD_ARTICLES_OPTION_RANDOM_VALUE="Random"
MOD_ARTICLES_OPTION_RATING_VALUE="Rating"
MOD_ARTICLES_OPTION_RELATIVEDAY_VALUE="Relative Date"
MOD_ARTICLES_OPTION_STARTPUBLISHING_VALUE="Start Publishing Date"
MOD_ARTICLES_OPTION_VOTE_VALUE="Vote"
MOD_ARTICLES_OPTION_YEAR_VALUE="Year"
MOD_ARTICLES_READ_MORE="Read more: "
MOD_ARTICLES_READ_MORE_TITLE="Read More &hellip;"
MOD_ARTICLES_REGISTER_TO_READ_MORE="Register to read more"
MOD_ARTICLES_UNTAGGED="Untagged"
MOD_ARTICLES_XML_DESCRIPTION="This module displays articles in a variety of ways."
8 changes: 8 additions & 0 deletions language/en-GB/mod_articles.sys.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
; Joomla! Project
; (C) 2024 Open Source Matters, Inc. <https://www.joomla.org>
; License GNU General Public License version 2 or later; see LICENSE.txt
; Note : All ini files need to be saved as UTF-8

MOD_ARTICLES="Articles"
MOD_ARTICLES_LAYOUT_DEFAULT="Default"
MOD_ARTICLES_XML_DESCRIPTION="This module displays articles in a variety of ways."
1 change: 1 addition & 0 deletions libraries/src/Extension/ExtensionHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ class ExtensionHelper
['module', 'mod_version', '', 1],

// Core module extensions - site
['module', 'mod_articles', '', 0],
['module', 'mod_articles_archive', '', 0],
['module', 'mod_articles_categories', '', 0],
['module', 'mod_articles_category', '', 0],
Expand Down
Loading