News:

CPG Release 1.6.28
added submissions from {406man}
cleaned up a few PHP (8.4) deprecations
fixed PHP deprecation in calendar
removed security vulnerability
(please upgrade when possible)

Main Menu

[ Page generation: 0.1925s ][ DB Queries: 13 (0.1393s) ]

Started by luchtzak, July 18, 2006, 10:18:48 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

luchtzak

Does this exist for the coppermine gallery?

[ Page generation: 0.1925s ][ DB Queries: 13 (0.1393s) ]

or

Script Execution Time: 0.20084 | SQL Queries: 10

many of the popular softwares have this, perhaps it can be programmed for coppermine too?

any suggestion where to find?

Abbas Ali

Chief Geek at Ranium Systems

Nibbler

It's not visible to regular users, is that what you are requesting ?

luchtzak

it's not that what I am looking for.

I would like to see on the bottom of every page a message saying:

this page has been generated in xxx seconds with xx db queries made. e.g. on the bottom of my website: www.luchtzak.be or http://top-100.luchtzak.be/

Abbas Ali

If you are using cpg1.4.x then you can do the following ...

Create a new script called 'customFooter.php' with code given below and place it in your coppermine folder.


<?php
    
global $cpg_time_start$query_stats;

    
$time_end cpgGetMicroTime();
    
$time round($time_end $cpg_time_start3);
    
$query_count count($query_stats);
    
$total_query_time array_sum($query_stats);
    echo 
'<p align="center">[ Page generation: '.$time.'s ][ DB Queries: '.$query_count.' ('.$total_query_time.'s)]</p>';
?>



then log in to the gallery, go to config page and change the value of Path to custom footer include to customFooter.php

This should show the stats at the bottom of every page to every user.
Chief Geek at Ranium Systems

Sami

‍I don't answer to PM with support question
Please post your issue to related board

Paver

From the first post, this sounded like a support request rather than a feature request.

And now with Abbas' code contribution, maybe this thread belongs on the Mods/Add-ons board under Stats.

luchtzak

Nice programming abbas!

1 item though is the database queries are not shown: http://coppermine.luchtzak.be/displayimage.php?pos=-9043

running 1.4.8 stable

Nibbler

functions.inc.php, change


        if (isset($CONFIG['debug_mode']) && (($CONFIG['debug_mode']==1) || ($CONFIG['debug_mode']==2) )) {
                $duration = round($query_end - $query_start, 3);
                $query_stats[] = $duration;
                $queries[] = "$query ({$duration}s)";
        }


to


        //if (isset($CONFIG['debug_mode']) && (($CONFIG['debug_mode']==1) || ($CONFIG['debug_mode']==2) )) {
                $duration = round($query_end - $query_start, 3);
                $query_stats[] = $duration;
                $queries[] = "$query ({$duration}s)";
        //}


Shame about that, would have been an easy plugin otherwise. Moving to mods board.

filmman

nice one that worked for me, been looking for something like that

Joachim Müller

@Nibbler: maybe we should add another plugin hook for cpg1.5.x to allow a full pluginized version?

Nibbler

Yes, would be useful to have a hook in cpg_db_query.