Newsberg Article Addons And Images Detection - Question | JoomShaper

Newsberg Article Addons And Images Detection

E

Emin

Template 3 years ago

Hi there,

I use Newsberg template. Ot the front page I use SP Page Builder with Newsberg Article Addons:

https://i.imgur.com/lASIjFu.jpg

Is there a way to choose from the already available images uploaded to the site:

https://i.imgur.com/iFzU0G1.jpg

Or at least detect the photos from here:

https://i.imgur.com/VaLsCKR.jpg

Or detect the first photo uploaded in the article.

It is very inconvenient to upload a photo for each article without having the option to choose from those already uploaded.

I hope you can help me.

Thanks.

3
21 Answers
F
freenduro
Accepted Answer
1 year ago #89193

ok

0
SC
S-D CONSULTING
Accepted Answer
1 year ago #89192

In fact, as I wrote in my comment of 5 months ago, obviously the changes must be set according to the layout you choose. We have been using Page Builder for years and now we use these changes on all websites built with JoomShaper templates. Very often they are websites that come from previous updates, even websites with thousands of articles that have always used the native Joomla field to manage images, for us it was impossible to go and change these settings using the blog option of page builder.

0
F
freenduro
Accepted Answer
1 year ago #89190

here my chnages

line 373

if(($articles_layout === "liberica" && $key === 0) || ($articles_layout === "bourbon") || (($articles_layout === "java") && $key === 5) || (($articles_layout === "robusta") && $robusta_classic && ($key === 0))){
                        if(isset($image) && $image) {
                            $output .= '<div class="bg-img-wrapper" style="background-image: url('/ . Uri::base() . $item->featured_image . ');"></div>';
                        }
                    } else{ /* personalizzazione */

                                                        if(isset($item->image_thumbnail) &&$item->image_thumbnail) {
                                                                $output .= '<a class="sppb-article-img-wrap" href="'. $item->link .'" itemprop="url"><img class="sppb-img-responsive" src="'. $item->image_thumbnail .'" alt="'. $item->title .'" itemprop="thumbnailUrl"></a>';
                                                        }
                                                }
                }
            }
        }

line 521

} else{ /* personalizzazione */

                                if(isset($item->image_thumbnail) &&$item->image_thumbnail) {
                                    $output .= '<a class="sppb-article-img-wrap" href="'. $item->link .'" itemprop="url"><img class="sppb-img-responsive" src="'. $item->image_thumbnail .'" alt="'. $item->title .'" itemprop="thumbnailUrl"></a>';
                                }
                            }
0
F
freenduro
Accepted Answer
1 year ago #89188

I made many tests and I realize that your modification works for some layaouts template

this works for geisha

not for arabica / liberica

here the site >> https://freenduro.fr/

0
SC
S-D CONSULTING
Accepted Answer
1 year ago #89179

I understand, the variables could be many, maybe even just a Joomla cache problem that you haven't cleaned up.

It all also depends on how you are using the addon, maybe, unlike me, are you using the background function? You should see the specific site to understand what is not working, I use the template on two different websites, I have made that variation in articles_layout and articles_thumb_slider and it works correctly in both.

However, I notice that in my variation the row does not correspond to yours, I would not like you to have replaced the variable only with the previous IF and not the next one:

if(($articles_layout === "liberica" && $key === 0) || ($articles_layout === "bourbon") || (($articles_layout === "java") && $key === 5) || (($articles_layout === "robusta") && $robusta_classic && ($key === 0))){
                                if(isset($item->image_thumbnail) && $item->image_thumbnail) { /* personalizzazione */

                                    $output .= '<div class="bg-img-wrapper" style="background-image: url('/ . Uri::base() . $item->image_thumbnail . ');"></div>';
                                }
                            } else{ /* personalizzazione */

                                if(isset($item->image_thumbnail) &&$item->image_thumbnail) {
                                    $output .= '<a class="sppb-article-img-wrap" href="'. $item->link .'" itemprop="url"><img class="sppb-img-responsive" src="'. $item->image_thumbnail .'" alt="'. $item->title .'" itemprop="thumbnailUrl"></a>';
                                }
                            }
0
F
freenduro
Accepted Answer
1 year ago #89175

I made the changes in /templates/newsberg/sppagebuilder/addons/articles_layout

i replace

