Exemple #1
0
		<!-- ?download=true would be provided by the CurrentFile() method -->
		<!-- By adding an option for target, we can use this box for more kinds... (links for example) -->
		
		<!-- Tag -->
		<span class="<?php 
echo Subfolio::current_file('tag');
?>
"><!-- --></span>
		<!-- Icon -->
		<img width='32' height='32' src='<?php 
echo Subfolio::current_file('icon');
?>
' />
		<!-- Filename / comment -->
		<p id="filename"><?php 
echo FileFolder::fix_display_name(Subfolio::current_file('filename'), true, true, false);
?>
</p>
	</a>
	<dl>
		<dt><?php 
echo SubfolioLanguage::get_text('kind');
?>
</dt><dd><?php 
echo Subfolio::current_file('kind');
?>
</dd>
		<dt><?php 
echo SubfolioLanguage::get_text('comment');
?>
</dt><dd><?php 
Exemple #2
0
 public static function get_breadcrumb()
 {
     $root = Kohana::config('filebrowser.site_root');
     $replace_dash_space = view::get_option('replace_dash_space', true);
     $replace_underscore_space = view::get_option('replace_underscore_space', true);
     $display_file_extensions = view::get_option('display_file_extensions', true);
     $breadcrumbs = array();
     $ff = Subfolio::$filebrowser->get_path();
     $parts = explode("/", $ff);
     $count = 1;
     if ($ff != "" && sizeof($parts) > 0) {
         $path = $root;
         foreach ($parts as $key => $value) {
             $crumb = array();
             $crumb['name'] = htmlentities(FileFolder::fix_display_name($value, $replace_dash_space, $replace_underscore_space, $display_file_extensions));
             $evalue = Filebrowser::double_encode_specialcharacters(urlencode($value));
             if ($count == sizeof($parts)) {
                 $crumb['url'] = '';
             } else {
                 $crumb['url'] = $path . $evalue;
             }
             $path .= $evalue . "/";
             $breadcrumbs[] = $crumb;
             $count++;
         }
     }
     return $breadcrumbs;
 }