Hello,
i need to insert in the users profile pages some modules (written by me).
these modules must contain informations (from db) from the owner of the page that you are visiting. i need the user ID of the profile page owner.
to be understandable:
i'm the USER1 and i'm on the USER2 profile page (that is my friend), here i have to be able to display a module containing information (from db) of USER2.
USER2 obviously also have the opportunity to see that module browsing my profile page with my information inside.
I'm writing wrapper modules to be included in the profile pages, which precisely retrieve data from users, there are alternatives to the wrapper?
But the REALLY important question that i have to do is: to do this i need the user ID of the profile page owner. From where can i get it?
thanks ;)
Hi Mario,
I will need to pass this to a developer for them to answer. This may take a few days before they reply as there is a backlogged at the moment
Hi Mario,
here the example:
$userid = JRequest::getVar('userid');
$modelProfile = CFactory::getModel('Profile');
$profileCustom = $modelProfile->getProfile($userid);
print_r($profileCustom);require_once JPATH_BASE.'/components/com_community/libraries/core.php';
Hi Albertus, i tested the instruction that you wrote me, but i still have back my info (in your example a list of my personal profile informations) instead of the infos of the owner of the profile page that i'm visiting. why? i've to add any extra controls? on the user id? help :)
basically i need the user id of the owner of the page profile that i'm visiting to show him informations, now i can only see my information on the pages that i'm visiting, because are connected to my session.
Hi Mario,
from this code if you visit any profile page the id "$profileID" will follow the profile page that you visiting.
$userid = JRequest::getVar('userid');
$modelProfile = CFactory::getModel('Profile');
$profileCustom = $modelProfile->getProfile($userid);
$profileID = $profileCustom['id'];
hi Abert, i wrote exactly that code in a php page, i call that page using a joomla wrapper module then using a 3rd party extension (tigra) i load that module the layout system.
i still have back my user id in that module when i'm visiting a friend's profile page
what's wrong in these passages?
in the ftp root you can find the php page that i'm talking about in:
www.olimpy.com/aaa/idprofilo.php
thanks Albertus
Hi Mario,
Here I attached the hellome custom module based on you purpose.
please install this module from joomla extension manager, and rest off you can cutomize it.