summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtemplates/center_component_comments.php54
-rwxr-xr-xtemplates/center_component_comments.tpl35
-rwxr-xr-xtemplates/center_list_components.tpl18
3 files changed, 0 insertions, 107 deletions
diff --git a/templates/center_component_comments.php b/templates/center_component_comments.php
deleted file mode 100755
index 86ea440..0000000
--- a/templates/center_component_comments.php
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-/**
- * @version $Header$
- * @package stock
- * @subpackage modules
- */
-
-/**
- * A specialized version of liberty/modules/mod_last_comments.php for stock
- */
-use Bitweaver\Liberty\LibertyComment;
-use Bitweaver\KernelTools;
-
-global $gQueryUser, $gBitUser, $gLibertySystem, $moduleParams;
-$params = $moduleParams['module_params'];
-$moduleTitle = !empty($moduleParams['title'])? $moduleParams['title'] : 'Recent Image Comments';
-
-$userId = null;
-if( !empty( $gQueryUser->mUserId ) ) {
- $userId = $gQueryUser->mUserId;
-}
-
-$listHash = [
- 'user_id' => $userId,
- 'max_records' => $moduleParams['module_rows'],
-];
-
-if (!empty($params['full'])) {
- $listHash['parse'] = true;
-}
-
-if (!empty($params['pigeonholes'])) {
- $listHash['pigeonholes']['root_filter'] = $params['pigeonholes'];
-}
-
-if( !empty( $params['root_content_type_guid'] ) ) {
- if( empty($moduleTitle) && is_string( $params['root_content_type_guid'] ) ) {
- $moduleTitle = $gLibertySystem->getContentTypeName( $params['root_content_type_guid'] ).' '.KernelTools::tra( 'Comments' );
- }
- $listHash['root_content_type_guid'] = $params['root_content_type_guid'];
-} else {
- // default to base image types
- $listHash['root_content_type_guid'] = ['stockcomponent','stockassembly'];
-}
-$gBitSmarty->assign( 'moduleTitle', $moduleTitle );
-
-$lcom = new LibertyComment();
-$modLastComments = $lcom->getList( $listHash );
-$keys = array_keys( $modLastComments );
-foreach( $keys as $k ) {
- $modLastComments[$k]['object'] = LibertyBase::getLibertyObject( $modLastComments[$k]['root_id'], $modLastComments[$k]['root_content_type_guid'] );
-}
-$gBitSmarty->assign( 'modLastComments', $modLastComments );
-?>
diff --git a/templates/center_component_comments.tpl b/templates/center_component_comments.tpl
deleted file mode 100755
index a90a417..0000000
--- a/templates/center_component_comments.tpl
+++ /dev/null
@@ -1,35 +0,0 @@
-{* $Header$ *}
-{strip}
-{if $modLastComments}
-<div class="listing stock">
- <div class="header">
- <h2>{tr}{$moduleTitle|default:'Image Comments'}{/tr}</h2>
- </div>
-
- <div class="body">
- <ul class="comment">
- {section name=ix loop=$modLastComments}
- <li class="post">
- <a href="{$modLastComments[ix].object->getDisplayUrl()}"><img class="thumb" src="{$modLastComments[ix].object->getThumbnailUrl($moduleParams.module_params.thumb_size)}" alt="{$modLastComments[ix].object->getTitle()|escape}" title="{$modLastComments[ix].object->getTitle()|escape}" /></a>
-
- <div class="header">
- <h3>{$modLastComments[ix].object->getTitle()|escape}:&nbsp;{$modLastComments[ix].display_link}</h3>
- {if $moduleParams.module_params.show_date}
- <div class="date">{tr}by{/tr} {displayname hash=$modLastComments[ix]}, {$modLastComments[ix].last_modified|bit_short_datetime}</div>
- {/if}
- </div>
- {if $moduleParams.module_params.full}
- <p>{$modLastComments[ix].parsed_data}</p>
- {/if}
- <div class="clear"></div>
- </li>
- {sectionelse}
- <li></li>
- {/section}
- </ul>
- <div class="clear"></div>
- {pagination gallery_id=$gContent->mGalleryId}
- </div> <!-- end .body -->
-</div> <!-- end .stock -->
-{/if}
-{/strip}
diff --git a/templates/center_list_components.tpl b/templates/center_list_components.tpl
deleted file mode 100755
index f861b9a..0000000
--- a/templates/center_list_components.tpl
+++ /dev/null
@@ -1,18 +0,0 @@
-{strip}
-{if $thumbnailList || $showEmpty}
- <div class="listing stock">
- <div class="header">
- <h2>{$stock_center_params.title|default:"{tr}Components{/tr}"}</h2>
- </div>
-
- <div class="body">
- {foreach from=$thumbnailList key=componentId item=component}
- <div><a href="{$component.display_url}">{$component.title|escape}</a></div>
- {foreachelse}
- {tr}No records found{/tr}
- {/foreach}
- <p><a href="{$smarty.const.STOCK_PKG_URL}list_assemblies.php?user_id={$gQueryUserId}">{tr}View More{/tr}...</a></p>
- </div><!-- end .body -->
- </div><!-- end .stock -->
-{/if}
-{/strip}