当前位置: 首页>>代码示例>>PHP>>正文


PHP url::abs_file方法代码示例

本文整理汇总了PHP中url::abs_file方法的典型用法代码示例。如果您正苦于以下问题:PHP url::abs_file方法的具体用法?PHP url::abs_file怎么用?PHP url::abs_file使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在url的用法示例。


在下文中一共展示了url::abs_file方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: header_top

 static function header_top($theme)
 {
     $session = Session::instance();
     $highroller_theme = $session->get("highroller_theme", "");
     if ($highroller_theme) {
         print html::stylesheet(url::abs_file("modules/highroller/themes/{$highroller_theme}/theme.css"));
     }
 }
开发者ID:webmatter,项目名称:gallery3-contrib,代码行数:8,代码来源:highroller_theme.php

示例2: get_add_form

 static function get_add_form($parent)
 {
     $form = new Forge("albums/create/{$parent->id}", "", "post", array("id" => "g-add-album-form"));
     $group = $form->group("add_album")->label(t("Add an album to %album_title", array("album_title" => $parent->title)));
     $group->input("title")->label(t("Title"))->error_messages("required", t("You must provide a title"))->error_messages("length", t("Your title is too long"));
     $group->textarea("description")->label(t("Description"));
     $group->input("name")->label(t("Directory name"))->error_messages("no_slashes", t("The directory name can't contain the \"/\" character"))->error_messages("required", t("You must provide a directory name"))->error_messages("length", t("Your directory name is too long"));
     $group->input("slug")->label(t("Internet Address"))->error_messages("not_url_safe", t("The internet address should contain only letters, numbers, hyphens and underscores"))->error_messages("required", t("You must provide an internet address"))->error_messages("length", t("Your internet address is too long"));
     $group->hidden("type")->value("album");
     $group->submit("")->value(t("Create"));
     $form->script("")->url(url::abs_file("modules/gallery/js/albums_form_add.js"));
     return $form;
 }
开发者ID:joericochuyt,项目名称:gallery3,代码行数:13,代码来源:album.php

示例3: get_add_form

 static function get_add_form($parent)
 {
     $form = new Forge("albums/{$parent->id}", "", "post", array("id" => "gAddAlbumForm"));
     $group = $form->group("add_album")->label(t("Add an album to %album_title", array("album_title" => $parent->title)));
     $group->input("title")->label(t("Title"));
     $group->textarea("description")->label(t("Description"));
     $group->input("name")->label(t("Directory Name"))->callback("item::validate_no_slashes")->error_messages("no_slashes", t("The directory name can't contain the \"/\" character"));
     $group->hidden("type")->value("album");
     $group->submit("")->value(t("Create"));
     $form->add_rules_from(ORM::factory("item"));
     $form->script("")->url(url::abs_file("modules/gallery/js/albums_form_add.js"));
     return $form;
 }
开发者ID:eo04837,项目名称:gallery3,代码行数:13,代码来源:album.php

示例4: get_add_form

 static function get_add_form($parent)
 {
     $form = new Forge("albums/create/{$parent->id}", "", "post", array("id" => "g-add-album-form"));
     $group = $form->group("add_album")->label(t("Add an album to %album_title", array("album_title" => $parent->title)));
     $group->input("title")->label(t("Title"))->error_messages("required", t("You must provide a title"))->error_messages("length", t("Your title is too long"));
     $group->textarea("description")->label(t("Description"));
     $group->input("name")->label(t("Directory name"))->error_messages("no_slashes", t("The directory name can't contain a \"/\""))->error_messages("no_backslashes", t("The directory name can't contain a \"\\\""))->error_messages("no_trailing_period", t("The directory name can't end in \".\""))->error_messages("required", t("You must provide a directory name"))->error_messages("length", t("Your directory name is too long"))->error_messages("conflict", t("There is already a movie, photo or album with this name"));
     $group->input("slug")->label(t("Internet Address"))->error_messages("conflict", t("There is already a movie, photo or album with this internet address"))->error_messages("reserved", t("This address is reserved and can't be used."))->error_messages("not_url_safe", t("The internet address should contain only letters, numbers, hyphens and underscores"))->error_messages("required", t("You must provide an internet address"))->error_messages("length", t("Your internet address is too long"));
     $group->hidden("type")->value("album");
     module::event("album_add_form", $parent, $form);
     $group->submit("")->value(t("Create"));
     $form->script("")->url(url::abs_file("modules/gallery/js/albums_form_add.js"));
     return $form;
 }
