xoops forums

Mamba

Moderator
Posted on: 2012/7/31 12:29
Mamba
Mamba (Show more)
Moderator
Posts: 10817
Since: 2004/4/23
#1

MyComments 1.01 Beta 1 ready for testing on XOOPS 2.5.5

MyComments is a module developed originally by Trabis with which your users can keep track of their received and sent comments.

Features:

- display received comments by user
- display sent comments by user
- display the above per module
- include comments on your site search
- display a block with the last commented items (not last comments)

It has now been updated to XOOPS 2.5.5 Admin GUI, and tested it on XOOPS 2.5.5 and PHP 5.3.13

Download: XOOPS SVN

Requirements: XOOPS 2.5.5

Please help us with testing...
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

DCrussader

Friend of XOOPS
Posted on: 2012/8/7 12:19
DCrussader
DCrussader (Show more)
Friend of XOOPS
Posts: 573
Since: 2005/7/4 7
#2

Re: MyComments 1.01 Beta 1 ready for testing on XOOPS 2.5.5

Portuguese translation is for removal or conversation to be used as base on TX
English files are updated, removed invalid spaces, converted to UTF-8.

http://www.uploading.to/k8bkbumv2wvb

TX Task - https://www.transifex.com/projects/p/x ... s-i18n/r/mycomments101b1/

moss

Just popping in
Posted on: 2013/1/26 13:43
moss
moss (Show more)
Just popping in
Posts: 38
Since: 2009/10/28
#3

Re: MyComments 1.01 Beta 1 ready for testing on XOOPS 2.5.5

This module is fantastic.

I use the block with the last commented items on my website and I would just add the number of comments by items to see his popularity, How to do this ?

Thans for your information and sorry for my english.

moss

Just popping in
Posted on: 2013/1/28 10:54
moss
moss (Show more)
Just popping in
Posts: 38
Since: 2009/10/28
#4

Re: MyComments 1.01 Beta 1 ready for testing on XOOPS 2.5.5

any idea how to add the number of comments per item ?

I add the php code to help...

function b_mycomments2_show($options

    global 
$xoopsUser
    include_once 
XOOPS_ROOT_PATH.'/modules/mycomments/include/comment_constants.php';
    
$limit 10// If you  are not getting suficient results, please increase a little more this number
    
$block $comment_config $trackedItems = array(); 

    
$comment_handler =& xoops_getmodulehandler('comment','mycomments');
    
$moduleperm_handler =& xoops_gethandler('groupperm'); 
    
$member_handler =& xoops_gethandler('member'); 
    
$module_handler =& xoops_gethandler('module'); 

    
$criteria = new CriteriaCompo(new Criteria('com_status'MYCOM_ACTIVE));
    
$criteria->setLimit(intval($options[0] * $limit)); 
    
$criteria->setSort('com_created'); 
    
$criteria->setOrder('DESC'); 

    
$comments $comment_handler->getObjects($criteriatrue); 
    
$modules $module_handler->getObjects(new Criteria('hascomments'1), true); 

    
$count 0
    foreach (
array_keys($comments) as $i) { 
        if ( 
$count == $options[0])  continue; 
        
$mid $comments[$i]->getVar('com_modid'); 

        if (
$xoopsUser) { 
            if (!
$moduleperm_handler->checkRight('module_read'$mid$xoopsUser->getGroups())) { 
                continue; 
            } 
        } else { 
            if (!
$moduleperm_handler->checkRight('module_read'$midXOOPS_GROUP_ANONYMOUS)) { 
                continue; 
            } 
        } 

          
$com['module'] = '<a href="'.XOOPS_URL.'/modules/'.$modules[$mid]->getVar('dirname').'/">'.'<img src="'.XOOPS_URL '/modules/' $modules[$mid]->getVar('dirname''n') . '/images/ico.gif" />'.'</a>'
        if (!isset(
$comment_config[$mid])) { 
            
$comment_config[$mid] = $modules[$mid]->getInfo('comments'); 
        } 
        
$com['id'] = $i
        
$com['title'] = '<a href="'.XOOPS_URL.'/modules/'.$modules[$mid]->getVar('dirname').'/'.$comment_config[$mid]['pageName'].'?'.$comment_config[$mid]['itemName'].'='.$comments[$i]->getVar('com_itemid').'&com_id='.$i.'&com_rootid='.$comments[$i]->getVar('com_rootid').'&'.htmlspecialchars($comments[$i]->getVar('com_exparams')).'#comment'.$i.'">'.$comments[$i]->getVar('com_title').'</a>'
        
$com['icon'] = htmlspecialchars$comments[$i]->getVar('com_icon'), ENT_QUOTES ); 
        
$com['icon'] = ($com['icon'] != '') ? $com['icon'] : 'icon1.gif';
        
$com['time'] = formatTimestamp($comments[$i]->getVar('com_created'),'s'); 
        if (
$comments[$i]->getVar('com_uid') > 0) { 
            
$poster =& $member_handler->getUser($comments[$i]->getVar('com_uid')); 
            if (
is_object($poster)) { 
                
$com['poster'] = '<a href="'.XOOPS_URL.'/userinfo.php?uid='.$comments[$i]->getVar('com_uid').'">'.$poster->getVar('uname').'</a>'
            } else { 
                
$com['poster'] = $GLOBALS['xoopsConfig']['anonymous']; 
            } 
        } else { 
            
$com['poster'] = $GLOBALS['xoopsConfig']['anonymous']; 
        } 
        if (
count($trackedItems) > 0) { 
            
$itemMatch false
            foreach (
array_keys($trackedItems) as $j) { 
                if (
$comments[$i]->getVar('com_modid') == $trackedItems[$j]['modid'] && $comments[$i]->getVar('com_itemid') == $trackedItems[$j]['itemid']) { 
                    
$itemMatch true
                } 
            } 
            if (!
$itemMatch) { 
                
$block['comments'][] =& $com
                
$trackedItems[] = array('modid' => $comments[$i]->getVar('com_modid'), 'itemid' => $comments[$i]->getVar('com_itemid') ); 
                
$count++; 
            } 
        } else { 
            
$block['comments'][] =& $com
            
$trackedItems[] = array('modid' => $comments[$i]->getVar('com_modid'), 'itemid' => $comments[$i]->getVar('com_itemid') ); 
            
$count++; 
        } 
        unset(
$com); 
    } 
    return 
$block
}


Thank you for your help

Cesagonchu

Moderator
Posted on: 2013/3/19 9:41
Cesagonchu
Cesagonchu (Show more)
Moderator
Posts: 864
Since: 2010/2/1 2
#5

Re: MyComments 1.01 Beta 1 ready for testing on XOOPS 2.5.5

Transifex : MyComments 1.01 Final (language files for translators).

Sourceforge : MyComments 1.01 Final.

Please help us with translations and tests.