Hello,
before i wrote here about a problem that i had when i was trying to show in a user profile page some informations about the profile pages owner, i wanted to show some informations related to the owner of the profile page that i was visiting (a friend's page) in some personalized modules.
Albertus was awesome and he released to me a custom hello me module that explained to me how to create perfectly those modules that i needed.
(here:
Here it is the post of that help request
)
Actually i have to create other modules in Groups pages and in the Events pages.
I need to create modules in the Groups pages that shows informations about the Group that i'm seeing ( if i'm seeing a determined group page i have to see a module that contains informations about that specificgroup).
The same on the events pages: i need to create modules in the Events pages that shows informations about the Event that i'm seeing ( if i'm seeing a determined event i have to see a personalized module that contains informations about that specific event).
To create those modules i think that i've to do something like what was done for the profiles modules, but i don't know what exactly, can you help me?
Hi Mario,
I will make that custom code for you. first can you give me the example in more detail, what information for the specificgroup? because at group page jomsocial already have group detail information at there. same thing for event.
Regards,
Albert
Basically are information stored in the db from me added to the events and to the groups related (connected) to that specific group or that specific event by the group/event ID, so i need to understand how to create a module that allow me to show informations added from me to a determined group/event in the groups/events page.
If you need a real example of the informations to build a practical example i'll wrote you exactly tomorrow.
Thanks a lot Albertus, as always perfect support!
Hi Mario,
yes I need a real example. if the information only appear at groups/events page, I thinks we no need create/build new module.
better we use override method, that more save more times to build it.
Regards,
Albert
Hi Mario,
yes it possible, we only need to put the custom code by using override for
groups.viewgroup.php
events.viewevent.php
I can do it for you. the information for that modules from what tables? if not from jomsocial tables I need FTP and cpanel/database access detail. I will make it for you.
Regards,
Albert
Hi Albertus,
i tried to write and install this module, but don't work.
Can you tell me where is the code error, please?
Thanks!
Mario
Hi Albertus,
I'm so sorry, but i was wrong sending last .zip file. I was confused the default.php beetwen two different folder.
This is the exact module...
I'm stil so sorry. Thanks for you help and your disponibility. Mario
Hi Mario,
I can install that module at my test site with out any problem. please make sure you uninstall it already before you install it.
that code for displaying event owner detail? if so, the code must be like this:
defined('_JEXEC') or die('Restricted access');
$eventid = JRequest::getvar('eventid');
$modelEvents = CFactory::getModel('Events');
$event = JTable::getInstance('Event', 'CTable');
$event->load($eventid);
$owner = CFactory::getUser($event->creator);
echo $owner->id;
echo ' - ';
echo $owner->getDisplayName();