if(isset($image) && $image) {
                                $output .= '<a class="sppb-article-img-wrap" href="'. $item->link .'" itemprop="url"><img class="sppb-img-responsive" src="'. $image .'" alt="'. $item->title .'" itemprop="thumbnailUrl"></a>';

by

 if(isset($item->image_thumbnail) && $item->image_thumbnail) {
                                $output .= '<a class="sppb-article-img-wrap" href="'. $item->link .'" itemprop="url"><img class="sppb-img-responsive" src="'. $item->image_thumbnail .'" alt="'. $item->title .'" itemprop="thumbnailUrl"></a>';

in lignes 378 & 522 but does not work

(i remove photo from blog options and i put photo in joomla image intro )

0
SC
S-D CONSULTING
Accepted Answer
1 year ago #89173

The file indicated in its path is the original file of the Page Builder component. If you have an override in the template, the site.php file to edit will be found in templates / newsberg / sppagebuilder / addon / *

I use this modification on all websites with Page Builder because I natively use the Joomla field to manage images, and it works on all.

You have to intercept everything in the file that refers to that image. Clearly, compared to the solution I proposed months ago, the file may have changed slightly, but the concept remains.

0
F
freenduro
Accepted Answer
1 year ago #89166

i use Newsberg template on joomla 3 and i would like to replace in the article layout SP addon the image from blog , by the intro image from joomla

I find the answer belowbut does no works

0
SC
S-D CONSULTING
Accepted Answer
1 year ago #68856

To solve the problem of addons not loading native Joomla images in articles, it is quite simple. Open templates/newsberg/sppagebuilder/articles_addon/site.php

Change this:

if(isset($image) && $image) {
                                $output .= '<a class="sppb-article-img-wrap" href="'. $item->link .'" itemprop="url"><img class="sppb-img-responsive" src="'. $image .'" alt="'. $item->title .'" itemprop="thumbnailUrl"></a>';

with this:

if(isset($item->image_thumbnail) && $item->image_thumbnail) {
                                $output .= '<a class="sppb-article-img-wrap" href="'. $item->link .'" itemprop="url"><img class="sppb-img-responsive" src="'. $item->image_thumbnail .'" alt="'. $item->title .'" itemprop="thumbnailUrl"></a>';

This variation is to be made in two places, in lines 379 and 525. This way, if you use your joomla images they will be the ones that will be used in the addon. If you use Page Builder blog images (guess or video), those will be loaded as priority

0
C
cmfionline
Accepted Answer
3 years ago #8352

Hello, any consideration for the functionality?

0
E
Emin
Accepted Answer
3 years ago #2657

Hi, Rashida Rahman Is there any progress on this issue.

0
L
Lukas
Accepted Answer
3 years ago #2450

Yes I think too, that work with images is very uncomfortable now.

0
J
john@gs
Accepted Answer
3 years ago #1361

I too would like to see the same thing.

Or you can do something even simpler. Allow the add-ons to use the Joomla Intro image. This way we have the option to use the Helix Blog Image or the regular Joomla Intro/Full images for Joomla Articles.

This should be a feature in my optinion. The Helix Blog image cuts out the ability to use captions on hero images which are often needed for news websites.

0
Rashida Rahman
Rashida Rahman
Accepted Answer
Support Agent 3 years ago #1117

Hi,

I will talk about it with the team, thanks!

0
E
Emin
Accepted Answer
3 years ago #977

Is it possible to add this basic functionality?

0
E
Emin
Accepted Answer
3 years ago #580

Thanks for the reply.

I think this is a big gap in functionality.

For example, I have a site with 20 categories and 10k articles. I only have 20 hero images for each category.

With the lack of this functionality, I have to upload 10k images for each article instead of having only 20 images uploaded and selecting one image depending from article category.

Is there a chance to add this functionality?

Thanks!

0
Rashida Rahman
Rashida Rahman
Accepted Answer
Support Agent 3 years ago #546

Hi,

My apology! This is not possible as per my knowledge!

Best Regards

0
E
Emin
Accepted Answer
3 years ago #518

I've tried a lot of ways and I can't figure out how to choose from the ones already uploaded images.

0
E
Emin
Accepted Answer
3 years ago #469

No, this is not the case.

I don't want to upload a new photo for each article. I want to choose a photo from those already uploaded on the site

0
Rashida Rahman
Rashida Rahman
Accepted Answer
Support Agent 3 years ago #461

Hi there!

Yes! Please remove the demo image first from that blog options tab, then you will find a option to upload from your images.

https://prnt.sc/we46kx

https://prnt.sc/we46uw

Best Regards

-2
E
Emin
Accepted Answer
3 years ago #446

Is there a solution to this problem?

Thanks!

0