Instead of putting some debug information on my pages I thought it made more sense to put it into quickedit
I got this far. I am more of a designer and a cut n’ paste php user. How can I get the timings ([^q^] etc.) to render?
english.inc.php
$QE_lang[’timing’] = ’Timing’;
$QE_lang[’QE_query_time’] = ’Query time’;
$QE_lang[’QE_query_count’] = ’Query count’;
$QE_lang[’QE_parse_time’] = ’Parse time’;
$QE_lang[’QE_total_time’] = ’Total time’;
output.class.inc.php
$menus = array (
’content’ => array (),
’setting’ => array (),
’timing’ => array(),
’go’ => array ()
);
$menus[’timing’][] =<<<EOD
{$QE_lang[’QE_query_time’]}: [^qt^]
EOD;
$menus[’timing’][] =<<<EOD
{$QE_lang[’QE_query_count’]}: [^q^]
EOD;
$menus[’timing’][] =<<<EOD
{$QE_lang[’QE_parse_time’]}: [^p^]
EOD;
$menus[’timing’][] =<<<EOD
{$QE_lang[’QE_total_time’]}: [^t^]
EOD;
DropboxUploader -- Upload files to a Dropbox account.
DIG -- Dynamic Image Generator
gus -- Google URL Shortener
makeQR -- Uses google chart api to make QR codes.
MODxTweeter -- Update your twitter status on publish.
Is this even close? I am stuck. Any help?
DropboxUploader -- Upload files to a Dropbox account.
DIG -- Dynamic Image Generator
gus -- Google URL Shortener
makeQR -- Uses google chart api to make QR codes.
MODxTweeter -- Update your twitter status on publish.
This is not possible. The Quickedit plugin is executed [tt]OnWebPagePrerender[/tt] which is AFTER the timing strings are injected in to the output.
I put the timing tags inside HTML comments so that anyone not looking for it won’t see it and I can still check the timings on every single page without even having to log in.
You could also put it in a chunck and use a snippet like ManagerOnly to only show the chunck when logged in as manager thus keeping the timings private.
@sirlancelot: ok, thank make a lot more sense now.
@dev_cw: I think i will try that, maybe use the same css as quickedit and make it look more unified.
I could some javascript to "write" into a container on the quickedit menu.
Thanks!
DropboxUploader -- Upload files to a Dropbox account.
DIG -- Dynamic Image Generator
gus -- Google URL Shortener
makeQR -- Uses google chart api to make QR codes.
MODxTweeter -- Update your twitter status on publish.
ok, so this worked. I changed
output.class.inc.php to...
$menus = array (
'content' => array (),
'setting' => array (),
'timing' => array(),
'go' => array ()
);
$menus['timing'][] =<<<EOD
{$QE_lang['QE_query_time']}: <span id="qt">{[^qt^]}</span>
EOD;
$menus['timing'][] =<<<EOD
{$QE_lang['QE_query_count']}: <span id="q">[^q^]</span>
EOD;
$menus['timing'][] =<<<EOD
{$QE_lang['QE_parse_time']}: <span id="p">[^p^]</span>
EOD;
$menus['timing'][] =<<<EOD
{$QE_lang['QE_total_time']}: <span id="t">[^t^]</span>
EOD;
then added some mootool voodo
<script type="text/javascript">
window.addEvent('load', function() {
$('qt').setHTML('[^qt^]');
$('q').setHTML('[^q^]');
$('p').setHTML('[^p^]');
$('t').setHTML('[^t^]');
});
</script>
It only worked when I added it to the template. I tried to make it a plugin to add it to ever page of the front end, but it would not update the timing strings even when I used OnWebPageComplete (which I assumed is the very last thing after OnWebPagePrerender)
DropboxUploader -- Upload files to a Dropbox account.
DIG -- Dynamic Image Generator
gus -- Google URL Shortener
makeQR -- Uses google chart api to make QR codes.
MODxTweeter -- Update your twitter status on publish.
-
☆ A M B ☆
- 24,524 Posts
OnWebPagePrerender is invoked just before the final "echo" statement that sends the parsed document to the server to be rendered, so anything you want in the document has to be added on or before that event.
onWebPageComplete is invoked after the page has been finished and sent to the server, and is only invoked if track_visitors is set to 1. It’s intended for dealing with tracking and statistics.
(Yes, I do spend whole evenings poring over the document.parser.inc.php file. And no, I don’t have a life

)