Obsah fóra
PravidláRegistrovaťPrihlásenie




Odpovedať na tému [ Príspevkov: 2 ] 
AutorSpráva
Offline

Užívateľ
Užívateľ
Obrázok užívateľa

Registrovaný: 20.05.06
Prihlásený: 16.01.07
Príspevky: 99
Témy: 23
Bydlisko: 10m od PC
Príspevok NapísalOffline : 20.05.2006 11:16

Niekde som to tu niekedy našiel nejaký mod čo vypísal na spodku fóra nejaké informácie z DB
Citácia:
[ Načítanie: 0.2s ] :: [ 8 Queries ] :: [ 23,999 stránok za dnes ] :: [ Dnes DB: 339,313 ] :: [ Max DB: 3,672,481 ]

pls dajte mi sem odkaz na ten príspevok


Offline

Prevádzkovateľ fóra
Prevádzkovateľ fóra
Výpisi z DB v phpBB

Registrovaný: 01.05.05
Príspevky: 13348
Témy: 1496
Bydlisko: Bratislava
Príspevok NapísalOffline : 20.05.2006 11:20

Install One

Kód:
////////////////////////////////////////////////////////////////////////////
///                           ___                 
///                          /  /\                ___     
///    ###       ###        /  /::\              /  /\   
///  ##    ####     ##     /  /:/\:\            /  /:/   
/// ##    ##   ##    ##   /  /:/~/::\          /__/::\   
/// ##    ##         ##  /__/:/ /:/\:\         \__\/\:\__
/// ##    ##   ##    ##  \  \:\/:/__\/  /ŻŻŻ/     \  \:\/\
///  ##    ####     ##    \  \::/                  \__\::/
///    ###       ###       \  \:\                  /__/:/
///                         \  \:\                 \__\/ 
///                          \__\/               
////////////////////////////////////////////////////////////////////////////

/***************************************************************************
 *                              Footer Mod
 *                            ---------------
 *      Version         : 1.0.0
 *      Email         : austin_inc@hotmail.com
 *      Site         : austin-inc.com/
 *      Copyright      : © aUsTiN-Inc 2003/4
 *
 ***************************************************************************/

If your reading this, you have either deleted the previous hack to do this or its a first
time install. If neither of those are true, please refer back to the ReadMe

#
#-----[ OPEN ]------------------------------------------
#

extension.inc

#
#-----[ FIND ]------------------------------------------
#

$starttime = 0;

#
#-----[ REPLACE WITH ]----------------------------------
#

// Added by Smartor - BEGIN

$mtime = microtime();
$mtime = explode(" ",$mtime);
$mtime = $mtime[1] + $mtime[0];
$starttime = $mtime;

// Added by Smartor - END

#
#-----[ CLOSE & SAVE ]----------------------------------
#

#
#-----[ OPEN ]------------------------------------------
#

includes/functions.php

#
#-----[ FIND ]------------------------------------------
#

?>

#
#-----[ BEFORE ADD ]------------------------------------
#

/* Start Page Views, Queries Today & Queries Top By aUsTiN (http://austin-inc.com/Blend) */

function UpdatePageView()
   {
   global $db, $table_prefix;
   
      $q1 = "UPDATE ". $table_prefix ."page_view_count
            SET views = views + 1";
      $r1 = $db -> sql_query($q1);   
   return;   
   }
   
function SelectPageViewDate()
   {
   global $db, $table_prefix;
   
      $q = "SELECT *
            FROM ". $table_prefix ."page_view_count";
      $r      = $db -> sql_query($q);
      $row    = $db -> sql_fetchrow($r);      
      $pvd    = $row['date'];   
   
   return $pvd;   
   }
      
function PageViewsToday()
   {
   global $db, $table_prefix;
   
      $q = "SELECT *
            FROM ". $table_prefix ."page_view_count";
      $r      = $db -> sql_query($q);
      $row    = $db -> sql_fetchrow($r);      
      $pvv    = $row['views'];   
   
   return $pvv;   
   }
         
function ResetPageViews($date)      
   {
   global $db, $table_prefix;
      
      $q1 = "UPDATE ". $table_prefix ."page_view_count
            SET views = '1', date = '$date'";
      $r1 = $db -> sql_query($q1);
      
   return;   
   }
   
