Search
Other Articles Anywhere questions
Forum

Get data from an external database. Image not showing and the link doesn't work

seereen's Avatar seereen
Hi,

Get data from an external database. but the image doesn't show. I've put URLs already.

Thanks for your help and advises.
Peter van Westen's Avatar Peter van Westen ADMIN
Articles Anywhere will grab the content as is from the other database.
This includes the urls/paths to images.

Probably the URLs to those images are relative to the website they come from.
For instance, if your other database contains:
<img src="/images/apples.jpg" ...>
Then that will stay the same on the website where you are using Articles Anywhere.

That means you need to also have those images on that website.

Or you need to replace the URL parts with that of the other website.
You could for instance replace:
src="images/
With:
src="https://your-other-website.com/images/

So you can do:
[text replace="src=\"images/=>src=\"https://your-other-website.com/images/"]
PS: Seeing there is a quote in that text, you need to escape it in the attribute.
Please post a rating at the Joomla! Extensions Directory
seereen's Avatar seereen
How to add this code (image and link readmore)

<div class="row">{articles category="cate1" database="dbtest"}
<div class="col-12 col-sm-6 col-md-3 mt-5">
<div class="panel">
<p>[image-1 replace="src=\"images/=>src=\"http:mydomain/nksitham/images/"]</p>
[link]
<h4 class="media-heading">[title]</h4>
[/link]
<p class="badge bg-info">people</p>
<p>[created]</p>
<p>[readmore text="Read more..."]</p>
</div>
</div>
{/articles}
</div>

Thanks?
Peter van Westen's Avatar Peter van Westen ADMIN
That depends on what you are trying to achieve. Do you want to link to the other website? And is the image only on the other website?

Can you give more information about your setup?
Please post a rating at the Joomla! Extensions Directory
seereen's Avatar seereen
Yes, I would like to link to another website. And it's a specific image on another website.
Picture it's working now
Thank a lot

<p>[readmore text="Read more..." replace="href=\"a/=>href=\"http://mydomain/nksitham/"]</p>
How to write this code <p>[readmore text="Read more..."]</p>

Thanks for fast support.
Peter van Westen's Avatar Peter van Westen ADMIN
That depends on what the href urls look like in the database.
You are now for some reason searching for:
href="a/

What URLs look like in the database is usually different to what you see in the final HTML output, as Joomla changes/fixes URLs in the last stages of rendering the page.
Please post a rating at the Joomla! Extensions Directory
Peter van Westen's Avatar Peter van Westen ADMIN
You could also manually make links with:
<a href="http://mydomain/nksitham/[url]" class="whatever">Read more...</a>
Please post a rating at the Joomla! Extensions Directory
seereen's Avatar seereen
Examples of links from other websites
http://mydomain/nksitham/index.php?option=com_content&view=article&id=5:chulalongkorn-day-2022&catid=10&Itemid=179
I would like to link to the title

<div class="row">{articles category="cate1" database="dbtest"}
<div class="col-12 col-sm-6 col-md-3 mt-5">
<div class="panel">
<p>[image-intro replace="src=\"images/=>src=\"http://mydomain/nksitham/images/"]</p>
[link replace="href=\"a/=>href=\"http://mydomain/nksitham/index.php?"]
<h4 class="media-heading">[title]</h4>
[/link]
<p class="badge bg-info">people</p>
<p>[created]</p>
</div>
</div>
{/articles}</div>
Peter van Westen's Avatar Peter van Westen ADMIN
See my previous reply.
Please post a rating at the Joomla! Extensions Directory
seereen's Avatar seereen
Thanks peter I understand I use tag a instead of [link] title article

<a href="http://mydomain/nksitham/[url]">
<h4 class="media-heading">[title]</h4>
</a>

Good?
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription