1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-11 00:54:49 +02:00

Admin tools - column selector working everywhere again; improved UI - list/editQuery not needed anymore, queries are auto-generated, table JOIN support added (see comment manager), various improvement, still work in progress

This commit is contained in:
secretr
2009-11-05 17:32:19 +00:00
parent 276fa19298
commit 18a4b9bfe9
11 changed files with 455 additions and 260 deletions

View File

@@ -11,9 +11,9 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_admin/comment.php,v $
| $Revision: 1.11 $
| $Date: 2009-11-05 00:11:56 $
| $Author: e107coders $
| $Revision: 1.12 $
| $Date: 2009-11-05 17:32:18 $
| $Author: secretr $
+----------------------------------------------------------------------------+
*/
require_once("../class2.php");
@@ -54,8 +54,24 @@ class comments_admin_ui extends e_admin_ui
{
protected $pluginTitle = LAN_COMMENTMAN;
protected $pluginName = 'comments';
protected $pluginName = 'core';
protected $table = "comments";
/**
* If present this array will be used to build your list query
* You can link fileds from $field array with 'table' parameter, which should equal to a key (table) from this array
* 'leftField', 'rightField' and 'fields' attributes here are required, the rest is optional
*
* @var array [optional]
*/
protected $tableJoin = array (
'user' => array('leftField' => 'comment_author_id', 'rightField' => 'user_id', 'fields' => '*'/*, 'leftTable' => '', 'joinType' => 'LEFT JOIN', 'whereJoin' => '', 'where' => ''*/)
);
//protected $listQry = "SELECT SQL_CALC_FOUND_ROWS * FROM #comments"; // without any Order or Limit.
protected $editQry = "SELECT * FROM #comments WHERE comment_id = {ID}";
protected $pid = "comment_id";
protected $perPage = 10;
protected $batchDelete = true;
@@ -65,10 +81,11 @@ class comments_admin_ui extends e_admin_ui
'comment_id' => array('title'=> ID, 'type' => 'int', 'width' =>'5%', 'forced'=> TRUE),
'comment_item_id' => array('title'=> "item id", 'type' => 'text', 'width' => 'auto'),
'comment_subject' => array('title'=> "subject", 'type' => 'text', 'width' => 'auto', 'thclass' => 'left first'), // Display name
'comment_comment' => array('title'=> "comment", 'type' => 'textarea', 'width' => '30%', 'readParms' => 'expand=...&truncate=50'), // Display name
'comment_author_id' => array('title'=> "authorID", 'type' => 'text', 'width' => 'auto'), // User name
'comment_comment' => array('title'=> "comment", 'type' => 'textarea', 'width' => '30%', 'readParms' => 'expand=...&truncate=50&bb=1'), // Display name
'comment_author_id' => array('title'=> "authorID", 'type' => 'number', 'width' => 'auto'), // User id
'comment_author_name' => array('title'=> "authorName",'type' => 'text', 'width' => 'auto'), // User name
'comment_datestamp' => array('title'=> "datestamp", 'type' => 'datestamp', 'width' => 'auto'), // User name
'user_name' => array('title'=> "System user", 'type' => 'text', 'width' => 'auto', 'table' => 'user', 'noedit' => true), // User name
'comment_datestamp' => array('title'=> "datestamp", 'type' => 'datestamp', 'width' => 'auto'), // User date
'comment_blocked' => array('title'=> "blocked", 'type' => 'text', 'width' => 'auto'), // Photo
'comment_ip' => array('title'=> "IP", 'type' => 'text', 'width' => '10%', 'thclass' => 'center' ), // Real name (no real vetting)
'comment_type' => array('title'=> "Type", 'type' => 'method', 'width' => '10%', 'thclass' => 'center', 'filter'=>TRUE,'batch'=>TRUE ), // No real vetting
@@ -86,10 +103,6 @@ class comments_admin_ui extends e_admin_ui
'pref_name' => array('title'=> 'name', 'type' => 'text')
);
protected $listQry = "SELECT * FROM #comments"; // without any Order or Limit.
protected $editQry = "SELECT * FROM #comments WHERE comment_id = {ID}";
}
//TODO Block and Unblock buttons, moderated comments?