本文整理汇总了PHP中get_manual_url函数的典型用法代码示例。如果您正苦于以下问题:PHP get_manual_url函数的具体用法?PHP get_manual_url怎么用?PHP get_manual_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_manual_url函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_admin_badge
/**
* Get badge to inform the settings are edited only by collection/user admins
*
* @param string Type: 'coll', 'user'
* @param string Manual URL, '#' - default, false - don't set URL
* @return string
*/
function get_admin_badge($type = 'coll', $manual_url = '#', $text = '#', $title = '#')
{
switch ($type) {
case 'coll':
if ($text == '#') {
// Use default text:
$text = T_('Coll. Admin');
}
if ($title == '#') {
// Use default title:
$title = T_('This can only be edited by users with the Collection Admin permission.');
}
if ($manual_url == '#') {
// Use default manual url:
$manual_url = 'collection-admin';
}
break;
case 'user':
if ($text == '#') {
// Use default text:
$text = T_('User Admin');
}
if ($title == '#') {
// Use default title:
$title = T_('This can only be edited by users with the User Admin permission.');
}
if ($manual_url == '#') {
// Use default manual url:
$manual_url = 'user-admin';
}
break;
default:
// Unknown badge type:
return '';
}
if (empty($manual_url)) {
// Don't use a link:
$r = ' <b';
} else {
// Use link:
$r = ' <a href="' . get_manual_url($manual_url) . '" target="_blank"';
}
$r .= ' class="badge badge-warning" data-toggle="tooltip" data-placement="top" title="' . format_to_output($title, 'htmlattr') . '">';
$r .= $text;
if (empty($manual_url)) {
// End of text formatted badge:
$r .= '</b>';
} else {
// End of the link:
$r .= '</a>';
}
return $r;
}
示例2: get_help_url
/**
* Get help URL
*
* @return string URL
*/
function get_help_url()
{
return get_manual_url('simple-linkblog-links-list-widget');
}
示例3: start_install_progress_bar
start_install_progress_bar(T_('Uprade in progress'), get_upgrade_steps_count());
echo '<h2>' . T_('Upgrading b2evolution...') . '</h2>';
echo '<h2>' . T_('Checking files...') . '</h2>';
evo_flush();
// Check for .htaccess:
if (!install_htaccess(true)) {
// Exit installation here because the .htaccess file has the some errors
break;
}
// Update the progress bar status
update_install_progress_bar();
// Try to obtain some serious time to do some serious processing (5 minutes)
// NOte: this must NOT be in upgrade_b2evo_tables(), otherwise it will mess with the longer setting used by the auto upgrade feature.
if (set_max_execution_time(300) === false) {
// max_execution_time ini setting could not be changed for this script, display a warning
$manual_url = 'href="' . get_manual_url('blank-or-partial-page') . '" target = "_blank"';
echo '<div class="text-warning"><evo:warning>' . sprintf(T_('WARNING: the max_execution_time is set to %s seconds in php.ini and cannot be increased automatically. This may lead to a PHP <a %s>timeout causing the upgrade to fail</a>. If so please post a screenshot to the <a %s>forums</a>.'), ini_get('max_execution_time'), $manual_url, 'href="http://forums.b2evolution.net/"') . '</evo:warning></div>';
}
echo '<h2>' . T_('Upgrading data in existing b2evolution database...') . '</h2>';
evo_flush();
$is_automated_upgrade = $action !== 'evoupgrade';
$upgrade_result = upgrade_b2evo_tables($action);
if ($upgrade_result === 'need-fix') {
// We are waiting for the user to click on "try to repair/upgrade now"...
// We already displayed the orange upgrade button. Offer an alternative:
// A link back to install menu
display_install_back_link();
} elseif ($upgrade_result === true) {
if ($is_automated_upgrade) {
// After successful auto_upgrade or svn_upgrade we must remove files/folder based on the upgrade_policy.conf
remove_after_upgrade();
示例4: update_basic_config_file
/**
* Update file /conf/_basic_config.php
*
* @param string Current action, updated by reference
* @param array Params
* @return boolean TRUE on success
*/
function update_basic_config_file($params = array())
{
global $DB, $db_config, $evo_charset, $conf_path, $default_locale;
// These global params should be rewritten by this function on success result
global $baseurl, $admin_email, $config_is_done, $action;
$params = array_merge(array('db_user' => '', 'db_password' => '', 'db_name' => '', 'db_host' => '', 'db_tableprefix' => '', 'baseurl' => '', 'admin_email' => '', 'print_messages' => true, 'quick_install' => false), $params);
if (!$params['print_messages']) {
// Start to get all messages instead of printing on screen:
ob_start();
// Use this global var to store all messages
global $basic_config_file_result_messages;
}
// Connect to DB:
$DB = new DB(array('user' => $params['db_user'], 'password' => $params['db_password'], 'name' => $params['db_name'], 'host' => $params['db_host'], 'aliases' => $db_config['aliases'], 'connection_charset' => empty($db_config['connection_charset']) ? DB::php_to_mysql_charmap($evo_charset) : $db_config['connection_charset'], 'halt_on_error' => false));
if ($DB->error) {
// restart conf
display_install_messages(T_('It seems that the database config settings you entered don\'t work. Please check them carefully and try again...'));
$action = 'start';
} else {
$conf_template_filepath = $conf_path . '_basic_config.template.php';
$conf_filepath = $conf_path . '_basic_config.php';
// Read original:
$file_loaded = @file($conf_template_filepath);
if (empty($file_loaded)) {
// This should actually never happen, just in case...
display_install_messages(sprintf(T_('Could not load original conf file [%s]. Is it missing?'), $conf_filepath));
if (!$params['print_messages']) {
// Return all messages instead of printing on screen
$basic_config_file_result_messages = ob_get_clean();
}
return false;
}
// File loaded...
$conf = implode('', $file_loaded);
// Update conf:
$conf = preg_replace(array('#\\$db_config\\s*=\\s*array\\(
\\s*[\'"]user[\'"]\\s*=>\\s*[\'"].*?[\'"], ([^\\n\\r]*\\r?\\n)
\\s*[\'"]password[\'"]\\s*=>\\s*[\'"].*?[\'"], ([^\\n\\r]*\\r?\\n)
\\s*[\'"]name[\'"]\\s*=>\\s*[\'"].*?[\'"], ([^\\n\\r]*\\r?\\n)
\\s*[\'"]host[\'"]\\s*=>\\s*[\'"].*?[\'"], ([^\\n\\r]*\\r?\\n)
#ixs', "#tableprefix\\s*=\\s*'.*?';#", "#baseurl\\s*=\\s*'.*?';#", "#admin_email\\s*=\\s*'.*?';#", "#config_is_done\\s*=.*?;#"), array("\$db_config = array(\n" . "\t'user' => '" . str_replace(array("'", "\$"), array("\\'", "\\\$"), $params['db_user']) . "',\$1" . "\t'password' => '" . str_replace(array("'", "\$"), array("\\'", "\\\$"), $params['db_password']) . "',\$2" . "\t'name' => '" . str_replace(array("'", "\$"), array("\\'", "\\\$"), $params['db_name']) . "',\$3" . "\t'host' => '" . str_replace(array("'", "\$"), array("\\'", "\\\$"), $params['db_host']) . "',\$4", "tableprefix = '" . str_replace("'", "\\'", $params['db_tableprefix']) . "';", "baseurl = '" . str_replace("'", "\\'", $params['baseurl']) . "';", "admin_email = '" . str_replace("'", "\\'", $params['admin_email']) . "';", 'config_is_done = 1;'), $conf);
// Write new contents:
if (save_to_file($conf, $conf_filepath, 'w')) {
display_install_messages(sprintf(T_('Your configuration file <code>%s</code> has been successfully created.') . '</p>', $conf_filepath), 'success');
$tableprefix = $params['db_tableprefix'];
$baseurl = $params['baseurl'];
$admin_email = $params['admin_email'];
$config_is_done = 1;
if (!$params['quick_install']) {
// Switch to menu only on standard installation:
$action = 'menu';
}
} else {
?>
<h1><?php
echo T_('Config file update');
?>
</h1>
<p><strong><?php
printf(T_('We cannot automatically create or update your config file [%s]!'), $conf_filepath);
?>
</strong></p>
<p><?php
echo T_('There are two ways to deal with this:');
?>
</p>
<ul>
<li><strong><?php
echo T_('You can allow the installer to create the config file by changing permissions for the /conf directory:');
?>
</strong>
<ol>
<li><?php
printf(T_('Make sure there is no existing and potentially locked configuration file named <code>%s</code>. If so, please delete it.'), $conf_filepath);
?>
</li>
<li><?php
printf(T_('<code>chmod 777 %s</code>. If needed, see the <a %s>online manual about permissions</a>.'), $conf_path, 'href="' . get_manual_url('directory-and-file-permissions') . '" target="_blank"');
?>
</li>
<li><?php
echo T_('Come back to this page and refresh/reload.');
?>
</li>
</ol>
<br />
</li>
<li><strong><?php
echo T_('Alternatively, you can update the config file manually:');
?>
</strong>
<ol>
<li><?php
//.........这里部分代码省略.........
示例5: get_manual_url
if (!empty($blog)) {
echo ' blogID="' . $blog . '"';
}
?>
>
<settings>
<docs><?php
echo get_manual_url('blogger-api');
?>
</docs>
</settings>
</api>
<api name="b2" preferred="false" apiLink="<?php
echo $xmlsrv_url;
?>
xmlrpc.php"<?php
if (!empty($blog)) {
echo ' blogID="' . $blog . '"';
}
?>
>
<settings>
<docs><?php
echo get_manual_url('b2-api');
?>
</docs>
</settings>
</api>
</apis>
</service>
</rsd>
示例6: array_unique
<?php
if (!empty($legend_statuses) && is_logged_in()) {
// Display legend for items statuses
$legend_statuses = array_unique($legend_statuses);
$statuses = get_visibility_statuses('', array('deprecated', 'redirected', 'trash'));
$statuses_titles = get_visibility_statuses('legend-titles');
?>
<ul class="bPosts bForums legend">
<?php
foreach ($statuses_titles as $status => $title) {
if (in_array($status, $legend_statuses)) {
// Only statuses that exist on the page
?>
<li>
<a href="<?php
echo get_manual_url('visibility-statuses');
?>
" target="_blank"><span class="note status_<?php
echo $status;
?>
"><span><?php
echo $statuses[$status];
?>
</span></span></a>
<span><?php
echo $title;
?>
</span>
</li>
<?php
}