From 79a99069e6fcf21785a0aa324b7ed55f6bb1a682 Mon Sep 17 00:00:00 2001 From: Tijn Kuyper Date: Thu, 7 Feb 2013 18:42:25 +0100 Subject: [PATCH] Issue #90 - Blogcalendar menu (also #6 and GUI styling) --- e107_plugins/blogcalendar_menu/config.php | 91 ++++++++++--------- .../blogcalendar_menu/languages/English.php | 12 +-- 2 files changed, 52 insertions(+), 51 deletions(-) diff --git a/e107_plugins/blogcalendar_menu/config.php b/e107_plugins/blogcalendar_menu/config.php index b9cc795cc6..d211fed174 100644 --- a/e107_plugins/blogcalendar_menu/config.php +++ b/e107_plugins/blogcalendar_menu/config.php @@ -2,16 +2,14 @@ /* * e107 website system * - * Copyright (C) 2008-2009 e107 Inc (e107.org) + * Copyright (C) 2008-2013 e107 Inc (e107.org) * Released under the terms and conditions of the * GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * * Plugin Administration - Blog calendar menu * - * $Source: /cvs_backup/e107_0.8/e107_plugins/blogcalendar_menu/config.php,v $ - * $Revision$ - * $Date$ - * $Author$ + * $URL$ + * $Id$ * */ $eplug_admin = TRUE; @@ -25,13 +23,18 @@ exit ; } require_once(e_ADMIN."auth.php"); - + +require_once(e_HANDLER."form_handler.php"); +require_once(e_HANDLER."message_handler.php"); +$frm = e107::getForm(); +$mes = e107::getMessage(); + if (isset($_POST['update_menu'])) { $temp = array(); while (list($key, $value) = each($_POST)) { - if ($value != BLOGCAL_CONF3) + if ($value != LAN_UPDATE) // ??? { $temp[$key] = $value; } @@ -40,52 +43,56 @@ { save_prefs(); } - $ns->tablerender("", "
".BLOGCAL_CONF5."
"); } - -$text = "
+ +$ns->tablerender($caption, $mes->render() . $text); + +$text = "
- +
+ + + + - - + + // if the nr of months per row is undefined, default to 3 + $months_per_row = $pref['blogcal_mpr']?$pref['blogcal_mpr']: + "3"; + for($i = 1; $i <= 12; $i++) { + $text .= " + +
".BLOGCAL_CONF1.": - + - - - ".BLOGCAL_CONF2.": admin_button('update_menu', LAN_UPDATE, 'update')." + + - "; +"; + $ns->tablerender(BLOGCAL_CONF4, $text); require_once(e_ADMIN."footer.php"); diff --git a/e107_plugins/blogcalendar_menu/languages/English.php b/e107_plugins/blogcalendar_menu/languages/English.php index 1776b908a0..b091abb606 100644 --- a/e107_plugins/blogcalendar_menu/languages/English.php +++ b/e107_plugins/blogcalendar_menu/languages/English.php @@ -2,16 +2,10 @@ /* * e107 website system * - * Copyright (C) 2008-2009 e107 Inc (e107.org) + * Copyright (C) 2008-2013 e107 Inc (e107.org) * Released under the terms and conditions of the * GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * - * - * - * $Source: /cvs_backup/e107_0.8/e107_plugins/blogcalendar_menu/languages/English.php,v $ - * $Revision$ - * $Date$ - * $Author$ */ define("BLOGCAL_L1", "News for "); @@ -42,9 +36,9 @@ define("BLOGCAL_CONF1", "Months/row"); define("BLOGCAL_CONF2", "Cellpadding"); -define("BLOGCAL_CONF3", "Update Menu Settings"); +//define("BLOGCAL_CONF3", "Update Menu Settings"); define("BLOGCAL_CONF4", "BlogCal Menu Configuration"); -define("BLOGCAL_CONF5", "BlogCal menu configuration saved"); +//define("BLOGCAL_CONF5", "BlogCal menu configuration saved"); define("BLOGCAL_ARCHIV1", "Select Archive");