本文整理汇总了PHP中locales::is_rtl方法的典型用法代码示例。如果您正苦于以下问题:PHP locales::is_rtl方法的具体用法?PHP locales::is_rtl怎么用?PHP locales::is_rtl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类locales
的用法示例。
在下文中一共展示了locales::is_rtl方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: body_attributes
public function body_attributes()
{
if (locales::is_rtl()) {
return 'class="rtl"';
}
return '';
}
示例2: head
static function head($theme)
{
if ($theme->page_type == "item") {
if (locales::is_rtl()) {
$rtl_support = "rtl: true,\n";
} else {
$rtl_support = "rtl: false,\n";
}
$carouselwidth = module::get_var("navcarousel", "carouselwidth", "600");
if ($carouselwidth == 0) {
$carouselwidth = "100%";
$containerwidth = "";
} else {
$carouselwidth = $carouselwidth . "px";
$containerwidth = ".jcarousel-skin-tango .jcarousel-container-horizontal {\n\n width: " . $carouselwidth . ";\n\n }\n";
}
$thumbsize = module::get_var("navcarousel", "thumbsize", "50");
$theme->script("jquery.jcarousel.min.js");
$theme->css("skin.css");
$showelements = module::get_var("navcarousel", "showelements", "7");
$childcount = $theme->item->parent()->viewable()->children_count();
$itemoffset = intval(floor($showelements / 2));
if ($childcount <= $showelements) {
$itemoffset = 1;
} else {
$itempos = $theme->item->parent()->get_position($theme->item);
$itemoffset = $itempos - $itemoffset;
if ($itemoffset < 1) {
$itemoffset = 1;
}
if ($itemoffset + $showelements > $childcount) {
$itemoffset = $childcount - $showelements + 1;
}
}
if (module::get_var("navcarousel", "noajax", false)) {
$ajaxhandler = "";
} else {
$ajaxhandler = "itemLoadCallback: navcarousel_itemLoadCallback,\n";
}
if (module::get_var("navcarousel", "showondomready", false)) {
$onwinload = "";
} else {
$onwinload = "});\n\n \$(window).load(function () {\n";
}
return "\n<!-- Navcaoursel -->\n <style type=\"text/css\">\n\n " . $containerwidth . "\n .jcarousel-skin-tango .jcarousel-clip-horizontal {\n\n width: " . $carouselwidth . ";\n\n height: " . ($thumbsize + 25) . "px;\n\n }\n\n .jcarousel-skin-tango .jcarousel-item {\n\n width: " . ($thumbsize + 25) . "px;\n\n height: " . ($thumbsize + 25) . "px;\n\n }\n\n #navcarousel-loader {\n\n height: " . ($thumbsize + 25) . "px;\n\n }\n\n .jcarousel-skin-tango .jcarousel-next-horizontal {\n top: " . intval(floor($thumbsize / 2.8)) . "px;\n }\n .jcarousel-skin-tango .jcarousel-prev-horizontal {\n top: " . intval(floor($thumbsize / 2.8)) . "px;\n }\n </style>\n\n <script type=\"text/javascript\">\n\n jQuery(document).ready(function() {\n\n jQuery('#navcarousel').jcarousel({\n\n " . $ajaxhandler . "\n itemFallbackDimension: " . ($thumbsize + 25) . ",\n\n start: " . $itemoffset . ",\n\n size: " . $childcount . ",\n\n visible: " . $showelements . ",\n\n " . $rtl_support . "\n scroll: " . module::get_var("navcarousel", "scrollsize", "7") . "\n\n });\n\n " . $onwinload . "\n \$(\".jcarousel-prev-horizontal\").css(\"visibility\", \"visible\");\n\n \$(\".jcarousel-next-horizontal\").css(\"visibility\", \"visible\");\n\n \$(\"#navcarousel\").css(\"visibility\", \"visible\");\n\n \$(\"#navcarousel-wrapper\").css(\"background\", \"none\");\n\n \$(\"#navcarousel-wrapper\").css(\"float\", \"left\");\n\n });\n\n </script>\n\n <!-- Navcaoursel -->";
}
}
示例3: defined
<?php
defined("SYSPATH") or die("No direct script access.");
// Check and see if the current photo has any faces or notes associated with it.
$existingUsers = ORM::factory("items_user")->where("item_id", "=", $item->id)->find_all();
$existingFaces = ORM::factory("items_face")->where("item_id", "=", $item->id)->find_all();
$existingNotes = ORM::factory("items_note")->where("item_id", "=", $item->id)->find_all();
$fullname = module::get_var("photoannotation", "fullname", false);
$showusers = module::get_var("photoannotation", "showusers", false);
$showfaces = module::get_var("photoannotation", "showfaces", false);
$shownotes = module::get_var("photoannotation", "shownotes", false);
if (locales::is_rtl()) {
$rtl_support = "image-annotate-rtl";
} else {
$rtl_support = "";
}
$tags_arraystring = "";
$jscode = "";
$legend_faces = "";
$legend_notes = "";
$legend_users = "";
if (module::get_var("gallery", "active_site_theme") == "greydragon") {
$css_item_id = "#g-photo-id-" . $item->id;
$css_a_class = ".g-sb-preview";
} else {
$css_item_id = "#g-item-id-" . $item->id;
$css_a_class = ".g-fullsize-link";
}
// If it does, then insert some javascript and display an image map
// to show where the faces are at.
if (count($existingFaces) > 0 || count($existingNotes) > 0 || count($existingUsers) > 0) {
示例4: t
<head>
<title><?php
echo t("Gallery 3 upgrader");
?>
</title>
<link rel="stylesheet" type="text/css" href="<?php
echo url::file("modules/gallery/css/upgrader.css");
?>
"
media="screen,print,projection" />
<script src="<?php
echo url::file("lib/jquery.js");
?>
" type="text/javascript"></script>
</head>
<body<? if (locales::is_rtl()) { echo ' class="rtl"'; } ?>>
<div id="outer">
<img id="logo" src="<?php
echo url::file("modules/gallery/images/gallery.png");
?>
" />
<div id="inner">
<? if ($can_upgrade): ?>
<div id="dialog" style="visibility: hidden">
<a id="dialog_close_link" style="display: none" onclick="$('#dialog').fadeOut(); return false;" href="#" class="close">[x]</a>
<div id="busy" style="display: none">
<h1>
<img width="16" height="16" src="<?php
echo url::file("themes/wind/images/loading-small.gif");
?>
"/>