e107help.org Q&A
0 like 0 dislike
Hello There!

There's a way to capture content buffering (ie: ob_start, ob_get_contents) of the WHOLE page from a plugin?

I've tried with e_module.php in my plugin for ob_start and it works correctly, but where i can call the ob_get_contents?

e_footer.php is called to early and the page is not complete.

Any idea?

BTW: i'm trying to create static html pages from plugin.

Thanks Kind Regards
e107 version 2
closed with the note: moved to github
in Plugins by (4 points) 1 1
closed by
If you manage this, I would like to know how.
Hi Jimako!

Well probably the best way would be to add a new block in "e107_core/c/templates/footer_defaul.php" to mimic the "e_footer.php" behaviour but at the end of the file (can be called the "e_end.php") i will try it.

I was asking for a upgrade save method if there's was one.

Btw i think will be a usefull thing, in my case i'm trying to use phpfastcache library to generate static cache for the non logged in users... And getting 100% score on GTMetrix :)

I was afraid you need to change core files.  

I am curious because e107 has already inbuild cache system.  For example for news. So there has to be way how to start and end output. Question is - what is better -  to cache all page (or make html file) or cache its elements (menus, news etc).  I use phpwee-php-minifier already and only place I was able to find was in class2.php.


But it started to be annoying to replace it manually after each sync.

Oh. by the way, you can copy footer_default.php (and header too) as footer_myversion.php  and then in theme.php set _layout as myversion.  It will take these templates.  (not sure about syntax now, but I did this way if I needed to change core templates).

Doesn't that thing - e_footer is not loaded as last one bug?

Hi Jimako!

Maybe has to be included from the dev's i will wrote on github.

The cache system on e107 is surely good but in the case of a shared hosting can be the bottleneck so static html pages (non logged user) can be really helpfull to increase speed on small resource or highload.

I will surely look into phpwee! Seems promising.



1 Answer

1 like 0 dislike
Thanks for creating issue as feature request.  

by (1.7k points) 10 36 47

Hi Jimako!

Seems to be quite simple but ti does require core implementation i've added a pull request on github.

Maybe Cameron and other can have better solution but it's a very little modification so...

Here is :


Also i've tried to look into phpwee minifier but it give me errors, the resulting page has javascript errors, but i need to look further.

I think in terms of seo/optimization there's are some points that might be of interested to add in e107 for example:

  • use custom css/scripts in theme (exclude core js/css) | theme
  • define javascript scripts directly in theme | theme
  • combine js / css | plugin?

Thanks kind regards


Welcome to e107 Q&A, where you can ask questions and receive answers from other members of the e107 community.
844 questions
1,242 answers
5,546 users