diff --git a/e107_core/templates/footer_default.php b/e107_core/templates/footer_default.php index ad9656fd6..e75de9592 100644 --- a/e107_core/templates/footer_default.php +++ b/e107_core/templates/footer_default.php @@ -374,6 +374,22 @@ $show = deftrue('e_POWEREDBY_DISABLE') ? "none" : "block"; // Let search engines unset($show); echo "\n\n"; +//hook into the end of page buffering +//Load e_end.php files. +if (!empty($pref['e_end_list']) && is_array($pref['e_end_list'])) +{ + foreach($pref['e_end_list'] as $val) + { + $fname = e_PLUGIN.$val."/e_end.php"; // Do not place inside a function - BC $pref required. . + + if(is_readable($fname)) + { + + $ret = ($e107_debug || isset($_E107['debug'])) ? include_once($fname) : @include_once($fname); + } + } + unset($ret); +} // // I Send the buffered page data, along with appropriate headers diff --git a/e107_handlers/plugin_class.php b/e107_handlers/plugin_class.php index 4af32abcc..77b1000df 100644 --- a/e107_handlers/plugin_class.php +++ b/e107_handlers/plugin_class.php @@ -76,6 +76,7 @@ class e_plugin 'e_user', 'e_library', // For third-party libraries are defined by plugins/themes. 'e_gsitemap', + 'e_end', // hook into all page at the end ); @@ -1069,6 +1070,7 @@ class e107plugin 'e_user', 'e_library', // For third-party libraries are defined by plugins/themes. 'e_gsitemap', + 'e_end', // hook into all page at the end ); @@ -1114,8 +1116,8 @@ class e107plugin 'e_upload' => "Use data from your plugin in the user upload form.", 'e_user' => "Have your plugin include data on the user-profile page.", 'e_library' => "Include a third-party library", - 'e_parse' => "Hook into e107's text/html parser" - + 'e_parse' => "Hook into e107's text/html parser", + 'e_end' => "Hook into all page at the end" );