diff --git a/e107_plugins/import/providers/html_import_class.php b/e107_plugins/import/providers/html_import_class.php index 843abeca8..e439d6b2a 100644 --- a/e107_plugins/import/providers/html_import_class.php +++ b/e107_plugins/import/providers/html_import_class.php @@ -207,7 +207,7 @@ class html_import extends base_import_class $text = "
".DBLAN_10." - +
diff --git a/e107_plugins/rss_menu/admin_prefs.php b/e107_plugins/rss_menu/admin_prefs.php index 20b7fee1a..7551d18dc 100644 --- a/e107_plugins/rss_menu/admin_prefs.php +++ b/e107_plugins/rss_menu/admin_prefs.php @@ -38,6 +38,8 @@ require_once(e_PLUGIN.'rss_menu/rss_shortcodes.php'); $rss = new rss; global $tp; +$mes = e107::getMessage(); + // Delete entry if(isset($_POST['delete'])) @@ -87,10 +89,12 @@ if($rss->file_check()) // Render message if(isset($message)) { - $rss->show_message('', $message); + $mes->add($message); + // $rss->show_message('', $message); } // Get template +/* if (is_readable(THEME."rss_template.php")) { require_once(THEME."rss_template.php"); @@ -98,6 +102,178 @@ if (is_readable(THEME."rss_template.php")) else { require_once(e_PLUGIN."rss_menu/rss_template.php"); +}*/ + +$frm = e107::getForm(); + +// Admin : rss listing +if(!isset($RSS_ADMIN_LIST_HEADER)) +{ + + $RSS_ADMIN_LIST_HEADER = " +
+ +
+ + + + + + + + + + + + "; +} +if(!isset($RSS_ADMIN_LIST_TABLE)) +{ + $RSS_ADMIN_LIST_TABLE = " + + + + + + + + + "; +} +if(!isset($RSS_ADMIN_LIST_FOOTER)) +{ + $RSS_ADMIN_LIST_FOOTER = " + + + + +
{RSS_ADMIN_CAPTION=id,RSS_LAN_ADMIN_2}{RSS_ADMIN_CAPTION=name,RSS_LAN_ADMIN_4}{RSS_ADMIN_CAPTION=path,RSS_LAN_ADMIN_3}{RSS_ADMIN_CAPTION=url,RSS_LAN_ADMIN_5}".RSS_LAN_ADMIN_12."{RSS_ADMIN_CAPTION=limit,RSS_LAN_ADMIN_7}".LAN_OPTIONS."
{RSS_ADMIN_ID}{RSS_ADMIN_NAME}{RSS_ADMIN_PATH}{RSS_ADMIN_URL}{RSS_ADMIN_TOPICID}{RSS_ADMIN_LIMIT}{RSS_ADMIN_OPTIONS}
+ {RSS_ADMIN_LIMITBUTTON} +
+ + "; +} + +// Admin : rss create/edit +if(!isset($RSS_ADMIN_CREATE_TABLE)) +{ + $RSS_ADMIN_CREATE_TABLE = " +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
".RSS_LAN_ADMIN_4."{RSS_ADMIN_FORM_NAME}
".RSS_LAN_ADMIN_5."{RSS_ADMIN_FORM_URL}
".RSS_LAN_ADMIN_12."{RSS_ADMIN_FORM_TOPICID}
".RSS_LAN_ADMIN_3."{RSS_ADMIN_FORM_PATH}
".RSS_LAN_ADMIN_6."{RSS_ADMIN_FORM_TEXT}
".RSS_LAN_ADMIN_7."{RSS_ADMIN_FORM_LIMIT}
".RSS_LAN_ADMIN_8."{RSS_ADMIN_FORM_CLASS}
{RSS_ADMIN_FORM_CREATEBUTTON}
+
+
"; +} + +// Admin : rss options +if(!isset($RSS_ADMIN_OPTIONS_TABLE)) +{ + $RSS_ADMIN_OPTIONS_TABLE = " +
+
+ + + + + + + + + + + + + + + + + + + + +
".LAN_OPTIONS."".RSS_LAN_ADMIN_14."
".RSS_LAN_ADMIN_13." + +
".RSS_LAN_ADMIN_19." + +
".RSS_LAN_ADMIN_33." + +
+
+ ".$frm->admin_button('updatesettings',LAN_SAVE,'update')." +
+
+
"; +} + +// Admin : rss import +if(!isset($RSS_ADMIN_IMPORT_HEADER)) +{ + $RSS_ADMIN_IMPORT_HEADER = " +
+
+ + + "; +} +if(!isset($RSS_ADMIN_IMPORT_TABLE)) +{ + $RSS_ADMIN_IMPORT_TABLE = " + + + + + + + "; +} + +if(!isset($RSS_ADMIN_IMPORT_FOOTER)) +{ + $RSS_ADMIN_IMPORT_FOOTER = " +
".RSS_LAN_ADMIN_16." + ".RSS_LAN_ADMIN_3." + ".RSS_LAN_ADMIN_4." + ".RSS_LAN_ADMIN_5." + ".RSS_LAN_ADMIN_12." +
{RSS_ADMIN_IMPORT_CHECK}{RSS_ADMIN_IMPORT_PATH}{RSS_ADMIN_IMPORT_NAME}
{RSS_ADMIN_IMPORT_TEXT}
{RSS_ADMIN_IMPORT_URL}{RSS_ADMIN_IMPORT_TOPICID}
+
+ ".$frm->admin_button('import_rss',RSS_LAN_ADMIN_17,'submit')." +
+
+
"; } // Listing @@ -139,7 +315,8 @@ require_once(e_ADMIN."footer.php"); // ##### Display options -------------------------------------------------------------------------- function admin_prefs_adminmenu() { - global $sql, $qs; + global $sql; + $qs = explode(".",e_QUERY); $act = varset($qs[0], 'list'); @@ -177,7 +354,12 @@ class rss // Admin : list : existing rss feeds function rssadminlist() { - global $ns, $sql, $tp, $field, $sort, $rss_shortcodes, $row, $RSS_ADMIN_LIST_HEADER, $RSS_ADMIN_LIST_TABLE, $RSS_ADMIN_LIST_FOOTER; + $tp = e107::getParser(); + $mes = e107::getMessage(); + $ns = e107::getRender(); + $sql = e107::getDb(); + + global $field, $sort, $rss_shortcodes, $row, $RSS_ADMIN_LIST_HEADER, $RSS_ADMIN_LIST_TABLE, $RSS_ADMIN_LIST_FOOTER; $fieldstag = array('id'=>'rss_id','path'=>'rss_path','name'=>'rss_name','url'=>'rss_url','limit'=>'rss_limit'); $order = (isset($fieldstag[$field])) ? "ORDER BY ".$fieldstag[$field]." ".$sort : "ORDER BY rss_id"; @@ -195,14 +377,19 @@ class rss $text .= $tp -> parseTemplate($RSS_ADMIN_LIST_TABLE, FALSE, $rss_shortcodes); } $text .= $tp -> parseTemplate($RSS_ADMIN_LIST_FOOTER, FALSE, $rss_shortcodes); - $ns->tablerender(RSS_LAN_ADMIN_1, $text); + $ns->tablerender(RSS_LAN_ADMIN_1,$mes->render(). $text); } } // Create or edit - put up a form function rssadmincreate($action, $id=0) { - global $ns, $sql, $tp, $rss_shortcodes, $row, $RSS_ADMIN_CREATE_TABLE; + $mes = e107::getMessage(); + $ns = e107::getRender(); + $tp = e107::getParser(); + $sql = e107::getDb(); + + global $rss_shortcodes, $row, $RSS_ADMIN_CREATE_TABLE; if (($action == "edit") && $id ) { @@ -219,14 +406,21 @@ class rss $row['rss_text'] = $tp -> toForm($row['rss_text']); } } - $text = $tp -> parseTemplate($RSS_ADMIN_CREATE_TABLE, FALSE, $rss_shortcodes); - $ns->tablerender(RSS_LAN_ADMIN_10, $text); + + $text = $tp->parseTemplate($RSS_ADMIN_CREATE_TABLE, FALSE, $rss_shortcodes); + + $ns->tablerender(RSS_LAN_ADMIN_10, $mes->render().$text); } // Import - put up the list of possible feeds to import function rssadminimport() { - global $sql, $ns, $i, $tp, $rss_shortcodes, $feed, $pref; + $sql = e107::getDb(); + $ns = e107::getRender(); + $mes = e107::getMessage(); + $tp = e107::getParser(); + + global $i,$rss_shortcodes, $feed, $pref; global $RSS_ADMIN_IMPORT_HEADER, $RSS_ADMIN_IMPORT_TABLE, $RSS_ADMIN_IMPORT_FOOTER; $sqli = new db; @@ -332,17 +526,21 @@ class rss } else { - $ns->tablerender(RSS_LAN_ADMIN_11, $text); + $ns->tablerender(RSS_LAN_ADMIN_11, $mes->render(). $text); } } // Options - display form function rssadminoptions() { - global $ns, $sql, $tp, $rss_shortcodes, $row, $RSS_ADMIN_OPTIONS_TABLE; + $mes = e107::getMessage(); + $ns = e107::getRender(); + $tp = e107::getParser(); + + global $rss_shortcodes, $row, $RSS_ADMIN_OPTIONS_TABLE; $text = $tp -> parseTemplate($RSS_ADMIN_OPTIONS_TABLE, FALSE, $rss_shortcodes); - $ns->tablerender(LAN_OPTIONS, $text); + $ns->tablerender(LAN_OPTIONS, $mes->render(). $text); return; } diff --git a/e107_plugins/rss_menu/rss_shortcodes.php b/e107_plugins/rss_menu/rss_shortcodes.php index 218114cf4..02a3998ef 100644 --- a/e107_plugins/rss_menu/rss_shortcodes.php +++ b/e107_plugins/rss_menu/rss_shortcodes.php @@ -74,12 +74,14 @@ SC_END SC_BEGIN RSS_ADMIN_LIMIT global $row, $rs; $id = $row['rss_id']; +$frm = e107::getForm(); + return $frm->number("limit[$id]",$row['rss_limit']); return ""; SC_END SC_BEGIN RSS_ADMIN_LIMITBUTTON -global $row; -return ""; + $frm = e107::getForm(); + return $frm->admin_button('update_limit',LAN_UPDATE,'update'); SC_END SC_BEGIN RSS_ADMIN_OPTIONS @@ -132,21 +134,30 @@ SC_END SC_BEGIN RSS_ADMIN_FORM_LIMIT global $row; +$frm = e107::getForm(); + +return $frm->number('rss_limit',$row['rss_limit'],3); return ""; SC_END SC_BEGIN RSS_ADMIN_FORM_CREATEBUTTON -global $row, $qs; +global $row; +$qs = explode(".", e_QUERY); +$frm = e107::getForm(); + if(isset($qs[1]) && $qs[1] == "edit" && isset($qs[2]) && is_numeric($qs[2]) ) { $text = " - - "; + "; + + $text .= $frm->admin_button('update_rss',LAN_UPDATE,'update'); + } else { - $text = ""; + $text = $frm->admin_button('create_rss',LAN_CREATE,'submit'); + } return $text; SC_END diff --git a/e107_plugins/rss_menu/rss_template.php b/e107_plugins/rss_menu/rss_template.php index d7c8b95e4..209d403ff 100644 --- a/e107_plugins/rss_menu/rss_template.php +++ b/e107_plugins/rss_menu/rss_template.php @@ -1,5 +1,5 @@ "; } -// Admin : rss listing -if(!isset($RSS_ADMIN_LIST_HEADER)) -{ - - $RSS_ADMIN_LIST_HEADER = " -
-
- - - - - - - - - - - - - "; -} -if(!isset($RSS_ADMIN_LIST_TABLE)) -{ - $RSS_ADMIN_LIST_TABLE = " - - - - - - - - - "; -} -if(!isset($RSS_ADMIN_LIST_FOOTER)) -{ - $RSS_ADMIN_LIST_FOOTER = " - - - - -
{RSS_ADMIN_CAPTION=id,RSS_LAN_ADMIN_2}{RSS_ADMIN_CAPTION=name,RSS_LAN_ADMIN_4}{RSS_ADMIN_CAPTION=path,RSS_LAN_ADMIN_3}{RSS_ADMIN_CAPTION=url,RSS_LAN_ADMIN_5}".RSS_LAN_ADMIN_12."{RSS_ADMIN_CAPTION=limit,RSS_LAN_ADMIN_7}".LAN_OPTIONS."
{RSS_ADMIN_ID}{RSS_ADMIN_NAME}{RSS_ADMIN_PATH}{RSS_ADMIN_URL}{RSS_ADMIN_TOPICID}{RSS_ADMIN_LIMIT}{RSS_ADMIN_OPTIONS}
- {RSS_ADMIN_LIMITBUTTON} -
-
-
"; -} -// Admin : rss create/edit -if(!isset($RSS_ADMIN_CREATE_TABLE)) -{ - $RSS_ADMIN_CREATE_TABLE = " -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
".RSS_LAN_ADMIN_4."{RSS_ADMIN_FORM_NAME}
".RSS_LAN_ADMIN_5."{RSS_ADMIN_FORM_URL}
".RSS_LAN_ADMIN_12."{RSS_ADMIN_FORM_TOPICID}
".RSS_LAN_ADMIN_3."{RSS_ADMIN_FORM_PATH}
".RSS_LAN_ADMIN_6."{RSS_ADMIN_FORM_TEXT}
".RSS_LAN_ADMIN_7."{RSS_ADMIN_FORM_LIMIT}
".RSS_LAN_ADMIN_8."{RSS_ADMIN_FORM_CLASS}
{RSS_ADMIN_FORM_CREATEBUTTON}
-
-
"; -} - -// Admin : rss options -if(!isset($RSS_ADMIN_OPTIONS_TABLE)) -{ - $RSS_ADMIN_OPTIONS_TABLE = " -
-
- - - - - - - - - - - - - - - - - - - - -
".LAN_OPTIONS."".RSS_LAN_ADMIN_14."
".RSS_LAN_ADMIN_13." - -
".RSS_LAN_ADMIN_19." - -
".RSS_LAN_ADMIN_33." - -
- -
-
-
"; -} - -// Admin : rss import -if(!isset($RSS_ADMIN_IMPORT_HEADER)) -{ - $RSS_ADMIN_IMPORT_HEADER = " -
-
- - - - - - - - - "; -} -if(!isset($RSS_ADMIN_IMPORT_TABLE)) -{ - $RSS_ADMIN_IMPORT_TABLE = " - - - - - - - "; -} - -if(!isset($RSS_ADMIN_IMPORT_FOOTER)) -{ - $RSS_ADMIN_IMPORT_FOOTER = " - - - -
".RSS_LAN_ADMIN_15."
".RSS_LAN_ADMIN_16."".RSS_LAN_ADMIN_3."".RSS_LAN_ADMIN_4."".RSS_LAN_ADMIN_5."".RSS_LAN_ADMIN_12."
{RSS_ADMIN_IMPORT_CHECK}{RSS_ADMIN_IMPORT_PATH}{RSS_ADMIN_IMPORT_NAME}
{RSS_ADMIN_IMPORT_TEXT}
{RSS_ADMIN_IMPORT_URL}{RSS_ADMIN_IMPORT_TOPICID}
- -
-
-
"; -} ?> \ No newline at end of file diff --git a/e107_web/js/core/all.jquery.js b/e107_web/js/core/all.jquery.js index ac8461db1..fb7220e23 100644 --- a/e107_web/js/core/all.jquery.js +++ b/e107_web/js/core/all.jquery.js @@ -881,7 +881,7 @@ function duplicateHTML(copy,paste,baseid){ but.type = 'button'; but.value = 'x'; - but.className = 'button'; + but.className = 'btn button'; but.onclick = function(){ this.parentNode.parentNode.removeChild(this.parentNode); }; var destination = document.getElementById(paste);