User tests: Successful: Unsuccessful:
The changes allows thumbnail for any file type: video, pdf, audio etc.
Apply path, run npm install.
Edit
else condition (optionaly change the image path):
else {
if (!$isDir){
$obj->thumb_path = Uri::root(true) . '/images/headers/raindrops.jpg';
} else {
$obj->thumb_path = Uri::root(true) . '/images/headers/maple.jpg';
}
}Go to media manager and upload some video, or audio or any other file.
Thn check the thumbnail.
Non image files has a icon
Non image files has a 'raindrops.jpg' image
Please select:
| Status | New | ⇒ | Pending |
| Category | ⇒ | Administration com_media NPM Change Repository |
No need core hacks, what you see in the description is for testing only.
The use case:
onFetchMediaItems :public function onFetchMediaItems($event)
{
$items = $event->getArgument('items');
foreach ($items as $item) {
if (in_array($item->extension, ['mp4', 'mp3', 'pdf'])) {
$item->thumb_path = Uri::root(true) . '/images/headers/raindrops.jpg';
}
}
$event->setArgument('items', $items);
}I have tested this item ✅ successfully on 242a656
I have tested this item ✅ successfully on 242a656
| Status | Pending | ⇒ | Ready to Commit |
| Labels |
Added:
NPM Resource Changed
Feature
PR-5.3-dev
|
||
RTC
Can this somehow be documented?
I will write something after it will be merged.
Better would be the opposite, so it will no get forgotten.
I mean, I can write doc, but then waiting another year for merging, not much fun and motivating.
If it not going to be merge in this release, then I see no reason to spend my time for docs ASAP.
| Labels |
Added:
RTC
Documentation Required
|
||
| Labels |
Added:
PR-6.0-dev
|
||
@Fedik Sorry, it seems my suggested javascript code style changes were not sufficient. Now the javascriptcs checker complains about missing line breaks and indentation: https://ci.joomla.org/joomla/joomla-cms/82743/1/20
No problem, I also can fix them later, if it fail again.
But thanks for checking ;)
| Title |
|
||||||
| Category | Administration com_media NPM Change Repository | ⇒ | Administration com_associations com_banners com_categories com_checkin com_config com_contact com_content com_contenthistory com_cpanel com_fields com_installer com_joomlaupdate com_media NPM Change com_menus com_modules com_postinstall com_templates com_users |
The conflicts should go away after next upmerge 😉
| Labels |
Removed:
PR-5.3-dev
|
||
| Category | Administration com_media NPM Change com_associations com_banners com_categories com_checkin com_config com_contact com_content com_contenthistory com_cpanel com_fields com_installer com_joomlaupdate com_menus com_modules com_postinstall com_templates com_users | ⇒ | Administration com_media NPM Change Repository |
Okay, had to redo "rebase" localy, because automatic one went wrong
| Labels |
Removed:
Documentation Required
|
||
| Status | Ready to Commit | ⇒ | Pending |
| Status | Pending | ⇒ | Fixed in Code Base |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2025-03-11 12:11:38 |
| Closed_By | ⇒ | softforge | |
| Labels |
Removed:
RTC
|
||
Maybe I am missing something but I am missing the usecase for this and how it can be used by a siteowner without core hacks