From fecd0cb0157aa3c426c0e827ee11383bf35c11d1 Mon Sep 17 00:00:00 2001 From: Tijn Kuyper Date: Sun, 3 Feb 2013 14:19:24 +0100 Subject: [PATCH] GUI and LAN work on Linkwords plugin --- e107_plugins/linkwords/admin_config.php | 67 ++++++++----------- .../languages/English_admin_linkwords.php | 14 ++-- 2 files changed, 34 insertions(+), 47 deletions(-) diff --git a/e107_plugins/linkwords/admin_config.php b/e107_plugins/linkwords/admin_config.php index 44b58dff2..8fbb1e9be 100644 --- a/e107_plugins/linkwords/admin_config.php +++ b/e107_plugins/linkwords/admin_config.php @@ -2,27 +2,14 @@ /* * e107 website system * - * Copyright (C) 2008-2010 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) * * Linkwords plugin - admin page * - * $Source: /cvs_backup/e107_0.8/e107_plugins/linkwords/admin_config.php,v $ - * $Revision$ - * $Date$ - * $Author$ - */ - - -/** - * e107 Linkword plugin - * - * @package e107_plugins - * @subpackage linkwords - * @version $Id$; - * - * Administration page + * $URL$ + * $Id$ */ require_once('../../class2.php'); @@ -147,7 +134,7 @@ if (isset($_POST['submit_linkword']) || isset($_POST['update_linkword'])) { if ($sql -> db_Insert('linkwords', $data)) { - $message = LWLAN_2; + $message = LWLAN_2; // TODO FIX $emessage style $admin_log->log_event('LINKWD_01',$logString,''); } else @@ -160,7 +147,7 @@ if (isset($_POST['submit_linkword']) || isset($_POST['update_linkword'])) $id = intval(varset($_POST['lw_edit_id'],0)); if (($id > 0) && $sql -> db_UpdateArray('linkwords', $data, ' WHERE `linkword_id`='.$id)) { - $message = LWLAN_3; + $message = LWLAN_3; // TODO FIX $emessage style $logString = 'ID: '.$id.'[!br!]'.$logString; $admin_log->log_event('LINKWD_02',$logString,''); } @@ -239,7 +226,7 @@ $text = " ".LWLAN_62." - ".LWLAN_63." + ".LWLAN_63." @@ -269,7 +256,7 @@ if (($action == 'words') || ($action == 'edit')) { $text .= LWLAN_4; } - else // TODO FIX table below needs proper GUI + else // TODO FIX table below needs input button to $frm style { $text = " @@ -277,7 +264,7 @@ if (($action == 'words') || ($action == 'edit')) - + @@ -298,21 +285,21 @@ if (($action == 'words') || ($action == 'edit')) { $text .= " - - - - - - - - + + + + + + + + "; } @@ -343,9 +330,9 @@ if ($action=='options') foreach ($lw_context_areas as $lw_key=>$lw_desc) { $checked = $pref['lw_context_visibility'][$lw_key] ? "checked='checked'" : ''; - $text .= " {$lw_desc} {$lw_desc}
"; } - $text .= " + $text .= "".LWLAN_27."
@@ -370,7 +357,7 @@ if ($action=='options')
{$row['linkword_id']}{$row['linkword_word']}{$row['linkword_link']}".($row['linkword_newwindow'] ? LAN_YES : LAN_NO)."{$row['linkword_tooltip']}".($row['linkword_tip_id'] > 0 ? $row['linkword_tip_id'] : '')."".$lwaction_vals[$row['linkword_active']]." -
-
- - -
-
\n -
{$row['linkword_id']}{$row['linkword_word']}{$row['linkword_link']}".($row['linkword_newwindow'] ? LAN_YES : LAN_NO)."{$row['linkword_tooltip']}".($row['linkword_tip_id'] > 0 ? $row['linkword_tip_id'] : '')."".$lwaction_vals[$row['linkword_active']]." +
+
+ + +
+
\n +
-".$frm->admin_button('saveopts_linkword','no-value','submit', LWLAN_30)." + ".$frm->admin_button('saveopts_linkword','no-value','submit', LAN_UPDATE)."
\n"; @@ -380,7 +367,7 @@ $ns -> tablerender(LWLAN_32, $text); -function admin_config_adminmenu() +function admin_config_adminmenu() // TODO FIX v2 style { if (e_QUERY) { diff --git a/e107_plugins/linkwords/languages/English_admin_linkwords.php b/e107_plugins/linkwords/languages/English_admin_linkwords.php index cc632e51c..2b104baf7 100644 --- a/e107_plugins/linkwords/languages/English_admin_linkwords.php +++ b/e107_plugins/linkwords/languages/English_admin_linkwords.php @@ -26,8 +26,8 @@ define("LWLAN_12", "Yes"); define("LWLAN_13", "No"); define("LWLAN_14", "Submit LinkWord"); define("LWLAN_15", "Update LinkWord"); -define("LWLAN_16", "Edit"); -define("LWLAN_17", "Delete"); +//define("LWLAN_16", "Edit"); +//define("LWLAN_17", "Delete"); define("LWLAN_18", "Are you sure you want to delete this linkword?"); define("LWLAN_19", "Linkword deleted."); define("LWLAN_20", "Unable to find that linkword entry."); @@ -40,16 +40,16 @@ define("LWLAN_26", "Areas in which to enable linkwords"); define("LWLAN_27", "This is the 'context' of the displayed text"); define("LWLAN_28", "Pages on which to disable linkwords"); define("LWLAN_29", "Same format as menu visibility control. One match per line. Specify a partial or complete URL. End with '!' for exact match of the end part of the link"); -define("LWLAN_30", "Save options"); +//define("LWLAN_30", "Save options"); define("LWLAN_31", "Add/edit linkword"); define("LWLAN_32", "Linkword Options"); define("LWLAN_33", 'Title areas'); define("LWLAN_34", 'Item summaries'); define("LWLAN_35", 'Body text'); define("LWLAN_36", 'Descriptions (links etc)'); -define("LWLAN_37", 'Legacy areas'); -define("LWLAN_38", 'Clickable links'); -define("LWLAN_39", 'Unprocessed text'); +//define("LWLAN_37", 'Legacy areas'); +//define("LWLAN_38", 'Clickable links'); +//define("LWLAN_39", 'Unprocessed text'); define("LWLAN_40", 'User-entered titles (e.g. forum)'); define("LWLAN_41", 'User-entered body text (e.g. forum)'); // Reserve numbers for further context strings @@ -76,7 +76,7 @@ define('LWLAN_59', 'Enable Ajax functionality'); define('LWLAN_60', 'LW ID'); define('LWLAN_61', 'ID'); define('LWLAN_62', 'Tooltip ID (LW ID)'); -define('LWLAN_63', '(Positive integers only)'); +define('LWLAN_63', 'Positive integers only'); define('LWLAN_64', 'Suppress link on current page'); define('LWLAN_65', 'When checked, suppresses clickable link if points to current page');