• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP l10n函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中l10n函数的典型用法代码示例。如果您正苦于以下问题:PHP l10n函数的具体用法?PHP l10n怎么用?PHP l10n使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: oauth_init

/**
 * plugin initialization
 */
function oauth_init()
{
    global $conf, $page, $hybridauth_conf, $template;
    load_language('plugin.lang', OAUTH_PATH);
    $conf['oauth'] = safe_unserialize($conf['oauth']);
    // check config
    if (defined('IN_ADMIN')) {
        if (empty($hybridauth_conf) and strpos(@$_GET['page'], 'plugin-oAuth') === false) {
            $page['warnings'][] = '<a href="' . OAUTH_ADMIN . '">' . l10n('Social Connect: You need to configure the credentials') . '</a>';
        }
        if (!function_exists('curl_init')) {
            $page['warnings'][] = l10n('Social Connect: PHP Curl extension is needed');
        }
    }
    // in case of registration aborded
    if (script_basename() == 'index' and ($oauth_id = pwg_get_session_var('oauth_new_user')) !== null) {
        pwg_unset_session_var('oauth_new_user');
        if ($oauth_id[0] == 'Persona') {
            oauth_assign_template_vars(get_gallery_home_url());
            $template->block_footer_script(null, 'navigator.id.logout();');
        } else {
            require_once OAUTH_PATH . 'include/hybridauth/Hybrid/Auth.php';
            try {
                $hybridauth = new Hybrid_Auth($hybridauth_conf);
                $adapter = $hybridauth->getAdapter($oauth_id[0]);
                $adapter->logout();
            } catch (Exception $e) {
            }
        }
    }
}
开发者ID:lcorbasson,项目名称:Piwigo-Social-Connect,代码行数:34,代码来源:main.inc.php


示例2: osm_loc_end_element_set_global

