Footer hack mód [install]

Sem môžete pridávať rozne odkazy a kódy užitočných modifikácií

Moderátor: Moderátori

Footer hack mód [install]

Poslaťod Leachim » Uto Jan 30, 2007 9:22 pm

1. časť:

Kód: Vybrať všetko
////////////////////////////////////////////////////////////////////////////
///                           ___                 
///                          /  /\                ___     
///    ###       ###        /  /::\              /  /\   
///  ##    ####     ##     /  /:/\:\            /  /:/   
/// ##    ##   ##    ##   /  /:/~/::\          /__/::\   
/// ##    ##         ##  /__/:/ /:/\:\         \__\/\:\__
/// ##    ##   ##    ##  \  \:\/:/__\/  /ŻŻŻ/     \  \:\/\
///  ##    ####     ##    \  \::/                  \__\::/
///    ###       ###       \  \:\                  /__/:/
///                         \  \:\                 \__\/ 
///                          \__\/               
////////////////////////////////////////////////////////////////////////////

/***************************************************************************
*                              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


2. časť:

Kód: Vybrať všetko
////////////////////////////////////////////////////////////////////////////
///                           ___                 
///                          /  /\                ___     
///    ###       ###        /  /::\              /  /\   
///  ##    ####     ##     /  /:/\:\            /  /:/   
/// ##    ##   ##    ##   /  /:/~/::\          /__/::\   
/// ##    ##         ##  /__/:/ /:/\:\         \__\/\:\__
/// ##    ##   ##    ##  \  \:\/:/__\/  /ŻŻŻ/     \  \:\/\
///  ##    ####     ##    \  \::/                  \__\::/
///    ###       ###       \  \:\                  /__/:/
///                         \  \:\                 \__\/ 
///                          \__\/               
////////////////////////////////////////////////////////////////////////////

/***************************************************************************
*                              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');

# --------------------------------------------------------
   
Michael Watzke - Osobný blog, Bazár PC, notebookov, Tvorba WWW stránok
Nepíšte mi ohľadom phpBB, neodpovedám...
Obrázok užívateľa
Leachim
Expert
Expert
 
Príspevky: 1123
Registrovaný: Sob Jan 27, 2007 2:34 pm

Poslaťod 8andrej8 » Ned Feb 04, 2007 6:56 pm

a co to vlastene robi?
8andrej8
Návštevník
Návštevník
 
Príspevky: 21
Registrovaný: Ned Feb 04, 2007 6:52 pm

Poslaťod masterdead » Ned Feb 04, 2007 7:24 pm

take slabsie statistiky, priblizne takto
:: [ Stránka načítaná za: 0.1 sekúnd ] :: [ 13 Queries ] :: [ 11,230 Stránok za dnes ] :: [ Quieres za dnes: 157,455 ] :: [ Max Quieres: 331,147 ] ::
Obrázok užívateľa
masterdead
Administrátor
Administrátor
 
Príspevky: 960
Registrovaný: Ned Jan 28, 2007 1:02 pm

Poslaťod UGGY » Pia Feb 09, 2007 4:17 pm

ako to mam dat do slovenciny? co treba prelozit?
UGGY
Prekladateľ
Prekladateľ
 
Príspevky: 27
Registrovaný: Ned Feb 04, 2007 9:38 am

Poslaťod P3T3R » Pia Feb 09, 2007 4:58 pm

UGGY píše:ako to mam dat do slovenciny? co treba prelozit?

Tu to mas cely mod a je to tam aj prelozene:
Kód: Vybrať všetko
////////////////////////////////////////////////////////////////////////////
///                           ___                 
///                          /  /\                ___     
///    ###       ###        /  /::\              /  /\   
///  ##    ####     ##     /  /:/\:\            /  /:/   
/// ##    ##   ##    ##   /  /:/~/::\          /__/::\   
/// ##    ##         ##  /__/:/ /:/\:\         \__\/\:\__
/// ##    ##   ##    ##  \  \:\/:/__\/  /———/     \  \:\/\
///  ##    ####     ##    \  \::/                  \__\::/
///    ###       ###       \  \:\                  /__/:/
///                         \  \:\                 \__\/
///                          \__\/               
////////////////////////////////////////////////////////////////////////////

/***************************************************************************
*                              Footer Mod
*                            ---------------
*      Version         : 1.0.0
*      Email         : austin_inc@hotmail.com
*      Site         : austin-inc.com/
*      Copyright      : © aUsTiN-Inc 2003/4
*      Translated    : Redpoint1
*      Translator e-mail : Redpoint1@azet.sk
*
***************************************************************************/

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

#
#-----[ SQL ]------------------------------------------
#

#
# 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');

#
#-----[ 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    = "Dnes DB dotazov: $otq";
      $show_in_footer_top      = "Najviac dotazov: $top_q dotazov v $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 zobrezených stránok za deň.";   
   $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 />
