G
G
Good Max2019-10-19 20:46:09
PHP
Good Max, 2019-10-19 20:46:09

How to replace links in Joomla module using php from external file?

In the widget that displays a feed of the last 6 posts on the Instagram website, it is necessary (as I try) to insert links to these posts using the php code, through the src= and href= attributes, as shown in the screenshot. Since this widget code is built into a dozen sites, when adding new posts to Instagram, changing their url "handles" on each site is quite hemorrhoids) so I want to implement their substitution from ONE .txt or .xls file.
5dab4b8fe14a8424294141.png
As an option, I tried the above combination with substitution by specifying php variables directly in the code, but it didn’t work out .. plz tell me how it is possible to implement this task?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Good Max, 2019-10-20
@Norozz

Tried creating an external .php file with an ID for these six insta posts

<?php
return [
    'id1' => 'sgsg4t3451',
    'id2' => '345341vfdA',
    'id3' => 'bfgw12aAvd',
    'id4' => 'ByLrLumiMVu',
    'id5' => 'ByJFfZ4Hrlp',
    'id6' => 'ByGXC_2HshD',
];
?>

with a link to these IDs from the Joomla HTML module:
but in this case, the server still does not process the php request url giving errors:
this is how the url looks like this is what
the console outputs
Question - what to do? How to bypass the Joomla template engine , which apparently fucks the whole process.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question