$form_element["active"]["uid"] =& $user_tray; } else { $form_element["active"]["uid"] =& $form_element["inactive"]["uid"]; } // Summary $form_element["active"]["art_summary"] = new XoopsFormTextArea(art_constant("MD_SUMMARY"), "art_summary", $art_summary, 5, 60); $form_element["inactive"]["art_summary"] = new XoopsFormHidden("art_summary", $art_summary); // Text subtitle $form_element["active"]["subtitle"] = new XoopsFormText(art_constant("MD_SUBTITLE"), "subtitle", 60, 255, $subtitle); $form_element["inactive"]["subtitle"] = new XoopsFormHidden("subtitle", $subtitle); // The editor selection $nohtml = empty($canhtml); if (!empty($editor)) { //art_setcookie("editor",$editor); } else { $editor = art_getcookie("editor"); if (empty($editor) && is_object($xoopsUser)) { $editor = @$xoopsUser->getVar("editor"); // Need set through user profile } if (empty($editor)) { $editor = @$xoopsModuleConfig["editor_default"]; } } $form_element["active"]["editor"] = new XoopsFormSelectEditor($form_art, "editor", $editor, $nohtml, @$xoopsModuleConfig["editor_allowed"]); $form_element["inactive"]["editor"] = new XoopsFormHidden("editor", $editor); // text render $editor_configs = array(); $editor_configs["name"] = "text"; $editor_configs["value"] = $text; $editor_configs["rows"] = empty($xoopsModuleConfig["editor_rows"]) ? 35 : $xoopsModuleConfig["editor_rows"];
* You may not change or alter any portion of this comment or credits * of supporting developers from this source code or any supporting source code * which is considered copyrighted (c) material of the original comment or credit authors. * 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. * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license http://www.fsf.org/copyleft/gpl.html GNU public license * @package article * @since 1.0 * @author Taiwen Jiang <*****@*****.**> * @version $Id: counter.php 2178 2008-09-26 08:34:09Z phppp $ */ include "header.php"; if (empty($xoopsModuleConfig['do_counter'])) { return; } $article_id = empty($_GET['article']) ? 0 : intval($_GET['article']); if (empty($article_id)) { return; } if (art_getcookie("art_" . $article_id) > 0) { return; } $article_handler =& xoops_getmodulehandler('article', $xoopsModule->getVar("dirname")); $article_obj =& $article_handler->get($article_id); $article_obj->setVar("art_counter", $article_obj->getVar("art_counter") + 1, true); $article_handler->insert($article_obj, true); art_setcookie("art_" . $article_id, time()); return;
/** * Article module for XOOPS * * You may not change or alter any portion of this comment or credits * of supporting developers from this source code or any supporting source code * which is considered copyrighted (c) material of the original comment or credit authors. * 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. * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license http://www.fsf.org/copyleft/gpl.html GNU public license * @package article * @since 1.0 * @author Taiwen Jiang <*****@*****.**> * @version $Id: counter.php 2178 2008-09-26 08:34:09Z phppp $ */ include "header.php"; $article_id = empty($_GET['id']) ? 0 : intval($_GET['id']); if (empty($article_id)) { return; } if (art_getcookie("ilog_" . $article_id) > 0) { return; } $article_handler =& xoops_getmodulehandler('article', $xoopsModule->getVar("dirname")); $article_obj =& $article_handler->get($article_id); $article_obj->setVar("counter", $article_obj->getVar("counter") + 1, true); $article_handler->insert($article_obj, true); art_setcookie("ilog_" . $article_id, time()); return;
* @license http://www.fsf.org/copyleft/gpl.html GNU public license * @package article * @since 1.0 * @author Taiwen Jiang <*****@*****.**> * @version $Id: form.article.php 2178 2008-09-26 08:34:09Z phppp $ */ if (!defined("XOOPS_ROOT_PATH")) { exit; } include_once XOOPS_ROOT_PATH . "/modules/" . $GLOBALS["artdirname"] . "/class/xoopsformloader.php"; // The form $form_art = new XoopsThemeForm("", "formarticle", XOOPS_URL . "/modules/" . $GLOBALS["artdirname"] . "/action.article.php", 'post', true); $form_art->setExtra("enctype=\"multipart/form-data\""); if (!empty($_POST["form_mode"])) { $form_mode = $_POST["form_mode"]; } elseif (!($form_mode = art_getcookie("form_mode"))) { $form_mode = @$xoopsModuleConfig["form_mode"]; } include dirname(__FILE__) . "/form.article.elements.php"; include_once dirname(__FILE__) . "/form.article.config.php"; $elements_active = empty($form_art_elements[$form_mode]) ? $form_art_elements["full"] : $form_art_elements[$form_mode]; foreach ($elements_active as $element) { if (empty($form_element["active"][$element])) { continue; } if (is_array($form_element["active"][$element])) { foreach (array_keys($form_element["active"][$element]) as $key) { $form_art->addElement($form_element["active"][$element][$key]); } } else { $form_art->addElement($form_element["active"][$element]);