mirror of
https://github.com/e107inc/e107.git
synced 2025-08-13 01:54:12 +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:
@@ -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?
|
||||
|
@@ -9,9 +9,9 @@
|
||||
* Custom Menus/Pages Administration
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_admin/cpage.php,v $
|
||||
* $Revision: 1.24 $
|
||||
* $Date: 2009-11-01 23:10:57 $
|
||||
* $Author: e107coders $
|
||||
* $Revision: 1.25 $
|
||||
* $Date: 2009-11-05 17:32:17 $
|
||||
* $Author: secretr $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -111,7 +111,7 @@ class page
|
||||
{
|
||||
|
||||
global $pref,$user_pref, $admin_log;
|
||||
if(isset($_POST['submit-e-columns']))
|
||||
if(isset($_POST['etrigger_ecolumns']))
|
||||
{
|
||||
$user_pref['admin_cpage_columns'] = $_POST['e-columns'];
|
||||
save_prefs('user');
|
||||
|
@@ -9,9 +9,9 @@
|
||||
* Administration Area - Site Links
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_admin/links.php,v $
|
||||
* $Revision: 1.31 $
|
||||
* $Date: 2009-10-26 09:51:56 $
|
||||
* $Author: e107coders $
|
||||
* $Revision: 1.32 $
|
||||
* $Date: 2009-11-05 17:32:17 $
|
||||
* $Author: secretr $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -208,7 +208,7 @@ class links
|
||||
$this->mode = $_GET['mode'];
|
||||
}
|
||||
|
||||
if (varset($_POST['submit-e-columns']))
|
||||
if (varset($_POST['etrigger_ecolumns']))
|
||||
{
|
||||
$user_pref['admin_links_columns'] = $_POST['e-columns'];
|
||||
save_prefs('user');
|
||||
|
@@ -9,8 +9,8 @@
|
||||
* News Administration
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_admin/newspost.php,v $
|
||||
* $Revision: 1.62 $
|
||||
* $Date: 2009-10-30 17:59:32 $
|
||||
* $Revision: 1.63 $
|
||||
* $Date: 2009-11-05 17:32:17 $
|
||||
* $Author: secretr $
|
||||
*/
|
||||
require_once("../class2.php");
|
||||
@@ -453,7 +453,7 @@ class admin_newspost
|
||||
$this->_observe_newsCommentsRecalc();
|
||||
}
|
||||
|
||||
if(isset($_POST['submit-e-columns'])) //elseif fails.
|
||||
if(isset($_POST['etrigger_ecolumns'])) //elseif fails.
|
||||
{
|
||||
$this->_observe_saveColumns();
|
||||
}
|
||||
@@ -1143,7 +1143,7 @@ class admin_newspost
|
||||
}
|
||||
|
||||
// AUTO RENDER
|
||||
$text .= $frm->trow($this->fields, $this->fieldpref, $row, 'news_id');
|
||||
$text .= $frm->renderTableRow($this->fields, $this->fieldpref, $row, 'news_id');
|
||||
}
|
||||
|
||||
$text .= "
|
||||
|
@@ -11,8 +11,8 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_admin/plugin.php,v $
|
||||
| $Revision: 1.53 $
|
||||
| $Date: 2009-11-04 21:59:35 $
|
||||
| $Revision: 1.54 $
|
||||
| $Date: 2009-11-05 17:32:17 $
|
||||
| $Author: secretr $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
@@ -127,7 +127,7 @@ class pluginManager{
|
||||
$this -> pluginProcessUpload();
|
||||
}
|
||||
|
||||
if(isset($_POST['submit-e-columns']))
|
||||
if(isset($_POST['etrigger_ecolumns']))
|
||||
{
|
||||
$user_pref['admin_pluginmanager_columns'] = $_POST['e-columns'];
|
||||
save_prefs('user');
|
||||
|
@@ -9,9 +9,9 @@
|
||||
* Administration Area - User classes
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_admin/userclass2.php,v $
|
||||
* $Revision: 1.31 $
|
||||
* $Date: 2009-11-05 12:26:43 $
|
||||
* $Author: e107coders $
|
||||
* $Revision: 1.32 $
|
||||
* $Date: 2009-11-05 17:32:18 $
|
||||
* $Author: secretr $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -861,7 +861,7 @@ class uclass_manager
|
||||
function uclass_manager()
|
||||
{
|
||||
global $user_pref;
|
||||
if(isset($_POST['submit-e-columns']))
|
||||
if(isset($_POST['etrigger_ecolumns']))
|
||||
{
|
||||
$user_pref['admin_userclass_columns'] = $_POST['e-columns'];
|
||||
save_prefs('user');
|
||||
|
@@ -10,9 +10,9 @@
|
||||
* Administration Area - Users
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_admin/users.php,v $
|
||||
* $Revision: 1.61 $
|
||||
* $Date: 2009-10-21 21:36:10 $
|
||||
* $Author: e107steved $
|
||||
* $Revision: 1.62 $
|
||||
* $Date: 2009-11-05 17:32:17 $
|
||||
* $Author: secretr $
|
||||
*
|
||||
*/
|
||||
require_once ('../class2.php');
|
||||
@@ -762,7 +762,7 @@ class users
|
||||
function usersSaveColumnPref()
|
||||
{
|
||||
global $pref,$user_pref,$admin_log;
|
||||
if (isset ($_POST['submit-e-columns']))
|
||||
if (isset ($_POST['etrigger_ecolumns']))
|
||||
{
|
||||
$user_pref['admin_users_columns'] = $_POST['e-columns'];
|
||||
save_prefs('user');
|
||||
|
Reference in New Issue
Block a user