[mod_articles_latest] Option for choose an specific author(s) - #20687
Conversation
brianteeman
left a comment
There was a problem hiding this comment.
approve language strings
| break; | ||
|
|
||
| case 'created_by' : | ||
| $model->setState('filter.author_id', $params->get('author')); |
There was a problem hiding this comment.
Add default value array().
|
|
||
| <field | ||
| name="author" | ||
| type="sql" |
There was a problem hiding this comment.
@SharkyKZ Why? author field only lets you select, 1 user only
There was a problem hiding this comment.
author field supports multiple attribute. Not to be mistaken with user field.
There was a problem hiding this comment.
My bad again. author field was my first option when I was doing this PR, but, I did not saw this part of support multiple attribute inside the code. Now checking again, after you told me this, I saw it inside the JFormFieldList class. I need to buy some glasses with enough magnification 😞 . Thank you again for your time @SharkyKZ
| value_field="name" | ||
| showon="user_id:created_by" | ||
| > | ||
| <option value="0">JOPTION_SELECT_AUTHORS</option> |
There was a problem hiding this comment.
Selecting 0 returns articles without author. So language constant should be JNONE or similar.
| ; Note : All ini files need to be saved as UTF-8 | ||
|
|
||
| MOD_ARTICLES_LATEST="Articles - Latest" | ||
| MOD_LATEST_NEWS_FIELD_AUTHOR_DESC="Select one or more authors from the list below." |
There was a problem hiding this comment.
Change to Select one or more authors.. The list is not below but next to the label.
There was a problem hiding this comment.
Done, thank you. Also i change the label, for -> Created by author(s)
|
|
||
| MOD_ARTICLES_LATEST="Articles - Latest" | ||
| MOD_LATEST_NEWS_FIELD_AUTHOR_DESC="Select one or more authors." | ||
| MOD_LATEST_NEWS_FIELD_AUTHOR_LABEL="Created by author(s)" |
There was a problem hiding this comment.
Please capitalize Created by Authors since it is a label.
| value_field="name" | ||
| showon="user_id:created_by" | ||
| > | ||
| <option value="0">JNONE</option> |
There was a problem hiding this comment.
Restore <option value="0">JNONE</option> please. It's a valid option.
There was a problem hiding this comment.
Not really - you wouldnt have chosen to filter by author if yoou wanted to set it to none
There was a problem hiding this comment.
None returns articles which have no author assigned. Maybe the string could read No Author but None is what we have now (see Search Tools in com_content).
There was a problem hiding this comment.
I removed because the same think as brian. If I there is for select an author. However, return a no author is valid too, but then you will need search for alias? because I do not see the point of show the last articles, for a no author list.
|
I have tested this item ✅ successfully on 0c75fd0 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20687. |
1 similar comment
|
I have tested this item ✅ successfully on 0c75fd0 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20687. |
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20687. |
Pull Request for Issue #20685
Summary of Changes
New option for filter articles by a specific authors
Testing Instructions
Created byin the optionAuthors. Select an author(s) and save.Expected result
Only articles from selected users are displayed
Actual result
The module no have the option to choose specific author(s)
Documentation Changes Required
Yes, need document the new option
Additional comments
You can use the module
Articles - Categoryfor have this, but asArticles - Latesthave an option for filter by authors, is incomplete if you cant choose a specific author(s).