public function __construct() { parent::__construct(); $this->session = Session::instance(); require Kohana::find_file('vendor', 'classTextile'); require Kohana::find_file('vendor', 'Markdown'); $this->auth = Auth::instance(); $this->access = Access::instance(); $this->filebrowser = Filebrowser::instance(); $this->filekind = FileKind::instance(); Subfolio::set_filebrowser($this->filebrowser); Subfolio::set_auth($this->auth); Subfolio::set_template($this->template); Subfolio::set_filekind($this->filekind); $this->template->site_title = Kohana::config('filebrowser.site_name'); $this->template->page_title = ""; }
<?php } ?> <?php if (SubfolioFiles::is_root()) { ?> <h1 class="h1_home"><?php echo SubfolioTheme::get_site_title(); ?> </h1> <?php } else { ?> <h1 class="h1"><?php echo Subfolio::current_file('filename'); ?> </h1> <?php } ?> </header> <?php if (!SubfolioFiles::is_root()) { ?> <nav> <span class='parent_dir'><?php echo SubfolioFiles::parent_link(SubfolioLanguage::get_text('parent_directory')); ?> </span>
<EMBED src='<?php echo Subfolio::current_file('url'); ?> ' autoplay=<?php echo Subfolio::current_file('autoplay'); ?> quality=high width='<?php echo Subfolio::current_file('width'); ?> ' height='<?php echo Subfolio::current_file('height'); ?> ' scale='noscale' TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://public.macromedia.com/go/getflashplayer'> </EMBED> <?php if (SubfolioTheme::get_option('display_info')) { require "_hideable_download_box.php"; }
?> <li><?php echo Subfolio::link_to(SubfolioLanguage::get_text('logout'), '/logout'); ?> </li> <?php } ?> <?php if (SubfolioTheme::get_option('display_send_page')) { $subject = "Link from " . $_SERVER["SERVER_NAME"]; $body = Subfolio::current_url(); ?> <li><?php echo Subfolio::mail_to(SubfolioLanguage::get_text('sendpage'), '', $subject, $body); ?> </li> <?php } ?> <?php if (SubfolioTheme::get_option('display_tiny_url')) { echo SubfolioTheme::get_tiny_url(SubfolioLanguage::get_text('generatetinyurl'), 'li'); } ?> <?php if (SubfolioTheme::get_option('display_collapse_header') && SubfolioTheme::get_option('display_header', true)) { echo SubfolioTheme::get_collapse_header_button('li');
<dt><?php echo SubfolioLanguage::get_text('kind'); ?> </dt><dd><?php echo Subfolio::current_file('kind'); ?> </dd> <dt><?php echo SubfolioLanguage::get_text('lastmodified'); ?> </dt><dd><?php echo Subfolio::current_file('lastmodified'); ?> </dd> <dt><?php echo SubfolioLanguage::get_text('size'); ?> </dt><dd><?php echo Subfolio::current_file('size'); ?> </dd> <dt><?php echo SubfolioLanguage::get_text('comment'); ?> </dt><dd><?php echo Subfolio::current_file('comment'); ?> </dd> </dl> </div>
<div class="standard_paragraph"> <?php echo Subfolio::current_file('body'); ?> </div> <?php if (SubfolioTheme::get_option('display_info')) { require "_hideable_download_box.php"; }
echo SubfolioLanguage::get_text('size'); ?> </dt><dd><?php echo Subfolio::current_file('size'); ?> </dd> <dt><?php echo SubfolioLanguage::get_text('comment'); ?> </dt><dd><?php echo Subfolio::current_file('comment'); ?> </dd> </dl> <p id='instructions'><?php echo Subfolio::current_file('instructions'); ?> </p> <a id="download" href="<?php echo Subfolio::current_file('link'); ?> ?download=true" target="<?php echo Subfolio::current_file('target'); ?> "><?php echo SubfolioLanguage::get_text('downloadfile'); ?> </a> <!-- Link_name can be open or download. These words taken from the language file... --> </div>
<div id="content"> <?php if (isset($content)) { echo $content; } ?> </div> <div class="clear"></div> </div> <?php include "footer.inc.php"; ?> </div> <?php $ga_code = Subfolio::get_setting('google_analytics_code'); if ($ga_code != '') { ?> <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> try { var pageTracker = _gat._getTracker("<?php echo $ga_code; ?> "); pageTracker._trackPageview(); } catch(err) {}</script> <?php
<?php $filename = Subfolio::current_file('filename'); $url = Subfolio::current_file('feedurl'); $count = Subfolio::current_file('count'); $cache = Subfolio::current_file('cache'); $items = SubfolioFiles::fetch_rss($url, $count, $filename, $cache); ?> <div class="rss"> <?php foreach ($items as $item) { ?> <div class="item"> <h2><a href="<?php echo $item['link']; ?> "><?php echo $item['title']; ?> </a></h2> <p><?php echo $item['description']; ?> </p> </div> <?php } ?> </div>
<?php /* Should the image be inlined or just show download info? */ $max_size = Subfolio::get_setting('display_max_filesize'); $size = Subfolio::current_file('rawsize'); if ($size > $max_size * 1024 * 1024) { require "_download_box.php"; } else { ?> <img width="<?php echo Subfolio::current_file('width'); ?> " height="<?php echo Subfolio::current_file('height'); ?> " src="<?php echo Subfolio::current_file('url'); ?> " /> <?php if (SubfolioTheme::get_option('display_info')) { require "_hideable_download_box.php"; } }
?> pluginspage='http://public.apple.com/quicktime/' width='100%' height='auto' scale='noscale' controller='true'> </EMBED> This uses EMBED tag and Subfolio default src : php echo Subfolio::current_file('url') to output <?php echo Subfolio::current_file('url'); ?> . It's broken. <EMBED src='http://dev.subfolio.com/kittie.mp4' autoplay=<?php echo Subfolio::current_file('autoplay'); ?> pluginspage='http://public.apple.com/quicktime/' width='100%' height='auto' scale='noscale' controller='true'> </EMBED> Same parameters except the video is located at http://dev.subfolio.com/kittie.mp4, outside of Subfolio 'directory' folder. Click on the play icon to launch the video. <video width="100%" height="auto" controls autoplay> <!-- MP4 must be first for iPad! --> <source src="http://dev.subfolio.com/kittie.mp4" type="video/mp4" /><!-- WebKit video --> </video> The video above uses the html5 VIDEO tag and is located at http://dev.subfolio.com/kittie.mp4, outside of Subfolio 'directory' folder. Its width is 100% and height is set on 'auto'. Click on the play icon to launch the video.
?> <a href="<?php echo Subfolio::current_file('link'); ?> " class="btn btn_download"><?php echo SubfolioLanguage::get_text('viewfile'); ?> </a> <?php } } ?> <!-- Minisite --> <?php if (Subfolio::current_file('icon_name') == 'site') { ?> <a href="<?php echo Subfolio::current_file('link'); ?> " class="btn btn_download"><?php echo SubfolioLanguage::get_text('viewsite'); ?> </a> <?php } ?> </div>
public static function set_filekind($_filekind) { Subfolio::$filekind = $_filekind; }