trying to make submitter link

1 year 10 months ago #610
Topic Author
kimberleyb's Avatar
Posts: 8
trying to make submitter link

Hi Guys

I'm trying to make the submitter username a link

I've followed the instructions but can't get the link to actually be a link

I created a plugin by copying an existing one and replaced the code from the competitions manual which did not create a link

I'm using jomsocial si I also tried using the code in the manual and also tried the jomsocial instructions

include_once JPATH_ROOT.'/components/com_community/libraries/core.php';
// Get CUser object
$link = CRoute::_('index.php?option=com_community&view=profile&userid='.$userid);
echo '<a href="/.$link." mce_href=" www.jomsocial.com/.$link .">View user profile</a>';

but none are making a link

can you please help?

adaptiveskiing.net/competitions/2-epic-selfies/4-ski-view

The topic has been locked.
1 year 10 months ago #611
Dmitry's Avatar
Posts: 660
trying to make submitter link

Hello Kimberley!

First of all in participant layout options the parameter Application Submitter should be enabled, as well as Link Submitter.

The piece of code for JomSocial should be:

// Set the link to submitter
include_once JPATH_ROOT . '/components/com_community/libraries/core.php';

$item->submitter_link = CRoute::_('index.php?option=com_community&view=profile&userid=' . $item->userId);

Hope it is working ;)

Best regards,
Dmitry


Like our extensions and support?
Add your voice to the JED listing with a 100-score review: bit.ly/2ciJBqC
Thanks!
The topic has been locked.

You can get our help: Monday - Friday / 09:00 to 17:00 (GMT+2). but not limited. Our staff will be pleased to provide Premium support to every paid subscriber asap, but sometimes you should be ready to wait for our reply for up to 3 days. In case of free extensions we do the best to develop and maintain them either, but their support is not necessary.

Product Latest Update