开发者ID:HarriLu,项目名称:gallery3,代码行数:14,代码来源:album.php

示例5: showhtml

 /**
  * Display the EXIF data for an item.
  */
 public function showhtml($item_id)
 {
     // Generate the Dialog Box for HTML links.
     $item = ORM::factory("item", $item_id);
     access::required("view", $item);
     // If the current page is an album, only display two links.
     if ($item->is_album()) {
         $linkArray[0] = array("Text:", "<a href=&quot;" . url::abs_site("{$item->type}s/{$item->id}") . "&quot;>Click Here</a>");
         $linkArray[1] = array("Thumbnail:", "<a href=&quot;" . url::abs_site("{$item->type}s/{$item->id}") . "&quot;><img src=&quot;" . $item->thumb_url(true) . "&quot;></a>");
         $linkTitles[0] = array("Link To This Album:", 2);
         // If the item is a movie, don't display resize links, do display an embed link.
     } elseif ($item->is_movie()) {
         // Link to the current page.
         $linkArray[0] = array("Text:", "<a href=&quot;" . url::abs_site("{$item->type}s/{$item->id}") . "&quot;>Click Here</a>");
         $linkArray[1] = array("Thumbnail:", "<a href=&quot;" . url::abs_site("{$item->type}s/{$item->id}") . "&quot;><img src=&quot;" . $item->thumb_url(true) . "&quot;></a>");
         $linkTitles[0] = array("Link To This Page:", 2);
         // If the visitor has suficient privlidges to see the fullsized
         //    version of the current image, then display links to it.
         if (access::can("view_full", $item)) {
             $linkArray[2] = array("Text:", "<a href=&quot;" . $item->file_url(true) . "&quot;>Click Here</a>");
             $linkArray[3] = array("Thumbnail:", "<a href=&quot;" . $item->file_url(true) . "&quot;><img src=&quot;" . $item->thumb_url(true) . "&quot;></a>");
             $linkArray[4] = array("Embed:", "<object width=&quot;" . $item->width . "&quot; height=&quot;" . $item->height . "&quot; data=&quot;" . url::abs_file("lib/flowplayer.swf") . "&quot; type=&quot;application/x-shockwave-flash&quot;><param name=&quot;movie&quot; value=&quot;" . url::abs_file("lib/flowplayer.swf") . "&quot; /><param name=&quot;allowfullscreen&quot; value=&quot;true&quot; /><param name=&quot;allowscriptaccess&quot; value=&quot;always&quot; /><param name=&quot;flashvars&quot; value='config={&quot;plugins&quot;:{&quot;pseudo&quot;:{&quot;url&quot;:&quot;flowplayer.h264streaming.swf&quot;},&quot;controls&quot;:{&quot;backgroundColor&quot;:&quot;#000000&quot;,&quot;backgroundGradient&quot;:&quot;low&quot;}},&quot;clip&quot;:{&quot;provider&quot;:&quot;pseudo&quot;,&quot;url&quot;:&quot;" . $item->file_url(true) . "&quot;},&quot;playlist&quot;:[{&quot;provider&quot;:&quot;pseudo&quot;,&quot;url&quot;:&quot;" . $item->file_url(true) . "&quot;}]}' /></object>");
             $linkTitles[1] = array("Link To The Video File:", 3);
         }
         // Or else assume the item is a photo.
     } else {
         // Link to the current page.
         $linkArray[0] = array("Text:", "<a href=&quot;" . url::abs_site("{$item->type}s/{$item->id}") . "&quot;>Click Here</a>");
         $linkArray[1] = array("Thumbnail:", "<a href=&quot;" . url::abs_site("{$item->type}s/{$item->id}") . "&quot;><img src=&quot;" . $item->thumb_url(true) . "&quot;></a>");
         $linkArray[2] = array("Resized:", "<a href=&quot;" . url::abs_site("{$item->type}s/{$item->id}") . "&quot;><img src=&quot;" . $item->resize_url(true) . "&quot;></a>");
         $linkTitles[0] = array("Link To This Page:", 3);
         // Link to the "resized" version of the current image.
         $linkArray[3] = array("Text:", "<a href=&quot;" . $item->resize_url(true) . "&quot;>Click Here</a>");
         $linkArray[4] = array("Thumbnail:", "<a href=&quot;" . $item->resize_url(true) . "&quot;><img src=&quot;" . $item->thumb_url(true) . "&quot;></a>");
         $linkArray[5] = array("Image:", "<img src=&quot;" . $item->resize_url(true) . "&quot;>");
         $linkTitles[1] = array("Link To The Resized Image:", 3);
         // If the visitor has suficient privlidges to see the fullsized
         //    version of the current image, then display links to it.
         if (access::can("view_full", $item)) {
             $linkArray[6] = array("Text:", "<a href=&quot;" . $item->file_url(true) . "&quot;>Click Here</a>");
             $linkArray[7] = array("Thumbnail:", "<a href=&quot;" . $item->file_url(true) . "&quot;><img src=&quot;" . $item->thumb_url(true) . "&quot;></a>");
             $linkArray[8] = array("Resized:", "<a href=&quot;" . $item->file_url(true) . "&quot;><img src=&quot;" . $item->resize_url(true) . "&quot;></a>");
             $linkTitles[2] = array("Link To The Full Size Image:", 3);
         }
     }
     $view = new View("embedlinks_htmldialog.html");
     $view->titles = $linkTitles;
     $view->details = $linkArray;
     print $view;
 }
