diff --git a/e107_admin/menus.php b/e107_admin/menus.php index e2af978d0..525019445 100644 --- a/e107_admin/menus.php +++ b/e107_admin/menus.php @@ -117,7 +117,14 @@ TEMPL; // alert(target); $.post(target, data ,function(ret) { - // alert('Posted: '+ret); + // alert('Posted: '+ret); + // console.log('Posted: '+ ret); + + if(ret == '') + { + return false; + } + var a = $.parseJSON(ret); if(a.error) diff --git a/e107_core/xml/user_extended.xml b/e107_core/xml/user_extended.xml index 296b242a3..04dfd5bf4 100644 --- a/e107_core/xml/user_extended.xml +++ b/e107_core/xml/user_extended.xml @@ -77,6 +77,13 @@ 253 253 253 + + + textarea + class='form-control tbox' col='80' maxlength='254' + 253 + 253 + 253 list diff --git a/e107_handlers/core_functions.php b/e107_handlers/core_functions.php index 0f201f81e..0d8771498 100644 --- a/e107_handlers/core_functions.php +++ b/e107_handlers/core_functions.php @@ -484,10 +484,14 @@ class e_array { if (!is_array($ArrayData)) { return false; } + $Array = var_export($ArrayData, true); - if ($AddSlashes == true) { + + if ($AddSlashes == true) + { $Array = addslashes($Array); } + return $Array; } diff --git a/e107_handlers/e107_class.php b/e107_handlers/e107_class.php index 42faec689..603fe383a 100644 --- a/e107_handlers/e107_class.php +++ b/e107_handlers/e107_class.php @@ -1863,6 +1863,99 @@ class e107 $jshandler->resetDependency(); } + + /** + * Throw log/info/warnings/errors to the Chrome/Firefox Console. + * @param $name + * @param null $var + * @param string $type + */ + public static function debug($name, $var = null, $type = 'log', $js = false) + { + + $nl = "\r\n"; + // echo "alert('hi');"; + + if($js != true) + { + echo ''.$nl; + } + + } + + + + + + + + + /** * Retrieve JS Helper object * diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index a4e66c87d..3996232ad 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -1624,7 +1624,7 @@ class e_form */ function radio($name, $value, $checked = false, $options = null) { - + if(!is_array($options)) parse_str($options, $options); if(is_array($value)) @@ -1665,6 +1665,8 @@ class e_form { $text .= "".$labelFound.""; } + + return $text; } @@ -1683,6 +1685,12 @@ class e_form $options_on = varset($options['enabled'],array()); $options_off = varset($options['disabled'],array()); + + unset($options['enabled'],$options['disabled']); + + $options_on = array_merge($options_on, $options); + $options_off = array_merge($options_off, $options); + if(vartrue($options['class']) == 'e-expandit' || vartrue($options['expandit'])) // See admin->prefs 'Single Login' for an example. { @@ -1708,6 +1716,8 @@ class e_form $text = $this->radio($name, 1, $checked_enabled, $options_on)." ".$this->radio($name, 0, !$checked_enabled, $options_off); } + + return $text; } @@ -2639,6 +2649,7 @@ class e_form case 'radio': //$def_options['class'] = ' '; + $def_options = array('class' => ''); unset($def_options['size'], $def_options['selected']); break; diff --git a/e107_languages/English/lan_user_extended.php b/e107_languages/English/lan_user_extended.php index 3328756a4..7b59afecc 100644 --- a/e107_languages/English/lan_user_extended.php +++ b/e107_languages/English/lan_user_extended.php @@ -56,6 +56,8 @@ define("UE_LAN_GENDER","Gender"); define("UE_LAN_GENDER_DESC","Gender"); define("UE_LAN_MALE","Male"); define("UE_LAN_FEMALE","Female"); +define("UE_LAN_COMMENT", "Comments"); +define("UE_LAN_COMMENT_DESC", "Comment Box"); diff --git a/e107_plugins/forum/newforumposts_menu.php b/e107_plugins/forum/newforumposts_menu.php index d71a4dc6a..d83e22c55 100755 --- a/e107_plugins/forum/newforumposts_menu.php +++ b/e107_plugins/forum/newforumposts_menu.php @@ -38,7 +38,7 @@ class forum_newforumposts_menu // plugin folder + menu name (without the .php) function getQuery() { $max_age = vartrue($this->menuPref['maxage'], 0); - $max_age = ($max_age == 0) ? '' : '(t.post_datestamp > '.(time()-(int)$max_age*86400).') AND '; + $max_age = ($max_age == 0) ? '' : '(p.post_datestamp > '.(time()-(int)$max_age*86400).') AND '; $forumList = implode(',', $this->forumObj->getForumPermList('view')); @@ -148,6 +148,8 @@ class forum_newforumposts_menu // plugin folder + menu name (without the .php) $caption = LAN_PLUGIN_FORUM_LATESTPOSTS; } + // e107::debug('menuPref', $this->menuPref); + e107::getRender()->tablerender($caption, $text, 'nfp_menu'); }