本文整理汇总了PHP中dcPage::breadcrumb方法的典型用法代码示例。如果您正苦于以下问题:PHP dcPage::breadcrumb方法的具体用法?PHP dcPage::breadcrumb怎么用?PHP dcPage::breadcrumb使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dcPage
的用法示例。
在下文中一共展示了dcPage::breadcrumb方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: breadcrumb
public static function breadcrumb($elements = null, $options = array())
{
if (method_exists('dcPage', 'breadcrumb')) {
return dcPage::breadcrumb($elements, $options);
} else {
$with_home_link = isset($options['home_link']) ? $options['home_link'] : true;
$hl = isset($options['hl']) ? $options['hl'] : true;
$hl_pos = isset($options['hl_pos']) ? $options['hl_pos'] : -1;
// First item of array elements should be blog's name, System or Plugins
$res = '<h2>';
$index = 0;
if ($hl_pos < 0) {
$hl_pos = count($elements) + $hl_pos;
}
foreach ($elements as $element => $url) {
if ($hl && $index == $hl_pos) {
$element = sprintf('<span class="page-title">%s</span>', $element);
}
$res .= ($index == 0 ? ' ' : ' › ') . ($url ? '<a href="' . $url . '">' : '') . $element . ($url ? '</a>' : '');
$index++;
}
$res .= '</h2>';
return $res;
}
}
示例2: catch
throw $e;
}
@unlink($dest);
if ($ret_code == 2) {
dcPage::addSuccessNotice(__('Language has been successfully upgraded'));
} else {
dcPage::addSuccessNotice(__('Language has been successfully installed.'));
}
$core->adminurl->redirect("admin.langs");
} catch (Exception $e) {
$core->error->add($e->getMessage());
}
}
/* DISPLAY Main page
-------------------------------------------------------- */
dcPage::open(__('Languages management'), dcPage::jsLoad('js/_langs.js'), dcPage::breadcrumb(array(__('System') => '', __('Languages management') => '')));
if (!empty($_GET['removed'])) {
dcPage::success(__('Language has been successfully deleted.'));
}
if (!empty($_GET['added'])) {
dcPage::success($_GET['added'] == 2 ? __('Language has been successfully upgraded') : __('Language has been successfully installed.'));
}
echo '<p>' . __('Here you can install, upgrade or remove languages for your Dotclear ' . 'installation.') . '</p>' . '<p>' . sprintf(__('You can change your user language in your <a href="%1$s">preferences</a> or ' . 'change your blog\'s main language in your <a href="%2$s">blog settings</a>.'), $core->adminurl->get("admin.user.preferences"), $core->adminurl->get("admin.blog.pref")) . '</p>';
echo '<h3>' . __('Installed languages') . '</h3>';
$locales_content = scandir(DC_L10N_ROOT);
$tmp = array();
foreach ($locales_content as $v) {
$c = $v == '.' || $v == '..' || $v == 'en' || !is_dir(DC_L10N_ROOT . '/' . $v) || !isset($iso_codes[$v]);
if (!$c) {
$tmp[$v] = DC_L10N_ROOT . '/' . $v;
}
示例3: catch
}
} catch (Exception $e) {
$core->error->add($e->getMessage());
}
?>
<html>
<head>
<title><?php
echo __('Pings');
?>
</title>
</head>
<body>
<?php
echo dcPage::breadcrumb(array(__('Plugins') => '', __('Pings configuration') => ''));
echo '<form action="' . $p_url . '" method="post">' . '<p><label for="pings_active" class="classic">' . form::checkbox('pings_active', 1, $core->blog->settings->pings->pings_active) . __('Activate pings extension') . '</label></p>';
$i = 0;
foreach ($pings_uris as $n => $u) {
echo '<p><label for="pings_srv_name-' . $i . '" class="classic">' . __('Service name:') . '</label> ' . form::field(array('pings_srv_name[]', 'pings_srv_name-' . $i), 20, 128, html::escapeHTML($n)) . ' ' . '<label for="pings_srv_uri-' . $i . '" class="classic">' . __('Service URI:') . '</label> ' . form::field(array('pings_srv_uri[]', 'pings_srv_uri-' . $i), 40, 255, html::escapeHTML($u));
if (!empty($_GET['test'])) {
try {
pingsAPI::doPings($u, 'Example site', 'http://example.com');
echo ' <img src="images/check-on.png" alt="OK" />';
} catch (Exception $e) {
echo ' <img src="images/check-off.png" alt="' . __('Error') . '" /> ' . $e->getMessage();
}
}
echo '</p>';
$i++;
}
示例4: adminPostList
} else {
$sortby = 'post_dt';
$order = 'desc';
}
# Get posts
try {
$posts = $core->blog->getPosts($params);
$counter = $core->blog->getPosts($params, true);
$post_list = new adminPostList($core, $posts, $counter->f(0));
} catch (Exception $e) {
$core->error->add($e->getMessage());
}
/* DISPLAY
-------------------------------------------------------- */
$form_filter_title = __('Show filters and display options');
$starting_script = dcPage::jsLoad('js/_posts_list.js');
$starting_script .= dcPage::jsLoad('js/filter-controls.js');
$starting_script .= '<script type="text/javascript">' . "\n" . "//<![CDATA[" . "\n" . dcPage::jsVar('dotclear.msg.show_filters', $show_filters ? 'true' : 'false') . "\n" . dcPage::jsVar('dotclear.msg.filter_posts_list', $form_filter_title) . "\n" . dcPage::jsVar('dotclear.msg.cancel_the_filter', __('Cancel filters and display options')) . "\n" . "//]]>" . "</script>";
dcPage::open(__('Entries'), $starting_script, dcPage::breadcrumb(array(html::escapeHTML($core->blog->name) => '', __('Entries') => '')));
if (!empty($_GET['upd'])) {
dcPage::success(__('Selected entries have been successfully updated.'));
} elseif (!empty($_GET['del'])) {
dcPage::success(__('Selected entries have been successfully deleted.'));
}
if (!$core->error->flag()) {
echo '<p class="top-add"><a class="button add" href="' . $core->adminurl->get("admin.post") . '">' . __('New entry') . '</a></p>' . '<form action="' . $core->adminurl->get("admin.posts") . '" method="get" id="filters-form">' . '<h3 class="out-of-screen-if-js">' . $form_filter_title . '</h3>' . '<div class="table">' . '<div class="cell">' . '<h4>' . __('Filters') . '</h4>' . '<p><label for="user_id" class="ib">' . __('Author:') . '</label> ' . form::combo('user_id', $users_combo, $user_id) . '</p>' . '<p><label for="cat_id" class="ib">' . __('Category:') . '</label> ' . form::combo('cat_id', $categories_combo, $cat_id) . '</p>' . '<p><label for="status" class="ib">' . __('Status:') . '</label> ' . form::combo('status', $status_combo, $status) . '</p> ' . '<p><label for="format" class="ib">' . __('Format:') . '</label> ' . form::combo('format', $format_combo, $format) . '</p>' . '<p><label for="password" class="ib">' . __('Password:') . '</label> ' . form::combo('password', $password_combo, $password) . '</p>' . '</div>' . '<div class="cell filters-sibling-cell">' . '<p><label for="selected" class="ib">' . __('Selected:') . '</label> ' . form::combo('selected', $selected_combo, $selected) . '</p>' . '<p><label for="attachment" class="ib">' . __('Attachments:') . '</label> ' . form::combo('attachment', $attachment_combo, $attachment) . '</p>' . '<p><label for="month" class="ib">' . __('Month:') . '</label> ' . form::combo('month', $dt_m_combo, $month) . '</p>' . '<p><label for="lang" class="ib">' . __('Lang:') . '</label> ' . form::combo('lang', $lang_combo, $lang) . '</p> ' . '<p><label for="comment" class="ib">' . __('Comments:') . '</label> ' . form::combo('comment', $comment_combo, $comment) . '</p>' . '<p><label for="trackback" class="ib">' . __('Trackbacks:') . '</label> ' . form::combo('trackback', $trackback_combo, $trackback) . '</p>' . '</div>' . '<div class="cell filters-options">' . '<h4>' . __('Display options') . '</h4>' . '<p><label for="sortby" class="ib">' . __('Order by:') . '</label> ' . form::combo('sortby', $sortby_combo, $sortby) . '</p>' . '<p><label for="order" class="ib">' . __('Sort:') . '</label> ' . form::combo('order', $order_combo, $order) . '</p>' . '<p><span class="label ib">' . __('Show') . '</span> <label for="nb" class="classic">' . form::field('nb', 3, 3, $nb_per_page) . ' ' . __('entries per page') . '</label></p>' . '</div>' . '</div>' . '<p><input type="submit" value="' . __('Apply filters and display options') . '" />' . '<br class="clear" /></p>' . '</form>';
# Show posts
$post_list->display($page, $nb_per_page, '<form action="' . $core->adminurl->get("admin.posts") . '" method="post" id="form-entries">' . '%s' . '<div class="two-cols">' . '<p class="col checkboxes-helpers"></p>' . '<p class="col right"><label for="action" class="classic">' . __('Selected entries action:') . '</label> ' . form::combo('action', $posts_actions_page->getCombo()) . '<input type="submit" value="' . __('ok') . '" /></p>' . form::hidden(array('user_id'), $user_id) . form::hidden(array('cat_id'), $cat_id) . form::hidden(array('status'), $status) . form::hidden(array('password'), $password) . form::hidden(array('selected'), $selected) . form::hidden(array('comment'), $comment) . form::hidden(array('trackback'), $trackback) . form::hidden(array('attachment'), $attachment) . form::hidden(array('month'), $month) . form::hidden(array('lang'), $lang) . form::hidden(array('sortby'), $sortby) . form::hidden(array('order'), $order) . form::hidden(array('page'), $page) . form::hidden(array('nb'), $nb_per_page) . $core->formNonce() . '</div>' . '</form>', $show_filters);
}
dcPage::helpBlock('core_posts');
dcPage::close();
示例5: array
$core->callBehavior('adminDashboardContents', $core, $__dashboard_contents);
# Editor stuff
$admin_post_behavior = '';
if ($core->auth->user_prefs->dashboard->quickentry) {
if ($core->auth->check('usage,contentadmin', $core->blog->id)) {
$post_format = $core->auth->getOption('post_format');
$post_editor = $core->auth->getOption('editor');
if ($post_editor && !empty($post_editor[$post_format])) {
// context is not post because of tags not available
$admin_post_behavior = $core->callBehavior('adminPostEditor', $post_editor[$post_format], 'quickentry', array('#post_content'), $post_format);
}
}
}
/* DISPLAY
-------------------------------------------------------- */
dcPage::open(__('Dashboard'), dcPage::jsLoad('js/_index.js') . $admin_post_behavior . $core->callBehavior('adminDashboardHeaders'), dcPage::breadcrumb(array(__('Dashboard') . ' : ' . html::escapeHTML($core->blog->name) => ''), array('home_link' => false)));
# Dotclear updates notifications
if ($core->auth->isSuperAdmin() && is_readable(DC_DIGESTS)) {
$updater = new dcUpdate(DC_UPDATE_URL, 'dotclear', DC_UPDATE_VERSION, DC_TPL_CACHE . '/versions');
$new_v = $updater->check(DC_VERSION);
$version_info = $new_v ? $updater->getInfoURL() : '';
if ($updater->getNotify() && $new_v) {
echo '<div class="dc-update"><h3>' . sprintf(__('Dotclear %s is available!'), $new_v) . '</h3> ' . '<p><a class="button submit" href="' . $core->adminurl->get("admin.update") . '">' . sprintf(__('Upgrade now'), $new_v) . '</a> ' . '<a class="button" href="' . $core->adminurl->get("admin.update", array('hide_msg' => 1)) . '">' . __('Remind me later') . '</a>' . ($version_info ? ' </p>' . '<p class="updt-info"><a href="' . $version_info . '">' . __('Information about this version') . '</a>' : '') . '</p>' . '</div>';
}
}
if ($core->auth->getInfo('user_default_blog') != $core->blog->id && $core->auth->getBlogCount() > 1) {
echo '<p><a href="' . $core->adminurl->get("admin.home", array('default_blog' => 1)) . '" class="button">' . __('Make this blog my default blog') . '</a></p>';
}
if ($core->blog->status == 0) {
echo '<p class="static-msg">' . __('This blog is offline') . '.</p>';
} elseif ($core->blog->status == -1) {
示例6: __
for (var i=0; i<items.length; i++) {
order.value += items[i].id.substr(2)+',';
}
});
}
};
//]]>
</script>
<?php
echo dcPage::jsPageTabs($default_tab);
?>
</head>
<body>
<?php
echo dcPage::breadcrumb(array(html::escapeHTML($core->blog->name) => '', '<span class="page-title">' . $page_title . '</span>' => ''));
if (!empty($_GET['newconfig'])) {
dcPage::success(__('Items has been successfully updated'));
}
if (!empty($_GET['removed'])) {
dcPage::success(__('Items have been successfully removed.'));
}
if (!empty($_GET['addlink'])) {
dcPage::success(__('Menu item has been successfully created.'));
}
?>
<div class="multi-part" title="<?php
echo __('Menu');
?>
" id="menu">
示例7: catch
//$link_auto = $_POST['link_auto'];
try {
$menu->updateLink($id, $link_title, $link_href, $link_level, $link_auto, $link_desc, $link_lang, $link_class);
http::redirect($p_url . '&edit=1&id=' . $id . '&upd=1');
} catch (Exception $e) {
$core->error->add($e->getMessage());
}
}
?>
<html>
<head>
<title><?php
echo $page_title;
?>
</title>
</head>
<body>
<?php
echo dcPage::breadcrumb(array(html::escapeHTML($core->blog->name) => '', $page_title => $p_url, __('Changing the item') => ''));
if (isset($rs)) {
if (!empty($_GET['upd'])) {
dcPage::success(__('Items has been successfully updated'));
}
echo '<p><a class="back" href="' . $p_url . '">' . __('Return to menu') . '</a></p>';
echo '<form action="plugin.php" method="post">' . '<div class="fieldset two-cols"><h4>' . __('Changing the item') . '</h4>' . '<p class="field"><label class="classic required" for="link_title"><abbr title="' . __('Required field') . '">*</abbr> ' . __('Label of item menu:') . ' </label>' . form::field('link_title', 50, 255, html::escapeHTML($link_title)) . '</p>' . '<p class="field"><label class="classic required" for="link_href"><abbr title="' . __('Required field') . '">*</abbr> ' . __('URL of item menu:') . ' </label>' . form::field('link_href', 50, 255, html::escapeHTML($link_href)) . '</p>' . '<p class="field"><label class="classic" for="link_desc">' . __('Description:') . ' </label>' . form::field('link_desc', 50, 255, html::escapeHTML($link_desc)) . '</p>' . '<p class="field"><label class="classic" for="link_level">' . __('Level:') . ' </label>' . form::field('link_level', 5, 255, html::escapeHTML($link_level)) . '</p>' . '<p class="info">' . __('Note: 0 = hide menu item; 1 = level of item 1; 2 = item level 2; etc.') . '</p>' . '<p class="field"><label class="classic" for="link_lang">' . __('Language:') . ' </label>' . form::field('link_lang', 5, 5, html::escapeHTML($link_lang)) . '</p>' . '<p class="field"><label class="classic" for="link_class">' . __('Class:') . ' </label>' . form::field('link_class', 50, 32, html::escapeHTML($link_class)) . '</p>' . '</div>' . '<p>' . form::hidden('p', 'menu') . form::hidden('edit', 1) . form::hidden('id', $id) . $core->formNonce() . '<input type="submit" name="edit_link" class="submit" value="' . __('Save') . '"/></p>' . '</form>';
}
dcPage::helpBlock('menu');
?>
</body>
</html>
示例8: __
echo dcPage::jsConfirmClose('links-form', 'add-link-form', 'add-category-form');
?>
<?php
$core->auth->user_prefs->addWorkspace('accessibility');
if (!$core->auth->user_prefs->accessibility->nodragdrop) {
echo dcPage::jsLoad('js/jquery/jquery-ui.custom.js') . dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js') . dcPage::jsLoad(dcPage::getPF('blogroll/blogroll.js'));
}
?>
<?php
echo dcPage::jsPageTabs($default_tab);
?>
</head>
<body>
<?php
echo dcPage::breadcrumb(array(html::escapeHTML($core->blog->name) => '', __('Blogroll') => '')) . dcPage::notices();
?>
<div class="multi-part" id="main-list" title="<?php
echo __('Blogroll');
?>
">
<?php
if (!$rs->isEmpty()) {
?>
<form action="<?php
echo $core->adminurl->get('admin.plugin');
?>
" method="post" id="links-form">
示例9: implode
return '';
}
return implode($sep, $res);
}
/* DISPLAY Main page
-------------------------------------------------------- */
$starting_scripts = '<script type="text/javascript">' . "\n" . "//<![CDATA[" . "\n" . dcPage::jsVar('dotclear.msg.confirm_delete_media', __('Are you sure to delete this media?')) . "\n" . "//]]>" . "</script>" . dcPage::jsLoad('js/_media_item.js');
if ($popup && !empty($plugin_id)) {
$starting_scripts .= $core->callBehavior('adminPopupMedia', $plugin_id);
}
$temp_params = $media_page_url_params;
$temp_params['d'] = '%s';
$bc_template = $core->adminurl->get('admin.media', $temp_params, '&', true);
$temp_params['d'] = '';
$home_url = $core->adminurl->get('admin.media', $temp_params);
call_user_func($open_f, __('Media manager'), $starting_scripts . dcPage::jsDatePicker() . ($popup ? dcPage::jsPageTabs($tab) : ''), dcPage::breadcrumb(array(html::escapeHTML($core->blog->name) => '', __('Media manager') => $home_url, $core->media->breadCrumb($bc_template) . '<span class="page-title">' . $file->basename . '</span>' => ''), array('home_link' => !$popup, 'hl' => false)));
if ($popup) {
// Display notices
echo dcPage::notices();
}
if ($file === null) {
call_user_func($close_f);
exit;
}
if (!empty($_GET['fupd']) || !empty($_GET['fupl'])) {
dcPage::success(__('File has been successfully updated.'));
}
if (!empty($_GET['thumbupd'])) {
dcPage::success(__('Thumbnails have been successfully updated.'));
}
if (!empty($_GET['blogprefupd'])) {
示例10: catch
dcPage::addSuccessNotice(__('Comment has been successfully deleted.'));
http::redirect($core->getPostAdminURL($rs->post_type, $rs->post_id) . '&co=1', false);
} catch (Exception $e) {
$core->error->add($e->getMessage());
}
}
if (!$can_edit) {
$core->error->add(__("You can't edit this comment."));
}
}
/* DISPLAY
-------------------------------------------------------- */
if ($comment_id) {
$breadcrumb = dcPage::breadcrumb(array(html::escapeHTML($core->blog->name) => '', html::escapeHTML($post_title) => $core->getPostAdminURL($post_type, $post_id) . '&co=1#c' . $comment_id, __('Edit comment') => ''));
} else {
$breadcrumb = dcPage::breadcrumb(array(html::escapeHTML($core->blog->name) => '', html::escapeHTML($post_title) => $core->getPostAdminURL($post_type, $post_id), __('Edit comment') => ''));
}
dcPage::open(__('Edit comment'), dcPage::jsConfirmClose('comment-form') . dcPage::jsLoad('js/_comment.js') . $core->callBehavior('adminPostEditor', $comment_editor['xhtml'], 'comment', array('#comment_content'), 'xhtml') . $core->callBehavior('adminCommentHeaders'), $breadcrumb);
if ($comment_id) {
if (!empty($_GET['upd'])) {
dcPage::success(__('Comment has been successfully updated.'));
}
$comment_mailto = '';
if ($comment_email) {
$comment_mailto = '<a href="mailto:' . html::escapeHTML($comment_email) . '?subject=' . rawurlencode(sprintf(__('Your comment on my blog %s'), $core->blog->name)) . '&body=' . rawurlencode(sprintf(__("Hi!\n\nYou wrote a comment on:\n%s\n\n\n"), $rs->getPostURL())) . '">' . __('Send an e-mail') . '</a>';
}
echo '<form action="' . $core->adminurl->get("admin.comment") . '" method="post" id="comment-form">' . '<div class="fieldset">' . '<h3>' . __('Information collected') . '</h3>' . '<p>' . __('IP address:') . ' ' . '<a href="' . $core->adminurl->get("admin.comments", array('ip' => $comment_ip)) . '">' . $comment_ip . '</a></p>' . '<p>' . __('Date:') . ' ' . dt::dt2str(__('%Y-%m-%d %H:%M'), $comment_dt) . '</p>' . '</div>' . '<h3>' . __('Comment submitted') . '</h3>' . '<p><label for="comment_author" class="required"><abbr title="' . __('Required field') . '">*</abbr>' . __('Author:') . '</label>' . form::field('comment_author', 30, 255, html::escapeHTML($comment_author)) . '</p>' . '<p><label for="comment_email">' . __('Email:') . '</label>' . form::field('comment_email', 30, 255, html::escapeHTML($comment_email)) . '<span>' . $comment_mailto . '</span>' . '</p>' . '<p><label for="comment_site">' . __('Web site:') . '</label>' . form::field('comment_site', 30, 255, html::escapeHTML($comment_site)) . '</p>' . '<p><label for="comment_status">' . __('Status:') . '</label>' . form::combo('comment_status', $status_combo, $comment_status, '', '', !$can_publish) . '</p>' . $core->callBehavior('adminAfterCommentDesc', $rs) . '<p class="area"><label for="comment_content">' . __('Comment:') . '</label> ' . form::textarea('comment_content', 50, 10, html::escapeHTML($comment_content)) . '</p>' . '<p>' . form::hidden('id', $comment_id) . $core->formNonce() . '<input type="submit" accesskey="s" name="update" value="' . __('Save') . '" /> ';
if ($can_delete) {
echo '<input type="submit" class="delete" name="delete" value="' . __('Delete') . '" />';
}
echo '</p>' . '</form>';
示例11: catch
}
} catch (Exception $e) {
$core->error->add($e->getMessage());
}
if (!$core->error->flag()) {
dcPage::addSuccessNotice(__('User has been successfully updated.'));
http::redirect($redir);
}
}
}
/* DISPLAY
-------------------------------------------------------- */
if (!empty($users) && empty($blogs) && $action == 'blogs') {
$breadcrumb = dcPage::breadcrumb(array(__('System') => '', __('Users') => $core->adminurl->get("admin.users"), __('Permissions') => ''));
} else {
$breadcrumb = dcPage::breadcrumb(array(__('System') => '', __('Users') => $core->adminurl->get("admin.users"), __('Actions') => ''));
}
dcPage::open(__('Users'), dcPage::jsLoad('js/_users_actions.js') . $core->callBehavior('adminUsersActionsHeaders'), $breadcrumb);
if (!isset($action)) {
dcPage::close();
exit;
}
$hidden_fields = '';
foreach ($users as $u) {
$hidden_fields .= form::hidden(array('users[]'), $u);
}
if (isset($_POST['redir']) && strpos($_POST['redir'], '://') === false) {
$hidden_fields .= form::hidden(array('redir'), html::escapeURL($_POST['redir']));
} else {
$hidden_fields .= form::hidden(array('q'), html::escapeHTML($_POST['q'])) . form::hidden(array('sortby'), $_POST['sortby']) . form::hidden(array('order'), $_POST['order']) . form::hidden(array('page'), $_POST['page']) . form::hidden(array('nb'), $_POST['nb']);
}
示例12: sprintf
$img_status = sprintf($img_status_pattern, __('Unpublished'), 'check-off.png');
break;
case -1:
$img_status = sprintf($img_status_pattern, __('Scheduled'), 'scheduled.png');
break;
case -2:
$img_status = sprintf($img_status_pattern, __('Pending'), 'check-wrn.png');
break;
default:
$img_status = '';
}
$edit_entry_title = '“' . html::escapeHTML($post_title) . '”' . ' ' . $img_status;
} else {
$edit_entry_title = $page_title;
}
echo dcPage::breadcrumb(array(html::escapeHTML($core->blog->name) => '', __('Pages') => $p_url, $edit_entry_title => ''));
if (!empty($_GET['upd'])) {
dcPage::success(__('Page has been successfully updated.'));
} elseif (!empty($_GET['crea'])) {
dcPage::success(__('Page has been successfully created.'));
} elseif (!empty($_GET['attached'])) {
dcPage::success(__('File has been successfully attached.'));
} elseif (!empty($_GET['rmattach'])) {
dcPage::success(__('Attachment has been successfully removed.'));
}
# XHTML conversion
if (!empty($_GET['xconv'])) {
$post_excerpt = $post_excerpt_xhtml;
$post_content = $post_content_xhtml;
$post_format = 'xhtml';
dcPage::message(__('Don\'t forget to validate your XHTML conversion by saving your post.'));
示例13: catch
# Stop reading code here
return;
}
# -- Execute actions --
try {
$list->doActions();
} catch (Exception $e) {
$core->error->add($e->getMessage());
}
# -- Plugin install --
$plugins_install = null;
if (!$core->error->flag()) {
$plugins_install = $core->plugins->installModules();
}
# -- Page header --
dcPage::open(__('Plugins management'), dcPage::jsLoad('js/_plugins.js') . dcPage::jsPageTabs() . $core->callBehavior('pluginsToolsHeaders', $core, false), dcPage::breadcrumb(array(__('System') => '', __('Plugins management') => '')));
# -- Plugins install messages --
if (!empty($plugins_install['success'])) {
echo '<div class="static-msg">' . __('Following plugins have been installed:') . '<ul>';
foreach ($plugins_install['success'] as $k => $v) {
echo '<li>' . $k . '</li>';
}
echo '</ul></div>';
}
if (!empty($plugins_install['failure'])) {
echo '<div class="error">' . __('Following plugins have not been installed:') . '<ul>';
foreach ($plugins_install['failure'] as $k => $v) {
echo '<li>' . $k . ' (' . $v . ')</li>';
}
echo '</ul></div>';
}
示例14: __
dcPage::open(__('Blog appearance'), dcPage::jsPageTabs() . dcPage::jsColorPicker() . $core->callBehavior('themesToolsHeaders', $core, true), dcPage::breadcrumb(array(html::escapeHTML($core->blog->name) => '', __('Blog appearance') => $list->getURL('', false), '<span class="page-title">' . __('Theme configuration') . '</span>' => '')));
# Display previously gathered content
$list->displayConfiguration();
dcPage::helpBlock('core_blog_theme_conf');
dcPage::close();
# Stop reading code here
return;
}
# -- Execute actions --
try {
$list->doActions();
} catch (Exception $e) {
$core->error->add($e->getMessage());
}
# -- Page header --
dcPage::open(__('Themes management'), dcPage::jsLoad('js/_blog_theme.js') . dcPage::jsPageTabs() . dcPage::jsColorPicker() . $core->callBehavior('themesToolsHeaders', $core, false), dcPage::breadcrumb(array(html::escapeHTML($core->blog->name) => '', '<span class="page-title">' . __('Blog appearance') . '</span>' => '')));
# -- Display modules lists --
if ($core->auth->isSuperAdmin()) {
# Updated modules from repo
$modules = $list->store->get(true);
if (!empty($modules)) {
echo '<div class="multi-part" id="update" title="' . html::escapeHTML(__('Update themes')) . '">' . '<h3>' . html::escapeHTML(__('Update themes')) . '</h3>' . '<p>' . sprintf(__('There is one theme to update available from repository.', 'There are %s themes to update available from repository.', count($modules)), count($modules)) . '</p>';
$list->setList('theme-update')->setTab('themes')->setModules($modules)->displayModules(array('checkbox', 'name', 'sshot', 'desc', 'author', 'version', 'current_version', 'parent'), array('update', 'delete'));
echo '<p class="info vertical-separator">' . sprintf(__("Visit %s repository, the resources center for Dotclear."), '<a href="http://themes.dotaddict.org/galerie-dc2/">Dotaddict</a>') . '</p>' . '</div>';
}
}
# Activated modules
$modules = $list->modules->getModules();
if (!empty($modules)) {
echo '<div class="multi-part" id="themes" title="' . __('Installed themes') . '">' . '<h3>' . __('Installed themes') . '</h3>' . '<p>' . __('You can configure and manage installed themes from this list.') . '</p>';
$list->setList('theme-activate')->setTab('themes')->setModules($modules)->displayModules(array('sshot', 'distrib', 'name', 'config', 'desc', 'author', 'version', 'parent'), array('select', 'behavior', 'deactivate', 'delete'));
示例15: doChangePostLang
public static function doChangePostLang($core, dcPostsActionsPage $ap, $post)
{
$posts_ids = $ap->getIDs();
if (empty($posts_ids)) {
throw new Exception(__('No entry selected'));
}
if (isset($post['new_lang'])) {
$new_lang = $post['new_lang'];
$cur = $core->con->openCursor($core->prefix . 'post');
$cur->post_lang = $new_lang;
$cur->update('WHERE post_id ' . $core->con->in($posts_ids));
dcPage::addSuccessNotice(sprintf(__('%d entry has been successfully set to language "%s"', '%d entries have been successfully set to language "%s"', count($posts_ids)), count($posts_ids), html::escapeHTML(l10n::getLanguageName($new_lang))));
$ap->redirect(true);
} else {
$ap->beginPage(dcPage::breadcrumb(array(html::escapeHTML($core->blog->name) => '', $ap->getCallerTitle() => $ap->getRedirection(true), __('Change language for this selection') => '')));
# lang list
# Languages combo
$rs = $core->blog->getLangs(array('order' => 'asc'));
$all_langs = l10n::getISOcodes(0, 1);
$lang_combo = array('' => '', __('Most used') => array(), __('Available') => l10n::getISOcodes(1, 1));
while ($rs->fetch()) {
if (isset($all_langs[$rs->post_lang])) {
$lang_combo[__('Most used')][$all_langs[$rs->post_lang]] = $rs->post_lang;
unset($lang_combo[__('Available')][$all_langs[$rs->post_lang]]);
} else {
$lang_combo[__('Most used')][$rs->post_lang] = $rs->post_lang;
}
}
unset($all_langs);
unset($rs);
echo '<form action="' . $ap->getURI() . '" method="post">' . $ap->getCheckboxes() . '<p><label for="new_lang" class="classic">' . __('Entry language:') . '</label> ' . form::combo('new_lang', $lang_combo, '');
echo $core->formNonce() . $ap->getHiddenFields() . form::hidden(array('action'), 'lang') . '<input type="submit" value="' . __('Save') . '" /></p>' . '</form>';
$ap->endPage();
}
}