[geeklog-cvs] geeklog: Missing bits and pieces for the comment changes
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Fri Apr 10 13:02:40 EDT 2009
details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/16267635a8fc
changeset: 6900:16267635a8fc
user: Dirk Haun <dirk at haun-online.de>
date: Fri Apr 10 17:04:09 2009 +0200
description:
Missing bits and pieces for the comment changes
diffstat:
14 files changed, 248 insertions(+), 115 deletions(-)
language/english.php | 36 +++-
language/english_utf-8.php | 38 ++++
public_html/admin/install/config-install.php | 6
public_html/admin/moderation.php | 18 +-
public_html/article.php | 3
public_html/comment.php | 12 +
public_html/docs/history | 2
public_html/layout/professional/featuredstorytext.thtml | 2
public_html/layout/professional/storytext.thtml | 2
sql/mysql_tableanddata.php | 12 +
sql/updates/mysql_1.5.2_to_1.6.0.php | 31 ++++
system/lib-admin.php | 84 +++++++---
system/lib-comment.php | 115 +++++++--------
system/lib-story.php | 2
diffs (truncated from 758 to 300 lines):
diff -r d1d8a0120489 -r 16267635a8fc language/english.php
--- a/language/english.php Fri Apr 10 11:53:06 2009 +0200
+++ b/language/english.php Fri Apr 10 17:04:09 2009 +0200
@@ -204,7 +204,21 @@
24 => 'Anonymous User',
25 => 'Are you sure you want to report this post to the site admin?',
26 => '%s reported the following abusive comment post:',
- 27 => 'Abuse report'
+ 27 => 'Abuse report',
+ 28 => 'Preview Changes',
+ 29 => 'Submit Changes',
+ 30 => 'Edited on',
+ 31 => 'by',
+ 32 => 'Editing a Comment',
+ 33 => 'Editing a Comment Submission',
+ 34 => 'Preview Submission Changes',
+ 35 => 'Save Changes to Queue',
+ 36 => 'Notify me of new replies',
+ 37 => 'New Comment Reply',
+ 38 => 'Someone has replied to your comment.',
+ 39 => 'You may view the comment thread at the following address: ',
+ 40 => 'If you wish to receive no further notifications of replies, visit the
+ following link: '
);
###############################################################################
@@ -955,11 +969,14 @@
18 => 'Email',
34 => 'Command and Control',
35 => 'Story Submissions',
- 36 => '',
+ 36 => 'Comment',
37 => '',
38 => 'Submit',
39 => 'There are no submissions to moderate at this time',
- 40 => 'User Submissions'
+ 40 => 'User Submissions',
+ 41 => 'Comment Submissions',
+ 42 => 'User Name',
+ 43 => 'Auto-publish Comments?'
);
###############################################################################
@@ -1129,8 +1146,8 @@
12 => 'The block has been successfully deleted.',
13 => 'Your topic has been successfully saved.',
14 => 'The topic and all its stories and blocks have been successfully deleted.',
- 15 => '',
- 16 => '',
+ 15 => 'Your comment has been submitted for review and will be published when approved by a moderator.',
+ 16 => 'You have been unsubscribed. You will no longer be notified of new replies',
17 => '',
18 => '',
19 => '',
@@ -1523,7 +1540,8 @@
'records_found' => 'Records found',
'addchild' => 'Add child',
'list' => 'list',
- 'list_all' => 'List all'
+ 'list_all' => 'List all',
+ 'na' => 'N/A'
);
# Localisation of the texts for the various drop-down menus that are actually
@@ -1774,6 +1792,9 @@
'comment_limit' => "Comment Limit",
'comment_mode' => "Comment Mode",
'comment_code' => "Comment Default",
+ 'comment_edit' => "Allow Comment Edit?",
+ 'comment_edittime' => "Comment Edit Time (seconds)",
+ 'commentsubmission' => "Queue Comment Submissions",
'passwordspeedlimit' => "Password Speed Limit",
'login_attempts' => "Max. Login Attempts",
'login_speedlimit' => "Login Speed Limit",
@@ -1794,6 +1815,9 @@
'atom_max_stories' => "Max. Stories in Webservices Feed",
'disable_webservices' => 'Disable Webservices?',
'restrict_webservices' => 'Restrict Webservices?',
+ 'article_comment_close_days' => 'Days to close comments (default)',
+ 'comment_close_rec_stories' => 'Number of most recent stories enabled for comments',
+ 'allow_reply_notifications' => 'Allow comment reply notifications?',
'search_style' => "Results List Style",
'search_limits' => "Page Limits",
'search_show_num' => "Show Result Number?",
diff -r d1d8a0120489 -r 16267635a8fc language/english_utf-8.php
--- a/language/english_utf-8.php Fri Apr 10 11:53:06 2009 +0200
+++ b/language/english_utf-8.php Fri Apr 10 17:04:09 2009 +0200
@@ -204,7 +204,21 @@
24 => 'Anonymous User',
25 => 'Are you sure you want to report this post to the site admin?',
26 => '%s reported the following abusive comment post:',
- 27 => 'Abuse report'
+ 27 => 'Abuse report',
+ 28 => 'Preview Changes',
+ 29 => 'Submit Changes',
+ 30 => 'Edited on',
+ 31 => 'by',
+ 32 => 'Editing a Comment',
+ 33 => 'Editing a Comment Submission',
+ 34 => 'Preview Submission Changes',
+ 35 => 'Save Changes to Queue',
+ 36 => 'Notify me of new replies',
+ 37 => 'New Comment Reply',
+ 38 => 'Someone has replied to your comment.',
+ 39 => 'You may view the comment thread at the following address: ',
+ 40 => 'If you wish to receive no further notifications of replies, visit the
+ following link: '
);
###############################################################################
@@ -505,7 +519,7 @@
61 => 'Refine search',
62 => '#',
63 => 'Description',
- 64 => 'Showing %d - %d of %d results',
+ 64 => 'Showing %1$d - %2$d of %3$d results',
65 => 'Story',
66 => 'Comment',
67 => 'Show %d Results',
@@ -955,11 +969,14 @@
18 => 'Email',
34 => 'Command and Control',
35 => 'Story Submissions',
- 36 => '',
+ 36 => 'Comment',
37 => '',
38 => 'Submit',
39 => 'There are no submissions to moderate at this time',
- 40 => 'User Submissions'
+ 40 => 'User Submissions',
+ 41 => 'Comment Submissions',
+ 42 => 'User Name',
+ 43 => 'Auto-publish Comments?'
);
###############################################################################
@@ -1129,8 +1146,8 @@
12 => 'The block has been successfully deleted.',
13 => 'Your topic has been successfully saved.',
14 => 'The topic and all its stories and blocks have been successfully deleted.',
- 15 => '',
- 16 => '',
+ 15 => 'Your comment has been submitted for review and will be published when approved by a moderator.',
+ 16 => 'You have been unsubscribed. You will no longer be notified of new replies',
17 => '',
18 => '',
19 => '',
@@ -1523,7 +1540,8 @@
'records_found' => 'Records found',
'addchild' => 'Add child',
'list' => 'list',
- 'list_all' => 'List all'
+ 'list_all' => 'List all',
+ 'na' => 'N/A'
);
# Localisation of the texts for the various drop-down menus that are actually
@@ -1774,6 +1792,9 @@
'comment_limit' => "Comment Limit",
'comment_mode' => "Comment Mode",
'comment_code' => "Comment Default",
+ 'comment_edit' => "Allow Comment Edit?",
+ 'comment_edittime' => "Comment Edit Time (seconds)",
+ 'commentsubmission' => "Queue Comment Submissions",
'passwordspeedlimit' => "Password Speed Limit",
'login_attempts' => "Max. Login Attempts",
'login_speedlimit' => "Login Speed Limit",
@@ -1794,6 +1815,9 @@
'atom_max_stories' => "Max. Stories in Webservices Feed",
'disable_webservices' => 'Disable Webservices?',
'restrict_webservices' => 'Restrict Webservices?',
+ 'article_comment_close_days' => 'Days to close comments (default)',
+ 'comment_close_rec_stories' => 'Number of most recent stories enabled for comments',
+ 'allow_reply_notifications' => 'Allow comment reply notifications?',
'search_style' => "Results List Style",
'search_limits' => "Page Limits",
'search_show_num' => "Show Result Number?",
diff -r d1d8a0120489 -r 16267635a8fc public_html/admin/install/config-install.php
--- a/public_html/admin/install/config-install.php Fri Apr 10 11:53:06 2009 +0200
+++ b/public_html/admin/install/config-install.php Fri Apr 10 17:04:09 2009 +0200
@@ -227,6 +227,12 @@
$c->add('comment_limit',100,'text',4,21,NULL,1650,TRUE);
$c->add('comment_mode','threaded','select',4,21,11,1660,TRUE);
$c->add('comment_code',0,'select',4,21,17,1670,TRUE);
+ $c->add('comment_edit',0,'select',4,21,0,1680,TRUE);
+ $c->add('commentsubmission',0,'select',4,21,0, 1682, TRUE);
+ $c->add('comment_edittime',1800,'text',4,21,NULL,1684,TRUE);
+ $c->add('article_comment_close_days',30,'text',4,21,NULL,1686,TRUE);
+ $c->add('comment_close_rec_stories',0,'text',4,21,NULL,1688,TRUE);
+ $c->add('allow_reply_notifications',0,'select',4,21,0, 1689, TRUE);
// Subgroup: Images
$c->add('sg_images', NULL, 'subgroup', 5, 0, NULL, 0, TRUE);
diff -r d1d8a0120489 -r 16267635a8fc public_html/admin/moderation.php
--- a/public_html/admin/moderation.php Fri Apr 10 11:53:06 2009 +0200
+++ b/public_html/admin/moderation.php Fri Apr 10 17:04:09 2009 +0200
@@ -272,16 +272,16 @@
}
} elseif ( $type == 'story') { // story submission
$sql = "SELECT sid AS id,title,date,tid FROM {$_TABLES['storysubmission']}" . COM_getTopicSQL ('WHERE') . " ORDER BY date ASC";
- $H = array($LANG29[10],$LANG29[14],$LANG29[15]);
+ $H = array($LANG29[10], $LANG29[14], $LANG29[15]);
$section_title = $LANG29[35];
$section_help = 'ccstorysubmission.html';
} elseif ($type == 'comment') {
$sql = "SELECT cid AS id,title,comment,date,uid "
. "FROM {$_TABLES['commentsubmissions']} "
. "ORDER BY cid ASC";
- $H = array($LANG29[10],$LANG29[36], $LANG29[37]);
+ $H = array($LANG29[10], $LANG29[36], $LANG29[14]);
$section_title = $LANG29[41];
- $section_help = 'i do not know';
+ $section_help = 'ccstorysubmission.html'; // FIXME
}
// run SQL but this time ignore any errors
@@ -299,7 +299,7 @@
$data_arr = array();
for ($i = 0; $i < $nrows; $i++) {
$A = DB_fetchArray($result);
- if ($isplugin) {
+ if ($isplugin) {
$A['edit'] = $_CONF['site_admin_url'] . '/plugins/' . $type
. '/index.php?mode=editsubmission&id=' . $A[0];
} elseif ($type == 'comment') {
@@ -331,11 +331,11 @@
$header_arr[7]['field'] = 'publishfuture';
}
- $text_arr = array('has_menu' => false,
- 'title' => $section_title,
- 'help_url' => $section_help,
- 'no_data' => $LANG29[39],
- 'form_url' => "{$_CONF['site_admin_url']}/moderation.php"
+ $text_arr = array('has_menu' => false,
+ 'title' => $section_title,
+ 'help_url' => $section_help,
+ 'no_data' => $LANG29[39],
+ 'form_url' => "{$_CONF['site_admin_url']}/moderation.php"
);
$form_arr = array("bottom" => '', "top" => '');
if ($nrows > 0) {
diff -r d1d8a0120489 -r 16267635a8fc public_html/article.php
--- a/public_html/article.php Fri Apr 10 11:53:06 2009 +0200
+++ b/public_html/article.php Fri Apr 10 17:04:09 2009 +0200
@@ -313,13 +313,14 @@
. '/trackback.php?mode=sendall&id=' . $story->getSid();
$story_options[] = COM_createLink($LANG_TRB['send_trackback'], $url);
}
-
+ /*
if (true) { // can subscribe
$commentSubscribeURL = '';
$story_options[] = COM_createLink('Nubbies', $commentSubscribeURL, array('rel' => 'nofollow'));
$story_template->set_var ('comment_subscribe_url', $commentSubscribeURL);
$story_template->set_var ('lang_comment_subscribe', 'Nubbies');
}
+ */
$related = STORY_whatsRelated($story->displayElements('related'),
$story->displayElements('uid'),
$story->displayElements('tid'));
diff -r d1d8a0120489 -r 16267635a8fc public_html/comment.php
--- a/public_html/comment.php Fri Apr 10 11:53:06 2009 +0200
+++ b/public_html/comment.php Fri Apr 10 17:04:09 2009 +0200
@@ -260,10 +260,12 @@
* Handles a comment edit submission
*
* @copyright Jared Wenerd 2008
- * @author Jared Wenerd <wenerd87 AT gmail DOT com>
+ * @author Jared Wenerd, wenerd87 AT gmail DOT com
+ * @param string $mode 'edit' or 'editsubmission'
* @return string HTML (possibly a refresh)
*/
-function handleEdit($mode) {
+function handleEdit($mode)
+{
global $_TABLES; $LANG03;
//get needed data
@@ -311,10 +313,12 @@
}
return COM_siteHeader('menu', $LANG03[1])
- . CMT_commentForm ($title, $commenttext, $sid,
- COM_applyFilter ($_REQUEST['pid'], true), $type, $mode, $postmode)
+ . CMT_commentForm($title, $commenttext, $sid,
+ COM_applyFilter($_REQUEST['pid'], true), $type, $mode, $postmode)
. COM_siteFooter();
}
+
+
// MAIN
CMT_updateCommentcodes();
$display = '';
diff -r d1d8a0120489 -r 16267635a8fc public_html/docs/history
--- a/public_html/docs/history Fri Apr 10 11:53:06 2009 +0200
+++ b/public_html/docs/history Fri Apr 10 17:04:09 2009 +0200
@@ -8,7 +8,7 @@
+ Site migration support and easier plugin installation, by Matt West
More information about the geeklog-cvs
mailing list