mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 12:48:26 +02:00
comments manager link added - work in progress.
This commit is contained in:
@@ -9,9 +9,9 @@
|
|||||||
* Admin Navigation
|
* Admin Navigation
|
||||||
*
|
*
|
||||||
* $Source: /cvs_backup/e107_0.8/e107_admin/ad_links.php,v $
|
* $Source: /cvs_backup/e107_0.8/e107_admin/ad_links.php,v $
|
||||||
* $Revision: 1.16 $
|
* $Revision: 1.17 $
|
||||||
* $Date: 2009-08-15 01:00:38 $
|
* $Date: 2009-08-30 08:23:47 $
|
||||||
* $Author: bugrain $
|
* $Author: e107coders $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('e107_INIT')) { exit; }
|
if (!defined('e107_INIT')) { exit; }
|
||||||
@@ -136,6 +136,9 @@ if (!defined('E_16_BANNER')) {
|
|||||||
if (!defined('E_16_CACHE')) {
|
if (!defined('E_16_CACHE')) {
|
||||||
define('E_16_CACHE', "<img class='icon S16' src='".e_IMAGE."admin_images/cache_16.png' alt='' />");
|
define('E_16_CACHE', "<img class='icon S16' src='".e_IMAGE."admin_images/cache_16.png' alt='' />");
|
||||||
}
|
}
|
||||||
|
if (!defined('E_16_COMMENT')) {
|
||||||
|
define('E_16_COMMENT', "<img class='icon S16' src='".e_IMAGE."admin_images/comments_16.png' alt='' />");
|
||||||
|
}
|
||||||
if (!defined('E_16_CREDITS')) {
|
if (!defined('E_16_CREDITS')) {
|
||||||
define('E_16_CREDITS', "<img class='icon S16' src='".e_IMAGE."e107_icon_16.png' alt='' />");
|
define('E_16_CREDITS', "<img class='icon S16' src='".e_IMAGE."e107_icon_16.png' alt='' />");
|
||||||
}
|
}
|
||||||
@@ -433,6 +436,7 @@ $e_icon_array = array(
|
|||||||
'banlist' => E_32_BANLIST,
|
'banlist' => E_32_BANLIST,
|
||||||
'banner' => E_32_BANNER,
|
'banner' => E_32_BANNER,
|
||||||
'cache' => E_32_CACHE,
|
'cache' => E_32_CACHE,
|
||||||
|
'comment' => E_32_COMMENT,
|
||||||
'credits' => E_32_CREDITS,
|
'credits' => E_32_CREDITS,
|
||||||
'cron' => E_32_CRON,
|
'cron' => E_32_CRON,
|
||||||
'custom' => E_32_CUST,
|
'custom' => E_32_CUST,
|
||||||
@@ -590,7 +594,8 @@ $array_functions = array(
|
|||||||
34 => array(e_ADMIN.'docs.php', ADLAN_12, ADLAN_13, '', 20, E_16_DOCS, E_32_DOCS),
|
34 => array(e_ADMIN.'docs.php', ADLAN_12, ADLAN_13, '', 20, E_16_DOCS, E_32_DOCS),
|
||||||
35 => array('#TODO', 'System Info', 'System Information', '', 20, '', ''),
|
35 => array('#TODO', 'System Info', 'System Information', '', 20, '', ''),
|
||||||
36 => array(e_ADMIN.'credits.php', LAN_CREDITS, LAN_CREDITS, '', 20, '', ''),
|
36 => array(e_ADMIN.'credits.php', LAN_CREDITS, LAN_CREDITS, '', 20, '', ''),
|
||||||
37 => array(e_ADMIN.'custom_field.php', ADLAN_161, ADLAN_162, 'U', 4, E_16_CUSTOMFIELD, E_32_CUSTOMFIELD)
|
37 => array(e_ADMIN.'custom_field.php', ADLAN_161, ADLAN_162, 'U', 4, E_16_CUSTOMFIELD, E_32_CUSTOMFIELD),
|
||||||
|
38 => array(e_ADMIN.'comment.php', LAN_COMMENTMAN, LAN_COMMENTMAN, 'B', 5, E_16_COMMENT, E_32_COMMENT)
|
||||||
);
|
);
|
||||||
|
|
||||||
//FIXME array structure suitable for e_admin_menu - see shortcodes/admin_navigation.php
|
//FIXME array structure suitable for e_admin_menu - see shortcodes/admin_navigation.php
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
+ ----------------------------------------------------------------------------+
|
+ ----------------------------------------------------------------------------+
|
||||||
| e107 website system
|
| e107 website system
|
||||||
|
|
|
|
||||||
| <20>Steve Dunstan 2001-2002
|
| <20>Steve Dunstan 2001-2002
|
||||||
| http://e107.org
|
| http://e107.org
|
||||||
| jalist@e107.org
|
| jalist@e107.org
|
||||||
|
|
|
|
||||||
@@ -11,9 +11,9 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_admin/comment.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_admin/comment.php,v $
|
||||||
| $Revision: 1.2 $
|
| $Revision: 1.3 $
|
||||||
| $Date: 2009-05-08 21:50:19 $
|
| $Date: 2009-08-30 08:23:49 $
|
||||||
| $Author: e107steved $
|
| $Author: e107coders $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
require_once("../class2.php");
|
require_once("../class2.php");
|
||||||
@@ -22,6 +22,10 @@ if (!getperms("B"))
|
|||||||
header("location:".e_BASE."index.php");
|
header("location:".e_BASE."index.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
require_once(e_ADMIN."auth.php");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (e_QUERY)
|
if (e_QUERY)
|
||||||
{
|
{
|
||||||
@@ -60,5 +64,107 @@ if (e_QUERY)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo "<script type='text/javascript'>window.history.go(-1);</script>\n";
|
else
|
||||||
|
{
|
||||||
|
$cm= new comment_manager;
|
||||||
|
$cm->commentList();
|
||||||
|
}
|
||||||
|
// echo "<script type='text/javascript'>window.history.go(-1);</script>\n";
|
||||||
|
|
||||||
|
require_once(e_ADMIN."footer.php");
|
||||||
|
|
||||||
|
|
||||||
|
class comment_manager
|
||||||
|
{
|
||||||
|
|
||||||
|
var $fields;
|
||||||
|
var $fieldpref;
|
||||||
|
|
||||||
|
|
||||||
|
function comment_manager()
|
||||||
|
{
|
||||||
|
$this->fieldpref = (varset($user_pref['admin_cpage_columns'])) ? $user_pref['admin_cpage_columns'] : array("comment_id","comment_pid","comment_item_id","comment_subject","comment_comment","comment_author","comment_datestamp");
|
||||||
|
|
||||||
|
$this->fields = array(
|
||||||
|
'comment_id' => array('title'=> ID, '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_author' => array('title'=> "author", 'type' => 'text', 'width' => 'auto'), // User name
|
||||||
|
'comment_comment' => array('title'=> "comment", 'type' => 'text', 'width' => 'auto'), // Display name
|
||||||
|
'comment_datestamp' => array('title'=> "date", 'type' => 'text', 'width' => 'auto'), // User name
|
||||||
|
'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' => 'text', 'width' => '10%', 'thclass' => 'center' ), // No real vetting
|
||||||
|
'comment_lock' => array('title'=> "Lock", 'type' => 'text', 'width' => 'auto'),
|
||||||
|
|
||||||
|
// 'page_ip_restrict' => array('title'=> LAN_USER_07, 'type' => 'text', 'width' => 'auto'), // Avatar
|
||||||
|
|
||||||
|
'options' => array('title'=> LAN_OPTIONS, 'forced'=>TRUE, 'width' => '10%', 'thclass' => 'center last')
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function commentList()
|
||||||
|
{
|
||||||
|
global $pref;
|
||||||
|
$sql = e107::getDb();
|
||||||
|
require_once(e_HANDLER."form_handler.php");
|
||||||
|
$frm = new e_form(true);
|
||||||
|
|
||||||
|
$sql -> db_Select("comments", "*");
|
||||||
|
|
||||||
|
$text = "<form method='post' action='".e_SELF."?".e_QUERY."'>
|
||||||
|
<fieldset id='core-comment-list'>
|
||||||
|
<legend class='e-hideme'>".CUSLAN_5."</legend>
|
||||||
|
<table cellpadding='0' cellspacing='0' class='adminlist'>".
|
||||||
|
$frm->colGroup($this->fields,$this->fieldpref).
|
||||||
|
$frm->thead($this->fields,$this->fieldpref).
|
||||||
|
|
||||||
|
"<tbody>";
|
||||||
|
|
||||||
|
while($row = $sql-> db_Fetch())
|
||||||
|
{
|
||||||
|
$text .= "<tr>
|
||||||
|
<td>{$row['comment_id']}</td>";
|
||||||
|
|
||||||
|
$text .= (in_array("comment_item_id",$this->fieldpref)) ? "<td>".($row['comment_item_id'])."</td>" : "";
|
||||||
|
$text .= (in_array("comment_subject",$this->fieldpref)) ? "<td>".($row['comment_subject'])."</td>" : "";
|
||||||
|
$text .= (in_array("comment_author",$this->fieldpref)) ? "<td>".($row['comment_author_name'])."</td>" : "";
|
||||||
|
$text .= (in_array("comment_comment",$this->fieldpref)) ? "<td>".($row['comment_comment'])."</td>" : "";
|
||||||
|
$text .= (in_array("comment_datestamp",$this->fieldpref)) ? "<td>".strftime($pref['shortdate'],$row['comment_datestamp'])."</td>" : "";
|
||||||
|
$text .= (in_array("comment_ip",$this->fieldpref)) ? "<td>".($row['comment_ip'])."</td>" : "";
|
||||||
|
$text .= (in_array("comment_type",$this->fieldpref)) ? "<td class='center'>".($row['comment_type'])."</td>" : "";
|
||||||
|
$text .= (in_array("comment_lock",$this->fieldpref)) ? "<td class='center'>".($row['comment_lock'] ? ADMIN_TRUE_ICON : " ")."</td>" : "";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$text .= "
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
";
|
||||||
|
|
||||||
|
|
||||||
|
e107::getRender()->tablerender($caption,$text);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
?>
|
?>
|
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.0 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.5 KiB |
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Copyright e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
|
* Copyright e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
|
||||||
* $Id: lan_admin.php,v 1.26 2009-08-17 18:42:22 e107coders Exp $
|
* $Id: lan_admin.php,v 1.27 2009-08-30 08:23:51 e107coders Exp $
|
||||||
*
|
*
|
||||||
* Admin Language File
|
* Admin Language File
|
||||||
*/
|
*/
|
||||||
@@ -301,3 +301,4 @@ define("LAN_MENULAYOUT", "Menu Layout");
|
|||||||
define("LAN_IMAGEMANAGER", "Image Manager");
|
define("LAN_IMAGEMANAGER", "Image Manager");
|
||||||
|
|
||||||
define("LAN_MOREINFO","More Information...");
|
define("LAN_MOREINFO","More Information...");
|
||||||
|
define("LAN_COMMENTMAN", "Comments Manager");
|
||||||
|
Reference in New Issue
Block a user