diff options
| author | Lester Caine <lester@lsces.co.uk> | 2026-06-14 12:07:39 +0100 |
|---|---|---|
| committer | Lester Caine <lester@lsces.co.uk> | 2026-06-14 12:07:39 +0100 |
| commit | bf2b0572f29f7a27065ec3e9bbfd597ccad60ec4 (patch) | |
| tree | 4eb90760859c9663aa4f55d03afc9531bbe0ecb2 | |
| parent | 96448ac56a810b38555465087696ea7a1c7d7305 (diff) | |
| download | stock-bf2b0572f29f7a27065ec3e9bbfd597ccad60ec4.tar.gz stock-bf2b0572f29f7a27065ec3e9bbfd597ccad60ec4.tar.bz2 stock-bf2b0572f29f7a27065ec3e9bbfd597ccad60ec4.zip | |
Remove dead center_ component template files
center_list_components.tpl, center_component_comments.php and
center_component_comments.tpl are unreferenced old embedded-center
pattern remnants — same cleanup as center_list_assemblies.php.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
| -rwxr-xr-x | templates/center_component_comments.php | 54 | ||||
| -rwxr-xr-x | templates/center_component_comments.tpl | 35 | ||||
| -rwxr-xr-x | templates/center_list_components.tpl | 18 |
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}: {$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} |
