diff options
| author | Christian Fowler <spider@viovio.com> | 2010-02-02 22:02:22 +0000 |
|---|---|---|
| committer | Christian Fowler <spider@viovio.com> | 2010-02-02 22:02:22 +0000 |
| commit | 79b825be4ce37a1b5b2fe968da1f625df0729545 (patch) | |
| tree | e656c416584433b42a73726a128f642defb0c184 | |
| parent | 6a903ddcf98d4ee47095cd7de6a73c1f6e68291f (diff) | |
| download | fisheye-79b825be4ce37a1b5b2fe968da1f625df0729545.tar.gz fisheye-79b825be4ce37a1b5b2fe968da1f625df0729545.tar.bz2 fisheye-79b825be4ce37a1b5b2fe968da1f625df0729545.zip | |
use ->getTitle() method instead of ->mInfo.title in templates to allow for cleaner polymorphism
| -rw-r--r-- | image_lookup_inc.php | 4 | ||||
| -rw-r--r-- | templates/edit_gallery.tpl | 6 | ||||
| -rw-r--r-- | templates/edit_image.tpl | 8 | ||||
| -rw-r--r-- | templates/edit_image_inc.tpl | 6 | ||||
| -rw-r--r-- | templates/image_order.tpl | 4 | ||||
| -rw-r--r-- | templates/view_gallery_files_inc.tpl | 4 | ||||
| -rw-r--r-- | templates/view_gallery_images_inc.tpl | 16 |
7 files changed, 24 insertions, 24 deletions
diff --git a/image_lookup_inc.php b/image_lookup_inc.php index dcc2b47..59eb5a2 100644 --- a/image_lookup_inc.php +++ b/image_lookup_inc.php @@ -1,6 +1,6 @@ <?php /** - * @version $Header: /cvsroot/bitweaver/_bit_fisheye/image_lookup_inc.php,v 1.6 2007/11/05 06:23:10 spiderr Exp $ + * @version $Header: /cvsroot/bitweaver/_bit_fisheye/image_lookup_inc.php,v 1.7 2010/02/02 22:02:21 spiderr Exp $ * @package fisheye * @subpackage functions */ @@ -9,7 +9,7 @@ global $gContent, $gGallery; if( $gContent = FisheyeImage::lookup( $_REQUEST ) ) { - $gContent->load(); + // nothing to do. ::lookup will do a full load } else { $gContent = new FisheyeImage(); $imageId = NULL; diff --git a/templates/edit_gallery.tpl b/templates/edit_gallery.tpl index 4642352..2968d09 100644 --- a/templates/edit_gallery.tpl +++ b/templates/edit_gallery.tpl @@ -17,8 +17,8 @@ function updateGalleryPagination() { <div class="edit fisheye"> <div class="header"> <h1> - {if $gContent->mInfo.title} - {tr}Edit Gallery{/tr}: {$gContent->mInfo.title|escape} + {if $gContent->getTitle()} + {tr}Edit Gallery{/tr}: {$gContent->getTitle()|escape} {else} {tr}Create Image Gallery{/tr} {/if} @@ -37,7 +37,7 @@ function updateGalleryPagination() { <div class="row"> {formlabel label="Title" for="gallery-title" mandatory="y"} {forminput} - <input type="text" name="title" id="gallery-title" value="{$gContent->mInfo.title|escape}" maxlength="160" size="50"/> + <input type="text" name="title" id="gallery-title" value="{$gContent->getTitle()|escape}" maxlength="160" size="50"/> {/forminput} </div> diff --git a/templates/edit_image.tpl b/templates/edit_image.tpl index 416f6f0..18782f8 100644 --- a/templates/edit_image.tpl +++ b/templates/edit_image.tpl @@ -2,7 +2,7 @@ <div class="edit fisheye"> <div class="header"> - <h1>{if $gContent->mInfo.image_id}{tr}Edit Image{/tr}: {$gContent->mInfo.title|escape} {else}{tr}Add New Image{/tr} {/if}</h1> + <h1>{if $gContent->mInfo.image_id}{tr}Edit Image{/tr}: {$gContent->getTitle()|escape} {else}{tr}Add New Image{/tr} {/if}</h1> </div> <div class="body"> @@ -21,7 +21,7 @@ {formlabel label="Current Image"} {forminput} {if $gContent->mInfo.storage_path} - <img src="{$gContent->mInfo.thumbnail_url.medium}?{math equation="1 + rand(1,9999)"}" alt="{$gContent->mInfo.title|escape}" /> + <img src="{$gContent->mInfo.thumbnail_url.medium}?{math equation="1 + rand(1,9999)"}" alt="{$gContent->getTitle()|escape}" /> <br /> <small> {if $gContent->mInfo.width && $gContent->mInfo.height} @@ -31,7 +31,7 @@ {/if} </small> {else} - <img src="{$smarty.const.FISHEYE_PKG_URL}image/no_image.png" alt="{$gContent->mInfo.title|escape}" /> + <img src="{$smarty.const.FISHEYE_PKG_URL}image/no_image.png" alt="{$gContent->getTitle()|escape}" /> {/if} {/forminput} </div> @@ -39,7 +39,7 @@ <div class="row"> {formlabel label="Title" for="image-title"} {forminput} - <input type="text" name="title" id="image-title" value="{$gContent->mInfo.title|escape}" maxlength="160" size="50"/> + <input type="text" name="title" id="image-title" value="{$gContent->getTitle()|escape}" maxlength="160" size="50"/> {/forminput} </div> diff --git a/templates/edit_image_inc.tpl b/templates/edit_image_inc.tpl index 7508032..5b44c75 100644 --- a/templates/edit_image_inc.tpl +++ b/templates/edit_image_inc.tpl @@ -7,7 +7,7 @@ <div class="row"> {formlabel label="Title" for="image-title"} {forminput} - <input type="text" name="title" id="image-title" value="{$gContent->mInfo.title|escape}" maxlength="160" size="40"/> + <input type="text" name="title" id="image-title" value="{$gContent->getTitle()|escape}" maxlength="160" size="40"/> {/forminput} </div> @@ -22,7 +22,7 @@ {formlabel label="Current Image"} {forminput} {if $gContent->mInfo.storage_path} - <img src="{$gContent->mInfo.thumbnail_url.medium}" alt="{$gContent->mInfo.title|escape}" /> + <img src="{$gContent->mInfo.thumbnail_url.medium}" alt="{$gContent->getTitle()|escape}" /> <br /> <small> {if $gContent->mInfo.width && $gContent->mInfo.height} @@ -32,7 +32,7 @@ {/if} </small> {else} - <img src="{$smarty.const.FISHEYE_PKG_URL}image/no_image.png" alt="{$gContent->mInfo.title|escape}" /> + <img src="{$smarty.const.FISHEYE_PKG_URL}image/no_image.png" alt="{$gContent->getTitle()|escape}" /> {/if} {/forminput} </div> diff --git a/templates/image_order.tpl b/templates/image_order.tpl index db27568..1ef9af3 100644 --- a/templates/image_order.tpl +++ b/templates/image_order.tpl @@ -1,7 +1,7 @@ {strip} <div class="admin fisheye"> <div class="header"> - <h1>{tr}Gallery Images{/tr}: <a href="{$smarty.const.FISHEYE_PKG_URL}view.php?gallery_id={$gContent->mGalleryId}">{$gContent->mInfo.title|escape}</a></h1> + <h1>{tr}Gallery Images{/tr}: <a href="{$smarty.const.FISHEYE_PKG_URL}view.php?gallery_id={$gContent->mGalleryId}">{$gContent->getTitle()|escape}</a></h1> </div> <div class="body"> @@ -36,7 +36,7 @@ <tr class="{$pageClass}"> {counter name=imageCount print=false} <td class="{$galItem->mType.content_type_guid}"> - <a href="{$galItem->getDisplayUrl()|escape}"><img class="thumb" src="{$gContent->mItems.$itemContentId->getThumbnailUri()|replace:"&":"&"}{if $batchEdit.$itemContentId ne ''}?{math equation="1 + rand(1,9999)"}{/if}" alt="{$galItem->mInfo.title|escape}" /></a> + <a href="{$galItem->getDisplayUrl()|escape}"><img class="thumb" src="{$gContent->mItems.$itemContentId->getThumbnailUri()|replace:"&":"&"}{if $batchEdit.$itemContentId ne ''}?{math equation="1 + rand(1,9999)"}{/if}" alt="{$galItem->getTitle()|escape}" /></a> </td> <td> diff --git a/templates/view_gallery_files_inc.tpl b/templates/view_gallery_files_inc.tpl index a217339..b35f56b 100644 --- a/templates/view_gallery_files_inc.tpl +++ b/templates/view_gallery_files_inc.tpl @@ -27,13 +27,13 @@ {assign var=item_id value=$gContent->mItems[ix]->mImageId} <td> <a href="{$smarty.const.BIT_ROOT_URL}{$gContent->mItems[ix]->mStorage.$item_id.storage_path}"> - <img class="thumb" src="{$gContent->mItems[ix]->getThumbnailUri()}" alt="{$gContent->mItems[ix]->mInfo.title|escape|default:'image'}" /> + <img class="thumb" src="{$gContent->mItems[ix]->getThumbnailUri()}" alt="{$gContent->mItems[ix]->getTitle()|escape|default:'image'}" /> </a> </td> <td> {if $gBitSystem->isFeatureActive( 'fisheye_gallery_list_image_titles' )} - <h2>{$gContent->mItems[ix]->mInfo.title|escape}</h2> + <h2>{$gContent->mItems[ix]->getTitle()|escape}</h2> {/if} <a href="{$smarty.const.BIT_ROOT_URL}{$gContent->mItems[ix]->mStorage.$item_id.storage_path}"> {$gContent->mItems[ix]->mStorage.$item_id.filename} diff --git a/templates/view_gallery_images_inc.tpl b/templates/view_gallery_images_inc.tpl index ed2f7ba..67f8281 100644 --- a/templates/view_gallery_images_inc.tpl +++ b/templates/view_gallery_images_inc.tpl @@ -10,7 +10,7 @@ {include file="bitpackage:liberty/services_inc.tpl" serviceLocation='body' serviceHash=$galItem->mInfo type=mini} {include file=$gLibertySystem->getMimeTemplate('inline',$galItem->mInfo.attachment_plugin_guid) attachment=$galItem->getPreviewHash()} {if $gBitSystem->isFeatureActive( 'fisheye_gallery_list_image_titles' )} - <h2>{$galItem->mInfo.title|escape}</h2> + <h2>{$galItem->getTitle()|escape}</h2> {/if} {if $gBitSystem->isFeatureActive( 'fisheye_gallery_list_image_descriptions' )} <p>{$galItem->mInfo.data|escape}</p> @@ -62,19 +62,19 @@ <a href="{$galItem->mInfo.thumbnail_url.large}"> {/if} {/if} - <img src="{$galItem->mInfo.thumbnail_url.$thumbsize}" alt="{$galItem->mInfo.title|escape}" title="{$galItem->mInfo.title|escape}" /> + <img src="{$galItem->mInfo.thumbnail_url.$thumbsize}" alt="{$galItem->getTitle()|escape}" title="{$galItem->getTitle()|escape}" /> {if $gBitSystem->isFeatureActive( 'site_fancy_zoom' )} </a> {/if} {else} <a href="{$galItem->getDisplayUrl()|escape}"> - <img class="thumb" src="{$galItem->getThumbnailUri()}" alt="{$galItem->mInfo.title|escape|default:'image'}" /> + <img class="thumb" src="{$galItem->getThumbnailUri()}" alt="{$galItem->getTitle()|escape|default:'image'}" /> </a> {/if} </td> {/if} <td> - <h3><a href="{$galItem->mInfo.display_url}">{$galItem->mInfo.title|escape}</a></h3> + <h3><a href="{$galItem->getDisplayUrl()}">{$galItem->getTitle()|escape}</a></h3> {if $gBitSystem->isFeatureActive( 'fisheye_item_list_desc' ) && $galItem->mInfo.data} {$galItem->mInfo.parsed_data} {/if} @@ -85,7 +85,7 @@ {if $gBitSystem->isFeatureActive( 'fisheye_item_list_name' )} {if $br}<br />{/if} {if $gBitUser->hasPermission( 'p_treasury_view_item' )} - <a href="{$galItem->mInfo.display_url}"> + <a href="{$galItem->getDisplayUrl()}"> {/if} {$galItem->mInfo.filename} <small>({$galItem->mInfo.mime_type})</small> {if $gBitUser->hasPermission( 'p_treasury_view_item' )} @@ -124,7 +124,7 @@ <a href="{$galItem->mInfo.download_url}">{biticon ipackage="icons" iname="emblem-downloads" iexplain="Download File"}</a> {/if} {if $gBitUser->hasPermission( 'p_treasury_view_item' )} - <a href="{$galItem->mInfo.display_url}">{biticon ipackage="icons" iname="document-open" iexplain="View File"}</a> + <a href="{$galItem->getDisplayUrl()}">{biticon ipackage="icons" iname="document-open" iexplain="View File"}</a> {/if} {if $gContent->isOwner( $galItem->mInfo ) || $gBitUser->isAdmin()} <a href="{$smarty.const.FISHEYE_PKG_URL}edit_image.php?content_id={$galItem->mInfo.content_id}&action=edit">{biticon ipackage="icons" iname="accessories-text-editor" iexplain="Edit File"}</a> @@ -150,10 +150,10 @@ {include file="bitpackage:liberty/services_inc.tpl" serviceLocation='body' serviceHash=$galItem->mInfo type=mini} {box class="box `$galItem->mInfo.content_type_guid`"} {if $gBitSystem->isFeatureActive( 'fisheye_gallery_list_image_titles' )} - <h2>{$galItem->mInfo.title|escape}</h2> + <h2>{$galItem->getTitle()|escape}</h2> {/if} <a href="{$galItem->getDisplayUrl()|escape}"> - <img class="thumb" src="{$galItem->getThumbnailUri()}" alt="{$galItem->mInfo.title|escape|default:'image'}" /> + <img class="thumb" src="{$galItem->getThumbnailUri()}" alt="{$galItem->getTitle()|escape|default:'image'}" /> </a> {if $gBitSystem->isFeatureActive( 'fisheye_gallery_list_image_descriptions' )} <p>{$galItem->mInfo.data|escape}</p> |
