Joomal 3.3.6
The Module Articles - Newsflash has the param " Show Images" but no image is displayed when is set to yes.
My suggestion is add the following code after https://github.com/joomla/joomla-cms/blob/staging/modules/mod_articles_news/tmpl/_item.php#L12
$images = json_decode($item->images);
if( $images->image_intro && $params->get('image') ){
echo '<img class="img-rounded" src="' . JURI::base() . $images->image_intro . '" alt="' . htmlspecialchars($article->title) . '" />';
}
Labels |
Added:
?
|
Labels |
Added:
?
|
Hi @brianteeman ,
thanks for your reply.
Your comment is correct. IMHO the Intro image field should have higher priority, or at least consider display images from both sources (content and fields)
Yeah if you look here https://github.com/joomla/joomla-cms/blob/staging/modules/mod_articles_news/helper.php#L107 you will see what i mean. It is referring to images inside the content
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5229.
By all means submit a PR for that and then the maintainers can consider it
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5229.
Setting to Information Required. @htmgarcia are you planning to submit a PR for this new feature or shall we close this.
Status | New | ⇒ | Information Required |
Sorry for the late.
I was planning make a PR but may take some time for me to get familiar with the workflow.
I'm closing it. I will reopen it when I'm ready.
Thanks.
Status | Information Required | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-01-06 23:43:25 |
Awesome thanks for the code, this should be included in any new releases.
@htmgarcia Thanks for the little bit of code to insert the images. I spent a lot of time trying to figure out why the images wouldn't show only to find out it was only related to content images. Yes, content images could be something that works for some people, but I agree more weight or importance should have gone to the intro images first.
Anyhow, I'm a beginner in coding and now trying to figure out how to add code so that the images that are now showing will link to the article. Would you have any coding to do this or advice on how to learn or create such code?
PS I added your code in at Line 25 so as to put the image after the title.
Thanks
FP
OK got the code sorted, to add link to the intro images also I used this code
<?php endif; $images = json_decode($item->images);
if( $images->image_intro && $params->get('image') ){
echo '<a href="'.$item->link.'"><img class="img-rounded" src="' . JURI::base() . $images->image_intro . '" alt="' . htmlspecialchars($article->title) . '" /></a>';
Hi Franz, sorry but I'm new to all this so no idea what a PR is (maybe personal request?) and don't know who/what 3.8-branch is?
Not much help I'm afraid :(
Doesnt the param refer to images INSIDE the content - not the image fields
On 27 November 2014 at 21:44, ValentÃn notifications@github.com wrote:
Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/