Ejemplo n.º 1
0
 function children($limit = null, $offset = null, $where = array(), $order_by = null)
 {
     if (!hide::can_view_hidden_items($this)) {
         $this->join("hidden_items", "items.id", "hidden_items.item_id", "LEFT OUTER");
         $this->where("hidden_items.item_id", "IS", NULL);
         return parent::children($limit, $offset, $where, $order_by);
     }
 }
Ejemplo n.º 2
0
 public function resize_url($full_uri = false)
 {
     if (!module::get_var("aws_s3", "enabled")) {
         return parent::resize_url($full_uri);
     }
     if ($this->is_album() && $this->id > 1) {
         return aws_s3::generate_url("rs/" . $this->relative_path() . "/.album.jpg", $this->view_1 == 1 ? false : true, $this->updated);
     } else {
         return aws_s3::generate_url("rs/" . $this->relative_path(), $this->view_1 == 1 ? false : true, $this->updated);
     }
 }
Ejemplo n.º 3
0
 public function resize_img($extra_attrs)
 {
     $panorama = ORM::factory("panorama")->where("item_id", "=", $this->id)->find();
     if ($panorama->loaded() && $panorama->checked) {
         $swfUrl = url::file("modules/panorama/lib/pan0.swf");
         $panoramaHFOV = $panorama->HFOV;
         $panoramaVFOV = $panorama->VFOV;
         $img_url = $this->file_url();
         return "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"\n        codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\"\n        width=\"640\" height=\"480\" title=\"FSPP Panorama Viewer\">\n        <param name=\"allowFullScreen\" value=\"true\" />\n        <param name=\"movie\" value=\"{$swfUrl}?panoSrc={$img_url}&FOV=40&minFOV=20&maxFOV=40&panHFOV={$panoramaHFOV}&panVFOV={$panorama->VFOV}\" />\n        <param name=\"quality\" value=\"high\" />\n        <param name=\"BGCOLOR\" value=\"#AAAAAA\" />\n        <param name=\"wmode\" value=\"transparent\" />\n        <embed src=\"{$swfUrl}?panoSrc={$img_url}&FOV=40&minFOV=20&maxFOV=40&panHFOV={$panoramaHFOV}&panVFOV={$panoramaVFOV}\"\n        allowFullScreen=\"true\"\n        width=\"640\" height=\"480\" quality=\"high\"\n        wmode=\"transparent\"\n        pluginspage=\"http://www.macromedia.com/go/getflashplayer\"\n        type=\"application/x-shockwave-flash\" bgcolor=\"#DDDDDD\">\n        </embed>\n        </object>";
     } else {
         return parent::resize_img($extra_attrs);
     }
 }
Ejemplo n.º 4
0
 public function __set($column, $value)
 {
     if (substr($column, 0, 3) == "s3_") {
         $var = substr($column, 3);
         $this->get_aws_s3_meta()->{$var} = $value;
     } else {
         parent::__set($column, $value);
     }
 }