コード例 #1
0
ファイル: swf.php プロジェクト: romyilano/subfolio
<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";
}
コード例 #2
0
ファイル: header.inc.php プロジェクト: romyilano/subfolio
		<?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');
}
?>
  </ul>
</div>
 
<?php 
if (SubfolioTheme::get_option('display_navigation')) {
    ?>
  <?php 
    require "prev_next.inc.php";
}
?>

<script>
$(document).ready(function(){
  expand_header_label = "<?php 
echo SubfolioLanguage::get_text('expandheader');
?>
";
  collapse_header_label = "<?php 
echo SubfolioLanguage::get_text('collapseheader');
?>
コード例 #3
0
ファイル: related.php プロジェクト: romyilano/subfolio
</p>
		<ul class="<?php 
    echo SubfolioTheme::get_listing_mode();
    ?>
">
			
			<?php 
    foreach (SubfolioFiles::related() as $item) {
        ?>
				<li>
					<a href='<?php 
        echo $item['link'];
        ?>
'>
						<?php 
        if (SubfolioTheme::get_option('display_icons')) {
            ?>
  						<?php 
            if ($item['restricted']) {
                ?>
						  <span class="<?php 
                if ($item['have_access']) {
                    echo "unlocked";
                } else {
                    echo "locked";
                }
                ?>
"><!-- --></span>
						  <?php 
            }
            ?>
コード例 #4
0
ファイル: FileFolder.php プロジェクト: romyilano/subfolio
 public function get_thumbnail_url()
 {
     $root = SubfolioTheme::get_site_root();
     if ($this->has_custom_thumbnail()) {
         return $root . "directory/" . format::urlencode_parts($this->parent) . "/-thumbnails-custom/" . Filebrowser::double_encode_specialcharacters($this->get_custom_thumbnail_file_name());
     } else {
         $thumbnail = "-thumbnails/" . $this->name;
         $url = $root . "directory/" . format::urlencode_parts($this->parent) . "/-thumbnails/" . Filebrowser::double_encode_specialcharacters(urlencode($this->name));
         if (!file_exists("-thumbnails")) {
             mkdir("-thumbnails", 0755, true);
         }
         $build_thumbnail = false;
         if (!$this->has_thumbnail()) {
             $build_thumbnail = true;
         }
         if ($build_thumbnail) {
             $max_size = Kohana::config('filebrowser.thumbnail_max_filesize');
             $stats = stat($this->name);
             if ($stats['size'] > $max_size * 1024 * 1024) {
                 return '';
             } else {
                 $thumbnail_width = SubfolioTheme::get_option('thumbnail_width', Kohana::config('filebrowser.thumbnail_width'));
                 $thumbnail_height = SubfolioTheme::get_option('thumbnail_height', Kohana::config('filebrowser.thumbnail_height'));
                 $info = @getimagesize($this->name);
                 if (isset($info[1])) {
                     if ($info[1] <= $thumbnail_height) {
                     } else {
                         $this->image = new Image($this->name);
                         if ($this->image) {
                             $this->image->resize($thumbnail_width, $thumbnail_height, Image::HEIGHT);
                             $this->image->save($thumbnail);
                         }
                     }
                 }
             }
         }
         if (file_exists($thumbnail)) {
             $thumbnail_stats = stat($thumbnail);
             return $url . "?rnd=" . $thumbnail_stats['ctime'];
         } else {
             return '';
         }
     }
 }
コード例 #5
0
ファイル: footer.inc.php プロジェクト: romyilano/subfolio
?>

	<?php 
$copyright = SubfolioTheme::get_site_copyright();
if ($copyright != '') {
    ?>
	<span class='copyright'><?php 
    echo $copyright;
    ?>
</span>
	<?php 
}
?>

	<?php 
if (!SubfolioTheme::get_mobile_viewport() && SubfolioTheme::get_option('display_updated_since')) {
    ?>
		<span><?php 
    echo SubfolioLanguage::get_text('updated_since');
    ?>
</span>
		<?php 
    echo SubfolioFiles::updated_since_link_or_span('lastweek');
    ?>
		<span class="updated_since_sep">&#8226;</span>
		<?php 
    echo SubfolioFiles::updated_since_link_or_span('lastmonth');
    ?>
		<span class="updated_since_sep">&#8226;</span>
		<?php 
    echo SubfolioFiles::updated_since_link_or_span('lastvisit');
コード例 #6
0
            echo $item['date'];
            ?>
</span><?php 
        }
        ?>
						<?php 
        if (SubfolioTheme::get_option('display_kind')) {
            ?>
<span class="kind"><?php 
            echo $item['kind'];
            ?>
</span><?php 
        }
        ?>
						<?php 
        if (SubfolioTheme::get_option('display_comment')) {
            ?>
<span class="comment"><?php 
            echo $item['comment'];
            ?>
</span><?php 
        }
        ?>
							
					</a>
				</li>
			<?php 
    }
    ?>
			
		</ul>
コード例 #7
0
ファイル: gallery.php プロジェクト: romyilano/subfolio
        echo $image['container_height'] . "px";
        ?>
">
  						<img width="<?php 
        echo $image['width'] . "px";
        ?>
" height="<?php 
        echo $image['height'] . "px";
        ?>
" src="<?php 
        echo $image['url'];
        ?>
" />
  					</div>
  					<?php 
        if (SubfolioTheme::get_option('display_file_names_in_gallery')) {
            ?>
          	  <p><?php 
            echo $image['filename'];
            ?>
</p>
          	<?php 
        }
        ?>
  				</a>
        </li>
			
			<?php 
    }
    ?>
		</ul>
コード例 #8
0
ファイル: Subfolio.php プロジェクト: romyilano/subfolio
 public function gallery_images()
 {
     $display_filenames = view::get_option('display_file_names_in_gallery', true);
     $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);
     $folders = Subfolio::$filebrowser->get_folder_list();
     $files = Subfolio::$filebrowser->get_file_list();
     $folders = Subfolio::$filebrowser->sort($folders);
     $files = Subfolio::$filebrowser->sort($files);
     $complete_list = array_merge($folders, $files);
     $gallery = array();
     foreach ($complete_list as $file) {
         if (!$file->has_thumbnail()) {
             continue;
         }
         if ($file->has_thumbnail()) {
             $image_source = $file->get_thumbnail_url();
         } else {
             if ($file->needs_thumbnail()) {
                 $image_source = $file->get_thumbnail_url();
             } else {
                 $image_source = $file->get_url();
             }
         }
         list($width, $height) = $file->get_gallery_width_height();
         if ($image_source != '') {
             $image = array();
             $image['width'] = $width;
             $image['height'] = $height;
             $image['container_width'] = $width;
             if ($file->has_custom_thumbnail()) {
                 $image['class'] = "gallery_thumbnail custom";
                 $image['link'] = Subfolio::$filebrowser->get_link(Filebrowser::double_encode_specialcharacters($file->name));
                 $image['filename'] = $file->get_display_name($replace_dash_space, $replace_underscore_space, $display_file_extensions);
                 $image['url'] = $image_source;
                 $image['container_height'] = $height;
                 // Custom thumbnails -----------------------------------------------------------------------------
             } else {
                 // Genrerated or not thumbnails -----------------------------------------------------------------------------
                 $image['class'] = "gallery_thumbnail";
                 $image['link'] = Subfolio::$filebrowser->get_link(Filebrowser::double_encode_specialcharacters($file->name));
                 $image['filename'] = $file->get_display_name($replace_dash_space, $replace_underscore_space, $display_file_extensions);
                 $image['url'] = $image_source;
                 $image['container_height'] = SubfolioTheme::get_option('thumbnail_height');
             }
             $gallery[] = $image;
         }
     }
     return $gallery;
 }