开发者ID:kuranoglu,项目名称:gallery3-contrib,代码行数:53,代码来源:embedlinks.php

示例6: queue

 public function queue($state)
 {
     $page = max(Input::instance()->get("page"), 1);
     $view = new Gallery_View("admin_manage_comments_queue.html");
     $view->counts = $this->_counts();
     $view->menu = $this->_menu($view->counts);
     $view->state = $state;
     $view->comments = ORM::factory("comment")->order_by("created", "DESC")->order_by("id", "DESC")->where("state", "=", $state)->limit(self::$items_per_page)->offset(($page - 1) * self::$items_per_page)->find_all();
     // This view is not themed so we can't use $theme->url() in the view and have to
     // reproduce Gallery_View::url() logic here.
     $atn = theme::$admin_theme_name;
     $view->fallback_avatar_url = url::abs_file("themes/{$atn}/images/avatar.jpg");
     $view->page = $page;
     $view->page_type = "collection";
     $view->page_subtype = "admin_comments";
     $view->page_size = self::$items_per_page;
     $view->children_count = $this->_counts()->{$state};
     $view->max_pages = ceil($view->children_count / $view->page_size);
     // Also we want to use $theme->paginator() so we need a dummy theme
     $view->theme = $view;
     print $view;
 }
开发者ID:JasonWiki,项目名称:docs,代码行数:22,代码来源:admin_manage_comments.php

示例7:

echo $attrs["id"];
?>
",
    {
      src: "<?php 
echo url::abs_file("lib/flowplayer.swf");
?>
",
      wmode: "transparent",
      provider: "pseudostreaming"
    },
    {
      clip: {
        scaling: 'fit'
      },
      plugins: {
        pseudostreaming: {
          url: "<?php 
echo url::abs_file("lib/flowplayer.pseudostreaming.swf");
?>
"
        },
        controls: {
          autoHide: 'always',
          hideDelay: 2000
        }
      }
    }
  )
</script>
开发者ID:webmatter,项目名称:gallery3-contrib,代码行数:30,代码来源:movieplayer.html.php

示例8: movie_img

 /**
  * Return a flowplayer <script> tag for movies
  * @param array $extra_attrs
  * @return string
  */
 public function movie_img($extra_attrs)
 {
     $attrs = array_merge($extra_attrs, array("id" => "player", "style" => "display:block;width:400px;height:300px"));
     return html::anchor($this->file_url(true), "", $attrs) . "<script>flowplayer('player', '" . url::abs_file("lib/flowplayer-3.0.5.swf") . "'); </script>";
 }
开发者ID:HelixiR,项目名称:gallery3,代码行数:10,代码来源:item.php

示例9: json_encode

>
  </video>
</div>
<script type="text/javascript">
  $("#<?php 
echo $div_attrs["id"];
?>
 video").mediaelementplayer(
    $.extend(true, {
      defaultVideoWidth: <?php 
echo $width;
?>
,
      defaultVideoHeight: <?php 
echo $height;
?>
,
      startVolume: 1.0,
      features: ["playpause", "progress", "current", "duration", "volume", "fullscreen"],
      pluginPath: "<?php 
echo url::abs_file("lib/mediaelementjs/");
?>
",
      flashName: "flashmediaelement.swf.php"
    }, <?php 
echo json_encode($player_options);
?>
)
  );
