當前位置: 首頁>>代碼示例>>PHP>>正文


PHP gallery::find_file方法代碼示例

本文整理匯總了PHP中gallery::find_file方法的典型用法代碼示例。如果您正苦於以下問題:PHP gallery::find_file方法的具體用法?PHP gallery::find_file怎麽用?PHP gallery::find_file使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在gallery的用法示例。


在下文中一共展示了gallery::find_file方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: css

 /**
  * Add a css file to the combined css list.
  * @param $file  the file name or path of the script to include. If a path is specified then
  *               it needs to be relative to DOCROOT. Just specifying a file name will result
  *               in searching Kohana's cascading file system.
  */
 public function css($file)
 {
     if ($path = gallery::find_file("css", $file, false)) {
         $this->css[$path] = 1;
     } else {
         Kohana_Log::add("error", "Can't find css file: {$file}");
     }
 }
開發者ID:andyst,項目名稱:gallery3,代碼行數:14,代碼來源:Gallery_View.php

示例2: css

 /**
  * If css combining is enabled, add this css to the list of css that will be
  * combined into a single style element.  When combined, the order of style elements
  * is preserved.
  *
  * @param $file  the file name or path of the css to include. If a path is specified then
  *               it needs to be relative to DOCROOT. Just specifying a file name will result
  *               in searching Kohana's cascading file system.
  * @param $group the group of css to combine this with.  defaults to "core"
  */
 public function css($file, $group = "core")
 {
     if ($path = gallery::find_file("css", $file, false)) {
         if (isset($this->combine_queue["css"])) {
             $this->combine_queue["css"][$group][$path] = 1;
         } else {
             return html::stylesheet($path);
         }
     } else {
         Kohana_Log::add("error", "Can't find css file: {$file}");
     }
 }
開發者ID:Joe7,項目名稱:gallery3,代碼行數:22,代碼來源:Gallery_View.php

