1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-22 05:31:58 +02:00

comments manager link added - work in progress.

This commit is contained in:
CaMer0n 2009-08-30 08:23:51 +00:00
parent 9c16c71089
commit 39a9f98b18
5 changed files with 123 additions and 11 deletions
e107_admin
e107_images/admin_images
e107_languages/English/admin

@ -9,9 +9,9 @@
* Admin Navigation
*
* $Source: /cvs_backup/e107_0.8/e107_admin/ad_links.php,v $
* $Revision: 1.16 $
* $Date: 2009-08-15 01:00:38 $
* $Author: bugrain $
* $Revision: 1.17 $
* $Date: 2009-08-30 08:23:47 $
* $Author: e107coders $
*/
if (!defined('e107_INIT')) { exit; }
@ -136,6 +136,9 @@ if (!defined('E_16_BANNER')) {
if (!defined('E_16_CACHE')) {
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')) {
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,
'banner' => E_32_BANNER,
'cache' => E_32_CACHE,
'comment' => E_32_COMMENT,
'credits' => E_32_CREDITS,
'cron' => E_32_CRON,
'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),
35 => array('#TODO', 'System Info', 'System Information', '', 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

@ -3,7 +3,7 @@
+ ----------------------------------------------------------------------------+
| e107 website system
|
| ©Steve Dunstan 2001-2002
| <EFBFBD>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
@ -11,9 +11,9 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_admin/comment.php,v $
| $Revision: 1.2 $
| $Date: 2009-05-08 21:50:19 $
| $Author: e107steved $
| $Revision: 1.3 $
| $Date: 2009-08-30 08:23:49 $
| $Author: e107coders $
+----------------------------------------------------------------------------+
*/
require_once("../class2.php");
@ -22,7 +22,11 @@ if (!getperms("B"))
header("location:".e_BASE."index.php");
exit;
}
require_once(e_ADMIN."auth.php");
if (e_QUERY)
{
$temp = explode("-", 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 : "&nbsp;")."</td>" : "";
}
$text .= "
</tbody>
</table>
</fieldset>
</form>
";
e107::getRender()->tablerender($caption,$text);
}
}
?>

Binary file not shown.

Before

(image error) Size: 1.1 KiB

After

(image error) Size: 1.0 KiB

Binary file not shown.

Before

(image error) Size: 2.7 KiB

After

(image error) Size: 2.5 KiB

@ -1,7 +1,7 @@
<?php
/*
* 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
*/
@ -301,3 +301,4 @@ define("LAN_MENULAYOUT", "Menu Layout");
define("LAN_IMAGEMANAGER", "Image Manager");
define("LAN_MOREINFO","More Information...");
define("LAN_COMMENTMAN", "Comments Manager");