From 7e064971047bdb81f65ba43e7940c693a5d6dd20 Mon Sep 17 00:00:00 2001 From: Christian Fowler Date: Wed, 3 Feb 2010 18:50:52 +0000 Subject: move recent comments to liberty --- templates/center_recent_comments.php | 47 ------------------------------------ templates/center_recent_comments.tpl | 22 ----------------- 2 files changed, 69 deletions(-) delete mode 100755 templates/center_recent_comments.php delete mode 100755 templates/center_recent_comments.tpl diff --git a/templates/center_recent_comments.php b/templates/center_recent_comments.php deleted file mode 100755 index a0cbcc2..0000000 --- a/templates/center_recent_comments.php +++ /dev/null @@ -1,47 +0,0 @@ -mUserId ) ) { - $userId = $gQueryUser->mUserId; -} - -$listHash = array( - 'user_id' => $userId, - 'max_records' => $moduleParams['module_rows'], -); - -if (!empty($params['full'])) { - $listHash['parse'] = TRUE; -} - -$listHash['full'] = (!empty( $params['full'] ) ? $params['full'] : TRUE); -$listHash['thumb_size'] = (!empty( $params['thumb_size'] ) ? $params['thumb_size'] : 'avatar'); -$listHash['show_date'] = (!empty( $params['show_date'] ) ? $params['show_date'] : TRUE);; - -if( !empty( $params['root_content_type_guid'] ) ) { - $listHash['root_content_type_guid'] = $params['root_content_type_guid']; -} - -$gBitSmarty->assign( 'moduleTitle', $moduleTitle ); -$lcom = new LibertyComment(); -$modLastComments = $lcom->getList( $listHash ); -$keys = array_keys( $modLastComments ); -foreach( $keys as $k ) { - if($modLastComments[$k]['parent_content_type_guid'] == 'feedstatus'){ //if comment is a reply to a status, use the poster as the object, otherwise our thumbnail will be of the content we commented on (the other user,status) - $user = new BitUser( $modLastComments[$k]['user_id'] ); - $user->load(); - $modLastComments[$k]['object'] = $user; - }else{ //If a comment on a piece of content, use piece of content as object in question - $modLastComments[$k]['object'] = LibertyBase::getLibertyObject( $modLastComments[$k]['root_id'], $modLastComments[$k]['root_content_type_guid'] ); - } -} - -$gBitSmarty->assign( 'modLastComments', $modLastComments ); - -?> diff --git a/templates/center_recent_comments.tpl b/templates/center_recent_comments.tpl deleted file mode 100755 index 58b8ac7..0000000 --- a/templates/center_recent_comments.tpl +++ /dev/null @@ -1,22 +0,0 @@ -{strip} -{if $modLastComments} -
-
-

{tr}{$moduleTitle}{/tr}

-
-
-
    - {section name=ix loop=$modLastComments} -
  • - {$modLastComments[ix].object->getTitle()|escape} -
    - {displayname hash=$modLastComments[ix]} {$modLastComments[ix].parsed_data} -
    {$modLastComments[ix].last_modified|bit_short_datetime}
    -
    -
  • - {/section} -
-
-
-{/if} -{/strip} -- cgit v1.3