From 4414495b0406423e775abcc637ffd27dc1064451 Mon Sep 17 00:00:00 2001 From: Cameron Date: Thu, 11 Jun 2015 12:29:19 -0700 Subject: [PATCH] PHP Notice/Warning removal. 'field-help' containers may now be customized with: data-placement="[top|right|bottom|left]" --- e107_admin/plugin.php | 3 +++ e107_handlers/e_parse_class.php | 8 ++++---- e107_web/js/core/admin.jquery.js | 7 +++++++ 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/e107_admin/plugin.php b/e107_admin/plugin.php index 8adb1d368..64223b661 100644 --- a/e107_admin/plugin.php +++ b/e107_admin/plugin.php @@ -2435,6 +2435,9 @@ class pluginBuilder $legacyFile = e_PLUGIN.$this->pluginName."/plugin.php"; if(file_exists($legacyFile)) { + $eplug_name = $eplug_author = $eplug_url = $eplug_description = ""; + $eplug_tables = array(); + require_once($legacyFile); $mes = e107::getMessage(); $mes->addInfo("Loading plugin.php file"); diff --git a/e107_handlers/e_parse_class.php b/e107_handlers/e_parse_class.php index bbd73c4eb..25e5a8ad2 100644 --- a/e107_handlers/e_parse_class.php +++ b/e107_handlers/e_parse_class.php @@ -766,7 +766,7 @@ class e_parse extends e_parser } - if(substr($text,0,6) == '[html]') + if(is_string($text) && substr($text,0,6) == '[html]') { // $text = $this->toHtml($text,true); $search = array('"',''','\', '&',); // '&' must be last. @@ -2838,7 +2838,7 @@ class e_parser $doc->preserveWhiteSpace = true; libxml_use_internal_errors(true); - $doc->loadHTML($html); + $doc->loadHTML($html); $tg = explode(",", $taglist); $ret = array(); @@ -3669,8 +3669,8 @@ return; // Set it up for processing. // libxml_use_internal_errors(true); // hides errors. - $doc = $this->domObj; - + $doc = $this->domObj; + libxml_use_internal_errors(true); @$doc->loadHTML($html); // $doc->encoding = 'UTF-8'; diff --git a/e107_web/js/core/admin.jquery.js b/e107_web/js/core/admin.jquery.js index b44bcc75c..210f85356 100644 --- a/e107_web/js/core/admin.jquery.js +++ b/e107_web/js/core/admin.jquery.js @@ -355,6 +355,13 @@ $(document).ready(function() { var placement = 'top'; } + + var custplace = $(t).attr('data-placement'); // ie top|left|bottom|right + + if(custplace !== undefined) + { + placement = custplace; + } t.hide();