Page timer & MySQL counter for Xoops 2.2.x
Date 2005/8/10 13:50:00 | Topic: Hacks
| Thanks to Mith for revising the code here, and I've also just updated the page timer & MySQL counter smarty plugin so that it works with the new Xoops 2.2.x branch. This plugin allows you to place a single smarty tag in your theme which when executed by the server is replaced with the time taken by the server to generate the page, as well as giving you a total of all MySQL database queries used. If you are installing from new, please just follow the 5 simple installation steps on the next page of this article (also detailed in install.txt file in the download). If you're upgrading from the Xoops 2.0.x version of this plugin, all you should have to do is overwrite the insert.showstat.php specified in installation step 1, and then also add the <{insert name='showstat'}> tag to your themeadmin.html as the administration side of Xoops is also now themeable as of Xoops 2.2. You can download the Page timer & MySQL counter for Xoops 2.2.x IT Headquarters 1) upload insert.showstat.php file to your /class/smarty/plugins directory from your Xoops root folder. 2) Go into your Xoops control panel, and goto System Admin->Preferences Main->General Settings and set the "Update module template .html files from themes/your theme/templates directory?" to yes. 3) Insert the "<{insert name='showstat'}>" minus the "" into your theme.html and themeadmin.html file and view your homepage (you should see something like "0.432 Seconds | 46 Queries" printed at the base of your page). 4) Go into your Xoops control panel, and goto System Admin->Preferences Main->General Settings and set the "Update module template .html files from themes/your theme/templates directory?" to no. 5) Set all your block and caching options to suit your site, and this smarty plugin should now display the execution time and MySQL query count generated for producing every page.
|
|