Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

custom module, user ID needed

12 years 2 months ago
  • Mario's Avatar
    Topic Author
  • Mario
  • Offline
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 1
Licenses:
JomSocial Active Socialize Expired

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 ;)

12 years 2 months ago
  • Paul's Avatar
  • Paul
  • Visitor
  • Thank you received: 0
Licenses:

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

12 years 2 months ago
  • Mario's Avatar
    Topic Author
  • Mario
  • Offline
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 1
Licenses:
JomSocial Active Socialize Expired

ok Paul, i'm waiting for an answer :)
thank you

12 years 2 months ago
Licenses:

Hi Mario,

here the example:

$userid = JRequest::getVar('userid');
$modelProfile = CFactory::getModel('Profile');
$profileCustom = $modelProfile->getProfile($userid);
print_r($profileCustom);

first you need to include Jomsocial library
require_once JPATH_BASE.'/components/com_community/libraries/core.php';

Regards,
Albert

The following user(s) said Thank You: Mario
12 years 2 months ago
  • Mario's Avatar
    Topic Author
  • Mario
  • Offline
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 1
Licenses:
JomSocial Active Socialize Expired

Thanks Albertus!!! ;)

12 years 2 months ago
  • Mario's Avatar
    Topic Author
  • Mario
  • Offline
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 1
Licenses:
JomSocial Active Socialize Expired

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.

12 years 2 months ago
Licenses:

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'];

Regards,
Albert

12 years 2 months ago
  • Mario's Avatar
    Topic Author
  • Mario
  • Offline
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 1
Licenses:
JomSocial Active Socialize Expired

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

12 years 2 months ago
Licenses:

Hi Mario,

please provide me FTP access detail. I want have a look at the code and do some try.

FYI: you can put FTP access detail at site info form, by editing you first post at this topic

Regards,
Albert

12 years 2 months ago
  • Mario's Avatar
    Topic Author
  • Mario
  • Offline
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 1
Licenses:
JomSocial Active Socialize Expired

done! :)

12 years 2 months ago
Licenses:

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.


This attachment is hidden for guests.
Please log in or register to see it.


Regards,
Albert

This message has an attachment file.
Please log in or register to see it.

The following user(s) said Thank You: Mario
12 years 2 months ago
  • Mario's Avatar
    Topic Author
  • Mario
  • Offline
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 1
Licenses:
JomSocial Active Socialize Expired

Thank u Albert :) you were brilliant :)

12 years 1 month ago
  • Mario's Avatar
    Topic Author
  • Mario
  • Offline
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 1
Licenses:
JomSocial Active Socialize Expired

Hi Guys,
which are the libraries for the creation of modules for the events and groups pages? as done before for the profile page

12 years 1 month ago
Licenses:

Hi Mario,

/com_community/views/groups/view.html.php
and
/com_community/views/events/view.html.php

for more detail I suggest you to open new topic.

Regards,
Albert

Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW