Menu

#355 wrong nb of user post through the sync feature

XOOPS_2.5
open
nobody
None
9
2012-09-25
2010-09-06
Marco
No

in the file /modules/system/admin/users/users.php, the sync feature counts only contributions in the comments and in newbb, so it forgots the other modules.
the function synchronize($id, $type) has to be improved

Discussion

  • trabis

    trabis - 2010-09-18

    Moving to feature requests

     
  • voltan

    voltan - 2011-09-07

    Solve it is easy . you must put lines like this :

    // Start check modules for get Count of posts

        $tables = array();
    
        // Count comments (approved only: com_status == XOOPS_COMMENT_ACTIVE)
    
        $tables[] = array ('table_name' => 'xoopscomments', 'uid_column' => 'com_uid', 'criteria' => new Criteria('com_status', XOOPS_COMMENT_ACTIVE));
    
        // Count forum posts
    
        if (XoopsModule::getByDirname("newbb")) {
    
            $tables[] = array ('table_name' => 'bb_posts', 'uid_column' => 'uid');
    
        }
        // Count Content posts
    
        if (XoopsModule::getByDirname("fmcontent")) {
    
            $tables[] = array ('table_name' => 'fmcontent_content', 'uid_column' => 'content_uid');
    
        }
        // Count Content posts
        if (XoopsModule::getByDirname("news")) {
    
            $tables[] = array ('table_name' => 'stories', 'uid_column' => 'uid');
    
        }
    // End check modules for get Count of posts
    

    in htdocs/modules/system/admin/users/user.php and htdocs/modules/system/admin/users/jquery.php

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.