本文整理汇总了PHP中get_language_string函数的典型用法代码示例。如果您正苦于以下问题:PHP get_language_string函数的具体用法?PHP get_language_string怎么用?PHP get_language_string使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_language_string函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getOptionsSupported
function getOptionsSupported()
{
global $personalities;
if (!extensionEnabled('print_album_menu') && (($m = getOption('garland_menu')) == 'garland' || $m == 'zenpage' || $m == 'garland')) {
$note = '<p class="notebox">' . sprintf(gettext('<strong>Note:</strong> The <em>%s</em> custom menu makes use of the <em>print_album_menu</em> plugin.'), $m) . '</p>';
} else {
$note = '';
}
$options = array(gettext('Theme personality') => array('key' => 'garland_personality', 'type' => OPTION_TYPE_SELECTOR, 'selections' => $personalities, 'desc' => gettext('Select the theme personality')), gettext('Allow search') => array('key' => 'Allow_search', 'type' => OPTION_TYPE_CHECKBOX, 'desc' => gettext('Set to enable search form.')), gettext('Allow cloud') => array('key' => 'Allow_cloud', 'type' => OPTION_TYPE_CHECKBOX, 'desc' => gettext('Set to enable tag cloud for album page.')), gettext('Custom menu') => array('key' => 'garland_menu', 'type' => OPTION_TYPE_CUSTOM, 'desc' => gettext('Set this to the <em>menu_manager</em> menu you wish to use.') . $note));
if (extensionEnabled('zenpage')) {
global $_zp_CMS;
$pages = $_zp_CMS->getPages(false);
$list = array();
foreach ($pages as $page) {
$pageObj = newPage($page['titlelink']);
if (!$pageObj->getShow()) {
$list[getBare(get_language_string($page['title']))] = $page['titlelink'];
}
}
$options[gettext('Custom Homepage')] = array('key' => 'garland_customHome', 'type' => OPTION_TYPE_SELECTOR, 'selections' => $list, 'null_selection' => gettext('none'), 'desc' => gettext('Select the <em>pages</em> titlelink for the home page. Only unpublished pages are offered for selection.'));
}
if (getOption('garland_personality') == 'image_gallery') {
$options[gettext('Image gallery transition')] = array('key' => 'garland_transition', 'type' => OPTION_TYPE_SELECTOR, 'selections' => array(gettext('None') => '', gettext('Fade') => 'fade', gettext('Shrink/grow') => 'resize', gettext('Horizontal') => 'slide-hori', gettext('Vertical') => 'slide-vert'), 'order' => 10, 'desc' => gettext('Transition effect for Image gallery'));
$options[gettext('Image gallery caption')] = array('key' => 'garland_caption_location', 'type' => OPTION_TYPE_RADIO, 'buttons' => array(gettext('On image') => 'image', gettext('Separate') => 'separate', gettext('Omit') => 'none'), 'order' => 10.5, 'desc' => gettext('Location for Image gallery picture caption'));
}
return $options;
}
示例2: getExtraContent
/**
* Returns the extra content
*
* @return string
*/
function getExtraContent($locale = NULL)
{
$text = $this->get("extracontent");
if ($locale == 'all') {
return zpFunctions::unTagURLs($text);
} else {
return applyMacros(zpFunctions::unTagURLs(get_language_string($text, $locale)));
}
}
示例3: getOptionsSupported
function getOptionsSupported()
{
$unpublishedpages = query_full_array("SELECT title,titlelink FROM " . prefix('pages') . " WHERE `show` != 1 ORDER by `sort_order`");
$list = array();
foreach ($unpublishedpages as $page) {
$list[get_language_string($page['title'])] = $page['titlelink'];
}
return array(gettext('Allow search') => array('key' => 'Allow_search', 'type' => OPTION_TYPE_CHECKBOX, 'desc' => gettext('Check to enable search form.')), gettext('News on index page') => array('key' => 'zenpage_zp_index_news', 'type' => OPTION_TYPE_CHECKBOX, 'desc' => gettext("Enable this if you want to show the news section’s first page on the <code>index.php</code> page.")), gettext('Homepage') => array('key' => 'zenpage_homepage', 'type' => OPTION_TYPE_SELECTOR, 'selections' => $list, 'null_selection' => gettext('none'), 'desc' => gettext("Choose here any <em>un-published Zenpage page</em> (listed by <em>titlelink</em>) to act as your site’s homepage instead the normal gallery index.") . "<p class='notebox'>" . gettext("<strong>Note:</strong> This of course overrides the <em>News on index page</em> option and your theme must be setup for this feature! Visit the theming tutorial for details.") . "</p>"), gettext('Use standard contact page') => array('key' => 'zenpage_contactpage', 'type' => OPTION_TYPE_CHECKBOX, 'desc' => gettext('Disable this if you do not want to use the separate contact page with the contact form. You can also use the codeblock of a page for this. See the contact_form plugin documentation for more info.')), gettext('Use custom menu') => array('key' => 'zenpage_custommenu', 'type' => OPTION_TYPE_CHECKBOX, 'desc' => gettext('Check this if you want to use the <em>menu_manager</em> plugin if enabled to build a custom menu instead of the separate standard ones. A standard menu named "zenpage" is created and used automatically.')));
}
示例4: __construct
function __construct($user)
{
$this->table = 'albums';
$this->name = $user;
$this->owner = $user;
$this->setTitle(get_language_string(getOption('favorites_title')));
$this->setDesc(get_language_string(getOption('favorites_desc')));
$this->imageSortDirection = getOption('favorites_image_sort_direction');
$this->albumSortDirection = getOption('favorites_album_sort_direction');
$this->imageSortType = getOption('favorites_image_sort_type');
$this->albumSortType = getOption('favorites_album_sort_type');
$list = query_full_array('SELECT `aux` FROM ' . prefix('plugin_storage') . ' WHERE `type`="favorites" AND `aux` REGEXP ' . db_quote('[[:<:]]' . $user . '[[:>:]]'));
foreach ($list as $aux) {
$instance = getSerializedArray($aux['aux']);
if (isset($instance[1])) {
$this->list[$instance[1]] = $instance[1];
}
}
}
示例5: checkForGuest
/**
* returns the auth type of a guest login
*
* @param string $hint
* @param string $show
* @return string
*/
function checkForGuest(&$hint = NULL, &$show = NULL)
{
global $_zp_gallery, $_zp_gallery_page, $_zp_current_zenpage_page, $_zp_current_category, $_zp_current_zenpage_news;
$authType = zp_apply_filter('checkForGuest', NULL);
if (!is_null($authType)) {
return $authType;
}
if (in_context(ZP_SEARCH)) {
// search page
$hash = getOption('search_password');
if (getOption('search_user') != '') {
$show = true;
}
$hint = get_language_string(getOption('search_hint'));
$authType = 'zp_search_auth';
if (empty($hash)) {
$hash = $_zp_gallery->getPassword();
if ($_zp_gallery->getUser() != '') {
$show = true;
}
$hint = $_zp_gallery->getPasswordHint();
$authType = 'zp_gallery_auth';
}
if (!empty($hash) && zp_getCookie($authType) == $hash) {
return $authType;
}
} else {
if (!is_null($_zp_current_zenpage_news)) {
$authType = $_zp_current_zenpage_news->checkAccess($hint, $show);
return $authType;
} else {
if (isset($_GET['album'])) {
// album page
list($album, $image) = rewrite_get_album_image('album', 'image');
if ($authType = checkAlbumPassword($album, $hint)) {
return $authType;
} else {
$alb = newAlbum($album);
if ($alb->getUser() != '') {
$show = true;
}
return false;
}
} else {
// other page
$hash = $_zp_gallery->getPassword();
if ($_zp_gallery->getUser() != '') {
$show = true;
}
$hint = $_zp_gallery->getPasswordHint();
if (!empty($hash) && zp_getCookie('zp_gallery_auth') == $hash) {
return 'zp_gallery_auth';
}
}
}
}
if (empty($hash)) {
return 'zp_public_access';
}
return false;
}
示例6: printAdminRightsTable
/**
* Outputs the rights checkbox table for admin
*
* @param $id int record id for the save
* @param string $background background color
* @param string $alterrights are the items changable
* @param bit $rights rights of the admin
*/
function printAdminRightsTable($id, $background, $alterrights, $rights)
{
$rightslist = sortMultiArray(Zenphoto_Authority::getRights(), array('set', 'value'));
?>
<div class="box-rights">
<strong><?php
echo gettext("Rights:");
?>
</strong>
<?php
$element = 3;
$activeset = false;
?>
<input type="checkbox" name="<?php
echo $id;
?>
-rightsenabled" class="user-<?php
echo $id;
?>
" value="1" checked="checked" <?php
echo $alterrights;
?>
style="display:none" />
<?php
foreach ($rightslist as $rightselement => $right) {
if ($right['display']) {
if ($right['set'] != gettext('Pages') && $right['set'] != gettext('News') || extensionEnabled('zenpage')) {
if ($activeset != $right['set']) {
if ($activeset) {
?>
</fieldset>
<?php
}
$activeset = $right['set'];
?>
<fieldset><legend><?php
echo $activeset;
?>
</legend>
<?php
}
?>
<label title="<?php
echo html_encode(get_language_string($right['hint']));
?>
">
<input type="checkbox" name="<?php
echo $id . '-' . $rightselement;
?>
" id="<?php
echo $rightselement . '-' . $id;
?>
" class="user-<?php
echo $id;
?>
" value="<?php
echo $right['value'];
?>
"<?php
if ($rights & $right['value']) {
echo ' checked="checked"';
}
echo $alterrights;
?>
/> <?php
echo $right['name'];
?>
</label>
<?php
} else {
?>
<input type="hidden" name="<?php
echo $id . '-' . $rightselement;
?>
" id="<?php
echo $rightselement . '-' . $id;
?>
" value="<?php
echo $right['value'];
?>
" />
<?php
}
}
}
?>
</fieldset>
</div>
<?php
}
示例7: printContactForm
//.........这里部分代码省略.........
}
if (!empty($mailcontent['name'])) {
$message .= $mailcontent['name'] . "\n";
}
if (!empty($mailcontent['company'])) {
$message .= $mailcontent['company'] . "\n";
}
if (!empty($mailcontent['street'])) {
$message .= $mailcontent['street'] . "\n";
}
if (!empty($mailcontent['city'])) {
$message .= $mailcontent['city'] . "\n";
}
if (!empty($mailcontent['state'])) {
$message .= $mailcontent['state'] . "\n";
}
if (!empty($mailcontent['postal'])) {
$message .= $mailcontent['postal'] . "\n";
}
if (!empty($mailcontent['country'])) {
$message .= $mailcontent['country'] . "\n";
}
if (!empty($mailcontent['email'])) {
$message .= $mailcontent['email'] . "\n";
}
if (!empty($mailcontent['phone'])) {
$message .= $mailcontent['phone'] . "\n";
}
if (!empty($mailcontent['website'])) {
$message .= $mailcontent['website'] . "\n";
}
$message .= "\n\n";
if (getOption('contactform_confirm')) {
echo get_language_string(getOption("contactform_confirmtext"));
if (getOption('contactform_sendcopy')) {
echo get_language_string(getOption("contactform_sendcopy_text"));
}
?>
<div>
<?php
$_processing_post = true;
include getPlugin('contact_form/form.php', true);
?>
<form id="confirm" action="<?php
echo sanitize($_SERVER['REQUEST_URI']);
?>
" method="post" accept-charset="UTF-8" style="float: left">
<input type="hidden" id="confirm" name="confirm" value="confirm" />
<input type="hidden" id="name" name="name" value="<?php
echo html_encode($name);
?>
" />
<input type="hidden" id="subject" name="subject" value="<?php
echo html_encode($subject);
?>
" />
<input type="hidden" id="message" name="message" value="<?php
echo html_encode($message);
?>
" />
<input type="hidden" id="mailaddress" name="mailaddress" value="<?php
echo html_encode($mailaddress);
?>
" />
<input type="submit" value="<?php
echo gettext("Confirm");
示例8: getitemComments
/**
* Gets the feed item data in a comments feed
*
* @param array $item Array of a comment
* @return array
*/
protected function getitemComments($item)
{
if ($item['anon']) {
$author = "";
} else {
$author = " " . gettext("by") . " " . $item['name'];
}
$commentpath = $imagetag = $title = '';
switch ($item['type']) {
case 'images':
$title = get_language_string($item['title']);
$obj = newImage(array('folder' => $item['folder'], 'filename' => $item['filename']));
$link = $obj->getlink();
$feeditem['pubdate'] = date("r", strtotime($item['date']));
$category = get_language_string($item['albumtitle']);
$website = $item['website'];
$title = $category . ": " . $title;
$commentpath = PROTOCOL . '://' . $this->host . $link . "#" . $item['id'];
break;
case 'albums':
$obj = newAlbum($item['folder']);
$link = rtrim($obj->getLink(), '/');
$feeditem['pubdate'] = date("r", strtotime($item['date']));
$title = get_language_string($item['albumtitle']);
$website = $item['website'];
$commentpath = PROTOCOL . '://' . $this->host . $link . "#" . $item['id'];
break;
case 'news':
case 'pages':
if (extensionEnabled('zenpage')) {
$feeditem['pubdate'] = date("r", strtotime($item['date']));
$category = '';
$title = get_language_string($item['title']);
$titlelink = $item['titlelink'];
$website = $item['website'];
if ($item['type'] == 'news') {
$obj = newArticle($titlelink);
} else {
$obj = newPage($titlelink);
}
$commentpath = PROTOCOL . '://' . $this->host . html_encode($obj->getLink()) . "#" . $item['id'];
} else {
$commentpath = '';
}
break;
}
$feeditem['title'] = getBare($title . $author);
$feeditem['link'] = $commentpath;
$feeditem['desc'] = $item['comment'];
return $feeditem;
}
示例9: getImageArgs
$args = getImageArgs($_GET);
$args[0] = 'FULL';
$adminrequest = $args[12];
if ($forbidden = getOption('image_processor_flooding_protection') && (!isset($_GET['check']) || $_GET['check'] != sha1(HASH_SEED . serialize($args)))) {
// maybe it was from the tinyZenpage javascript which does not know better!
zp_session_start();
$forbidden = !isset($_SESSION['adminRequest']) || $_SESSION['adminRequest'] != @$_COOKIE['zp_user_auth'];
}
$args[0] = 'FULL';
$hash = getOption('protected_image_password');
if (($hash || !$albumobj->checkAccess()) && !zp_loggedin(VIEW_FULLIMAGE_RIGHTS)) {
// handle password form if posted
zp_handle_password('zp_image_auth', getOption('protected_image_password'), getOption('protected_image_user'));
//check for passwords
$authType = 'zp_image_auth';
$hint = get_language_string(getOption('protected_image_hint'));
$show = getOption('protected_image_user');
if (empty($hash)) {
// check for album password
$hash = $albumobj->getPassword();
$authType = "zp_album_auth_" . $albumobj->getID();
$hint = $albumobj->getPasswordHint();
$show = $albumobj->getUser();
if (empty($hash)) {
$albumobj = $albumobj->getParent();
while (!is_null($albumobj)) {
$hash = $albumobj->getPassword();
$authType = "zp_album_auth_" . $albumobj->getID();
$hint = $albumobj->getPasswordHint();
$show = $albumobj->getUser();
if (!empty($hash)) {
示例10: updateCategory
/**
* Updates a category
*
*/
function updateCategory(&$reports)
{
$date = date('Y-m-d_H-i-s');
$id = sanitize_numeric($_POST['id']);
$permalink = getcheckboxState('permalink');
$title = process_language_string_save("title", 2);
$desc = process_language_string_save("desc", 0);
$custom = process_language_string_save("custom_data", 1);
$titlelink = $oldtitlelink = sanitize($_POST['titlelink-old'], 3);
if (getcheckboxState('edittitlelink')) {
$titlelink = sanitize($_POST['titlelink'], 3);
if (empty($titlelink)) {
$titlelink = seoFriendly(get_language_string($title));
if (empty($titlelink)) {
$titlelink = seoFriendly($date);
}
}
} else {
if (!$permalink) {
// allow the link to change
$link = seoFriendly(get_language_string($title));
if (!empty($link)) {
$titlelink = $link;
}
}
}
$titleok = true;
if ($titlelink != $oldtitlelink) {
// title link change must be reflected in DB before any other updates
$titleok = query('UPDATE ' . prefix('news_categories') . ' SET `titlelink`=' . db_quote($titlelink) . ' WHERE `id`=' . $id, false);
if (!$titleok) {
$titlelink = $oldtitlelink;
// force old link so data gets saved
}
} else {
$titlelink = $oldtitlelink;
}
//update category
$show = getcheckboxState('show');
$cat = new ZenpageCategory($titlelink);
$notice = processPasswordSave($cat);
$cat->setPermalink(getcheckboxState('permalink'));
$cat->set('title', $title);
$cat->setDesc($desc);
$cat->setCustomData(zp_apply_filter('save_category_custom_data', $custom, $cat));
$cat->setShow($show);
if (getcheckboxState('resethitcounter')) {
$cat->set('hitcounter', 0);
}
$msg = zp_apply_filter('update_category', '', $cat, $oldtitlelink);
$cat->save();
if ($titleok) {
if (empty($titlelink) or empty($title)) {
$reports[] = "<p class='errorbox fade-message'>" . gettext("You forgot to give your category a <strong>title or titlelink</strong>!") . "</p>";
} else {
if ($notice == 'user') {
$reports[] = "<p class='errorbox fade-message'>" . gettext('You must supply a password for the Protected Category user') . '</p>';
} else {
if ($notice == 'pass') {
$reports[] = "<p class='errorbox fade-message'>" . gettext('Your passwords were empty or did not match') . '</p>';
} else {
$reports[] = "<p class='messagebox fade-message'>" . gettext("Category updated!") . "</p>";
}
}
}
} else {
$reports[] = "<p class='errorbox fade-message'>" . sprintf(gettext("A category with the title/titlelink <em>%s</em> already exists!"), html_encode($cat->getTitle())) . "</p>";
}
if ($msg) {
$reports[] = $msg;
}
return $cat;
}
示例11: array
$flag = array();
}
printManagedObjects('albums', $albumlist, $album_alter_rights, $userobj, $id, gettext('user'), $flag);
if (extensionEnabled('zenpage')) {
$pagelist = array();
$pages = $_zp_zenpage->getPages(false);
foreach ($pages as $page) {
if (!$page['parentid']) {
$pagelist[get_language_string($page['title'])] = $page['titlelink'];
}
}
printManagedObjects('pages', $pagelist, $album_alter_rights, $userobj, $id, gettext('user'), NULL);
$newslist = array();
$categories = $_zp_zenpage->getAllCategories(false);
foreach ($categories as $category) {
$newslist[get_language_string($category['title'])] = $category['titlelink'];
}
printManagedObjects('news', $newslist, $album_alter_rights, $userobj, $id, gettext('user'), NULL);
}
}
?>
</td>
</tr>
<?php
echo $custom_row;
?>
</table> <!-- end individual admin table -->
</td>
</tr>
<?php
$id++;
示例12: gettext
// custom menu check end
?>
<?php
if (extensionEnabled('zenpage')) {
?>
<div class="menu">
<h3><?php
echo gettext("Latest notes");
?>
</h3>
<ul>
<?php
$latest = getLatestNews(3);
foreach ($latest as $item) {
$title = htmlspecialchars(get_language_string($item['title']));
$link = getNewsURL($item['titlelink']);
echo "<li><a href=\"" . $link . "\" title=\"" . strip_tags(htmlspecialchars($title, ENT_QUOTES)) . "\">" . htmlspecialchars($title) . "</a></li>";
}
?>
</ul>
</div>
<?php
}
?>
<div class="menu">
<h3><?php
echo gettext("Toolbox");
?>
</h3>
示例13: printFavoritesURL
/**
* Prints links to the favorites "albums"
*
* @global favorites $_myFavorites
* @param type $text
*/
function printFavoritesURL($text = NULL, $before = NULL, $between = NULL, $after = NULL)
{
global $_myFavorites;
if (zp_loggedin()) {
if (is_null($text)) {
$text = get_language_string(getOption('favorites_linktext'));
}
$list = $_myFavorites->getList();
$betwixt = NULL;
echo $before;
foreach ($_myFavorites->getList() as $instance) {
$link = $_myFavorites->getLink(NULL, $instance);
$display = $text;
if ($instance) {
$display .= '[' . $instance . ']';
}
echo $betwixt;
$betwixt = $between;
?>
<a href="<?php
echo $link;
?>
" class="favorite_link"><?php
echo html_encode($display);
?>
</a>
<?php
}
echo $after;
}
}
示例14: jqm_printFooterNav
/**
* Prints the footer
*/
function jqm_printFooterNav()
{
global $_zp_gallery_page, $_zp_current_album;
?>
<div id="footer" data-role="footer">
<?php
@call_user_func('printLanguageSelector', "langselector");
?>
<ul id="footerlist">
<li><?php
echo gettext('Powered by');
?>
<a href="http://www.zenphoto.org">Zenphoto</a> and <a href="http://jquerymobile.com">jQueryMobile</a></li>
<li><?php
echo gettext('zpMobile theme by');
?>
<a href="http://www.maltem.de">Malte Müller</a></li>
</ul>
<?php
$adminlink = '';
$favoriteslink = '';
if (!zp_loggedin() && function_exists('printRegisterURL')) {
if ($_zp_gallery_page != 'register.php') {
$_linktext = get_language_string(getOption('register_user_page_link'));
$adminlink = '<li><a rel="external" href="' . html_encode(register_user::getLink()) . '">' . $_linktext . '</a></li>';
}
}
if (function_exists('printFavoritesURL')) {
$favoriteslink = '<li><a rel="external" href="' . html_encode(getFavoritesURL()) . '">' . gettext('Favorites') . '</a></li>';
}
if ($adminlink || $favoriteslink) {
?>
<div data-role="navbar">
<ul id="footernav">
<?php
echo $adminlink . $favoriteslink;
if (function_exists("printUserLogin_out")) {
echo "<li>";
printUserLogin_out("", "", 0);
echo "</li>";
}
?>
</ul>
</div>
<!-- /navbar -->
<?php
}
?>
</div><!-- footer -->
<?php
}
示例15: header
header("Status: 403 " . gettext("Forbidden"));
exitZP();
// terminate the script with no output
}
}
$hash = getOption('downloadList_password');
if (GALLERY_SECURITY != 'public' || $hash) {
// credentials required to download
if (!zp_loggedin(getOption('downloadList_rights') ? FILES_RIGHTS : ALL_RIGHTS)) {
$user = getOption('downloadList_user');
zp_handle_password('download_auth', $hash, $user);
if (!empty($hash) && zp_getCookie('download_auth') != $hash) {
$show = $user ? true : NULL;
$hint = '';
if (!empty($hash)) {
$hint = get_language_string(getOption('downloadList_hint'));
}
if (isset($_GET['albumzip'])) {
$item .= '&albumzip';
}
printPasswordForm($hint, true, $show, '?download=' . $item);
exitZP();
}
}
}
if (isset($_GET['albumzip'])) {
DownloadList::updateListItemCount($item . '.zip');
require_once SERVERPATH . '/' . ZENFOLDER . '/lib-zipStream.php';
if (isset($_GET['fromcache'])) {
$fromcache = sanitize($isset($_GET['fromcache']));
} else {