</script>
开发者ID:HarriLu,项目名称:gallery3,代码行数:30,代码来源:movieplayer.html.php

示例10: resize_url

 /**
  * album: http://example.com/gallery3/var/resizes/album1/.resize.jpg
  * photo: http://example.com/gallery3/var/albums/album1/photo.resize.jpg
  */
 public function resize_url($full_uri = false)
 {
     return ($full_uri ? url::abs_file("var/resizes/" . $this->relative_path()) : url::file("var/resizes/" . $this->relative_path())) . ($this->is_album() ? "/.album.jpg" : "");
 }
开发者ID:jhilden,项目名称:gallery3,代码行数:8,代码来源:item.php

示例11: resize_url

 /**
  * album: http://example.com/gallery3/var/resizes/album1/.resize.jpg
  * photo: http://example.com/gallery3/var/albums/album1/photo.resize.jpg
  */
 public function resize_url($full_uri = false)
 {
     $relative_path = "var/resizes/" . $this->relative_path();
     $cache_buster = $this->_cache_buster($this->resize_path());
     return ($full_uri ? url::abs_file($relative_path) : url::file($relative_path)) . ($this->is_album() ? "/.album.jpg" : "") . $cache_buster;
 }
开发者ID:assad2012,项目名称:gallery3-appfog,代码行数:10,代码来源:item.php

示例12: changeVideo

            ?>
 x <?php 
            echo $r[1];
            ?>
</option>
            <?php 
        }
        ?>
        </select>
        <script type="text/javascript">
            var fpItmId = "g-item-id-<?php 
        echo $item->id;
        ?>
";
            var fpBaseUrl = "<?php 
        echo url::abs_file("var/modules/transcode/flv/" . $item->id);
        ?>
/";
            $f(fpItmId).onLoad(function() {
		changeVideo($('#resolution-select').val());
                //var url = fpBaseUrl + $('#resolution-select').val() + ".flv";
                //$('#' + fpItmId).flowplayer(0).play(url);
            });
            function changeVideo(res) {
                var id = "g-item-id-<?php 
        echo $item->id;
        ?>
";
                var dim = res.split('x');
		$('#' + fpItmId).css({width: dim[0] + 'px', height: dim[1] + 'px'});
                $('#' + id).flowplayer(0).play(fpBaseUrl + res + ".flv");
开发者ID:webmatter,项目名称:gallery3-contrib,代码行数:31,代码来源:transcode_resolution_variants.html.php

示例13: defined

<?php

defined("SYSPATH") or die("No direct script access.");
echo html::anchor($item->file_url(true), "", $attrs);
?>
<script>
  flowplayer("<?php 
echo $attrs["id"];
?>
", {src: "<?php 
echo url::abs_file("lib/flowplayer.swf");
?>
",
      wmode: "transparent"}, {
    plugins: {
      h264streaming: {
        url: "<?php 
echo url::abs_file("lib/flowplayer.h264streaming.swf");
?>
"
      },
      controls: {
        autoHide: 'always',
        hideDelay: 2000
      }
    }
  })
</script>
开发者ID:hiwilson,项目名称:gallery3,代码行数:28,代码来源:movieplayer.html.php