function SelectQueries()
   {
   global $db, $table_prefix;
   
      $q = "SELECT *
            FROM ". $table_prefix ."todays_queries";
      $r      = $db -> sql_query($q);
      $row    = $db -> sql_fetchrow($r);      
      $tqd    = $row['date'];
      $otq1    = $row['total'];
      $otq   = number_format($otq1);
            
      $q = "SELECT *
            FROM ". $table_prefix ."top_queries";
      $r      = $db -> sql_query($q);
      $row    = $db -> sql_fetchrow($r);      
      $top_1    = $row['total'];
      $top_d    = $row['day'];
      $set   = strftime("%b. %d, %Y @ %H:%M:%S", $top_d);
      $top_q    = number_format($top_1);             
                  
      $show_in_footer_today    = "Todays DB Queries: $otq";
      $show_in_footer_top      = "Highest Query Load: $top_q Queries On $set";       
      $show_data            = $show_in_footer_today ."/". $show_in_footer_top ."/". $tqd;
   return $show_data;   
   }   
   
function UpdateQueryCount($excuted_queries)
   {
   global $db, $table_prefix;
   
      $q1 = "UPDATE ". $table_prefix ."todays_queries
            SET total = total + $excuted_queries";
      $r1 = $db -> sql_query($q1);   
   return;
   }
   
function UpdateQueryTop($tqt, $excuted_queries)
   {
   global $db, $table_prefix;
   
      $q1 = "UPDATE ". $table_prefix ."top_queries
            SET total = '$tqt', day = '". time() ."'";
      $r1 = $db -> sql_query($q1);
         
   return;
   }
      
function ResetTodaysQueries($excuted_queries, $date)
   {
   global $db, $table_prefix;
   
      $q1 = "UPDATE ". $table_prefix ."todays_queries
            SET total = '$excuted_queries', date = '$date'";
      $r1 = $db -> sql_query($q1);
         
   return;
   }
         
function QueryDateCheck()
   {
   global $db, $table_prefix;

      $q = "SELECT total
            FROM ". $table_prefix ."todays_queries";
      $r      = $db -> sql_query($q);
      $row    = $db -> sql_fetchrow($r);      
      $tqt    = $row['total'];
      
      $q = "SELECT *
            FROM ". $table_prefix ."top_queries";
      $r      = $db -> sql_query($q);
      $row    = $db -> sql_fetchrow($r);      
      $tq    = $row['total'];
      $qd      = $row['day'];
      
      $show_data = "$tqt,$tq,$qd";
   return $show_data;   
   }   
   
/* Finished Page Views, Queries Today & Queries Top By aUsTiN (http://austin-inc.com/Blend) */

#
#-----[ CLOSE & SAVE ]----------------------------------
#

#
#-----[ OPEN ]------------------------------------------
#

includes/page_tail.php

#
#-----[ FIND ]------------------------------------------
#

$template->set_filenames(array(
   'overall_footer' => ( empty($gen_simple_header) ) ? 'overall_footer.tpl' : 'simple_footer.tpl')
);

#
#-----[ Add After ]-------------------------------------
#

/* Start Page Views, Queries Today & Queries Top By aUsTiN (http://austin-inc.com/Blend) */

   /* Start © Smartors Page generation time for Admin only Hack */
   $excuted_queries       = $db -> num_queries;
   $mtime                = microtime();
   $mtime                = explode(" ",$mtime);
   $mtime                = $mtime[1] + $mtime[0];
   $endtime             = $mtime;
   $gentime             = round(($endtime - $starttime), 1);
   /* End   © Smartors Page generation time for Admin only Hack */
      
   $date                = date("Y-m-d");   
   $pvd               = SelectPageViewDate();
   
   if($pvd == $date)
      {
   UpdatePageView();   
      }
   else
      {
   ResetPageViews($date);   
      }   
      
   $pvv               = PageViewsToday();
   $pvt               = number_format($pvv);
   $spvt               = "$pvt Page(s) Viewed Today.";   
   $data_to_explode       = SelectQueries();
   $explode_it          = explode("/", $data_to_explode);
   $show_in_footer_today    = $explode_it[0];
   $show_in_footer_top    = $explode_it[1];
   $tqd                = $explode_it[2];
   
      if($tqd == $date)
         {
      UpdateQueryCount($excuted_queries);
            
      $date_to_explode    = QueryDateCheck();
      $explode_it_2      = explode(",", $date_to_explode);
      $tqt             = $explode_it_2[0];
      $tq             = $explode_it_2[1];
      $qd             = $explode_it_2[2];
      
      if($tqt > $tq)
         {
      UpdateQueryTop($tqt, $excuted_queries);         
         }
      }
      else
      {
      ResetTodaysQueries($excuted_queries, $date);      
      }
            
   $template->assign_vars(array(
      'GENERATION_TIME'       => $gentime,
      'NUMBER_QUERIES'       => $excuted_queries,
      'OVERALL_QUERIES_TODAY' => $show_in_footer_today,
      'OVERALL_QUERIES_TOP'    => $show_in_footer_top,
      'OVERALL_PAGES_VIEWED'   => $spvt,      
      )
   );

   $template->assign_block_vars('generation_time_switch', array() );
   
/* Finished Page Views, Queries Today & Queries Top By aUsTiN (http://austin-inc.com/Blend) */

#
#-----[ Close & Save ]----------------------------------
#

#
#-----[ OPEN ]------------------------------------------
#

templates/YOUR_TEMPLATE/overall_footer.tpl

#
#-----[ FIND / OR SIMILAR TO THIS ]---------------------
#

Powered by <a href="http://www.phpbb.com/" target="_phpbb" class="copyright">phpBB</a> {PHPBB_VERSION} © 2002

#
#-----[ ADD AFTER ]-------------------------------------
#

<br />
:: [ Load Time: {GENERATION_TIME} Seconds ] :: [ {NUMBER_QUERIES} Queries ] :: [ {OVERALL_PAGES_VIEWED} ] ::
<br />
:: [ {OVERALL_QUERIES_TODAY} ] :: [ {OVERALL_QUERIES_TOP} ] ::

#
#-----[ CLOSE & SAVE ]----------------------------------
#

EoM


Install Two

Kód:
////////////////////////////////////////////////////////////////////////////
///                           ___                 
///                          /  /\                ___     
///    ###       ###        /  /::\              /  /\   
///  ##    ####     ##     /  /:/\:\            /  /:/   
/// ##    ##   ##    ##   /  /:/~/::\          /__/::\   
/// ##    ##         ##  /__/:/ /:/\:\         \__\/\:\__
/// ##    ##   ##    ##  \  \:\/:/__\/  /ŻŻŻ/     \  \:\/\
///  ##    ####     ##    \  \::/                  \__\::/
///    ###       ###       \  \:\                  /__/:/
///                         \  \:\                 \__\/ 
///                          \__\/               
////////////////////////////////////////////////////////////////////////////

/***************************************************************************
 *                              Footer Mod
 *                            ---------------
 *      Version         : 1.0.0
 *      Email         : austin_inc@hotmail.com
 *      Site         : austin-inc.com/
 *      Copyright      : © aUsTiN-Inc 2003/4
 *
 ***************************************************************************/

If your reading this, this means you already have © Smartors Page generation time for Admin only Hack installed.

#
#-----[ OPEN ]------------------------------------------
#

includes/page_tail.php

#
#-----[ FIND & DELETE ]---------------------------------

// Page generation time for Admin - BEGIN
$gzip_text = ($board_config['gzip_compress']) ? "GZIP compression enabled" : "GZIP compression disabled";
$excuted_queries = $db->num_queries;
$mtime = microtime();
$mtime = explode(" ",$mtime);
$mtime = $mtime[1] + $mtime[0];
$endtime = $mtime;
$gentime = round(($endtime - $starttime), 6);   // You can adjust the number 6

if ($userdata['user_level'] == ADMIN)
{
   $template->assign_vars(array(
      'GENERATION_TIME' => $gentime,
      'NUMBER_QUERIES' => $excuted_queries,
      'GZIP_TEXT' =>  $gzip_text,
      )
   );

   $template->assign_block_vars('generation_time_switch', array() );
}
// Page generation time for Admin - END


#
#-----[ CLOSE & SAVE ]-----------------------------------
#

#
#-----[ OPEN ]------------------------------------------
#

templates/YOUR_TEMPLATE/overall_footer.tpl

#
#-----[ FIND & DELETE ]---------------------------------
#

<!-- BEGIN generation_time_switch -->
<br />
<table width="100%" align="center" border="0" cellpadding="3">
   <tr>
      <td class="row1" align="center">
         <span class="gensmall">
         [ Page generation time: {GENERATION_TIME} seconds ] :: [ {NUMBER_QUERIES} queries excuted ] :: [ {GZIP_TEXT} ]
         </span>
      </td>
   </tr>
</table>
<br />
<!-- END generation_time_switch -->


#
#-----[ CLOSE & SAVE ]-----------------------------------
#


Please open the other install & do a fresh install of my version.

EoM


readme.txt

Kód:
////////////////////////////////////////////////////////////////////////////
///                           ___                 
///                          /  /\                ___     
///    ###       ###        /  /::\              /  /\   
///  ##    ####     ##     /  /:/\:\            /  /:/   
/// ##    ##   ##    ##   /  /:/~/::\          /__/::\   
/// ##    ##         ##  /__/:/ /:/\:\         \__\/\:\__
/// ##    ##   ##    ##  \  \:\/:/__\/  /ŻŻŻ/     \  \:\/\
///  ##    ####     ##    \  \::/                  \__\::/
///    ###       ###       \  \:\                  /__/:/
///                         \  \:\                 \__\/ 
///                          \__\/               
////////////////////////////////////////////////////////////////////////////

/***************************************************************************
 *                              Footer Mod
 *                            ---------------
 *      Version         : 1.0.0
 *      Email         : austin_inc@hotmail.com
 *      Site         : austin-inc.com/
 *      Copyright      : © aUsTiN-Inc 2003/4
 *
 ***************************************************************************/

There are two installs, one is for those who already have © Smartors Page generation time for Admin only Hack
installed & the other is for those who dont. If you already have smartors hack installed
please use Install Two, if you do not have any hacks for the footer that have to do with
page load time & db queries, etc. please use Install One. Now if you have someone elses
hack for the load time etc, find their install & reverse it, delete/undo everything you
previosuly did refering to includes/page_tail.php and templates/YOUR_TEMPLATE/overall_footer.tpl.
As you can see you wont be losing anything, its in this as well.

Any way you go, apply the following to your database. Replace DATE_HERE with todays date,
in the date format YYYY-MM-DD.

# --------------------------------------------------------

#
# Table structure for table `phpbb_page_view_count`
#

CREATE TABLE `phpbb_page_view_count` (
  `date` date NOT NULL default '0000-00-00',
  `views` int(20) NOT NULL default '0'
) TYPE=MyISAM;

#
# Dumping data for table `phpbb_page_view_count`
#

INSERT INTO `phpbb_page_view_count` VALUES ('DATE_HERE', '0');

# --------------------------------------------------------

#
# Table structure for table `phpbb_todays_queries`
#

CREATE TABLE `phpbb_todays_queries` (
  `total` int(100) NOT NULL default '0',
  `date` date NOT NULL default '0000-00-00'
) TYPE=MyISAM;

#
# Dumping data for table `phpbb_todays_queries`
#

INSERT INTO `phpbb_todays_queries` VALUES ('0', 'DATE_HERE');

# --------------------------------------------------------

#
# Table structure for table `phpbb_top_queries`
#

CREATE TABLE `phpbb_top_queries` (
  `total` int(100) NOT NULL default '0',
  `day` int(11) NOT NULL default '0'
) TYPE=MyISAM;

#
# Dumping data for table `phpbb_top_queries`
#

INSERT INTO `phpbb_top_queries` VALUES ('0', '1084654229');

# --------------------------------------------------------


Odpovedať na tému [ Príspevkov: 2 ] 


Podobné témy

 Témy  Odpovede  Zobrazenia  Posledný príspevok 
V tomto fóre nie sú ďalšie neprečítané témy. Hlada sa admin na phpBB!!! Administrator for phpBB needed!!!

v Ponuka práce

3

1856

20.08.2006 11:54

krocan Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. Update z PHPBB 2.0.20 na PHPBB PLUS 1.53

v Redakčné systémy

5

1093

31.08.2006 23:16

JanoF Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. phpbb upgrade témy na vyššiu verziu phpbb

v Redakčné systémy

2

2366

11.06.2014 22:07

marekmikula0 Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. Zmena z phpBB na phpBB plus

v Redakčné systémy

3

818

07.12.2006 19:40

koudy Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. ako na to - phpbb+ na phpbb

v Redakčné systémy

2

2057

18.05.2007 16:37

p360t Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. phpbb

v Ponuka práce

2

1673

16.01.2006 23:31

Luks Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. phpbb

v Redakčné systémy

2

786

04.07.2009 14:08

Flety Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. PHPBB

v Redakčné systémy

6

995

01.04.2007 20:05

Matúš Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. phpBB

v Redakčné systémy

5

1079

12.08.2009 11:33

m.jaros Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. phpbb

v Redakčné systémy

3

780

27.02.2007 11:30

XShady Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. PHPbb favicon

v Redakčné systémy

6

396

06.04.2014 21:06

oktobus0084 Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. PHPBB forum

v Redakčné systémy

0

922

10.11.2008 11:37

Johnnny Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. PHPbb fórum

v Redakčné systémy

13

2758

08.04.2007 22:56

pag Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. phpBB fórum

v Redakčné systémy

1

1144

14.09.2010 21:25

normandy88 Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. phpBB 2

v Redakčné systémy

5

1410

31.03.2006 17:56

maker Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. phpBB SEO

v Redakčné systémy

4

1013

10.07.2008 14:53

Owen Zobrazenie posledných príspevkov


Nemôžete zakladať nové témy v tomto fóre
Nemôžete odpovedať na témy v tomto fóre
Nemôžete upravovať svoje príspevky v tomto fóre
Nemôžete mazať svoje príspevky v tomto fóre

Skočiť na:  

Powered by phpBB Jarvis © 2005 - 2024 PCforum, webhosting by WebSupport, secured by GeoTrust, edited by JanoF
Ako väčšina webových stránok aj my používame cookies. Zotrvaním na webovej stránke súhlasíte, že ich môžeme používať.
Všeobecné podmienky, spracovanie osobných údajov a pravidlá fóra