[geeklog-cvs] geeklog: Hide archive option radiobutton from the story editor w...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sat Feb 7 16:49:58 EST 2009
details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/48f1098d5218
changeset: 6773:48f1098d5218
user: Dirk Haun <dirk at haun-online.de>
date: Sat Feb 07 21:39:46 2009 +0100
description:
Hide archive option radiobutton from the story editor when no archive topic is defined (feature request #0000807)
diffstat:
2 files changed, 19 insertions(+), 2 deletions(-)
public_html/admin/story.php | 19 +++++++++++++++++--
public_html/docs/history | 2 ++
diffs (63 lines):
diff -r b71bb6309c6c -r 48f1098d5218 public_html/admin/story.php
--- a/public_html/admin/story.php Sat Feb 07 18:46:54 2009 +0100
+++ b/public_html/admin/story.php Sat Feb 07 21:39:46 2009 +0100
@@ -2,7 +2,7 @@
/* Reminder: always indent with 4 spaces (no tabs). */
// +---------------------------------------------------------------------------+
-// | Geeklog 1.5 |
+// | Geeklog 1.6 |
// +---------------------------------------------------------------------------+
// | story.php |
// | |
@@ -506,22 +506,37 @@
$story_templates->set_var('expire_date_explanation', $LANG24[46]);
$story_templates->set_var('story_unixstamp', $story->EditElements('expirestamp'));
+
+ $atopic = DB_getItem($_TABLES['topics'], 'tid', "archive_flag = 1");
+ $have_archive_topic = (empty($atopic) ? false : true);
+
if ($story->EditElements('statuscode') == STORY_ARCHIVE_ON_EXPIRE) {
$story_templates->set_var('is_checked2', 'checked="checked"');
$story_templates->set_var('is_checked3', 'checked="checked"');
$story_templates->set_var('showarchivedisabled', 'false');
+ $have_archive_topic = true; // force display of auto archive option
} elseif ($story->EditElements('statuscode') == STORY_DELETE_ON_EXPIRE) {
$story_templates->set_var('is_checked2', 'checked="checked"');
$story_templates->set_var('is_checked4', 'checked="checked"');
+ if (! $have_archive_topic) {
+ $story_templates->set_var('is_checked3', 'style="display:none;"');
+ }
$story_templates->set_var('showarchivedisabled', 'false');
} else {
+ if (! $have_archive_topic) {
+ $story_templates->set_var('is_checked3', 'style="display:none;"');
+ }
$story_templates->set_var('showarchivedisabled', 'true');
}
$story_templates->set_var('lang_archivetitle', $LANG24[58]);
$story_templates->set_var('lang_option', $LANG24[59]);
$story_templates->set_var('lang_enabled', $LANG_ADMIN['enabled']);
$story_templates->set_var('lang_story_stats', $LANG24[87]);
- $story_templates->set_var('lang_optionarchive', $LANG24[61]);
+ if ($have_archive_topic) {
+ $story_templates->set_var('lang_optionarchive', $LANG24[61]);
+ } else {
+ $story_templates->set_var('lang_optionarchive', '');
+ }
$story_templates->set_var('lang_optiondelete', $LANG24[62]);
$story_templates->set_var('lang_title', $LANG_ADMIN['title']);
$story_templates->set_var('story_title', $story->EditElements('title'));
diff -r b71bb6309c6c -r 48f1098d5218 public_html/docs/history
--- a/public_html/docs/history Sat Feb 07 18:46:54 2009 +0100
+++ b/public_html/docs/history Sat Feb 07 21:39:46 2009 +0100
@@ -11,6 +11,8 @@
+ (TBD) Comment moderation and editable comments, by Jared Wenerd
Other changes:
+- Hide archive option radiobutton from the story editor when no archive topic
+ is defined (feature request #0000807) [Dirk]
- Display group names with an uppercase first letter everywhere [Dirk]
- Added an ISO 8601-ish format to the gl_dateformats table [Dirk]
- Let users with user.mail permissions only email groups that they are in
More information about the geeklog-cvs
mailing list