Автор Тема: Поиск адд-она  (Прочитано 3499 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн AlieN

  • Абыр!=)
  • Ветеран
  • *****
  • Сообщений: 1315
  • +0/-1
  • 2
    • Просмотр профиля
Поиск адд-она
« : 25 Июля 2002, 11:23:43 »
Нужна опция статистики как на ikonboard\'e:

Кол-во запросов и время исполнения, нашел такой хак на vbulletin.org но скачать это хак не могу (не знаю как :()
The Chemical Brothers - Hey Boy Hey Girl (User Friendly Mix)
Peter Presta pres - Set Sail(Peter Presta Apple Jaxx Dub) She S.Sunshine Feat Mila - Bring The Beat Back (Club Mix) Jerry Ropero - Home Alone (Dub Mix)

Оффлайн dusha

  • Фанат форума
  • Постоялец
  • ***
  • Сообщений: 106
  • +0/-0
  • 0
    • Просмотр профиля
    • http://localhost/
Поиск адд-она
« Ответ #1 : 25 Июля 2002, 17:27:01 »
как он называется?
Следи за собой, будь осторожен...

Оффлайн dusha

  • Фанат форума
  • Постоялец
  • ***
  • Сообщений: 106
  • +0/-0
  • 0
    • Просмотр профиля
    • http://localhost/
Поиск адд-она
« Ответ #2 : 25 Июля 2002, 17:32:20 »
+-----------------------------------------------+
vB Load TimeQueries Execution,              |
PHP and MySQL Percent Page Usage,             |
GZIP Compression and PHP Version MICROSTATS   |
Version 1.2                                   |
+-----------------------------------------------+
By Nakkid (vBulletin.org hacker)
Email(Messenger): [email]nakkidone@hotmail.com[/email]
4463Sm9obldvbw==
|
+-----------------------------------------------+
CREDITS                                       |
+-----------------------------------------------+
Chen \'FireFly\' Avinadav
| PHP and MySQL percentage addon.
|
+--------------------------------------------------------------------------+
| This hack will add at the bottom of each vBulletin(powered) page the     |
| following stats:                                                         |
|                                                                          |
| - load time of specified page in microseconds                            |
| - number of queries executed                                             |
| - PHP percent page usage                                                 |
| - MySQL percent page usage                                               |
| - browser GZIP library compression status                                |
| - server PHP version                                                     |
+--------------------------------------------------------------------------+
|
+-----------------------------------------------+
| FILES TO MODIFY:
+--------------------------------------------------------------------------+
| forum/admin/db_mysql.php
| forum/admin/functions.php
+--------------------------------------------------------------------------+
|
|
+-----------------------------------------------+
| INSTALL STEPS                                 |
+-----------------------------------------------+
|
+-----------------------------------------------+
| File: forum/admin/db_mysql.php (1 change)     |
+-----------------------------------------------+
| 1. Find this code:
+--------------------------------------------------------------------------+
    if ($showqueries) {
      echo "Query: $query_string\\n";

      global $pagestarttime;
      $pageendtime=microtime();
      $starttime=explode(" ",$pagestarttime);
      $endtime=explode(" ",$pageendtime);

      $beforetime=$endtime[0]-$starttime[0]+$endtime[1]-$starttime[1];

      echo "Time before: $beforetime\\n";
    }

    $this->query_id = mysql_query($query_string,$this->link_id);
    if (!$this->query_id) {
      $this->halt("Invalid SQL: ".$query_string);
    }

    $query_count++;

    if ($showqueries) {
      $pageendtime=microtime();
      $starttime=explode(" ",$pagestarttime);
      $endtime=explode(" ",$pageendtime);

      $aftertime=$endtime[0]-$starttime[0]+$endtime[1]-$starttime[1];
      $querytime+=$aftertime-$beforetime;

      echo "Time after:  $aftertime\\n";
+--------------------------------------------------------------------------+
|
+-----------------------------------------------+
| Replace it with:
+--------------------------------------------------------------------------+
    global $pagestarttime;
    $pageendtime=microtime();
    $starttime=explode(" ",$pagestarttime);
    $endtime=explode(" ",$pageendtime);

    $beforetime=$endtime[0]-$starttime[0]+$endtime[1]-$starttime[1];

    $this->query_id = mysql_query($query_string,$this->link_id);
    if (!$this->query_id) {
      $this->halt("Invalid SQL: ".$query_string);
    }

    $query_count++;

    $pageendtime=microtime();
    $starttime=explode(" ",$pagestarttime);
    $endtime=explode(" ",$pageendtime);

    $aftertime=$endtime[0]-$starttime[0]+$endtime[1]-$starttime[1];
    $querytime+=$aftertime-$beforetime;

    if ($showqueries) {
      echo "Query: $query_string\\n";
      echo "Time before: $beforetime\\n";
      echo "Time after:  $aftertime\\n";
+--------------------------------------------------------------------------+
|
|
+-----------------------------------------------+
| File: forum/admin/functions.php (1 change)    |
+-----------------------------------------------+
| 1. Find this code:
+--------------------------------------------------------------------------+
  if ($showqueries) {
    $pageendtime=microtime();

    $starttime=explode(" ",$pagestarttime);
    $endtime=explode(" ",$pageendtime);

    $totaltime=$endtime[0]-$starttime[0]+$endtime[1]-$starttime[1];

    $vartext.="<!-- Page generated in $totaltime seconds with $query_count queries -->";
  }
+--------------------------------------------------------------------------+
|
+-----------------------------------------------+
| Replace it with:
+--------------------------------------------------------------------------+
  $pageendtime=microtime();

  $starttime=explode(" ",$pagestarttime);
  $endtime=explode(" ",$pageendtime);
  $totaltime=$endtime[0]-$starttime[1];

  // time format (how many digits you want to show)
  $digits="7";

  $trimmedtime=number_format($totaltime,$digits);

  if (strstr($HTTP_SERVER_VARS[\'HTTP_ACCEPT_ENCODING\'], \'gzip\')) {
    $gziptext=" with GZIP compression library enabled";
  } else {
    $gziptext=" with GZIP compression library disabled";
  }

  $debugmode=(DEBUG)?"(Debug mode)":"";
  $versionphp=phpversion();
  $percentphp=number_format(((($totaltime-$querytime)/$totaltime)*100), 2)."% PHP";
  $percentsql=number_format((($querytime/$totaltime)*100), 2)."% MySQL";

  $vartext.="<center><smallfont>Page generated in $trimmedtime ($percentphp - $percentsql) seconds with $query_count queries.
             
PHP version $versionphp $debugmode$gziptext.</smallfont></center>";
+--------------------------------------------------------------------------+
|
|
+-----------------------------------------------+
| FINAL STEPS                                   |
+-----------------------------------------------+
|
| The variables you can use are:
|
| $digits      - number of digits for microtime
| $trimmedtime - the time your page is loaded
| $query_count - number of queries executed
| $versionphp  - PHP version
| $percentphp  - PHP percent page usage
| $percentsql  - MySQL percent page usage
| $gziptext    - GZIP compression library
| $debugmode   - script Debug mode
|
| NOTE: If you want to have more(less) then 7 digits in your microtime, change
|       value 7 to what ever suits better your forum.
|
|
| Upload the modified file. You are done.
+--------------------------------------------------------------------------+
Следи за собой, будь осторожен...

Оффлайн dusha

  • Фанат форума
  • Постоялец
  • ***
  • Сообщений: 106
  • +0/-0
  • 0
    • Просмотр профиля
    • http://localhost/
Поиск адд-она
« Ответ #3 : 25 Июля 2002, 17:33:34 »
должен быть вот этот, если не он, то скажи как тот называется...
Следи за собой, будь осторожен...

Оффлайн AlieN

  • Абыр!=)
  • Ветеран
  • *****
  • Сообщений: 1315
  • +0/-1
  • 2
    • Просмотр профиля
Поиск адд-она
« Ответ #4 : 25 Июля 2002, 17:52:01 »
dusha
сенькс именно то что я искал
спасибачки
The Chemical Brothers - Hey Boy Hey Girl (User Friendly Mix)
Peter Presta pres - Set Sail(Peter Presta Apple Jaxx Dub) She S.Sunshine Feat Mila - Bring The Beat Back (Club Mix) Jerry Ropero - Home Alone (Dub Mix)

 

Sitemap 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28