本文整理汇总了PHP中dcPage::jsMetaEditor方法的典型用法代码示例。如果您正苦于以下问题:PHP dcPage::jsMetaEditor方法的具体用法?PHP dcPage::jsMetaEditor怎么用?PHP dcPage::jsMetaEditor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dcPage
的用法示例。
在下文中一共展示了dcPage::jsMetaEditor方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: adminAddTags
public static function adminAddTags($core, dcPostsActionsPage $ap, $post)
{
if (!empty($post['new_tags'])) {
$meta =& $core->meta;
$tags = $meta->splitMetaValues($post['new_tags']);
$posts = $ap->getRS();
while ($posts->fetch()) {
# Get tags for post
$post_meta = $meta->getMetadata(array('meta_type' => 'tag', 'post_id' => $posts->post_id));
$pm = array();
while ($post_meta->fetch()) {
$pm[] = $post_meta->meta_id;
}
foreach ($tags as $t) {
if (!in_array($t, $pm)) {
$meta->setPostMeta($posts->post_id, 'tag', $t);
}
}
}
dcPage::addSuccessNotice(sprintf(__('Tag has been successfully added to selected entries', 'Tags have been successfully added to selected entries', count($tags))));
$ap->redirect(true);
} else {
$tag_url = $core->blog->url . $core->url->getURLFor('tag');
$opts = $core->auth->getOptions();
$type = isset($opts['tag_list_format']) ? $opts['tag_list_format'] : 'more';
$ap->beginPage(dcPage::breadcrumb(array(html::escapeHTML($core->blog->name) => '', __('Entries') => $ap->getRedirection(true), __('Add tags to this selection') => '')), dcPage::jsMetaEditor() . '<script type="text/javascript">' . "\n" . "//<![CDATA[\n" . "var editor_tags_options = {\n" . "meta_url : 'plugin.php?p=tags&m=tag_posts&tag=',\n" . "list_type : '" . html::escapeJS($type) . "',\n" . "text_confirm_remove : '" . html::escapeJS(__('Are you sure you want to remove this tag?')) . "',\n" . "text_add_meta : '" . html::escapeJS(__('Add a tag to this entry')) . "',\n" . "text_choose : '" . html::escapeJS(__('Choose from list')) . "',\n" . "text_all : '" . html::escapeJS(__('all')) . "',\n" . "text_separation : '" . html::escapeJS(__('Enter tags separated by coma')) . "',\n" . "};\n" . "\n//]]>\n" . "</script>\n" . dcPage::jsLoad(dcPage::getPF('tags/js/jquery.autocomplete.js')) . dcPage::jsLoad(dcPage::getPF('tags/js/posts_actions.js')) . '<script type="text/javascript">' . "\n" . "//<![CDATA[\n" . "dotclear.msg.tags_autocomplete = '" . html::escapeJS(__('used in %e - frequency %p%')) . "';\n" . "dotclear.msg.entry = '" . html::escapeJS(__('entry')) . "';\n" . "dotclear.msg.entries = '" . html::escapeJS(__('entries')) . "';\n" . "\n//]]>\n" . "</script>\n" . dcPage::cssLoad(dcPage::getPF('tags/style.css')));
echo '<form action="' . $ap->getURI() . '" method="post">' . $ap->getCheckboxes() . '<div><label for="new_tags" class="area">' . __('Tags to add:') . '</label> ' . form::textarea('new_tags', 60, 3) . '</div>' . $core->formNonce() . $ap->getHiddenFields() . form::hidden(array('action'), 'tags') . '<p><input type="submit" value="' . __('Save') . '" ' . 'name="save_tags" /></p>' . '</form>';
$ap->endPage();
}
}
示例2: onActionLegacy
public static function onActionLegacy($core, dcPagesActionsPage $as, $post)
{
$core->callBehavior('adminPostsActions', $core, $as->getRS(), $as->getAction(), $as->getRedirection());
$as->beginPage('', dcPage::jsLoad('js/jquery/jquery.autocomplete.js') . dcPage::jsMetaEditor() . $core->callBehavior('adminPostsActionsHeaders'), '');
ob_start();
$core->callBehavior('adminPostsActionsContent', $core, $as->getAction(), $as->getHiddenFields(true));
$res = ob_get_contents();
ob_end_clean();
$res = str_replace("posts_actions.php", "plugin.php", $res);
echo $res;
$as->endPage();
}
示例3: array
if ($post_editor) {
$p_edit = $c_edit = '';
if (!empty($post_editor[$post_format])) {
$p_edit = $post_editor[$post_format];
}
if (!empty($post_editor['xhtml'])) {
$c_edit = $post_editor['xhtml'];
}
if ($p_edit == $c_edit) {
$admin_post_behavior .= $core->callBehavior('adminPostEditor', $p_edit, 'post', array('#post_excerpt', '#post_content', '#comment_content'), $post_format);
} else {
$admin_post_behavior .= $core->callBehavior('adminPostEditor', $p_edit, 'post', array('#post_excerpt', '#post_content'), $post_format);
$admin_post_behavior .= $core->callBehavior('adminPostEditor', $c_edit, 'comment', array('#comment_content'), 'xhtml');
}
}
dcPage::open($page_title . ' - ' . __('Entries'), dcPage::jsDatePicker() . dcPage::jsModal() . dcPage::jsMetaEditor() . $admin_post_behavior . dcPage::jsLoad('js/_post.js') . dcPage::jsConfirmClose('entry-form', 'comment-form') . $core->callBehavior('adminPostHeaders') . dcPage::jsPageTabs($default_tab) . $next_headlink . "\n" . $prev_headlink, dcPage::breadcrumb(array(html::escapeHTML($core->blog->name) => '', __('Entries') => $core->adminurl->get("admin.posts"), $post_id ? $page_title_edit : $page_title => '')), array('x-frame-allow' => $core->blog->url));
if (!empty($_GET['upd'])) {
dcPage::success(__('Entry has been successfully updated.'));
} elseif (!empty($_GET['crea'])) {
dcPage::success(__('Entry 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.'));
}
if (!empty($_GET['creaco'])) {
dcPage::success(__('Comment has been successfully created.'));
}
if (!empty($_GET['tbsent'])) {
dcPage::success(__('All pings sent.'));
}