:: [ Vygenerované za {GENERATION_TIME} sekúnd ] :: [ {NUMBER_QUERIES} dotazov ] :: [ {OVERALL_PAGES_VIEWED} ] ::
<br />
:: [ {OVERALL_QUERIES_TODAY} ] :: [ {OVERALL_QUERIES_TOP} ] ::

#
#-----[ CLOSE & SAVE ]----------------------------------
#
Obrázok užívateľa
P3T3R
Pokročilý
Pokročilý
 
Príspevky: 144
Registrovaný: Štv Feb 01, 2007 11:08 pm
Bydlisko: OraVa

Poslaťod Redpoint1 » Ned Jún 10, 2007 10:29 pm

Ako vidím poslúžil vám môj preložený footer mod :)
Redpoint1
Návštevník
Návštevník
 
Príspevky: 14
Registrovaný: Ned Jún 10, 2007 10:25 pm

Poslaťod huli » Pon Jún 11, 2007 1:08 pm

ja som si footer urobil podla seba generation time mam na 3 desatinne miesta a nezapisuje to do DB tak pise iba cas vygenerovania......je to lepsie a rychlejsie
Pred založením novej témy si prezri FAQ pre phpBB2 / FAQ pre phpBB3 a taktiež použi vyhľadávanie, pretože tvoj problém už môže byť vyriešený.

Obrázok
Obrázok užívateľa
huli
Prekladateľ
Prekladateľ
 
Príspevky: 736
Registrovaný: Ned Apr 29, 2007 6:00 pm
Bydlisko: Žilina -> Solinky

Poslaťod drndos » Pon Jún 11, 2007 4:56 pm

nj ale tie tri desatine miesta som ti neporadil nahodou ja a ani si nenapisal ci funguju
drndos
Moderátor
Moderátor
 
Príspevky: 2555
Registrovaný: Ned Máj 06, 2007 4:32 pm

Poslaťod huli » Pon Jún 11, 2007 6:37 pm

pisal som nebolo to ono ale napisal som ako to urobit tak aby boli na 3 desatinne
Pred založením novej témy si prezri FAQ pre phpBB2 / FAQ pre phpBB3 a taktiež použi vyhľadávanie, pretože tvoj problém už môže byť vyriešený.

Obrázok
Obrázok užívateľa
huli
Prekladateľ
Prekladateľ
 
Príspevky: 736
Registrovaný: Ned Apr 29, 2007 6:00 pm
Bydlisko: Žilina -> Solinky

Poslaťod Dzony » Štv Aug 30, 2007 1:18 pm

chcem sa spytať ked to mam pred tym pridať ???
#-----[ 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 = "Dnes DB dotazov: $otq";
$show_in_footer_top = "Najviac dotazov: $top_q dotazov v $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;
}
Obrázok užívateľa
Dzony
Začiatočník
Začiatočník
 
Príspevky: 67
Registrovaný: Str Aug 29, 2007 2:40 pm

Poslaťod masterdead » Štv Aug 30, 2007 2:25 pm

citat vieme?
Kód: Vybrať všetko
#-----[ OPEN ]------------------------------------------
#

includes/functions.php

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

?>
pred ten znak
Obrázok užívateľa
masterdead
Administrátor
Administrátor
 
Príspevky: 960
Registrovaný: Ned Jan 28, 2007 1:02 pm

Poslaťod mittnick » Štv Nov 22, 2007 10:19 pm

mate niekto k tomuto modu doprogramovane aj "najviac zobrazenych stranok za den" ? ak hej mohli by ste sem hodit script
Obrázok užívateľa
mittnick
Návštevník
Návštevník
 
Príspevky: 6
Registrovaný: Pon Okt 29, 2007 3:18 pm

Poslaťod idea » Pia Nov 23, 2007 10:14 am

jakpsatweb.cz :-P
www.imghost.sk - Zdieľaj svoje obrázky online na novom imghoste !!!

www.pcblog.sk - Diskusný Server (Programovanie, IT Novinky, Security) a mnoho iného
Obrázok užívateľa
idea
Profesionál
Profesionál
 
Príspevky: 245
Registrovaný: Ned Jan 28, 2007 11:38 am
Bydlisko: www.imghost.sk

Poslaťod mittnick » Pia Nov 23, 2007 11:14 am

to si mohol rovno napisat www.google.com, ja som sa pytal na konkretne riesenie...

BTW : za porusenie pravidla o propagovani warezu na tomto fore by som ti hned dal BAN za to warez forum co mas v profile ako bydlisko
Obrázok užívateľa
mittnick
Návštevník
Návštevník
 
Príspevky: 6
Registrovaný: Pon Okt 29, 2007 3:18 pm


Späť na Užitočné modifikácie (phpBB 2)

Kto je on-line

Užívatelia prezerajúci fórum: Žiadny registrovaný užívateľ nie je prítomný a 1 hosť


vladstudio
TOPlist TOPlist

Valid XHTML 1.0 Strict [Valid Atom 1.0]


* Štúrovo ubytovanie *