summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/admin_mime_audio.tpl108
-rw-r--r--templates/mime_audio_inline_inc.tpl7
-rw-r--r--templates/mime_audio_player_inc.tpl29
-rw-r--r--templates/mime_audio_view_inc.tpl78
4 files changed, 222 insertions, 0 deletions
diff --git a/templates/admin_mime_audio.tpl b/templates/admin_mime_audio.tpl
new file mode 100644
index 0000000..0649a57
--- /dev/null
+++ b/templates/admin_mime_audio.tpl
@@ -0,0 +1,108 @@
+{strip}
+<div class="display liberty">
+ <div class="header">
+ <h1>{tr}Flashvideo Plugin Settings{/tr}</h1>
+ </div>
+
+ <div class="body">
+ {form legend="Flashvideo specific settings"}
+ <p class="formhelp">
+ You can find some information relating to this plugin on the <a class="external" href="http://www.bitweaver.org/wiki/TreasuryFlvPlugin">TreasuryFlvPlugin plugin page</a> at bitweaver.org.
+ </p>
+
+ {if !$gLibertySystem->isPluginActive( 'mimeaudio' )}
+ {formfeedback error="This plugins has not been enabled. All settings you change here will have no effect on uploaded videos unless you enable the plugin in the liberty plugins administration screen"}
+ {/if}
+
+ {formfeedback hash=$feedback}
+ <p class="formhelp">{tr}You can spcify the path to either ffmpeg or mplayer and lame. If you have all applications installed, we will first try to convert audio files using ffmpeg and if that didn't work, we'll use mplayer and lame.{/tr}</p>
+
+ <div class="row">
+ {formlabel label="Path to ffmpeg" for="mime_audio_ffmpeg_path"}
+ {forminput}
+ <input type='text' name="mime_audio_ffmpeg_path" id="mime_audio_ffmpeg_path" size="40" value="{$gBitSystem->getConfig('mime_audio_ffmpeg_path')|escape|default:$ffmpeg_path}" />
+ {formhelp note="If this path is not correct, please set the correct path to ffmpeg."}
+ {/forminput}
+ </div>
+
+ <div class="row">
+ {formlabel label="Path to mplayer" for="mime_audio_mplayer_path"}
+ {forminput}
+ <input type='text' name="mime_audio_mplayer_path" id="mime_audio_mplayer_path" size="40" value="{$gBitSystem->getConfig('mime_audio_mplayer_path')|escape|default:$mplayer_path}" />
+ {formhelp note="If this path is not correct, please set the correct path to mplayer."}
+ {/forminput}
+ </div>
+
+ <div class="row">
+ {formlabel label="Path to lame" for="mime_audio_lame_path"}
+ {forminput}
+ <input type='text' name="mime_audio_lame_path" id="mime_audio_lame_path" size="40" value="{$gBitSystem->getConfig('mime_audio_lame_path')|escape|default:$lame_path}" />
+ {formhelp note="If this path is not correct, please set the correct path to lame."}
+ {/forminput}
+ </div>
+
+ <div class="row">
+ {formlabel label="Lame options" for="mime_audio_lame_options"}
+ {forminput}
+ <input type='text' name="mime_audio_lame_options" id="mime_audio_lame_options" size="40" value="{$gBitSystem->getConfig('mime_audio_lame_options')|escape|default:$lame_options}" />
+ {formhelp note="If you know your way around lame, you can insert your own options here to override the default settings."}
+ {/forminput}
+ </div>
+
+ <div class="row">
+ {formlabel label="Audio sample rate" for="mime_audio_samplerate"}
+ {forminput}
+ {html_options
+ options=$rates.audio_samplerate
+ values=$rates.audio_samplerate
+ name=mime_audio_samplerate
+ id=mime_audio_samplerate
+ selected=$gBitSystem->getConfig('mime_audio_samplerate')|default:22050} Hz
+ {formhelp note="Set the audio sample rate. The higher the bitrate the higher the quality but also the larger the file."}
+ {/forminput}
+ </div>
+
+ <div class="row">
+ {formlabel label="Audio bitrate" for="mime_audio_bitrate"}
+ {forminput}
+ {html_options
+ options=$rates.audio_bitrate
+ values=$rates.audio_bitrate
+ name=mime_audio_bitrate
+ id=mime_audio_bitrate
+ selected=$gBitSystem->getConfig('mime_audio_bitrate')|default:96000} kbits/s
+ {formhelp note="Set the audio bitrate. The higher the bitrate the higher the quality but also the larger the file."}
+ {/forminput}
+ </div>
+
+ <div class="row">
+ {formlabel label="Force encode" for="mime_audio_force_encode"}
+ {forminput}
+ <input type='checkbox' name="mime_audio_force_encode" id="mime_audio_force_encode" value="y" {if $gBitSystem->isFeatureActive('mime_audio_force_encode')}checked="checked"{/if} />
+ {formhelp note="When mp3 files are uploaded they can be used directly for streaming. If you enable this, the uploaded mp3 will be re-encoded usually reducing filesize for streaming. The originally uploaded file will still be available for download."}
+ {/forminput}
+ </div>
+
+ <div class="row">
+ {formlabel label="Foreground Colour" for="mime_audio_frontcolor"}
+ {forminput}
+ <input type='text' name="mime_audio_frontcolor" id="mime_audio_frontcolor" size="10" value="{$gBitSystem->getConfig('mime_audio_frontcolor')|default:"FFFFFF"}" />
+ {formhelp note="Foreground colour of the progress bar."}
+ {/forminput}
+ </div>
+
+ <div class="row">
+ {formlabel label="Background Colour" for="mime_audio_backcolor"}
+ {forminput}
+ <input type='text' name="mime_audio_backcolor" id="mime_audio_backcolor" size="10" value="{$gBitSystem->getConfig('mime_audio_backcolor')|default:"000000"}" />
+ {formhelp note="Background colour of the progress bar."}
+ {/forminput}
+ </div>
+
+ <div class="row submit">
+ <input type="submit" name="plugin_settings" value="{tr}Save Plugin Settings{/tr}" />
+ </div>
+ {/form}
+ </div><!-- end .body -->
+</div><!-- end .liberty -->
+{/strip}
diff --git a/templates/mime_audio_inline_inc.tpl b/templates/mime_audio_inline_inc.tpl
new file mode 100644
index 0000000..a866c7f
--- /dev/null
+++ b/templates/mime_audio_inline_inc.tpl
@@ -0,0 +1,7 @@
+{strip}
+{if $attachment.source_url}
+ <div class="row" style="text-align:center;">
+ {include file="bitpackage:liberty/mime_audio_player_inc.tpl"}
+ </div>
+{/if}
+{/strip}
diff --git a/templates/mime_audio_player_inc.tpl b/templates/mime_audio_player_inc.tpl
new file mode 100644
index 0000000..b1c6029
--- /dev/null
+++ b/templates/mime_audio_player_inc.tpl
@@ -0,0 +1,29 @@
+{strip}
+{if $attachment.audio_url}
+ {if $area eq "storage_thumbs"}
+ {assign var=width value=160}
+ {assign var=height value=140}
+ {else}
+ {assign var=width value=400}
+ {assign var=height value=320}
+ {/if}
+ <div id="audio_player_{$area}{$attachment.attachment_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_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.audio_url}");
+ so.addVariable("frontcolor","0x{$gBitSystem->getConfig('mime_audio_frontcolor','FFFFFF')}");
+ so.addVariable("backcolor","0x{$gBitSystem->getConfig('mime_audio_backcolor','000000')}");
+ so.write('audio_player_{$area}{$attachment.attachment_id}');
+ /* ]]> */</script>
+{/if}
+
+{if $area eq "storage_thumbs"}
+ {if $attachment.meta.title}{$attachment.meta.title}<br />{/if}
+ <a href="{$attachment.display_url}">{tr}Full Details{/tr}</a>
+{/if}
+{/strip}
diff --git a/templates/mime_audio_view_inc.tpl b/templates/mime_audio_view_inc.tpl
new file mode 100644
index 0000000..549feab
--- /dev/null
+++ b/templates/mime_audio_view_inc.tpl
@@ -0,0 +1,78 @@
+{strip}
+{if $attachment.audio_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.playtime_string}
+ <div class="row">
+ {formlabel label="Duration" for=""}
+ {forminput}
+ {$attachment.meta.playtime_string}
+ {/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>
+ {* TODO: get this to work if $gContent->hasEditPermission() && $attachment.flv_url}
+ {form ipackage=treasury ifile="plugins/form.flv.php"}
+ <input type="hidden" name="content_id" value="{$gContent->mContentId}" />
+ <input type="submit" name="remove_original" value="{tr}Remove Original{/tr}" />
+ {formhelp note="This will remove the original file from the server. The falsh video will remain and you can still view the video but you cannot download the original anymore."}
+ {/form}
+ {/if*}
+ {/forminput}
+ </div>
+
+ <div class="row">
+ {formlabel label="Filesize" for=""}
+ {forminput}
+ {$attachment.file_size|display_bytes}
+ {/forminput}
+ </div>
+{/if}
+
+{attachhelp legend=1 hash=$attachment}
+{/strip}