summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Fowler <spider@viovio.com>2010-02-03 18:50:52 +0000
committerChristian Fowler <spider@viovio.com>2010-02-03 18:50:52 +0000
commit7e064971047bdb81f65ba43e7940c693a5d6dd20 (patch)
tree70b0a25db8ddf8ac33166b6bd6d8c90988a783fa
parent85247ef069425ecc429cf157b7f59e6613c97332 (diff)
downloadfeed-7e064971047bdb81f65ba43e7940c693a5d6dd20.tar.gz
feed-7e064971047bdb81f65ba43e7940c693a5d6dd20.tar.bz2
feed-7e064971047bdb81f65ba43e7940c693a5d6dd20.zip
move recent comments to liberty
-rwxr-xr-xtemplates/center_recent_comments.php47
-rwxr-xr-xtemplates/center_recent_comments.tpl22
2 files changed, 0 insertions, 69 deletions
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 @@
-<?php
-
-require_once( LIBERTY_PKG_PATH.'LibertyComment.php' );
-global $gQueryUser, $gBitUser, $gLibertySystem, $moduleParams;
-$params = $moduleParams['module_params'];
-$moduleTitle = !empty($moduleParams['title'])? $moduleParams['title'] : 'Recent Activity';
-
-$userId = NULL;
-
-if( !empty( $gQueryUser->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}
-<div class="">
- <div class="header">
- <h1>{tr}{$moduleTitle}{/tr}</h1>
- </div>
- <div class="body">
- <ul class="data">
- {section name=ix loop=$modLastComments}
- <li class="item">
- <a href="{$modLastComments[ix].object->getDisplayUrl()}"><img style="width:50px;float:left;" src="{if $modLastComments[ix].object->getThumbnailUrl($moduleParams.module_params.thumb_size)}{$modLastComments[ix].object->getThumbnailUrl($moduleParams.module_params.thumb_size)}{else}{$smarty.const.USERS_PKG_URL}icons/silhouette.png{/if}" alt="{$modLastComments[ix].object->getTitle()|escape}" title="{$modLastComments[ix].object->getTitle()|escape}" /></a>
- <div style="margin-left:60px;vertical-align:top;min-height:40px;margin-bottom:10px;background-color:#eee;padding:5px;">
- {displayname hash=$modLastComments[ix]} {$modLastComments[ix].parsed_data}
- <div class="date">{$modLastComments[ix].last_modified|bit_short_datetime}</div>
- </div>
- </li>
- {/section}
- </ul>
- </div> <!-- end .body -->
-</div>
-{/if}
-{/strip}