本文整理汇总了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}");
}
}
示例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}");
}
}
示例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;
示例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);
}
示例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();
示例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>
示例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
示例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