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.

How to display UserPoints at "All member" page?

7 years 7 months ago
Licenses:
JomSocial Active

Hello.

Can you please give me a hint: How to display UserPoints at "All member" page?

I edit file "html\com_community\layouts\people.browse.php"
and try to use code:
<?php echo $user->getKarmaPoint(); ?>

or this code:
<?php echo $user->userpoints; ?>

but with no succes. Does it mean I need to add something else?

Thanks.


Sorry for my English
Attachments:
7 years 7 months ago
Licenses:

HI, Dmitry.

Thank you for contacting us.
Try:

<?php echo $this->user->getKarmaPoint(); ?>


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
7 years 7 months ago
Licenses:
JomSocial Active

Sorry, but it didn't helped.
Page display Error 0: CALL TO A MEMBER FUNCTION GETKARMAPOINT() ON NULL

Thanks.


Sorry for my English
7 years 7 months ago
Licenses:

HI, Dmitry.

Did you defined $user at the beginning of the file?

$cuser = CFactory::getUser();


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
7 years 7 months ago
Licenses:
JomSocial Active

Hi. No, I didn't defined $user at the beginning of the file. :)

Seems it should looks like that?

<?php
defined('_JEXEC') or die();
if (!isset($pageTitle)) {
$task = JFactory::getApplication()->input->getCmd('task');
$pageTitle = JText::_($task === 'display' ? 'COM_COMMUNITY_ADVANCESEARCH_SEARCH_RESULTS' : 'COM_COMMUNITY_ALL_MEMBERS');
$cuser = CFactory::getUser();// crimson: add to display userpoints
}
?>


But after adding <?php echo $this->user->getKarmaPoint(); ?> page display "CALL TO A MEMBER FUNCTION GETKARMAPOINT() ON NULL"


I attached customised file "html\com_community\layouts\people.browse.php" with "crimson" comment. May be you can look at it later in low priority?

Thanks :)


Sorry for my English

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

7 years 7 months ago
Licenses:

Privet Dmitry.

Try this:

$mypoints = $row->user->getKarmaPoint();
echo $mypoints;


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
7 years 7 months ago
Licenses:
JomSocial Active

Thanks you very much - it helps :)
As result:
Need to paste this code to the begining of file (after "if (!isset($pageTitle)) {"):
$cuser = CFactory::getUser();

Need to paste this code to place where need Userpoints to display:
<?php $mypoints = $row->user->getKarmaPoint(); echo $mypoints; ?>


Sorry for my English
Attachments:
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