summaryrefslogtreecommitdiff
path: root/templates/mime
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2008-09-15 10:32:09 +0000
committerMax Kremmel <xing@synapse.plus.com>2008-09-15 10:32:09 +0000
commit91d0ba3f8bbf1de752d91f9f8b229efe423287d2 (patch)
tree657e08f226976cb5b2f3bf555dc60d075ad1a0c6 /templates/mime
parent9ec80107411cec0f8d1f861d164a1cd589b2a3ed (diff)
downloadliberty-91d0ba3f8bbf1de752d91f9f8b229efe423287d2.tar.gz
liberty-91d0ba3f8bbf1de752d91f9f8b229efe423287d2.tar.bz2
liberty-91d0ba3f8bbf1de752d91f9f8b229efe423287d2.zip
move mime templates to their own dir to clean up liberty/templates a bit
Diffstat (limited to 'templates/mime')
-rw-r--r--templates/mime/application/view.tpl9
-rw-r--r--templates/mime/audio/edit.tpl47
-rw-r--r--templates/mime/audio/inline.tpl29
-rw-r--r--templates/mime/audio/player.tpl28
-rw-r--r--templates/mime/audio/view.tpl79
-rw-r--r--templates/mime/default/inline.tpl33
-rw-r--r--templates/mime/default/upload.tpl30
-rw-r--r--templates/mime/default/view.tpl20
-rw-r--r--templates/mime/flash/inline.tpl17
-rw-r--r--templates/mime/flash/view.tpl25
-rw-r--r--templates/mime/flv/edit.tpl24
-rw-r--r--templates/mime/flv/inline.tpl28
-rw-r--r--templates/mime/flv/player.tpl23
-rw-r--r--templates/mime/flv/view.tpl63
-rw-r--r--templates/mime/image/edit.tpl11
-rw-r--r--templates/mime/image/inline.tpl52
-rw-r--r--templates/mime/image/view.tpl36
-rw-r--r--templates/mime/pbase/upload.tpl11
18 files changed, 565 insertions, 0 deletions
diff --git a/templates/mime/application/view.tpl b/templates/mime/application/view.tpl
new file mode 100644
index 0000000..a7261fa
--- /dev/null
+++ b/templates/mime/application/view.tpl
@@ -0,0 +1,9 @@
+{strip}
+<div class="row" style="text-align:center;">
+ {assign var=size value=$smarty.request.size|default:icon}
+ <a href="{$attachment.source_url|escape}">
+ <img title="" alt="" src="{$attachment.thumbnail_url.$size}" />
+ </a>
+</div>
+{/strip}
+{include file="bitpackage:liberty/mime_meta_inc.tpl"}
diff --git a/templates/mime/audio/edit.tpl b/templates/mime/audio/edit.tpl
new file mode 100644
index 0000000..1e2d98f
--- /dev/null
+++ b/templates/mime/audio/edit.tpl
@@ -0,0 +1,47 @@
+{strip}
+<div class="row">
+ {formlabel label="Title" for="title"}
+ {forminput}
+ <input type="text" size="35" id="audio_title" name="plugin[{$attachment.attachment_id}][mimeaudio][meta][title]" value="{$attachment.meta.title}" />
+ {/forminput}
+</div>
+
+<div class="row">
+ {formlabel label="Album" for="audio_album"}
+ {forminput}
+ <input type="text" size="35" id="audio_album" name="plugin[{$attachment.attachment_id}][mimeaudio][meta][album]" value="{$attachment.meta.album}" />
+ {/forminput}
+</div>
+
+<div class="row">
+ {formlabel label="Artist" for="audio_artist"}
+ {forminput}
+ <input type="text" size="35" id="audio_artist" name="plugin[{$attachment.attachment_id}][mimeaudio][meta][artist]" value="{$attachment.meta.artist}" />
+ {/forminput}
+</div>
+
+<div class="row">
+ {formlabel label="Year" for="audio_year"}
+ {forminput}
+ <input type="text" size="35" id="audio_year" name="plugin[{$attachment.attachment_id}][mimeaudio][meta][year]" value="{$attachment.meta.year}" />
+ {/forminput}
+</div>
+
+<div class="row">
+ {formlabel label="Genre" for="audio_genre"}
+ {forminput}
+ <input type="text" size="35" id="audio_genre" name="plugin[{$attachment.attachment_id}][mimeaudio][meta][genre]" value="{$attachment.meta.genre}" />
+ {/forminput}
+</div>
+
+{if $attachment.source_file}
+ <div class="row">
+ {formlabel label="Remove Original" for="remove_original"}
+ {forminput}
+ <input type="checkbox" id="remove_original" name="plugin[{$attachment.attachment_id}][mimeaudio][remove_original]" value="y" />
+ {formhelp note="This will permanently remove the original file from the server. This will still allow you to listen to the audio file but not download it."}
+ {/forminput}
+ </div>
+{/if}
+
+{/strip}
diff --git a/templates/mime/audio/inline.tpl b/templates/mime/audio/inline.tpl
new file mode 100644
index 0000000..91f17ec
--- /dev/null
+++ b/templates/mime/audio/inline.tpl
@@ -0,0 +1,29 @@
+{strip}
+{if $display_type == "attachment_plugin"}
+ {if $wrapper.output == 'desc' || $wrapper.output == 'description'}
+ {if $attachment.display_url}<a {$wrapper.href_class} href="{$wrapper.display_url|default:$attachment.display_url}">{/if}
+ {$wrapper.description|escape|default:$attachment.filename}
+ {if $attachment.display_url}</a>{/if}
+ {else}
+ <{$wrapper.wrapper|default:'div'} class="mimeaudio {$wrapper.class|default:'att-plugin'}"{if $wrapper.style} style="{$wrapper.style}{/if}">
+ {if $attachment.media_url}
+ {include file="bitpackage:liberty/mime_audio_player_inc.tpl"}
+ {/if}
+ {if $wrapper.display_url}<a {$wrapper.href_class} href="{$wrapper.display_url}">{/if}
+ {$wrapper.description|escape|default:$attachment.meta.title|default:"{tr}Full Details{/tr}"}
+ {if $wrapper.display_url}</a>{/if}
+ </{$wrapper.wrapper|default:'div'}>
+ {/if}
+{else}
+ <div class="item">
+ {if $attachment.media_url}
+ {include file="bitpackage:liberty/mime_audio_player_inc.tpl"}
+ {/if}
+
+ {if $display_type eq "storage_thumbs"}
+ {if $attachment.meta.title}{$attachment.meta.title}<br />{/if}
+ <a href="{$attachment.display_url}">{tr}Full Details{/tr}</a>
+ {/if}
+ </div>
+{/if}
+{/strip}
diff --git a/templates/mime/audio/player.tpl b/templates/mime/audio/player.tpl
new file mode 100644
index 0000000..7f4234c
--- /dev/null
+++ b/templates/mime/audio/player.tpl
@@ -0,0 +1,28 @@
+{strip}
+{if $attachment.media_url}
+ {assign var=id value="audio_`$display_type``$attachment.attachment_id`"}
+ {if $uploadTab}{assign var=id value="`$id`_tab"}{/if}
+
+ {* album covers are usually square - scrollbar is 20px high *}
+ {if $thumbsize eq "small"}
+ {assign var=width value=160}
+ {assign var=height value=180}
+ {else}
+ {assign var=width value=400}
+ {assign var=height value=420}
+ {/if}
+ <div id="{$id}"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this video.</div>
+ <script type="text/javascript">/* <![CDATA[ */
+ {if !$attachment.thumbnail_is_mime && $attachment.thumbnail_url.medium}
+ var so = new SWFObject('{$smarty.const.UTIL_PKG_URL}javascript/flv_player/mediaplayer.swf','mpl','{$width}','{$height}','7');
+ so.addVariable("image","{$attachment.thumbnail_url.medium}");
+ {else}
+ var so = new SWFObject('{$smarty.const.UTIL_PKG_URL}javascript/flv_player/mediaplayer.swf','mpl','{$width}','20','7');
+ {/if}
+ so.addVariable("file","{$attachment.media_url}");
+ so.addVariable("frontcolor","0x{$gBitSystem->getConfig('mime_audio_frontcolor','FFFFFF')}");
+ so.addVariable("backcolor","0x{$gBitSystem->getConfig('mime_audio_backcolor','000000')}");
+ so.write('{$id}');
+ /* ]]> */</script>
+{/if}
+{/strip}
diff --git a/templates/mime/audio/view.tpl b/templates/mime/audio/view.tpl
new file mode 100644
index 0000000..f01c5de
--- /dev/null
+++ b/templates/mime/audio/view.tpl
@@ -0,0 +1,79 @@
+{strip}
+{if $attachment.media_url}
+ <div class="row" style="text-align:center;">
+ {include file="bitpackage:liberty/mime_audio_player_inc.tpl"}
+ </div>
+{/if}
+
+{if $attachment.meta.title}
+ <div class="row">
+ {formlabel label="Title" for=""}
+ {forminput}
+ {$attachment.meta.title}
+ {/forminput}
+ </div>
+{/if}
+
+{if $attachment.meta.album}
+ <div class="row">
+ {formlabel label="Album" for=""}
+ {forminput}
+ {$attachment.meta.album}
+ {/forminput}
+ </div>
+{/if}
+
+{if $attachment.meta.artist}
+ <div class="row">
+ {formlabel label="Artist" for=""}
+ {forminput}
+ {$attachment.meta.artist}
+ {/forminput}
+ </div>
+{/if}
+
+{if $attachment.meta.year}
+ <div class="row">
+ {formlabel label="Year" for=""}
+ {forminput}
+ {$attachment.meta.year}
+ {/forminput}
+ </div>
+{/if}
+
+{if $attachment.meta.playtimestring}
+ <div class="row">
+ {formlabel label="Duration" for=""}
+ {forminput}
+ {$attachment.meta.playtimestring}
+ {/forminput}
+ </div>
+{/if}
+
+{if $attachment.meta.genre}
+ <div class="row">
+ {formlabel label="Genre" for=""}
+ {forminput}
+ {$attachment.meta.genre}
+ {/forminput}
+ </div>
+{/if}
+
+{if $attachment.download_url}
+ <div class="row">
+ {formlabel label="Filename" for=""}
+ {forminput}
+ <a href="{$attachment.download_url}">{$attachment.filename|escape}</a> <small>({$attachment.mime_type})</small>
+ {/forminput}
+ </div>
+
+ <div class="row">
+ {formlabel label="Filesize" for=""}
+ {forminput}
+ {$attachment.file_size|display_bytes}
+ {/forminput}
+ </div>
+{/if}
+
+{attachhelp legend=1 hash=$attachment}
+{/strip}
diff --git a/templates/mime/default/inline.tpl b/templates/mime/default/inline.tpl
new file mode 100644
index 0000000..0e16369
--- /dev/null
+++ b/templates/mime/default/inline.tpl
@@ -0,0 +1,33 @@
+{strip}
+{if $display_type == "attachment_plugin"}
+ {if $wrapper.output == 'desc' || $wrapper.output == 'description'}
+ {if $attachment.display_url}<a {$wrapper.href_class} href="{$wrapper.display_url|default:$attachment.display_url}">{/if}
+ {$wrapper.description|escape|default:$attachment.filename}
+ {if $attachment.display_url}</a>{/if}
+ {else}
+ <{$wrapper.wrapper|default:'div'} class="{$wrapper.class|default:'att-plugin'}"{if $wrapper.style} style="{$wrapper.style}{/if}">
+ {if $wrapper.display_url}<a {$wrapper.href_class} href="{$wrapper.display_url}">{/if}
+ {if $thumbsize == 'original'}
+ <img class="thumb" src="{$attachment.source_url}" alt="{$attachment.filename}" title="{$attachment.filename}"/>
+ {elseif $attachment.thumbnail_url.$thumbsize}
+ <img class="thumb" src="{$attachment.thumbnail_url.$thumbsize}" alt="{$attachment.filename}" title="{$attachment.filename}"/>
+ {/if}
+ <br />{$wrapper.description|escape}
+ {if $wrapper.display_url}</a>{/if}
+ </{$wrapper.wrapper|default:'div'}>
+ {/if}
+{else}
+ <div class="item">
+ {assign var=thumbsize value=$thumbsize|default:'small'}
+ {if $attachment.thumbnail_url.$thumbsize}
+ {if !$attachment.is_primary or ( $attachment.is_primary and !$hideprimary )}
+ <a href="{$attachment.display_url}">
+ <img class="thumb" src="{$attachment.thumbnail_url.$thumbsize}" alt="{$attachment.filename}" title="{$attachment.filename}"/>
+ </a>
+ {/if}
+ {else}
+ {tr}No thumbnail for {$attachment.source_url}{/tr}
+ {/if}
+ </div>
+{/if}
+{/strip}
diff --git a/templates/mime/default/upload.tpl b/templates/mime/default/upload.tpl
new file mode 100644
index 0000000..be8eb9b
--- /dev/null
+++ b/templates/mime/default/upload.tpl
@@ -0,0 +1,30 @@
+{strip}
+{if $gBitUser->hasPermission('p_liberty_attach_attachments') }
+ <div class="row">
+ {formlabel label="Upload File(s)"}
+ {forminput}
+ {if $gBitSystem->getConfig("liberty_attachment_style") == "multiple"}
+ <div id="upload_div"></div>
+ <input type="file" name="upload" size="40" id="uploads" />
+ <script type="text/javascript">
+ var upload_files = document.getElementById( 'upload_div' );
+ var upload_element = document.getElementById( 'uploads' );
+ var multi_selector = new MultiSelector( upload_files, {$gBitSystem->getConfig('liberty_max_multiple_attachments',10)});
+ multi_selector.addNamedElement( upload_element , 'uploads');
+ </script>
+ {formhelp note='After selecting the file you want to upload, please return to the edit area and click the save button.'}
+ {elseif $gBitSystem->getConfig("liberty_attachment_style") == "ajax"}
+ <input type="file" name="upload" size="40" id="upload_{$form_id}" onchange="javascript:LibertyAttachment.uploader(this, '{$smarty.const.LIBERTY_PKG_URL}attachment_uploader.php','{tr}Please wait for the current upload to finish.{/tr}', 'liberty_upload_frame_{$form_id}', '{$formid|default:editpageform}');" />
+ {include file="bitpackage:liberty/attachment_uploader_inc.tpl"}
+ {formhelp note='After selecting the file you want to upload, please return to the edit area and click the save button.'}
+ <script type="text/javascript">
+ LibertyAttachment.uploaderSetup( 'upload_{$form_id}' );
+ </script>
+ {else}
+ <input type="file" name="upload" size="40" />
+ {formhelp note='After selecting the file you want to upload, please return to the edit area and click the save button.'}
+ {/if}
+ {/forminput}
+ </div>
+{/if}
+{/strip}
diff --git a/templates/mime/default/view.tpl b/templates/mime/default/view.tpl
new file mode 100644
index 0000000..1b39bfe
--- /dev/null
+++ b/templates/mime/default/view.tpl
@@ -0,0 +1,20 @@
+{strip}
+<div class="row" style="text-align:center;">
+ {assign var=size value=$smarty.request.size|default:medium}
+ <img title="" alt="" src="{$attachment.thumbnail_url.$size}" />
+</div>
+
+{if !$attachment.thumbnail_is_mime}
+ <div class="pagination">
+ {tr}View other sizes{/tr}<br />
+ {foreach name=size key=size from=$attachment.thumbnail_url item=url}
+ <a href="{$attachment.display_url|escape}{if strpos($attachment.display_url,'?')}&amp;{else}?{/if}size={$size}">{tr}{$size}{/tr}</a>
+ {if !$smarty.foreach.size.last}&nbsp;&bull;&nbsp;{/if}
+ {/foreach}
+ {if ( $attachment.original ) }
+ &nbsp;&bull;&nbsp;<a href="{$attachment.source_url|escape}">{tr}Original File{/tr}</a>
+ {/if}
+ </div>
+{/if}
+{/strip}
+{include file="bitpackage:liberty/mime_meta_inc.tpl"}
diff --git a/templates/mime/flash/inline.tpl b/templates/mime/flash/inline.tpl
new file mode 100644
index 0000000..d2d1eba
--- /dev/null
+++ b/templates/mime/flash/inline.tpl
@@ -0,0 +1,17 @@
+<div class="item">
+ {* this should really get a max h or w and base size on the bounding box -or- even better would be to thumbnail swfs for list views*}
+ {assign var=height value=$attachment.preferences.height}
+ {assign var=width value=$attachment.preferences.width}
+ {assign var=size value=$smarty.request.size|default:medium}
+ {assign var=swfwidth value=$gThumbSizes.$thumbsize.width}
+ {math assign=multiplier equation="$swfwidth/$width"}
+ {math assign=swfheight equation="round($height*$multiplier)"}
+ <object width="{$swfwidth}" height="{$swfheight}">
+ <param name="movie" value="{$attachment.source_url}" />
+ <embed src="{$attachment.source_url}" width="{$swfwidth}" height="{$swfheight}">
+ </embed>
+ <img src="{$smarty.const.LIBERTY_PKG_URL}templates/noflash.container.gif" width="200" height="100" alt="" />
+ </object>
+ <br />
+ <a href="{$attachment.display_url}">View SWF</a>
+</div>
diff --git a/templates/mime/flash/view.tpl b/templates/mime/flash/view.tpl
new file mode 100644
index 0000000..87d06fe
--- /dev/null
+++ b/templates/mime/flash/view.tpl
@@ -0,0 +1,25 @@
+{strip}
+<div class="row" style="text-align:center;">
+ {* this should really get a max h or w and base size on the bounding box *}
+ {assign var=height value=$attachment.preferences.height}
+ {assign var=width value=$attachment.preferences.width}
+ {assign var=size value=$smarty.request.size|default:medium}
+ {assign var=swfwidth value=$gThumbSizes.$size.width}
+ {math assign=multiplier equation="$swfwidth/$width"}
+ {math assign=swfheight equation="round($height*$multiplier)"}
+ <object width="{$swfwidth}" height="{$swfheight}">
+ <param name="movie" value="{$attachment.source_url}" />
+ <embed src="{$attachment.source_url}" width="{$swfwidth}" height="{$swfheight}">
+ </embed>
+ <img src="{$smarty.const.LIBERTY_PKG_URL}templates/noflash.container.gif" width="200" height="100" alt="" />
+ </object>
+</div>
+<div class="pagination">
+ {tr}View other sizes{/tr}<br />
+ {foreach name=size key=size from=$attachment.thumbnail_url item=url}
+ <a href="{$attachment.display_url|escape}{if strpos($attachment.display_url,'?')}&amp;{else}?{/if}size={$size}">{tr}{$size}{/tr}</a>
+ {if !$smarty.foreach.size.last}&nbsp;&bull;&nbsp;{/if}
+ {/foreach}
+</div>
+{/strip}
+{include file="bitpackage:liberty/mime_meta_inc.tpl"}
diff --git a/templates/mime/flv/edit.tpl b/templates/mime/flv/edit.tpl
new file mode 100644
index 0000000..19f8e40
--- /dev/null
+++ b/templates/mime/flv/edit.tpl
@@ -0,0 +1,24 @@
+{strip}
+{assign var=tv value=1.33333333333}
+{assign var=ana value=1.55555555556}
+{assign var=wide value=1.77777777778}
+{assign var=puter value=1.6}
+{assign var=cin1 value=1.85}
+{assign var=cin2 value=2.39}
+
+<div class="row">
+ {formlabel label="Set Aspect Ratio" for="aspect"}
+ {forminput}
+ <select name="plugin[{$attachment.attachment_id}][mimeflv][meta][aspect]" id="aspect">
+ <option value="">{tr}Original{/tr}</option>
+ <option {if $attachment.meta.aspect == $tv }selected="selected" {/if}value="{$tv}">4:3 ({tr}TV{/tr})</option>
+ <option {if $attachment.meta.aspect == $ana }selected="selected" {/if}value="{$ana}">14:9 ({tr}Anamorphic{/tr})</option>
+ <option {if $attachment.meta.aspect == $wide }selected="selected" {/if}value="{$wide}">16:9 ({tr}TV Widescreen{/tr})</option>
+ <option {if $attachment.meta.aspect == $cin1 }selected="selected" {/if}value="{$cin1}">1.85 ({tr}Cinema Widescreen{/tr})</option>
+ <option {if $attachment.meta.aspect == $cin2 }selected="selected" {/if}value="{$cin2}">2.39 ({tr}Cinema Widescreen{/tr})</option>
+ <option {if $attachment.meta.aspect == $puter }selected="selected" {/if}value="{$puter}">16:10 ({tr}Computer Widescreen{/tr})</option>
+ </select>
+ {formhelp note="Here you can override the initially set aspect ratio. Please note that the displayed aspect aspect ratio might not correspond to the set value."}
+ {/forminput}
+</div>
+{/strip}
diff --git a/templates/mime/flv/inline.tpl b/templates/mime/flv/inline.tpl
new file mode 100644
index 0000000..4f6a3f7
--- /dev/null
+++ b/templates/mime/flv/inline.tpl
@@ -0,0 +1,28 @@
+{strip}
+{if $display_type == "attachment_plugin"}
+ {if $wrapper.output == 'desc' || $wrapper.output == 'description'}
+ {if $attachment.display_url}<a {$wrapper.href_class} href="{$wrapper.display_url|default:$attachment.display_url}">{/if}
+ {$wrapper.description|escape|default:$attachment.filename}
+ {if $attachment.display_url}</a>{/if}
+ {else}
+ <{$wrapper.wrapper|default:'div'} class="mimeflv {$wrapper.class|default:'att-plugin'}"{if $wrapper.style} style="{$wrapper.style}{/if}">
+ {if $attachment.media_url}
+ {include file="bitpackage:liberty/mime_flv_player_inc.tpl"}
+ {/if}
+ {if $wrapper.display_url}<a {$wrapper.href_class} href="{$wrapper.display_url}">{/if}
+ {$wrapper.description|escape|default:"{tr}Full Details{/tr}"}
+ {if $wrapper.display_url}</a>{/if}
+ </{$wrapper.wrapper|default:'div'}>
+ {/if}
+{else}
+ <div class="item">
+ {if $attachment.media_url}
+ {include file="bitpackage:liberty/mime_flv_player_inc.tpl"}
+ {/if}
+
+ {if $display_type eq "storage_thumbs"}
+ <a href="{$attachment.display_url}">{tr}Full Details{/tr}</a>
+ {/if}
+ </div>
+{/if}
+{/strip}
diff --git a/templates/mime/flv/player.tpl b/templates/mime/flv/player.tpl
new file mode 100644
index 0000000..2a47f3a
--- /dev/null
+++ b/templates/mime/flv/player.tpl
@@ -0,0 +1,23 @@
+{strip}
+{if $attachment.media_url}
+ {assign var=id value="video_`$display_type``$attachment.attachment_id`"}
+ {if $uploadTab}{assign var=id value="`$id`_tab"}{/if}
+ <div id="{$id}"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this video.</div>
+ <script type="text/javascript">/* <![CDATA[ */
+ {if $thumbsize eq "small"}
+ {assign var=width value=160}
+ {math width=$width scrollbar=20 original_width=$attachment.meta.width original_height=$attachment.meta.height equation="original_height / original_width * width + scrollbar" assign=height}
+ var so = new SWFObject('{$smarty.const.UTIL_PKG_URL}javascript/flv_player/mediaplayer.swf','player','{$width}','{$height}','7');
+ {else}
+ var so = new SWFObject('{$smarty.const.UTIL_PKG_URL}javascript/flv_player/mediaplayer.swf','player','{$attachment.meta.width}','{$attachment.meta.height+20}','7');
+ {/if}
+ so.addVariable("file","{$attachment.media_url}");
+ so.addVariable("image","{$attachment.thumbnail_url.medium}");
+ so.addVariable("overstretch","fit");
+ so.addVariable("usefullscreen","false");
+ so.addVariable("frontcolor","0x{$gBitSystem->getConfig('mime_flv_frontcolor','FFFFFF')}");
+ so.addVariable("backcolor","0x{$gBitSystem->getConfig('mime_flv_backcolor','000000')}");
+ so.write('{$id}');
+ /* ]]> */</script>
+{/if}
+{/strip}
diff --git a/templates/mime/flv/view.tpl b/templates/mime/flv/view.tpl
new file mode 100644
index 0000000..5990457
--- /dev/null
+++ b/templates/mime/flv/view.tpl
@@ -0,0 +1,63 @@
+{strip}
+{if $attachment.media_url}
+ <div class="row" style="text-align:center;">
+ {include file="bitpackage:liberty/mime_flv_player_inc.tpl"}
+ </div>
+
+ <div class="pagination">
+ {tr}View other sizes{/tr}<br />
+ &nbsp;&bull;&nbsp;
+ <a href="{$attachment.display_url}&size=small">{tr}Small{/tr}</a>&nbsp;&bull;&nbsp;
+ <a href="{$attachment.display_url}&size=medium">{tr}Medium{/tr}</a>&nbsp;&bull;&nbsp;
+ <a href="{$attachment.display_url}&size=large">{tr}Large{/tr}</a>&nbsp;&bull;&nbsp;
+ <a href="{$attachment.display_url}&size=huge">{tr}Huge{/tr}</a>&nbsp;&bull;&nbsp;
+ <a href="{$attachment.display_url}&size=original">{tr}Original{/tr}</a>&nbsp;&bull;&nbsp;
+ </div>
+{elseif $attachment.status.processing}
+ <div class="row" style="text-align:center;">
+ <a href="{$attachment.download_url}">
+ {assign var=size value=$gBitSystem->getConfig('treasury_item_view_thumb')}
+ <img src="{$attachment.thumbnail_url.$size}{$refresh}" alt="{$gContent->getTitle()}" title="{$gContent->getTitle()}" />
+ <br />{$gContent->getTitle()|escape}
+ </a>
+ </div>
+ {formfeedback warning="{tr}The video is being processed. please try to reload in a couple of minutes.{/tr}"}
+{elseif $attachment.status.error}
+ <div class="row" style="text-align:center;">
+ <a href="{$attachment.download_url}">
+ {assign var=size value=$gBitSystem->getConfig('treasury_item_view_thumb')}
+ <img src="{$attachment.thumbnail_url.$size}{$refresh}" alt="{$gContent->getTitle()}" title="{$gContent->getTitle()}" />
+ <br />{$gContent->getTitle()|escape}
+ </a>
+ </div>
+ {formfeedback error="{tr}The Video could not be processed. You can upload a different version of the film or simply leave as is.{/tr}"}
+{/if}
+
+{if $attachment.meta.duration}
+ <div class="row">
+ {formlabel label="Duration" for=""}
+ {forminput}
+ {$attachment.meta.duration|display_duration}
+ {/forminput}
+ </div>
+{/if}
+
+{if $attachment.download_url}
+ <div class="row">
+ {formlabel label="Filename" for=""}
+ {forminput}
+ <a href="{$attachment.download_url}">{$attachment.filename|escape}</a>
+ &nbsp; <small>({$attachment.mime_type})</small>
+ {/forminput}
+ </div>
+
+ <div class="row">
+ {formlabel label="Filesize" for=""}
+ {forminput}
+ {$attachment.file_size|display_bytes}
+ {/forminput}
+ </div>
+{/if}
+
+{attachhelp legend=1 hash=$attachment}
+{/strip}
diff --git a/templates/mime/image/edit.tpl b/templates/mime/image/edit.tpl
new file mode 100644
index 0000000..ae2511d
--- /dev/null
+++ b/templates/mime/image/edit.tpl
@@ -0,0 +1,11 @@
+{strip}
+{if $gBitSystem->isFeatureActive( 'mime_image_panoramas' )}
+ <div class="row">
+ {formlabel label="Panorama Image" for="panorama"}
+ {forminput}
+ <input type="checkbox" value="y" name="plugin[{$attachment.attachment_id}][mimeimage][preference][is_panorama]" id="panorama" {if $attachment.thumbnail_url.panorama}checked="checked"{/if} />
+ {formhelp note="If this image is a 360&deg; panoramic image with equirectangular projection, check this box. This works best for images with a 360&deg; by 180&deg; field of view (FOV)"}
+ {/forminput}
+ </div>
+{/if}
+{/strip}
diff --git a/templates/mime/image/inline.tpl b/templates/mime/image/inline.tpl
new file mode 100644
index 0000000..f84bbe9
--- /dev/null
+++ b/templates/mime/image/inline.tpl
@@ -0,0 +1,52 @@
+{strip}
+{if $display_type == "attachment_plugin" && $attachment.thumbnail_url.panorama}
+ {if $wrapper.output == 'desc' || $wrapper.output == 'description'}
+ {if $attachment.display_url}<a {$wrapper.href_class} href="{$wrapper.display_url|default:$attachment.display_url}">{/if}
+ {$wrapper.description|escape|default:$attachment.filename}
+ {if $attachment.display_url}</a>{/if}
+ {else}
+ <{$wrapper.wrapper|default:'div'} class="{$wrapper.class|default:'att-plugin'}"{if $wrapper.style} style="{$wrapper.style}{/if}">
+ <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="100%" height="100%" title="{$attachment.filename}">
+ <param name="allowFullScreen" value="true" />
+ <param name="movie" value="{$smarty.const.UTIL_PKG_URL}javascript/fspp/fspp.swf?panoSrc={$attachment.thumbnail_url.panorama}" />
+ <param name="quality" value="high" />
+ <param name="BGCOLOR" value="#AAAAAA" />
+ <embed src="{$smarty.const.UTIL_PKG_URL}javascript/fspp/fspp.swf?panoSrc={$attachment.thumbnail_url.panorama}" allowFullScreen="true"
+ width="100%" height="500px" quality="high"
+ pluginspage="http://www.macromedia.com/go/getflashplayer"
+ type="application/x-shockwave-flash" bgcolor="#DDDDDD">
+ </embed>
+ </object>
+ {if $wrapper.display_url}<a {$wrapper.href_class} href="{$wrapper.display_url}">{/if}
+ {$wrapper.description|escape}<br />
+ {if $wrapper.display_url}</a>{/if}
+ </{$wrapper.wrapper|default:'div'}>
+
+ <a href="javascript:void(0);" id="navigation-link-{$attachment.attachment_id}" onclick='flip("navigation-{$attachment.attachment_id}");flip("navigation-link-{$attachment.attachment_id}");'>{tr}Image Controls{/tr}</a>
+ <div id="navigation-{$attachment.attachment_id}" style="display:none;">
+ <div class="row">
+ {formlabel label="Keyboard Controls"}
+ {forminput}
+ <ul class="formhelp">
+ <li>[Home] - go fullscreen</li>
+ <li>{biticon iname="go-previous" iexplain="Left"} {biticon iname="go-next" iexplain="Right"} {biticon iname="go-up" iexplain="Up"} {biticon iname="go-down" iexplain="down"} - navigate</li>
+ <li>[PageUp] / [PageDn] - zoom in / zoom out</li>
+ </ul>
+ {/forminput}
+ </div>
+
+ <div class="row">
+ {formlabel label="Mouse Controls"}
+ {forminput}
+ <ul class="formhelp">
+ <li>[press left button] + movement - navigate</li>
+ <li>[wheel up] / [wheel down] - zoom in / zoom ou</li>
+ </ul>
+ {/forminput}
+ </div>
+ </div>
+ {/if}
+{else}
+ {include file=$gLibertySystem->getMimeTemplate('inline', $smarty.const.LIBERTY_DEFAULT_MIME_HANDLER)}
+{/if}
+{/strip}
diff --git a/templates/mime/image/view.tpl b/templates/mime/image/view.tpl
new file mode 100644
index 0000000..70450f9
--- /dev/null
+++ b/templates/mime/image/view.tpl
@@ -0,0 +1,36 @@
+{if $attachment.thumbnail_url.panorama}
+ <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="100%" height="100%" title="{$attachment.filename}">
+ <param name="allowFullScreen" value="true" />
+ <param name="movie" value="{$smarty.const.UTIL_PKG_URL}javascript/fspp/fspp.swf?panoSrc={$attachment.thumbnail_url.panorama}" />
+ <param name="quality" value="high" />
+ <param name="BGCOLOR" value="#AAAAAA" />
+ <embed src="{$smarty.const.UTIL_PKG_URL}javascript/fspp/fspp.swf?panoSrc={$attachment.thumbnail_url.panorama}" allowFullScreen="true"
+ width="100%" height="500px" quality="high"
+ pluginspage="http://www.macromedia.com/go/getflashplayer"
+ type="application/x-shockwave-flash" bgcolor="#DDDDDD">
+ </embed>
+ </object>
+ {include file="bitpackage:liberty/mime_meta_inc.tpl"}
+ <div class="row">
+ {formlabel label="Keyboard Controls"}
+ {forminput}
+ <ul class="formhelp">
+ <li>[Home] - go fullscreen</li>
+ <li>{biticon iname="go-previous" iexplain="Left"} {biticon iname="go-next" iexplain="Right"} {biticon iname="go-up" iexplain="Up"} {biticon iname="go-down" iexplain="down"} - navigate</li>
+ <li>[PageUp] / [PageDn] - zoom in / zoom out</li>
+ </ul>
+ {/forminput}
+ </div>
+
+ <div class="row">
+ {formlabel label="Mouse Controls"}
+ {forminput}
+ <ul class="formhelp">
+ <li>[press left button] + movement - navigate</li>
+ <li>[wheel up] / [wheel down] - zoom in / zoom ou</li>
+ </ul>
+ {/forminput}
+ </div>
+{else}
+ {include file=$gLibertySystem->getMimeTemplate('view', $smarty.const.LIBERTY_DEFAULT_MIME_HANDLER)}
+{/if}
diff --git a/templates/mime/pbase/upload.tpl b/templates/mime/pbase/upload.tpl
new file mode 100644
index 0000000..2a0012c
--- /dev/null
+++ b/templates/mime/pbase/upload.tpl
@@ -0,0 +1,11 @@
+{strip}
+{if $gBitUser->hasPermission('p_liberty_attach_attachments') }
+ <div class="row">
+ {formlabel label="PBase image ID"}
+ {forminput}
+ <input type="input" name="mimeplugin[{$smarty.const.PLUGIN_MIME_GUID_PBASE}][pbase_id]" size="10" />
+ {formhelp note='Use the ID number in the URL of the image on <a href="http://www.pbase.com/">PBase</a>.'}
+ {/forminput}
+ </div>
+{/if}
+{/strip}