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.

Top Members module for JomSocial wrong points likes views

7 years 5 months ago
  • Nick's Avatar
    Topic Author
  • Nick
  • Offline
  • Fresh Boarder
  • Posts: 24
  • Thank you received: 0
Licenses:
JomSocial Active

ISSUE SUMMARY:
In test.sosailize.net with jomsocial 4.2.6
In test site frontpage the Top Members module for JomSocial with title “Top 20 Members by Points Earned” shows 270 user points
But in admin>monitor>members shows 278
Which is the same as in test database
Then member adds 1 post status (1 point) and refreshed frontpage module shows 271 user points
While admin>monitor>members shows 279
Which is the same as in test database

The same we see in another test site Cloud.sosailize.net with jomsocial 4.3 beta 2
In cloud test site frontpage the Top Members module for JomSocial with title “Top 20 Members by Points Earned” shows 243 user points
But in admin>monitor>members shows 251
Which is the same as in cloud test database
Then member adds 2 wall post status (+2 points)
and refreshed frontpage module shows 245 user points
But in admin>monitor>members shows 253
Which is the same as in cloud test database

In both jomsocial versions the difference between module and community-users table is 13 user points.
How can I fix it?

Another problem with 4.2.6 and 4.3 beta2 is at Top Members module for JomSocial with title “Top 20 Members by Points Earned” in frontpage that shows 0 likes and 0 views
while in live site with version 4.2.5 this is correct and shows 3 likes and 444 views
How can I fix it?

Thank you.

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






STEPS TO REPLICATE:
1
2
3
4
5
RESULT
EXPECTED RESULT
BROWSER

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

7 years 5 months ago
Licenses:

HI, Nick.

Thank you for contacting us.
Thank you for contacting us.
I'm sorry to hear you have ​​​issues with our product.
I assign developer to investigate cause of this issue.
He'll contact you soon.​​


- 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 5 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi Nick,

We have some minor issue on this user points.. i already added this to our bug list.

thank you!

7 years 5 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi Nick,

Well, we have different method to gain user points from version < 4.1 and > 4.1.. and "Time span" user points in module confguration will only count records starting from JomSocial 4.1, and total points in members page is be taken from summary of all counter user points from version < 4.1 + > 4.1

To avoid the confusing, maybe you can use our old Top Members module, which it only be taken from summary of all counter user points, please download it on my attachment.

thank you

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

7 years 4 months ago
  • Nick's Avatar
    Topic Author
  • Nick
  • Offline
  • Fresh Boarder
  • Posts: 24
  • Thank you received: 0
Licenses:
JomSocial Active

Thank you for this old Top Members module.

I installed it in my test site and the points were the same as in database, but there were no number of "likes" and "views" as in newer modules.

Attached is a comparison table of the old module, the module in jomsocial 4.2.6 (both installed in my test site) and the module in jomsocial 4.2.5 (installed in live site).

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


The best combination would be the module in jomsocial 4.2.5 with "points", "likes" and "views" display, and points counted like in the Old Module.

So is it possible to download the module of 4.2.5 version corrected to count points as the old module?

Thank you

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

7 years 4 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi Nick,

Replace all code inside modules/mod_topmembers/default.php with this code :

<?php
/**
* @copyright (C) 2013 iJoomla, Inc. - All rights reserved.
* @license GNU General Public License, version 2 (http://www.gnu.org/licenses/gpl-2.0.html)
* @author iJoomla.com <[email protected]>
* @url https://www.jomsocial.com/license-agreement
* The PHP code portions are distributed under the GPL license. If not otherwise stated, all images, manuals, cascading style sheets, and included JavaScript *are NOT GPL, and are released under the IJOOMLA Proprietary Use License v1.0
* More info at https://www.jomsocial.com/license-agreement
*/
defined('_JEXEC') or die('Restricted access');

$showAvatar = $params->get('show_avatar', 1);
$showKarma  = $params->get('enablekarma', 1);

?>

<div>
    <?php if ( !empty($users) ) { ?>
    <ul class="clearfix">
        <?php foreach ($users as $user) { ?>
            <li style="padding: 6px 0">
                <?php if ( $showAvatar ) { ?>
                <div class="joms-popover__avatar">
                    <div class="joms-avatar">
                        <img src="<?php echo $user->avatar; ?>"
                            title="<?php echo JText::sprintf('MOD_TOPMEMBERS_GO_TO_PROFILE', CStringHelper::escape( $user->name ) ); ?>"
                            alt="<?php echo CStringHelper::escape( $user->name ); ?>"
                            data-author="<?php echo $user->id; ?>">
                    </div>
                </div>
                <?php } ?>
                <div class="joms-popover__content">
                    <a href="<?php echo $user->link; ?>"><?php echo $user->name; ?></a><br />
                    <?php if ( $showKarma == 1 ) { ?>
                    <?php
                        $badge = new CBadge( CFactory::getUser($user->id) );
                        $badge = $badge->getBadge();
                    ?>
                    <img src="<?php echo $badge->current->image; ?>" alt="<?php echo JText::_('MOD_HELLOME_KARMA'); ?>" style="margin-left:-3px;">
                    <?php } else if ( $showKarma == 2 ) { ?>
                    <small><?php echo JText::_('MOD_TOPMEMBERS_POINTS') , ': ', $user->userpoints; ?></small>
                    <?php } ?>
                    <small><?php echo JText::_('Likes') , ': ', $user->likes; ?></small>
                    <small><?php echo JText::_('Views') , ': ', $user->views; ?></small>
                </div>
            </li>
        <?php } ?>
    </ul>
    <?php } else { ?>
    <?php echo JText::_('MOD_TOPMEMBERS_NO_MEMBERS'); ?>
    <?php } ?>
</div>

thank you!

7 years 4 months ago
  • Nick's Avatar
    Topic Author
  • Nick
  • Offline
  • Fresh Boarder
  • Posts: 24
  • Thank you received: 0
Licenses:
JomSocial Active

Thank you for new code!

I couldn't find the modules/mod_topmembers/default.php but i found a default.php in folder modules/mod_topmembers/tmpl and replaced al code.

But the result is

Points: 1109
Likes:
Notice: Undefined property: stdClass::$likes in /home/sosailiz/public_html/sosailize.com/public_html/modules/mod_topmembers/tmpl/default.php on line 43
Views:
Notice: Undefined property: stdClass::$views in /home/sosailiz/public_html/sosailize.com/public_html/modules/mod_topmembers/tmpl/default.php on line 44

You may see it in frontpage of test.sosailize.net

What may i do?

Thank you!

7 years 4 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi,

After I see the code, the only possiblity is to show total views, not possible to show total like on that old module..

thank you!

7 years 4 months ago
  • Nick's Avatar
    Topic Author
  • Nick
  • Offline
  • Fresh Boarder
  • Posts: 24
  • Thank you received: 0
Licenses:
JomSocial Active

Thank you for making old module workable!
So for live site i just install the same file you attached before, and copy the code from test site modules/mod_topmembers/default.php and replace the code at live site modules/mod_topmembers/default.php ?

7 years 4 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

You need to copy all files inside mod_topmembers

thank you

7 years 4 months ago
  • Nick's Avatar
    Topic Author
  • Nick
  • Offline
  • Fresh Boarder
  • Posts: 24
  • Thank you received: 0
Licenses:
JomSocial Active

In my test site (test.sosailize.net) i installed jomsocial 4.3_RC1.
The Top Members module now shows correct likes & views so these issues are solved in this version. Thank you!

But the issue "wrong points", that is different user points between "administration>monitor>members>account details>User Points" page and top members module in front-page is not solved.

I had the old Top Members module as you said installed instead, but disappeared with upgrade to latest version. So it is not a solution to install it every time i do an upgrade.

Is there a way to synchronize the User Points and have them the same in module and in account details?
Thank you.

7 years 4 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi Nick,

I am sorry, regarding user points calucation it can't be fixed it cant be the same, because we use different method for user points on top members on total user points on monitor->members.

Please you backup your old mod_topmembers before upgrading, once the upgarding done you can restore that the old mod_topmembers module

thank you

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