1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-20 04:32:01 +02:00

Merge pull request #3183 from oudoken/master

Fixes #3151 add an e_output option to plugin class
This commit is contained in:
Cameron 2018-06-13 11:55:58 -07:00 committed by GitHub
commit a909cb8097
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 2 deletions

View File

@ -374,6 +374,22 @@ $show = deftrue('e_POWEREDBY_DISABLE') ? "none" : "block"; // Let search engines
unset($show);
echo "\n</body>\n</html>";
//hook into the end of page (usefull for example for capturing output buffering)
//Load e_output.php files.
if (!empty($pref['e_output_list']) && is_array($pref['e_output_list']))
{
foreach($pref['e_output_list'] as $val)
{
$fname = e_PLUGIN.$val."/e_output.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

View File

@ -76,6 +76,7 @@ class e_plugin
'e_user',
'e_library', // For third-party libraries are defined by plugins/themes.
'e_gsitemap',
'e_output', //hook into all pages at the end (after closing </html>)
);
@ -1069,6 +1070,7 @@ class e107plugin
'e_user',
'e_library', // For third-party libraries are defined by plugins/themes.
'e_gsitemap',
'e_output', //hook into all pages at the end (after closing </html>)
);
@ -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_output' => "Hook into all pages at the end (after closing </html>)"
);