示例3: setTimeout

        document.write("<scr" + "ipt type=\"text/javascript\" src=\"<?php 
echo url::base(false) . gallery::find_file("js", "jquery.js", false);
?>
\"></scr" + "ipt>");
        document.write("<scr" + "ipt type=\"text/javascript\" src=\"<?php 
echo url::base(false) . gallery::find_file("js", "jquery.tagcanvas.mod.min.js", false);
?>
\"></scr" + "ipt>");
      };
      setTimeout("initScripts()", 50);
    } else if (typeof(jQuery().tagcanvas) == 'undefined') {
      if (!jQueryTagCanvasScriptFlag) {
        // load one script
        jQueryTagCanvasScriptFlag = true;
        document.write("<scr" + "ipt type=\"text/javascript\" src=\"<?php 
echo url::base(false) . gallery::find_file("js", "jquery.tagcanvas.mod.min.js", false);
?>
\"></scr" + "ipt>");
      };
      setTimeout("initScripts()", 50);
    } else {
      // libraries loaded - run actual code
      function redraw() {
        // set g-tag-cloud-html5-embed-canvas size
        $("#g-tag-cloud-html5-embed-canvas").attr({
          'width' : $("#g-tag-cloud-html5-embed").parent().width(),
          'height': $("#g-tag-cloud-html5-embed").parent().height()
        });
        // start g-tag-cloud-html5-embed-canvas
        if(!$('#g-tag-cloud-html5-embed-canvas').tagcanvas(<?php 
echo $options;
開發者ID:webmatter,項目名稱:gallery3-contrib,代碼行數:31,代碼來源:tag_cloud_html5_embed.html.php

示例4: load_sessioninfo

 public function load_sessioninfo()
 {
     $this->sidebarvisible = $_REQUEST['sb'];
     if (empty($this->sidebarvisible)) {
         $session = Session::instance();
         $_sidebar_mode = $session->get("gd_sidebar");
         if ($_sidebar_mode) {
             $this->sidebarvisible = $_sidebar_mode;
         } else {
             $this->sidebarvisible = $this->ensureoptionsvalue("sidebar_visible", "right");
         }
     } else {
         // Sidebar position is kept for 360 days
         Session::instance()->set("gd_sidebar", $this->sidebarvisible, time() + 31536000);
     }
     $this->sidebarallowed = $this->ensureoptionsvalue("sidebar_allowed", "any");
     $this->sidebarvisible = $this->ensurevalue($this->sidebarvisible, "right");
     if ($this->sidebarallowed == "none") {
         $this->sidebarvisible = $this->ensureoptionsvalue("sidebar_visible", "right");
     }
     if ($this->sidebarallowed == "right") {
         $this->sidebarvisible = "right";
     }
     if ($this->sidebarallowed == "left") {
         $this->sidebarvisible = "left";
     }
     if ($this->item()) {
         if ($this->ensureoptionsvalue("sidebar_albumonly", FALSE)) {
             if (!$this->item()->is_album()) {
                 $this->sidebarallowed = "none";
                 $this->sidebarvisible = "none";
             }
         }
     }
     $this->logopath = $this->ensureoptionsvalue("logo_path", url::file("lib/images/logo.png"));
     $this->show_guest_menu = $this->ensureoptionsvalue("show_guest_menu", FALSE);
     $this->horizontal_crop = $this->ensureoptionsvalue("horizontal_crop", FALSE);
     $this->thumb_descmode = $this->ensureoptionsvalue("thumb_descmode", "overlay");
     $this->photo_descmode = $this->ensureoptionsvalue("photo_descmode", "overlay");
     $this->is_thumbmeta_visible = (!$this->ensureoptionsvalue("hide_thumbmeta", FALSE) and module::is_active("info"));
     $this->is_photometa_visible = (!$this->ensureoptionsvalue("hide_photometa", TRUE) and module::is_active("info"));
     $this->disable_seosupport = $this->ensureoptionsvalue("disable_seosupport", FALSE);
     $this->is_blockheader_visible = !$this->ensureoptionsvalue("hide_blockheader", FALSE);
     $this->mainmenu_position = $this->ensureoptionsvalue("mainmenu_position", "default");
     $this->show_breadcrumbs = !$this->ensureoptionsvalue("hide_breadcrumbs", FALSE);
     $this->loginmenu_position = $this->ensureoptionsvalue("loginmenu_position", "default");
     $this->copyright = $this->ensureoptionsvalue("copyright", null);
     $this->photonav_position = module::get_var("th_greydragon", "photonav_position", "top");
     $this->desc_allowbbcode = $this->ensureoptionsvalue("desc_allowbbcode", FALSE);
     $this->enable_pagecache = $this->ensureoptionsvalue("enable_pagecache", FALSE);
     $this->color_pack = $this->ensureoptionsvalue("color_pack", "greydragon");
     $cssfile = gallery::find_file("css/colorpacks/" . $this->color_pack, "colors.css", false);
     if (!$cssfile) {
         $this->color_pack = 'greydragon';
     }
     switch (module::get_var("th_greydragon", "thumb_ratio")) {
         case "digital":
             $this->crop_factor = 4 / 3;
             $this->crop_class = 'g-thumbtype-dgt';
             break;
         case "square":
             $this->crop_factor = 1;
             $this->crop_class = 'g-thumbtype-sqr';
             break;
         case "film":
             $this->crop_factor = 3 / 2;
             $this->crop_class = 'g-thumbtype-flm';
             break;
         case "photo":
         default:
             $this->crop_factor = 1;
             $this->crop_class = 'g-thumbtype-sqr';
             break;
     }
     $this->_thumb_size_y = floor($this->_thumb_size_x / $this->crop_factor);
 }
開發者ID:Glooper,項目名稱:gallery3-contrib,代碼行數:76,代碼來源:MY_Theme_View.php

示例5: defined

<?php

defined("SYSPATH") or die("No direct script access.");
?>
<!--[if lt IE 9]>
<?php 
echo html::script(gallery::find_file("js", "excanvas.compiled.js", false));
?>
<![endif]-->
<script type="text/javascript">
  function redraw() {

    // set g-tag-cloud-html5-page-canvas size
    $("#g-tag-cloud-html5-page-canvas").attr({
      'width' : Math.floor(Math.min( $(window).height()*<?php 
echo $width;
?>
,  $("#g-tag-cloud-html5-page").width() )),
      'height': Math.floor(          $(window).height()*<?php 
echo $height;
?>
 )
    });
    
    // start g-tag-cloud-html5-page-canvas
    if(!$('#g-tag-cloud-html5-page-canvas').tagcanvas(<?php 
echo $options;
?>
,'g-tag-cloud-html5-page-tags')) {
      // something went wrong, hide the canvas container g-tag-cloud-html5-page
      $('#g-tag-cloud-html5-page').hide();
開發者ID:webmatter,項目名稱:gallery3-contrib,代碼行數:31,代碼來源:tag_cloud_html5_page.html.php

示例6: t

              <a href="javascript:set('deny',<?php 
echo $group->id;
?>
,<?php 
echo $permission->id;
?>
,<?php 
echo $item->id;
?>
)"
                title="<?php 
echo t('click to deny')->for_html_attr();
?>
">
                <img src="<?php 
echo url::file(gallery::find_file("images", "ico-denied-gray.png"));
?>
" alt="<?php 
echo t('inactive denied icon')->for_html_attr();
?>
" />
              </a>
            </td>
          <? endif ?>
        <? endif ?>
      </td>
      <? endforeach ?>
    </tr>
    <? endforeach ?>
  </table>
</fieldset>
開發者ID:brocki,項目名稱:gallery3,代碼行數:31,代碼來源:permissions_form.html.php

示例7: t

              <a href="javascript:set('deny',<?php 
                echo $group->id;
                ?>
,<?php 
                echo $permission->id;
                ?>
,<?php 
                echo $item->id;
                ?>
)"
                title="<?php 
                echo t('click to deny')->for_html_attr();
                ?>
">
                <img src="<?php 
                echo url::file(gallery::find_file("images", "ico-denied-inactive.png"));
                ?>
" alt="<?php 
                echo t('inactive denied icon')->for_html_attr();
                ?>
" />
              </a>
            </td>
          <?php 
            }
            ?>
        <?php 
        }
        ?>
      </td>
      <?php 
開發者ID:JasonWiki,項目名稱:docs,代碼行數:31,代碼來源:permissions_form.html.php

示例8: t

echo html::js_string(ini_get("upload_max_filesize") ? num::convert_to_bytes(ini_get("upload_max_filesize")) . "B" : "100MB");
?>
,
    file_types: "*.gif;*.jpg;*.jpeg;*.png;*.flv;*.mp4;*.GIF;*.JPG;*.JPEG;*.PNG;*.FLV;*.MP4",
    file_types_description: <?php 
echo t("Photos and Movies")->for_js();
?>
,
    file_upload_limit: 1000,
    file_queue_limit: 0,
    custom_settings: { },
    debug: false,

    // Button settings
    button_image_url: <?php 
echo html::js_string(url::file(gallery::find_file("images", "select-photos-backg.png")));
?>
,
    button_width: "202",
    button_height: "45",
    button_placeholder_id: "g-choose-files-placeholder",
    button_text: <?php 
echo json_encode('<span class="swfUploadFont">' . t("Select photos...") . '</span>');
?>
,
    button_text_style: ".swfUploadFont { color: #2E6E9E; font-size: 16px; font-family: Lucida Grande,Lucida Sans,Arial,sans-serif; font-weight: bold; }",
    button_text_left_padding: 30,
    button_text_right_padding: 30,
    button_text_top_padding: 10,

    // The event handler functions are defined in handlers.js
開發者ID:estebandito,項目名稱:gallery3,代碼行數:31,代碼來源:simple_uploader.html.php


注:本文中的gallery::find_file方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。