Maybe my explanation was not complete.. i explain more in detail.
The idea is, i have a link that i give to some "non registerers users", for example a link like this created as a registered user.
https://qrmenudigital.com/index.php?option=com_content&view=article&id=32&uid=969
as you see in the link, the link have the article_id and the user_id
so this link would allow to everybody that has this link.. see the article... the item menu for this article is "public"
till here... would be ok.. not troubles..
----------------
I try to create a dinamic article --> will create a different content article for each user_id registered..
So, one option i try is --> Use the PHP to extract information from some fabrik elements i try to get a "name of establecimiento" for example.
The code PHP use for that in the article is. (I not use a plugin, i found a {source}{/source}to insert php in the article)
source}<?php
$user = JFactory::getUser();
$userId = $user->get('id');
$db = JFactory::getDbo();
$query = $db->getQuery(true);
//echo $userId;
$query->select($db->quoteName(array('nombre_establecimiento', 'user_id',)))
->from($db->quoteName('insertar_logo'))
->where($db->quoteName('user_id') . ' = ' . $userId);
$db->setQuery($query);
$results = $db->loadAssocList();
foreach ($results as $rows) {
echo "<center>";
//echo "<img src='images/stories/" . $userId . "/image-1.png'>";
echo "<H1>" . $rows['nombre_establecimiento'] . "</H1>" . "<BR>";
echo "</center>";
}
?>
{/source}
------------
So, If i am registered, the article show me the ['nombre_establecimiento'] --> seem is working
But if i'm not registered and i use the link.. i see the article title, but not content from fabrik
----
i think the trouble is.. when i put the link.. the article don´t know which user_id is.. so can not extract the fabrik datas
One option would be --> How can i relate the link with the php code article... so the article will know which user_id is.. and i hope will show the fabrik info.
Or if you have other ideas to obtain the same, would be welcome
Any suggestions?
Many thanks in advance!
Javier