Changeset 3475
- Timestamp:
- Jun 30, 2009, 9:05:35 PM (12 years ago)
- Location:
- extensions/CommentEditor
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/CommentEditor/classes/ce_config.class.php
r3473 r3475 9 9 var $config_values; 10 10 var $default_config; 11 var $db_key; 12 var $db_comment; 11 13 12 14 /* ************************ */ … … 16 18 function CE_Config($default_config = array()) { 17 19 $this->default_config = $default_config; 20 $this->db_key = CE_CFG_DB_KEY; 21 $this->db_comment = CE_CFG_DB_COMMENT; 18 22 } 19 23 … … 27 31 } 28 32 return null; 33 } 34 35 function setDBKey($key) { 36 $this->db_key = $key; 37 } 38 39 function setDBComment($comment) { 40 $this->db_comment = $comment; 29 41 } 30 42 … … 69 81 REPLACE INTO '.CONFIG_TABLE.' 70 82 VALUES( 71 \''. CE_CFG_DB_KEY.'\',83 \''. $this->db_key .'\', 72 84 \''.serialize($this->config_values).'\', 73 \''. CE_CFG_DB_COMMENT. '\')85 \''. $this->db_comment . '\') 74 86 ;'; 75 87 $result = pwg_query($query); … … 86 98 87 99 static function install($plugin_id, $default_config = array()) { 88 $query = ' 89 REPLACE INTO '.CONFIG_TABLE.' 90 VALUES( 91 \'' . $plugin_id . '\', 92 \'' . serialize($default_config) . '\', 93 \'Factory settings for '. $plugin_id . '\') 94 ;'; 95 $result = pwg_query($query); 96 if($result) { 97 return true; 98 } else { 99 return false; 100 } 100 $config = new CE_Config($default_config); 101 $config->setDBComment('Factory settings for '. $plugin_id); 102 $config->setDBKey($plugin_id); 103 $config->loadConfig(); 104 $result = $config->saveConfig(); 105 return $result; 101 106 } 102 107 -
extensions/CommentEditor/classes/ce_plugin.class.php
r3473 r3475 1 1 <?php 2 /* $Id: ce_plugin.class.php,v 1.1 2 2009/06/29 11:43:18Criss Exp $ */2 /* $Id: ce_plugin.class.php,v 1.13 2009/06/30 19:01:50 Criss Exp $ */ 3 3 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 4 4 … … 65 65 } 66 66 global $template, $conf, $user; 67 if ((!is_a_guest() and ($user[$conf['user_fields']['username']] == $author)) 67 if ((!is_a_guest() 68 and ($user[$conf['user_fields']['username']] == $author)) 68 69 or is_admin()) { 69 70 $key = count($template->get_template_vars('comments')); … … 94 95 $comments[$key]['DATE'] .= $this->getEditUrl($current_id); 95 96 $comments[$key]['DATE'] .= '">'; 96 $comments[$key]['DATE'] .= l10n('c omment_edit_tool');97 $comments[$key]['DATE'] .= l10n('ce_edit_tool'); 97 98 $comments[$key]['DATE'] .= '</a>'; 98 99 } … … 129 130 function doAction() { 130 131 $comment_id = ""; 131 $action = $this->isCommentEdit($ _SERVER['QUERY_STRING'], $comment_id);132 $action = $this->isCommentEdit($comment_id); 132 133 switch ($action) { 133 134 case CE_ACTION_EDIT: … … 139 140 break; 140 141 case CE_ACTION_ERROR: 141 $infos = array('c omment_edit_forbidden');142 $infos = array('ce_edit_forbidden'); 142 143 $this->displayError($infos); 143 144 break; … … 152 153 } 153 154 154 function isCommentEdit($p_query_string, &$p_comment_id) { 155 $params = split('\&', $p_query_string); 155 function isCommentEdit(&$p_comment_id) { 156 156 $action = CE_ACTION_NONE; 157 157 $comment_id = ""; 158 foreach ($params as $current_param) { 159 $key_value = split('=', $current_param); 160 if (isset($key_value[1])) { 161 if (CE_ACTION == $key_value[0] && CE_ACTION_NONE == $action) { 162 switch ($key_value[1]) { 163 case CE_ACTION_EDIT: 164 case CE_ACTION_UPDATE: 165 $action = $key_value[1]; 166 break; 167 default: 168 } 169 } 170 if (CE_ID == $key_value[0]) { 171 $comment_id = $key_value[1]; 172 } 158 if (isset($_GET[CE_ACTION])) { 159 switch ($_GET[CE_ACTION]) { 160 case CE_ACTION_EDIT: 161 case CE_ACTION_UPDATE: 162 $action = $_GET[CE_ACTION]; 163 break; 164 default: 173 165 } 166 } 167 if (isset($_GET[CE_ID])) { 168 $comment_id = $_GET[CE_ID]; 174 169 } 175 170 if (CE_ACTION_EDIT == $action) { … … 200 195 if (!$this->isEditAllowed($comment)) { 201 196 // Not allowed 202 array_push($infos, 'c omment_edit_forbidden');197 array_push($infos, 'ce_edit_forbidden'); 203 198 $this->displayError($infos); 204 199 return; … … 211 206 if ((!isset($_POST['ce_commentid'])) or 212 207 (!isset($_POST['ce_imageid']))) { 213 array_push($infos, 'c omment_access_invalid');208 array_push($infos, 'ce_access_invalid'); 214 209 $this->displayError($infos); 215 210 return; 216 211 } 217 212 if (!is_numeric($_POST['ce_imageid'])) { 218 array_push($infos, 'c omment_access_invalid');213 array_push($infos, 'ce_access_invalid'); 219 214 $this->displayError($infos); 220 215 return; … … 223 218 224 219 if (!$this->isEditAllowed($comment)) { 225 array_push($infos, 'c omment_edit_forbidden');220 array_push($infos, 'ce_edit_forbidden'); 226 221 $this->displayError($infos); 227 222 return; … … 229 224 $image_id = $comment->getInfo('image_id'); 230 225 if (intval($_POST['ce_imageid']) != intval($image_id)) { 231 array_push($infos, 'c omment_access_invalid');226 array_push($infos, 'ce_access_invalid'); 232 227 $this->displayError($infos); 233 228 return; … … 255 250 $conf['anti-flood_time'] = 0; 256 251 257 $comment_action = update_user_comment($comment_array, @$_POST['key'], $infos ); 252 $comment_action = update_user_comment($comment_array, 253 @$_POST['key'], 254 $infos ); 258 255 259 256 // Reactivate anti-flood system … … 271 268 break; 272 269 default: 273 trigger_error('Invalid comment action '.$comment_action, E_USER_WARNING); 270 trigger_error('Invalid comment action '.$comment_action, 271 E_USER_WARNING); 274 272 } 275 273 276 274 // allow plugins to notify what's going on 277 275 trigger_action( 'user_comment_insertion', 278 array_merge($comment_array, array('action'=>$comment_action))); 276 array_merge($comment_array, array('action'=> 277 $comment_action))); 279 278 if ($comment_action=='reject') { 280 279 $this->displayError($infos); … … 329 328 'TYPE' => $p_type, 330 329 'IMG' => $p_image, 331 'TITLE' => l10n( $p_type),330 'TITLE' => l10n('ce_'.$p_type), 332 331 'MSG' => $messages 333 332 ); 334 333 335 334 global $template; 336 if ("" == $template->get_template_vars('U_HOME')) { 337 $template->assign('U_HOME', make_index_url()); 338 } 339 $template->set_filenames(array('ce_message'=>$this->getTemplate('message.tpl'))); 335 336 $ce_exit = array( 337 'URL' => $this->getBaseUrl(), 338 'TITLE' => 'ce_close_message_title', 339 'ALT' => 'ce_close_message_alt', 340 'IMG' => CE_CLOSE_IMG 341 ); 342 $template->assign('ce_exit', $ce_exit); 343 $template->set_filenames( array('ce_message'=> 344 $this->getTemplate('message.tpl'))); 340 345 $template->block_html_head( '', 341 346 '<link rel="stylesheet" type="text/css" href="' … … 347 352 } 348 353 349 $template->assign(' message', $message_array);354 $template->assign('ce_message', $message_array); 350 355 $old_begin = $template->get_template_vars($begin); 351 356 $template->assign($begin, $template->parse('ce_message', true)); … … 374 379 'AUTHOR' => $p_comment->getInfo('author'), 375 380 'IMAGE' => $p_comment->getInfo('image_id'), 376 'DISABLED' => !is_admin(), 377 'USERS' => CE_Comment::getUsers(), 378 'F_ACTION' => $this->getUpdateUrl(), 379 'FREEAUTHOR'=> ($p_comment->isKnownAuthor())?'':'checked="checked"' 381 'F_ACTION' => $this->getUpdateUrl() 380 382 ); 381 if ("" == $template->get_template_vars('U_HOME')) { 382 $template->assign('U_HOME', make_index_url()); 383 } 384 $template->assign('comment', $tpl_comment); 385 $old_begin = $template->get_template_vars($begin); 386 $template->assign($begin, $template->parse('ce_edit', true)); 387 $template->concat($begin, $old_begin); 383 384 if (is_admin()) { 385 $tpl_comment['USERS'] = CE_Comment::getUsers(); 386 $tpl_comment['FREEAUTHOR'] = ($p_comment->isKnownAuthor())? 387 '':CE_CHECKED; 388 } 389 390 $additional_toolbar = ""; 391 $additional_toolbar = trigger_event('comment_editor_toolbar', 392 $additional_toolbar); 393 if ("" != $additional_toolbar) { 394 $tpl_comment['TOOLBAR'] = $additional_toolbar; 395 } 396 397 $ce_exit = array( 398 'URL' => $this->getBaseUrl(), 399 'TITLE' => 'ce_close_editor_title', 400 'ALT' => 'ce_close_editor_alt', 401 'IMG' => CE_CLOSE_IMG 402 ); 403 $template->assign('ce_exit', $ce_exit); 404 405 $template->assign('comment_editor', $tpl_comment); 406 $old_begin = $template->get_template_vars($begin); 407 $template->assign($begin, $template->parse('ce_edit', true)); 408 $template->concat($begin, $old_begin); 388 409 } 389 410 … … 414 435 } 415 436 416 function get EditUrl($comment_id) {437 function getBaseUrl() { 417 438 $url = get_root_url() . $this->getScriptName() . '.php'; 418 439 $url .= get_query_string_diff(array(CE_ACTION, CE_ID)); 440 return $url; 441 } 442 443 function getEditUrl($comment_id) { 444 $url = $this->getBaseUrl(); 419 445 $url = add_url_params($url, 420 446 array( … … 427 453 428 454 function getUpdateUrl() { 429 $url = get_root_url() . $this->getScriptName() .'.php'; 430 $url .= get_query_string_diff(array(CE_ACTION, CE_ID)); 455 $url = $this->getBaseUrl(); 431 456 $url = add_url_params($url, 432 457 array( -
extensions/CommentEditor/include/ce_common.inc.php
r3473 r3475 1 1 <?php 2 /* $Id: ce_common.inc.php,v 1.1 2 2009/06/29 11:43:18Criss Exp $ */2 /* $Id: ce_common.inc.php,v 1.13 2009/06/30 19:01:51 Criss Exp $ */ 3 3 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 4 4 … … 7 7 /* ************************** */ 8 8 9 // Version update10 define('CE_VERSION', '1.0.j');9 // Version 10 define('CE_VERSION', '1.0.k'); 11 11 12 // Define constants 13 define('CE_INCLUDE_DIR', 'include/'); 14 define('CE_CLASSES_DIR', 'classes/'); 15 define('CE_IMAGES_DIR', 'images/'); 16 define('CE_TEMPLATE_DIR', 'template/'); 17 define('CE_ADMIN_DIR', 'admin/'); 18 19 define('CE_CLASSES', CE_PATH.CE_CLASSES_DIR); 20 define('CE_INCLUDE', CE_PATH.CE_INCLUDE_DIR); 21 define('CE_TEMPLATE', CE_PATH.CE_TEMPLATE_DIR); 22 define('CE_ADMIN', CE_PATH.CE_ADMIN_DIR); 23 define('CE_AMDIN_TPL', CE_ROOT.CE_ADMIN_DIR.CE_TEMPLATE_DIR); 24 25 define('CE_OBSOLETE', 'obsolete.list'); 26 define('CE_ERRORS', CE_INCLUDE.'errors.png'); 27 define('CE_INFOS', CE_INCLUDE.'infos.png'); 28 define('CE_TYPE_INFO', 'info'); 29 define('CE_TYPE_ERROR', 'error'); 30 define('CE_PAGE', 'page'); 31 define('CE_PARAMS', 'params'); 32 define('CE_ID', 'comment_id'); 33 define('CE_ACTION', 'comment_action'); 34 define('CE_ACTION_NONE', 'none'); 35 define('CE_ACTION_EDIT', 'edit_comment'); 36 define('CE_ACTION_UPDATE', 'update_comment'); 37 define('CE_ACTION_ERROR', 'error_comment'); 38 12 // Directories 13 define('CE_INCLUDE_DIR', 'include/'); 14 define('CE_CLASSES_DIR', 'classes/'); 15 define('CE_IMAGES_DIR', 'images/'); 16 define('CE_TEMPLATE_DIR', 'template/'); 17 define('CE_ADMIN_DIR', 'admin/'); 18 // Path 19 define('CE_CLASSES', CE_PATH.CE_CLASSES_DIR); 20 define('CE_INCLUDE', CE_PATH.CE_INCLUDE_DIR); 21 define('CE_TEMPLATE', CE_PATH.CE_TEMPLATE_DIR); 22 define('CE_ADMIN', CE_PATH.CE_ADMIN_DIR); 23 define('CE_AMDIN_TPL', CE_ROOT.CE_ADMIN_DIR.CE_TEMPLATE_DIR); 24 // Files 25 define('CE_OBSOLETE', 'obsolete.list'); 26 define('CE_ERRORS', CE_INCLUDE.'errors.png'); 27 define('CE_INFOS', CE_INCLUDE.'infos.png'); 28 define('CE_CLOSE_IMG', 'exit.png'); 29 // Constants 30 define('CE_TYPE_INFO', 'info'); 31 define('CE_TYPE_ERROR', 'error'); 32 define('CE_PAGE', 'page'); 33 define('CE_PARAMS', 'params'); 34 define('CE_ID', 'comment_id'); 35 define('CE_ACTION', 'comment_action'); 36 define('CE_ACTION_NONE', 'none'); 37 define('CE_ACTION_EDIT', 'edit_comment'); 38 define('CE_ACTION_UPDATE', 'update_comment'); 39 define('CE_ACTION_ERROR', 'error_comment'); 40 define('CE_CHECKED', 'checked="checked"'); 39 41 // Config keys 40 42 if (isset($plugin)) { 41 define('CE_CFG_DB_KEY', $plugin['id']);42 define('CE_CFG_DB_COMMENT', 'Configuration of plugin ' . $plugin['id']);43 define('CE_CFG_DB_KEY', $plugin['id']); 44 define('CE_CFG_DB_COMMENT', 'Configuration of plugin ' . $plugin['id']); 43 45 } 44 46 define('CE_CFG_DISPLAY_ERROR', 'display_error'); 45 47 define('CE_CFG_DISPLAY_INFO', 'display_info'); 46 48 define('CE_CFG_VERSION', 'version'); 47 48 // Templates usage49 define('CE_CHECKED', 'checked="checked"');50 49 51 50 /* ************************** */ -
extensions/CommentEditor/language/en_UK/plugin.lang.php
r3473 r3475 1 1 <?php 2 /* $Id: plugin.lang.php,v 1. 6 2009/06/29 11:43:18Criss Exp $ */2 /* $Id: plugin.lang.php,v 1.7 2009/06/30 19:01:51 Criss Exp $ */ 3 3 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 4 4 global $lang; … … 6 6 // ================================================================== 7 7 // Edit block 8 $lang['comment_edit'] = 'Comment edition'; 9 $lang['comment_author'] = 'Author'; 10 $lang['comment_author_free'] = 'Free choice of the author'; 11 $lang['comment_content'] = 'Comment'; 12 $lang['comment_edit_tool'] = 'Edit'; 13 8 $lang['ce_edit'] = 'Comment edition'; 9 $lang['ce_author'] = 'Author'; 10 $lang['ce_author_free'] = 'Free choice of the author'; 11 $lang['ce_content'] = 'Comment'; 12 $lang['ce_edit_tool'] = 'Edit'; 13 $lang['ce_close_editor_title'] = 'Close edition block'; 14 $lang['ce_close_editor_alt'] = 'Close'; 14 15 15 16 // ================================================================== 16 17 // Message block 17 $lang[CE_TYPE_INFO] = 'Information'; 18 $lang[CE_TYPE_ERROR] = 'Error'; 19 $lang['comment_edit_forbidden'] = 'You are not allowed to edit this comment'; 20 $lang['comment_access_invalid'] = 'Invalid access'; 18 $lang['ce_'.CE_TYPE_INFO] = 'Information'; 19 $lang['ce_'.CE_TYPE_ERROR] = 'Error'; 20 $lang['ce_edit_forbidden'] = 'You are not allowed to edit this comment'; 21 $lang['ce_access_invalid'] = 'Invalid access'; 22 $lang['ce_close_message_title'] = 'Close message block'; 23 $lang['ce_close_message_alt'] = 'Close'; 21 24 22 25 // ================================================================== -
extensions/CommentEditor/language/fr_FR/plugin.lang.php
r3473 r3475 1 1 <?php 2 /* $Id: plugin.lang.php,v 1. 7 2009/06/29 11:43:18Criss Exp $ */2 /* $Id: plugin.lang.php,v 1.8 2009/06/30 19:01:50 Criss Exp $ */ 3 3 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 4 4 global $lang; … … 6 6 // ================================================================== 7 7 // Edit block 8 $lang['comment_edit'] = 'Edition de commentaire'; 9 $lang['comment_author'] = 'Auteur'; 10 $lang['comment_author_free'] = 'Choix libre de l\'auteur'; 11 $lang['comment_content'] = 'Commentaire'; 12 $lang['comment_edit_tool'] = 'Editer'; 8 $lang['ce_edit'] = 'Edition de commentaire'; 9 $lang['ce_author'] = 'Auteur'; 10 $lang['ce_author_free'] = 'Choix libre de l\'auteur'; 11 $lang['ce_content'] = 'Commentaire'; 12 $lang['ce_edit_tool'] = 'Editer'; 13 $lang['ce_close_editor_title'] = 'Fermer le bloc d\'édition'; 14 $lang['ce_close_editor_alt'] = 'Fermer'; 13 15 14 16 // ================================================================== 15 17 // Message block 16 $lang[CE_TYPE_INFO] = 'Information'; 17 $lang[CE_TYPE_ERROR] = 'Erreur'; 18 $lang['comment_edit_forbidden'] = 'Vous n\'êtes pas autorisé à éditer ce commentaire'; 19 $lang['comment_access_invalid'] = 'Accès invalide'; 18 $lang['ce_'.CE_TYPE_INFO] = 'Information'; 19 $lang['ce_'.CE_TYPE_ERROR] = 'Erreur'; 20 $lang['ce_edit_forbidden'] = 'Vous n\'êtes pas autorisé à éditer ce commentaire'; 21 $lang['ce_access_invalid'] = 'Accès invalide'; 22 $lang['ce_close_message_title'] = 'Fermer le bloc de message'; 23 $lang['ce_close_message_alt'] = 'Fermer'; 20 24 21 25 // ================================================================== -
extensions/CommentEditor/language/it_IT/plugin.lang.php
r3473 r3475 1 1 <?php 2 /* $Id: plugin.lang.php,v 1. 1 2009/06/29 11:51:59Criss Exp $ */2 /* $Id: plugin.lang.php,v 1.2 2009/06/30 19:01:51 Criss Exp $ */ 3 3 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 4 4 global $lang; … … 6 6 // ================================================================== 7 7 // Edit block 8 $lang['comment_edit'] = 'Edizione dei commenti'; 9 $lang['comment_author'] = 'Autore'; 10 $lang['comment_author_free'] = 'Scelta libera del\'autore'; 11 $lang['comment_content'] = 'Commento'; 12 //$lang['comment_edit_tool'] = ''; // TODO 8 $lang['ce_edit'] = 'Edizione dei commenti'; 9 $lang['ce_author'] = 'Autore'; 10 $lang['ce_author_free'] = 'Scelta libera del\'autore'; 11 $lang['ce_content'] = 'Commento'; 12 //$lang['ce_edit_tool'] = ''; // TODO 13 //$lang['ce_close_editor_title'] = ''; // TODO 14 //$lang['ce_close_editor_alt'] = ''; // TODO 13 15 14 16 15 17 // ================================================================== 16 18 // Message block 17 $lang[CE_TYPE_INFO] = 'Informazione'; 18 $lang[CE_TYPE_ERROR] = 'Errore'; 19 $lang['comment_edit_forbidden'] = 'Non siete autorizati ad editare questo commento'; 20 $lang['comment_access_invalid'] = 'Accesso invalido'; 19 $lang['ce_'.CE_TYPE_INFO] = 'Informazione'; 20 $lang['ce_'.CE_TYPE_ERROR] = 'Errore'; 21 $lang['ce_edit_forbidden'] = 'Non siete autorizati ad editare questo commento'; 22 $lang['ce_access_invalid'] = 'Accesso invalido'; 23 //$lang['ce_close_message_title'] = ''; // TODO 24 //$lang['ce_close_message_alt'] = ''; // TODO 21 25 22 26 // ================================================================== -
extensions/CommentEditor/main.inc.php
r3473 r3475 1 1 <?php 2 /* $Id: main.inc.php,v 1.1 7 2009/06/29 11:51:59Criss Exp $ */2 /* $Id: main.inc.php,v 1.18 2009/06/30 19:01:50 Criss Exp $ */ 3 3 /* 4 4 Plugin Name: Comment Editor 5 Version: 1.0. j5 Version: 1.0.k 6 6 Description: Allow to edit comment 7 7 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=296 … … 11 11 12 12 /** History ** 13 2009-06-30 1.0.k 14 Add toolbar trigger for edit template 15 13 16 2009-06-29 1.0.j 14 17 Add obsolete files management … … 18 21 Fix bug on administration page (text) 19 22 20 2009-06-26 1.0. i21 Display edit block on picture page if request comes 22 fromthis page23 2009-06-26 1.0.h 24 Display edit block on picture page if request comes from 25 this page 23 26 Add simple administration configuration management 24 Add and remove default configuration from database 25 onplugin install / uninstall27 Add and remove default configuration from database on 28 plugin install / uninstall 26 29 27 30 2009-06-22 1.0.g … … 46 49 47 50 2009-06-18 1.0.b 48 Fix plugin URI to be available in plugin update 49 check page. 51 Fix plugin URI to be available in plugin update check page. 50 52 Reduce code line size. 51 53 -
extensions/CommentEditor/maintain.inc.php
r3473 r3475 15 15 load_language('plugin.lang', CE_PATH); 16 16 if ($version != CE_VERSION) { 17 18 17 array_push($errors, sprintf(l10n('ce_inconsistent_version'), $plugin_id)); 18 return; 19 19 } 20 20 $clean = ce_clean_obsolete_files(CE_OBSOLETE); -
extensions/CommentEditor/template/edit.tpl
r3462 r3475 1 {* $Id: edit.tpl,v 1. 7 2009/06/26 09:17:01 Criss Exp $ *}2 {if !$comment.DISABLED}1 {* $Id: edit.tpl,v 1.8 2009/06/30 19:01:51 Criss Exp $ *} 2 {if isset($comment_editor.USERS)} 3 3 <script type="text/javascript"> 4 4 function toggleDisabled(aToggle, aList1, aList2) {ldelim} … … 14 14 <div class="titrePage"> 15 15 <ul class="categoryActions"> 16 <li><a href="{$ U_HOME}" title="{'return to homepage'|@translate}"><img src="{$themeconf.icon_dir}/home.png" class="button" alt="{'home'|@translate}"/></a></li>16 <li><a href="{$ce_exit.URL}" title="{$ce_exit.TITLE|@translate}"><img src="{$themeconf.icon_dir}/{$ce_exit.IMG}" class="button" alt="{$ce_exit.ALT|@translate}"/></a></li> 17 17 </ul> 18 <h2>{'c omment_edit'|@translate}</h2>18 <h2>{'ce_edit'|@translate}</h2> 19 19 </div> 20 20 <div id="ce-comments"> 21 <form method="post" action="{$comment .F_ACTION}" class="filter" id="editComment">21 <form method="post" action="{$comment_editor.F_ACTION}" class="filter" id="editComment"> 22 22 <table> 23 23 <tr> 24 <td>{'comment_author'|@translate}</td> 25 {if $comment.DISABLED} 26 <td colspan="3"> 27 <input type="text" name="ce_author" disabled="disabled" value="{$comment.AUTHOR}"> 28 {else} 24 <td>{'ce_author'|@translate}</td> 25 {if isset($comment_editor.USERS)} 29 26 <td> 30 {html_options name=ce_author id=ce_authorlist options=$comment .USERS selected=$comment.AUTHOR}27 {html_options name=ce_author id=ce_authorlist options=$comment_editor.USERS selected=$comment_editor.AUTHOR} 31 28 </td> 32 29 <td align="right"> 33 <input type="checkbox" name="ce_freeauthorck" id="ce_freeauthorck" value="1" onchange="toggleDisabled('ce_freeauthorck', 'ce_authorlist', 'ce_freeauthorfield');" {$comment .FREEAUTHOR}> {'comment_author_free'|@translate}30 <input type="checkbox" name="ce_freeauthorck" id="ce_freeauthorck" value="1" onchange="toggleDisabled('ce_freeauthorck', 'ce_authorlist', 'ce_freeauthorfield');" {$comment_editor.FREEAUTHOR}> {'ce_author_free'|@translate} 34 31 </td> 35 32 <td align="right"> 36 <input type="text" name="ce_freeauthor" id="ce_freeauthorfield" value="{$comment .AUTHOR}" >33 <input type="text" name="ce_freeauthor" id="ce_freeauthorfield" value="{$comment_editor.AUTHOR}" > 37 34 <script type="text/javascript">toggleDisabled('ce_freeauthorck', 'ce_authorlist', 'ce_freeauthorfield');</script> 35 {else} 36 <td colspan="3"> 37 <input type="text" name="ce_author" disabled="disabled" value="{$comment_editor.AUTHOR}"> 38 38 {/if} 39 39 </td> 40 40 </tr> 41 {if isset($comment_editor.TOOLBAR)} 41 42 <tr> 42 <td>{'comment_content'|@translate}</td> 43 <td> </td> 44 <td colspan="4">{$comment_editor.TOOLBAR}</td> 45 </tr> 46 {/if} 47 <tr> 48 <td>{'ce_content'|@translate}</td> 43 49 <td colspan="3"> 44 <textarea name="ce_content" id="ce_contentid" rows="5" cols="80">{$comment .CONTENT}</textarea>50 <textarea name="ce_content" id="ce_contentid" rows="5" cols="80">{$comment_editor.CONTENT}</textarea> 45 51 </td> 46 52 </tr> 47 53 <tr> 48 54 <td colspan="4" align="center"> 49 <input type="hidden" name="ce_imageid" value="{$comment .IMAGE}" />50 <input type="hidden" name="ce_commentid" value="{$comment .KEY}" />55 <input type="hidden" name="ce_imageid" value="{$comment_editor.IMAGE}" /> 56 <input type="hidden" name="ce_commentid" value="{$comment_editor.KEY}" /> 51 57 <input class="submit" type="submit" value="{'Submit'|@translate}"> 52 58 </td> -
extensions/CommentEditor/template/message.tpl
r3462 r3475 1 {* $Id: message.tpl,v 1. 6 2009/06/26 09:17:01 Criss Exp $ *}1 {* $Id: message.tpl,v 1.7 2009/06/30 19:01:51 Criss Exp $ *} 2 2 <div class="content" id="ce-message-block"> 3 3 <div class="titrePage"> 4 4 <ul class="categoryActions"> 5 <li><a href="{$ U_HOME}" title="{'return to homepage'|@translate}"><img src="{$themeconf.icon_dir}/home.png" class="button" alt="{'home'|@translate}"/></a></li>5 <li><a href="{$ce_exit.URL}" title="{$ce_exit.TITLE|@translate}"><img src="{$themeconf.icon_dir}/{$ce_exit.IMG}" class="button" alt="{$ce_exit.ALT|@translate}"/></a></li> 6 6 </ul> 7 <h2 id="ce-message-header">{'CommentEditor'|@translate} - {$ message.TITLE}</h2>7 <h2 id="ce-message-header">{'CommentEditor'|@translate} - {$ce_message.TITLE}</h2> 8 8 </div> 9 <div class="ce-message-{$ message.TYPE}">9 <div class="ce-message-{$ce_message.TYPE}"> 10 10 <div class="ce-message-img"> 11 <img src="{$ message.IMG}" alt="{$message.TITLE}" title="{$message.TITLE}" class="button">11 <img src="{$ce_message.IMG}" alt="{$ce_message.TITLE}" title="{$ce_message.TITLE}" class="button"> 12 12 </div> 13 13 <div class="ce-message-list"> 14 14 <ul class="ce-message-list"> 15 {foreach from=$ message.MSG item=msg}15 {foreach from=$ce_message.MSG item=msg} 16 16 <li>{$msg}</li> 17 17 {/foreach}
Note: See TracChangeset
for help on using the changeset viewer.