} if (!empty($_REQUEST['object']) && $_REQUEST['object'] == 'tag') { include dirname(__FILE__) . '/inc/tag_controller.php'; } else { if (!empty($_POST['saveconfig'])) { try { $tag_description_active = empty($_POST['tag_description_active']) ? false : true; $core->blog->settings->tagdescription->put('active', $tag_description_active, 'boolean'); $_SESSION['tag_description_message'] = __('The configuration has been updated.'); http::redirect($p_url); } catch (Exception $e) { http::redirect($p_url); } } # list $tag_manager = new tagManager($core); $page_tags = !empty($_GET['page']) ? (int) $_GET['page'] : 1; $nb_per_page_tags = 10; if (!empty($_GET['nb']) && (int) $_GET['nb'] > 0) { $nb_per_page_tags = (int) $_GET['nb']; } $limit_tags = array(($page_tags - 1) * $nb_per_page_tags, $nb_per_page_tags); try { $tags_counter = $tag_manager->getCountList(); $tags_list = new tagDescriptionAdminList($core, $tag_manager->getList($limit_tags), $tags_counter); $tags_list->setPluginUrl("{$p_url}&object=tag&action=edit&id=%s"); } catch (Exception $e) { $core->error->add($e->getMessage()); } if ($tag_description_active) { if (!empty($_SESSION['tag_description_default_tab'])) {
<form id="edit" method="post" action="edit.php?id=<?php echo $id; ?> &action=edit" onsubmit="return process_form(this)"> <div class="inform"> <fieldset> <legend><?php echo $lang_post['Edit post legend']; ?> </legend> <input type="hidden" name="form_sent" value="1" /> <div class="infldset txtarea"> <?php if ($can_edit_subject) { require_once './include/tags.php'; $tag = new tagManager($cur_post['subject'], $_POST['tag1'], $_POST['tag2'], $cur_post['fid']); $subject = $tag->getSubject(false); ?> <label class="required"><strong><?php echo $lang_common['Subject']; ?> <span><?php echo $lang_common['Required']; ?> </span></strong><br /> <input class="longinput" type="text" name="req_subject" size="80" maxlength="70" tabindex="<?php echo $cur_index++; ?> " value="<?php echo pun_htmlspecialchars($subject); ?>
// | | // | This program is distributed in the hope that it will be useful, but | // | WITHOUT ANY WARRANTY; without even the implied warranty of | // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | // | General Public License for more details. | // | | // | You should have received a copy of the GNU General Public License | // | along with this program; if not, write to the Free Software | // | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | // | MA 02110-1301 USA. | // +-----------------------------------------------------------------------+ if (!defined('DC_CONTEXT_ADMIN')) { exit; } $tag = array('meta_id' => '', 'meta_desc' => ''); $tag_manager = new tagManager($core); if ($_REQUEST['action'] == 'edit' && !empty($_GET['id'])) { $rs = $tag_manager->findById($_GET['id']); if (!$rs->isEmpty()) { $tag['meta_id'] = $rs->meta_id; $tag['meta_desc'] = $rs->meta_desc; $_SESSION['meta_id'] = $_GET['id']; } } if (!empty($_POST['save_tag'])) { // save current values $tag['meta_id'] = $_POST['tag_meta_id']; $tag['meta_desc'] = (string) $_POST['tag_meta_desc']; $cur = $tag_manager->openCursor(); $cur->meta_desc = (string) $_POST['tag_meta_desc']; try {