function osm_loc_end_element_set_global()
{
    global $template, $conf;
    $batch_global_height = isset($conf['osm_conf']['batch']['global_height']) ? $conf['osm_conf']['batch']['global_height'] : '200';
    $template->append('element_set_global_plugins_actions', array('ID' => 'openstreetmap', 'NAME' => l10n('OSM GeoTag'), 'CONTENT' => '
  <label>' . l10n('Latitude') . ' (-90=S to 90=N)
    <input type="text" size="8" name="osmlat">
  </label>
  <label>' . l10n('Longitude') . ' (-180=W to 180=E)
    <input type="text" size="9" name="osmlon">
  </label> (Empty values will erase coordinates)
  <style type="text/css"> .map1 { height: ' . $batch_global_height . 'px !important; width:100% !important; margin: 5px; } </style>
  <script src="plugins/piwigo-openstreetmap/leaflet/qleaflet.jquery.js"></script>
  <div class="osm-map1 map1"></div>
  <script>
    $(document).ready(function() {
         $("#permitAction").on("change", function (e) {
            var optionSelected = $("option:selected", this);
            if ("openstreetmap" == optionSelected.val()) {
              $(".osm-map1").qleaflet();
            }
         });
    });
  </script>
'));
}
开发者ID:joubu,项目名称:piwigo-openstreetmap,代码行数:26,代码来源:admin_batchmanager.php


示例3: multimedia_publish_attachments_register

function multimedia_publish_attachments_register(&$attachment_types)
{
  l10n_load('plugins/multimedia/l10n');
  $attachment_types[] = array('caption' => l10n('mm.attach.pic'), 'editor' => 'multimedia/picture.php');
  $attachment_types[] = array('caption' => l10n('mm.attach.link'), 'editor' => 'multimedia/link.php');
  $attachment_types[] = array('caption' => l10n('mm.attach.text'), 'editor' => 'multimedia/text.php');
}
开发者ID:hcopr,项目名称:Hubbub,代码行数:7,代码来源:events.php


示例4: on_index_thumbnails

 static function on_index_thumbnails($thumbs)
 {
     global $page, $template;
     $total = count($page['items']);
     if (count($thumbs) >= $total) {
         add_event_handler('loc_end_index', array('RVTS', 'on_end_index'));
         return $thumbs;
     }
     $url_model = str_replace('123456789', '%start%', duplicate_index_url(array('start' => 123456789)));
     $ajax_url_model = add_url_params($url_model, array('rvts' => '%per%'));
     $url_model = str_replace('&amp;', '&', $url_model);
     $ajax_url_model = str_replace('&amp;', '&', $ajax_url_model);
     $my_base_name = basename(dirname(__FILE__));
     $ajax_loader_image = get_root_url() . "plugins/{$my_base_name}/ajax-loader.gif";
     $template->func_combine_script(array('id' => 'jquery', 'load' => 'footer', 'path' => 'themes/default/js/jquery.min.js'));
     $template->func_combine_script(array('id' => $my_base_name, 'load' => 'async', 'path' => 'plugins/' . $my_base_name . '/rv_tscroller.min.js', 'require' => 'jquery', 'version' => RVTS_VERSION));
     $start = (int) $page['start'];
     $per_page = $page['nb_image_page'];
     $moreMsg = 'See the remaining %d photos';
     if ('en' != $GLOBALS['lang_info']['code']) {
         load_language('lang', dirname(__FILE__) . '/');
         $moreMsg = l10n($moreMsg);
     }
     // the String.fromCharCode comes from google bot which somehow manage to get these urls
     $template->block_footer_script(null, "var RVTS = {\najaxUrlModel: String.fromCharCode(" . ord($ajax_url_model[0]) . ")+'" . substr($ajax_url_model, 1) . "',\nstart: {$start},\nperPage: {$per_page},\nnext: " . ($start + $per_page) . ",\ntotal: {$total},\nurlModel: String.fromCharCode(" . ord($url_model[0]) . ")+'" . substr($url_model, 1) . "',\nmoreMsg: '{$moreMsg}',\nprevMsg: '" . l10n("Previous") . "',\najaxLoaderImage: '{$ajax_loader_image}'\n};\njQuery('.navigationBar').hide();");
     return $thumbs;
 }
开发者ID:kappuccino,项目名称:piwigo-tscroller,代码行数:27,代码来源:main.inc.php


示例5: setPluginWarnings

 private function setPluginWarnings()
 {
     global $pwg_loaded_plugins, $page;
     if (isset($pwg_loaded_plugins['language_switch'])) {
         $page['errors'][] = l10n('Language Switch plugin is enabled but is not compatible with the Bootstrap Default theme. Please disable it and download the <a href="http://piwigo.org/ext/extension_view.php?eid=797" target="_new">Bootstrap Default Language Switch</a> instead.');
     }
 }
开发者ID:odkbacco,项目名称:bootstrapdefault,代码行数:7,代码来源:themecontroller.php


示例6: friends_list_rowcallback

function friends_list_rowcallback($ds)
{
  $rowid = 'row_'.$ds['_key'];
  ?><div id="<?= $rowid ?>">
    <input type="button" value="<?= l10n('remove') ?>" onclick="friend_remove('<?= $rowid ?>', <?= $ds['_key'] ?>);"/>
    <span id="<?= $rowid ?>_status"></span>
  </div><?
}
开发者ID:hcopr,项目名称:Hubbub,代码行数:8,代码来源:friends.index.php


示例7: cdnplus_admin_menu

function cdnplus_admin_menu($menu)
{
    global $page, $conf;
    if (!empty($conf['cdnplus_conf']['cdn_enabled']) && empty($conf['cdnplus_conf']['cdn_1']['host']) and in_array($page['page'], array('intro', 'plugins_list'))) {
        $page['errors'][] = l10n('You need to set your CDN host');
    }
    $admin_url = get_admin_plugin_menu_link(dirname(__FILE__) . '/admin.php');
    array_push($menu, array('NAME' => 'CDNPlus', 'URL' => get_admin_plugin_menu_link(dirname(__FILE__)) . '/admin.php'));
    return $menu;
}
开发者ID:biggtfish,项目名称:piwigo-cdnplus,代码行数:10,代码来源:main.inc.php


示例8: index

 function index()
 {
     $this->form = new CQForm('settings');
     $this->form->ds =& $this->user->settings;
     $this->form->add('html', l10n('email.notify'))->add('checkbox', 'email_friendrequest')->add('checkbox', 'email_wallpost')->add('checkbox', 'email_comment')->add('checkbox', 'email_response')->add('checkbox', 'email_message')->add('html', '<br/>')->add('submit', 'save');
     if ($this->form->submitted) {
         $this->form->getData();
         #$this->user->ds['u_email'] = getDefault($this->user->ds['u_email'], $this->form->ds['email']);
         $this->user->save();
     }
 }
开发者ID:hcopr,项目名称:Hubbub,代码行数:11,代码来源:settings.controller.php


示例9: content_55bbb4a38f51d5_13758895

    function content_55bbb4a38f51d5_13758895($_smarty_tpl)
    {
        if (empty($_smarty_tpl->tpl_vars['load_mode']->value)) {
            $_smarty_tpl->tpl_vars['load_mode'] = new Smarty_variable('footer', null, 0);
        }
        echo $_smarty_tpl->getSubTemplate('include/colorbox.inc.tpl', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array('load_mode' => $_smarty_tpl->tpl_vars['load_mode']->value), 0);
        ?>


<?php 
        echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['combine_script'][0][0]->func_combine_script(array('id' => 'jquery.selectize', 'load' => 'footer', 'path' => 'themes/default/js/plugins/selectize.min.js'), $_smarty_tpl);
        ?>

<?php 
        echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['combine_css'][0][0]->func_combine_css(array('id' => 'jquery.selectize', 'path' => "themes/default/js/plugins/selectize." . (string) $_smarty_tpl->tpl_vars['themeconf']->value['colorscheme'] . ".css"), $_smarty_tpl);
        ?>


<?php 
        echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['combine_script'][0][0]->func_combine_script(array('id' => 'addAlbum', 'load' => $_smarty_tpl->tpl_vars['load_mode']->value, 'path' => 'admin/themes/default/js/addAlbum.js'), $_smarty_tpl);
        ?>


<div style="display:none">
  <div id="addAlbumForm">
    <form>
      <?php 
        echo l10n('Parent album');
        ?>
<br>
      <select name="category_parent"></select>
      <br><br>
      
      <?php 
        echo l10n('Album name');
        ?>
<br>
      <input name="category_name" type="text" maxlength="255">
      <span id="categoryNameError" style="color:red;"><?php 
        echo l10n('The name of an album must not be empty');
        ?>
</span>
      <br><br><br>
      
      <input type="submit" value="<?php 
        echo l10n('Create');
        ?>
">
      <span id="albumCreationLoading" style="display:none"><img src="themes/default/images/ajax-loader-small.gif"></span>
    </form>
  </div>
</div>
<?php 
    }
开发者ID:abhinay100,项目名称:piwigo_app,代码行数:54,代码来源:p6jhns_1rf28ly^b19c913f95548d36adef1d980c1ad76b8772c4a0.file.add_album.inc.tpl.php


示例10: getMenuLinks

 static function getMenuLinks()
 {
     $items = array();
     $items[] = array('icon' => 'building-o', 'title' => l10n('devices.index'), 'url' => actionUrl('index', 'devices'));
     $items[] = array('icon' => 'hand-o-down', 'title' => l10n('events.manual'), 'url' => actionUrl('manual', 'events'));
     $items[] = array('icon' => 'heartbeat', 'title' => l10n('radiator.minion'), 'url' => actionUrl('index', 'radiator'));
     if (cfg('cameras')) {
         $items[] = array('icon' => 'video-camera', 'title' => l10n('cam.index'), 'url' => actionUrl('index', 'cam'));
     }
     return $items;
 }
开发者ID:bangnaga,项目名称:HomeOverlord,代码行数:11,代码来源:H2Configuration.php


示例11: gb_section_init

function gb_section_init()
{
    global $tokens, $page, $conf;
    if ($tokens[0] == 'guestbook') {
        $page['section'] = 'guestbook';
        $page['body_id'] = 'theGuestBook';
        $page['is_external'] = true;
        $page['is_homepage'] = false;
        $page['title'] = l10n('GuestBook');
        $page['section_title'] = '<a href="' . get_gallery_home_url() . '">' . l10n('Home') . '</a>' . $conf['level_separator'] . l10n('GuestBook');
    }
}
开发者ID:plegall,项目名称:Piwigo-Guest-Book,代码行数:12,代码来源:events.inc.php


示例12: vjs_loc_end_element_set_global

function vjs_loc_end_element_set_global()
{
    global $template;
    $template->append('element_set_global_plugins_actions', array('ID' => 'videojs', 'NAME' => l10n('Videos'), 'CONTENT' => '
    <legend>Synchronize metadata</legend>
    <ul>
      <li>
	<label><input type="checkbox" name="vjs_metadata" value="1" checked="checked" /> filesize, width, height, latitude, longitude, date_creation, rotation</label>
	<br/><small>Will overwrite the information in the database with the metadata from the video.</small>
	<br/><small><strong>Require <a href="https://github.com/xbgmsharp/piwigo-videojs/wiki/How-to-add-videos#external-tools" target="_blank">\'MediaInfo\'</a> to be install.</strong></small>
      </li>
    </ul>
    <legend>Poster</legend>
    <ul>
      <li>
	<label><input type="checkbox" name="vjs_poster" value="1" checked="checked" /> Create a poster at position in second:</label>
	<!-- <input type="range" name="vjs_postersec" value="4" min="0" max="60" step="1"/> -->
	<input type="text" name="vjs_postersec" value="4" size="2" required/>
	<br/><small>Create a poster from the video at specify position.</small>
	<br/><small><strong>Require <a href="https://github.com/xbgmsharp/piwigo-videojs/wiki/How-to-add-videos#external-tools" target="_blank">\'FFmpeg\'</a> to be install.</strong></small>
      </li>
      <li>
	<label><input type="checkbox" name="vjs_posteroverwrite" value="1" checked="checked"> Overwrite existing posters</label>
	<br/><small>Overwrite existing thumbnails with new ones. If uncheck it should only run for newly added video.</small>
      </li>
      <li>
	<label><span class="property">Output format : </span></label>
	<label><input type="radio" name="vjs_output" value="jpg" checked="checked"/> JPG</label>
	<label><input type="radio" name="vjs_output" value="png" /> PNG</label>
	<br/><small>Select the output format for the poster and thumbnail.</small>
      </li>
      <li>
	<label><input type="checkbox" name="vjs_posteroverlay" value="1" /> Add film effect</label>
	<br/><small>Apply an overlay on the poster creation.</small>
      </li>
    </ul>
    <legend>Thumbnail</legend>
    <ul>
      <li>
	<label><input type="checkbox" name="vjs_thumb" value="1" /> Create a thumbnail at every seconds:</label>
	<!-- <input type="range" name="vjs_thumbsec" value="5" min="0" max="60" step="1"/> -->
	<input type="text" name="vjs_thumbsec" value="5" size="2" required/>
	<br/><small>Create a thumbnail every x seconds. <strong>Use by the videoJS plugin thumbnail</strong>.</small>
      </li>
      <li>
	<label>Size of the thumbnail:</label>
	<input type="text" name="vjs_thumbsize" value="120x68" size="5" placeholder="120x68" required/>
	<br/><small>Size in pixel, keep it small, default is fine, Youtube use 190x68.</small>
      </li>
    </ul>
'));
}
开发者ID:naryoss,项目名称:piwigo-videojs,代码行数:52,代码来源:admin_batchmanager.php


示例13: friends_rcv_rowcallback

function friends_rcv_rowcallback($ds)
{
  $rowid = 'row_'.$ds['_key'];
  ?><div id="<?= $rowid ?>">
    <input type="button" value="<?= l10n('ignore') ?>" onclick="friend_ignore('<?= $rowid ?>', <?= $ds['_key'] ?>);"/>
    <input type="button" value="<?= l10n('accept') ?>" onclick="friend_accept('<?= $rowid ?>', <?= $ds['_key'] ?>);"/>
    <span class="smalltext">into</span>
    <select id="group_select_<?= $rowid ?>">
      <?= implode('', $GLOBALS['group.options']) ?>
    </select>
    <span id="<?= $rowid ?>_status"></span>
  </div><?
}
开发者ID:hcopr,项目名称:Hubbub,代码行数:13,代码来源:friends.rcv.php


示例14: CM_CheckComment

/**
 * Check comment rules set in plugin before accepting it
 *
 * @param : comment action, comment
 * 
 * @return : comment action
 * 
 */
function CM_CheckComment($comment_action, $comm)
{
    global $page, $conf, $user, $template;
    load_language('plugin.lang', CM_PATH);
    $conf_CM = unserialize($conf['CommentsManager']);
    if ($conf['comments_forall']) {
        // Does not allow empty author name on comments for all
        if (isset($conf_CM['CM_No_Comment_Anonymous']) and $conf_CM['CM_No_Comment_Anonymous'] == 'true' and $comm['author'] == 'guest') {
            $comment_action = 'reject';
            array_push($page['errors'], l10n('CM_Not_Allowed_Author'));
        }
        if (isset($conf_CM['CM_GROUPVALID2']) and $conf_CM['CM_GROUPVALID2'] == 'true' and !is_a_guest() and $conf['comments_validation']) {
            if (CM_CheckValidGroup($comm['author']) or is_admin()) {
                $comment_action = 'validate';
                // Comment is validated if author is not in the validated group
            } else {
                $comment_action = 'moderate';
                // Comment needs moderation if author is not in the validated group
            }
        }
    }
    // Rules on comments NOT for all
    if (!$conf['comments_forall'] and !is_admin()) {
        if (isset($conf_CM['CM_GROUPCOMM']) and $conf_CM['CM_GROUPCOMM'] == 'true' and (isset($conf_CM['CM_GROUPVALID1']) and $conf_CM['CM_GROUPVALID1'] == 'false') and !CM_CheckAuthor($comm['author'])) {
            $comment_action = 'reject';
            // Comment rejected if author is not in the allowed group
            array_push($page['errors'], l10n('CM_Not_Allowed_Author'));
        } elseif (isset($conf_CM['CM_GROUPCOMM']) and $conf_CM['CM_GROUPCOMM'] == 'false' and (isset($conf_CM['CM_GROUPVALID1']) and $conf_CM['CM_GROUPVALID1'] == 'true') and $conf['comments_validation']) {
            if (CM_CheckValidGroup($comm['author']) and $conf['comments_validation']) {
                $comment_action = 'validate';
                // Comment is validated if author is not in the validated group
            } else {
                $comment_action = 'moderate';
                // Comment needs moderation if author is not in the validated group
            }
        } elseif (isset($conf_CM['CM_GROUPCOMM']) and $conf_CM['CM_GROUPCOMM'] == 'true' and (isset($conf_CM['CM_GROUPVALID1']) and $conf_CM['CM_GROUPVALID1'] == 'true') and $conf['comments_validation']) {
            if (!CM_CheckAuthor($comm['author'])) {
                $comment_action = 'reject';
                // Comment rejected if author is not in the allowed group
                array_push($page['errors'], l10n('CM_Not_Allowed_Author'));
            } elseif (CM_CheckValidGroup($comm['author']) and $conf['comments_validation']) {
                $comment_action = 'validate';
                // Comment is validated if author is not in the validated group
            } else {
                $comment_action = 'moderate';
            }
            // Comment needs moderation if author is not in the validated group
        }
    }
    return $comment_action;
}
开发者ID:Eric-Piwigo,项目名称:Comments_Access_Manager,代码行数:59,代码来源:functions.inc.php


示例15: osm_render_category

function osm_render_category()
{
    global $template, $page, $conf, $filter;
    include_once dirname(__FILE__) . '/include/functions.php';
    include_once dirname(__FILE__) . '/include/functions_map.php';
    osm_load_language();
    load_language('plugin.lang', OSM_PATH);
    // TF, 20160102: pass config as parameter
    $js_data = osm_get_items($conf, $page);
    if ($js_data != array()) {
        $local_conf = array();
        $local_conf['contextmenu'] = 'false';
        $local_conf['control'] = true;
        $local_conf['img_popup'] = false;
        $local_conf['popup'] = 1;
        $local_conf['center_lat'] = 0;
        $local_conf['center_lng'] = 0;
        $local_conf['zoom'] = 2;
        $local_conf['auto_center'] = 1;
        // TF, 20160102: pass config as parameter
        $local_conf['paths'] = osm_get_gps($conf, $page);
        $height = isset($conf['osm_conf']['category_description']['height']) ? $conf['osm_conf']['category_description']['height'] : '200';
        $width = isset($conf['osm_conf']['category_description']['width']) ? $conf['osm_conf']['category_description']['width'] : 'auto';
        $js = osm_get_js($conf, $local_conf, $js_data);
        $template->set_filename('map', dirname(__FILE__) . '/template/osm-category.tpl');
        $template->assign(array('CONTENT_ENCODING' => get_pwg_charset(), 'OSM_PATH' => embellish_url(get_gallery_home_url() . OSM_PATH), 'HOME' => make_index_url(), 'HOME_PREV' => isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : get_absolute_root_url(), 'HOME_NAME' => l10n("Home"), 'HOME_PREV_NAME' => l10n("Previous"), 'OSMJS' => $js, 'HEIGHT' => $height, 'WIDTH' => $width));
        $osm_content = $template->parse('map', true);
        //$osm_content = '<div id="osmmap"><div class="map_title">'.l10n('EDIT_MAP').'</div>' . $osm_content . '</div>';
        $index = isset($conf['osm_conf']['category_description']['index']) ? $conf['osm_conf']['category_description']['index'] : 0;
        // 0 - PLUGIN_INDEX_CONTENT_BEGIN
        // 1 - PLUGIN_INDEX_CONTENT_COMMENT
        // 2 - PLUGIN_INDEX_CONTENT_END
        if ($index <= 1) {
            // From index category comment at L300
            if ($page['start'] == 0 and !isset($page['chronology_field'])) {
                if (empty($page['comment'])) {
                    $page['comment'] = $osm_content;
                } else {
                    if ($index == 0) {
                        $page['comment'] = '<div>' . $osm_content . $page['comment'] . '</div>';
                    } else {
                        $page['comment'] = '<div>' . $page['comment'] . $osm_content . '</div>';
                    }
                }
            }
        } else {
            $osm_content = '<div id="osmmap">' . $osm_content . '</div>';
            $template->concat('PLUGIN_INDEX_CONTENT_END', "\n" . $osm_content);
        }
    }
}
开发者ID:ThomasDaheim,项目名称:piwigo-openstreetmap,代码行数:51,代码来源:category.inc.php


示例16: plugin_install

function plugin_install()
{
    global $prefixeTable;
    if (!defined('OSM_PATH')) {
        define('OSM_PATH', PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/');
    }
    // Remove unused files from previous version
    $toremove = array("admin.tpl", "admin.php", "admin_boot.php", "leaflet/leaflet.ie.css", "leaflet/MarkerCluster.Default.ie.css", "admin/admin_sync.php", "admin/admin_sync.tpl", "admin/admin_gps.php", "admin/admin_gps.tpl");
    foreach ($toremove as $file) {
        if (is_file(OSM_PATH . $file)) {
            @unlink(OSM_PATH . $file);
        }
    }
    $default_config = array('right_panel' => array('enabled' => true, 'add_before' => 'Average', 'height' => '200', 'zoom' => 12, 'link' => 'Location', 'linkcss' => null, 'showosm' => true), 'left_menu' => array('enabled' => true, 'link' => l10n('OSWORLDMAP'), 'popup' => 0, 'popupinfo_name' => true, 'popupinfo_img' => true, 'popupinfo_link' => true, 'popupinfo_comment' => true, 'popupinfo_author' => true, 'zoom' => 2, 'center' => '0,0', 'layout' => 2), 'category_description' => array('enabled' => true, 'index' => 0, 'height' => '200', 'width' => 'auto'), 'main_menu' => array('enabled' => false, 'height' => '200'), 'gpx' => array('height' => '500', 'width' => '320'), 'batch' => array('global_height' => '200', 'unit_height' => '200'), 'map' => array('baselayer' => 'mapnik', 'custombaselayer' => null, 'custombaselayerurl' => null, 'noworldwarp' => false, 'attrleaflet' => true, 'attrimagery' => true, 'attrplugin' => true), 'pin' => array('pin' => 1, 'pinpath' => '', 'pinsize' => '', 'pinshadowpath' => '', 'pinshadowsize' => '', 'pinoffset' => '', 'pinpopupoffset' => ''));
    /* Add configuration to the config table */
    $conf['osm_conf'] = serialize($default_config);
    conf_update_param('osm_conf', $conf['osm_conf']);
    $q = 'UPDATE ' . CONFIG_TABLE . ' SET `comment` = "Configuration settings for piwigo-openstreetmap plugin" WHERE `param` = "osm_conf";';
    pwg_query($q);
    // Remove previous created db table for GPX entries
    $q = "DROP TABLE IF EXISTS " . $prefixeTable . "osm_gps;";
    pwg_query($q);
    // Remove previous created directory for GPX entries
    $gpx_dir = PHPWG_ROOT_PATH . PWG_LOCAL_DIR . 'gps_track_files/';
    if (file_exists($gpx_dir) and is_dir($gpx_dir)) {
        osm_deltree($gpx_dir);
    }
    // Create world map link
    $dir_name = basename(dirname(__FILE__));
    $c = <<<EOF
<?php
define('PHPWG_ROOT_PATH','./');
if (isset(\$_GET['v']) and \$_GET['v'] == 1)
\tinclude_once( PHPWG_ROOT_PATH. 'plugins/piwigo-openstreetmap/osmmap.php');
else if (isset(\$_GET['v']) and \$_GET['v'] == 2)
\tinclude_once( PHPWG_ROOT_PATH. 'plugins/piwigo-openstreetmap/osmmap2.php');
else if (isset(\$_GET['v']) and \$_GET['v'] == 3)
\tinclude_once( PHPWG_ROOT_PATH. 'plugins/piwigo-openstreetmap/osmmap3.php');
else if (isset(\$_GET['v']) and \$_GET['v'] == 4)
\tinclude_once( PHPWG_ROOT_PATH. 'plugins/piwigo-openstreetmap/osmmap4.php');
else
\tinclude_once( PHPWG_ROOT_PATH. 'plugins/piwigo-openstreetmap/osmmap3.php');
?>
EOF;
    $fp = fopen(PHPWG_ROOT_PATH . 'osmmap.php', 'w');
    fwrite($fp, $c);
    fclose($fp);
}
开发者ID:lcorbasson,项目名称:piwigo-openstreetmap,代码行数:48,代码来源:maintain.inc.php


示例17: get_choosen_sort_orders

function get_choosen_sort_orders($orders)
{
    global $conf, $page;
    array_push($orders, array(l10n('Random'), 'RAND()', true));
    $to_remove = array();
    foreach ($conf['sortorders']['disabled'] as $disabled) {
        foreach ($orders as $order) {
            if (str_replace(' ', '_', $order[1]) == $disabled) {
                array_push($to_remove, $order[1]);
            }
        }
    }
    return array_filter($orders, function ($v) use($to_remove) {
        return !in_array($v[1], $to_remove);
    });
}
开发者ID:persandstrom,项目名称:SortOrders,代码行数:16,代码来源:public_events.inc.php


示例18: NBMS_Load_Profile

function NBMS_Load_Profile()
{
    global $conf, $user, $template, $lang;
    $query = '
  SELECT enabled
    FROM ' . USER_MAIL_NOTIFICATION_TABLE . '
    WHERE user_id = \'' . $user['id'] . '\'
  ;';
    $data = pwg_db_fetch_assoc(pwg_query($query));
    $values = $data['enabled'];
    if (is_null($values)) {
        $values = 'false';
    }
    $template->assign('radio_options', array('true' => l10n('Yes'), 'false' => l10n('No')));
    $template->assign(array('NBMS' => $values));
    $template->set_prefilter('profile_content', 'NBMS_prefilter');
}
开发者ID:Eric-Piwigo,项目名称:NBM_Subscriber,代码行数:17,代码来源:main.inc.php


示例19: initialize

 /**
  * Initialize the calendar
  * @param string $inner_sql
  */
 function initialize($inner_sql)
 {
     parent::initialize($inner_sql);
     global $lang, $conf;
     $week_no_labels = array();
     for ($i = 1; $i <= 53; $i++) {
         $week_no_labels[$i] = l10n('Week %d', $i);
         //$week_no_labels[$i] = $i;
     }
     $this->calendar_levels = array(array('sql' => pwg_db_get_year($this->date_field), 'labels' => null), array('sql' => pwg_db_get_week($this->date_field) . '+1', 'labels' => $week_no_labels), array('sql' => pwg_db_get_dayofweek($this->date_field) . '-1', 'labels' => $lang['day']));
     //Comment next lines for week starting on Sunday or if MySQL version<4.0.17
     //WEEK(date,5) = "0-53 - Week 1=the first week with a Monday in this year"
     if ('monday' == $conf['week_starts_on']) {
         $this->calendar_levels[CWEEK]['sql'] = pwg_db_get_week($this->date_field, 5) . '+1';
         $this->calendar_levels[CDAY]['sql'] = pwg_db_get_weekday($this->date_field);
         $this->calendar_levels[CDAY]['labels'][] = array_shift($this->calendar_levels[CDAY]['labels']);
     }
 }
开发者ID:lcorbasson,项目名称:Piwigo,代码行数:22,代码来源:calendar_weekly.class.php


示例20: content_55bbb46576e718_08061042

    function content_55bbb46576e718_08061042($_smarty_tpl)
    {
        ?>
<dt><?php 
        echo l10n('Specials');
        ?>
</dt>
<dd>
	<ul> <?php 
        $_smarty_tpl->tpl_vars['link'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['link']->_loop = false;
        $_from = $_smarty_tpl->tpl_vars['block']->value->data;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['link']->key => $_smarty_tpl->tpl_vars['link']->value) {
            $_smarty_tpl->tpl_vars['link']->_loop = true;
            ?>
 <li><a href="<?php 
            echo $_smarty_tpl->tpl_vars['link']->value['URL'];
            ?>
" title="<?php 
            echo $_smarty_tpl->tpl_vars['link']->value['TITLE'];
            ?>
"<?php 
            if (isset($_smarty_tpl->tpl_vars['link']->value['REL'])) {
                ?>
 <?php 
                echo $_smarty_tpl->tpl_vars['link']->value['REL'];
            }
            ?>
><?php 
            echo $_smarty_tpl->tpl_vars['link']->value['NAME'];
            ?>
</a></li> <?php 
        }
        ?>
 </ul>
</dd>
<?php 
    }
开发者ID:abhinay100,项目名称:piwigo_app,代码行数:41,代码来源:ljbwkp^890b3c06a98935702ba9794fea499c812e06c84e.file.menubar_specials.tpl.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP l10n_dec函数代码示例发布时间:2022-05-15
下一篇:
PHP l函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap