Posts: 5
Threads: 2
Joined: May 2013
Hello, I want to write plugin, which would change the FULL HTML-code in front-end (with all php-includes, headers, footers, plugin results, etc. before sending page to user). I'm using the index-posttemplate Front-end hook, but I don't know how I can use the full page content. Can you say me variables, for this question?
And sorry for my english.
Posts: 6,266
Threads: 181
Joined: Sep 2011
You should explain exactly what you are trying to accomplish.
Why not just use a template ?
Posts: 5
Threads: 2
Joined: May 2013
I want to make plugin, which compress HTML-page before sending to user. I want the plugin to work at any site on the Get-Simple. How can I do it?
Posts: 6,266
Threads: 181
Joined: Sep 2011
Well aside from the fact that gzip already does this, and minifying in php is probably inefficient and won't actually speed anything up.
http://get-simple.info/wiki/config:htaccess?s[]=gzip
You could accomplish this by starting php output buffering on the first hook you can, then on the last, grab the buffer and compress it and then send to the user.
Posts: 5
Threads: 2
Joined: May 2013
Thanks for help, shawn_a. I'll try.