示例14: get

 static function get($request)
 {
     $db = db::build();
     $start = microtime(true);
     $rest_base = url::abs_site("rest");
     $file_base = url::abs_file('');
     #'var/' . $size . '/'
     /* Build basic limiters */
     $limit = unrest_rest::getBasicLimiters($request);
     $limit = unrest_rest::getFreetextLimiters($request, $limit);
     /* Build numeric limiters */
     /* ...at some point. */
     /* Figure out an array of albums we got permissions to access */
     $permitted = unrest_rest::albumsICanAccess();
     $display = unrest_rest::getDisplayOptions($request);
     $items = unrest_rest::baseItemQuery($db);
     /*
     	Introduce some WHERE statements that'll make sure that we don't get to see stuff we
     	shouldn't be seeing.
     */
     unrest_rest::queryLimitByPermission(&$items, $permitted);
     unrest_rest::queryLimitByLimiter(&$items, $limit);
     unrest_rest::queryOrder(&$items, $request);
     $return = array();
     $filler = array();
     $relationshipCandidates = array();
     foreach ($items->execute() as $item) {
         $data = array('id' => intval($item->id), 'parent' => intval($item->parent_id), 'owner_id' => intval($item->{'owner_id'}), 'public' => $item->view_1 ? true : false, 'type' => $item->type);
         if (in_array('uitext', $display)) {
             $ui = array('title' => $item->title, 'description' => $item->description, 'name' => $item->name, 'slug' => $item->slug);
             $data = array_merge($data, $ui);
         }
         if (in_array('uiimage', $display)) {
             $ui = array('height' => $item->height, 'width' => $item->width, 'resize_height' => $item->resize_height, 'resize_width' => $item->resize_width, 'thumb_height' => $item->resize_height, 'thumb_width' => $item->resize_width);
             $ui['thumb_url_public'] = unrest_rest::size_url('thumbs', $item->relative_path_cache, $item->type, $file_base);
             $public = $item->view_1 ? true : false;
             $fullPublic = $item->view_full_1 ? true : false;
             if ($item->type != 'album') {
                 $ui['file_url'] = unrest_rest::makeRestURL('data', $item->id . '?size=full', $rest_base);
                 $ui['thumb_url'] = unrest_rest::makeRestURL('data', $item->id . '?size=thumb', $rest_base);
                 $ui['resize_url'] = unrest_rest::makeRestURL('data', $item->id . '?size=resize', $rest_base);
                 if ($public) {
                     $ui['resize_url_public'] = unrest_rest::size_url('resizes', $item->relative_path_cache, $item->type, $file_base);
                     if ($fullPublic) {
                         $ui['file_url_public'] = unrest_rest::size_url('albums', $item->relative_path_cache, $item->type, $file_base);
                     }
                 }
             }
             $data = array_merge($data, $ui);
         }
         if (in_array('members', $display)) {
             $filler['children_of'][] = $item->id;
         }
         $return[] = array('url' => unrest_rest::makeRestURL('item', $item->id, $rest_base), 'entity' => $data);
     }
     /* Do we need to fetch children? */
     if (array_key_exists('children_of', $filler)) {
         unrest_rest::addChildren($request, $db, $filler, $permitted, $display, &$return, $rest_base);
     }
     $end = microtime(true);
     error_log("Inner " . ($end - $start) . " seconds taken");
     return $return;
 }
开发者ID:webmatter,项目名称:gallery3-contrib,代码行数:63,代码来源:unrest_rest.php

示例15: t

    <tr>
      <th><?php 
echo t("Embed:");
?>
</th>
      <td><input type="text" value="<object width=&quot;<?php 
echo $item->width;
?>
&quot; height=&quot;<?php 
echo $item->height;
?>
&quot; data=&quot;<?php 
echo url::abs_file("lib/flowplayer.swf");
?>
&quot; type=&quot;application/x-shockwave-flash&quot;><param name=&quot;movie&quot; value=&quot;<?php 
echo url::abs_file("lib/flowplayer.swf");
?>
&quot; /><param name=&quot;allowfullscreen&quot; value=&quot;true&quot; /><param name=&quot;allowscriptaccess&quot; value=&quot;always&quot; /><param name=&quot;flashvars&quot; value='config={&quot;plugins&quot;:{&quot;pseudo&quot;:{&quot;url&quot;:&quot;flowplayer.h264streaming.swf&quot;},&quot;controls&quot;:{&quot;backgroundColor&quot;:&quot;#000000&quot;,&quot;backgroundGradient&quot;:&quot;low&quot;}},&quot;clip&quot;:{&quot;provider&quot;:&quot;pseudo&quot;,&quot;url&quot;:&quot;<?php 
echo $item->file_url(true);
?>
&quot;},&quot;playlist&quot;:[{&quot;provider&quot;:&quot;pseudo&quot;,&quot;url&quot;:&quot;<?php 
echo $item->file_url(true);
?>
&quot;}]}' /></object>" onclick="this.focus(); this.select();" readonly></td>
    </tr>
  <? } ?>
<? } ?>

<? if ($item->is_photo()) { ?>
    <tr>
      <th colspan="2"><br/><?php 
开发者ID:kuranoglu,项目名称:gallery3-contrib,代码行数:31,代码来源:embedlinks_photo_block.html.php


注:本文中的url::abs_file方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。