Question to those of you who might have some programming knowledge and/or have had this issue.

Quation Form Joomla Group From Facebook
Philip Dudin

Question to those of you who might have some programming knowledge and/or have had this issue.

Postby Philip Dudin » Tue 04 Dec 2018 5:53 pm

Hi guys,

Question to those of you who might have some programming knowledge and/or have had this issue.

I have a website which once was on Joomla 1.5 and used a gallery plugin to show pictures for every article in the format of:
{gallery}/stories/category/article-1{/gallery}
which reads the content of that directory, generates thumbnails and opens them in a lighbox when clicked.

After upgrading to Joomla 3 I found a compatible plugin that can do almost the same - with the exception that now pictures don't open in a lightbox but in a new browser tab instead. Though it was not urgent and I delayed it (till the end of this year), this must be fixed. The old approach comes with major drawback towards the SEO, and therefore I need to change everything, putting the pictures as normal sized images inside the article body.

Now, if it was about 10-20 articles, I could easily replace all of it manually. However, although I can do it (and this will enable me to put the alt tag for every image), this would be huge amount of work that I'd prefer to automate. I mean, this is ~400-500 articles, some of them with 20+ images.

Has any of you a suggestion how to solve this? By far my best idea is for a PHP script that parses the articles' body from the _content table, replaces the {gallery} line and - if it's been there - to inject a series of HTML code for all the images it finds in the respective directory.

I'd appreciate any ideas / help you can provide.
Thank you!