Welcome, Guest. Please Login or Register.
May 07, 2025, 04:33:13 PM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  page info and such at bottom « previous next »
Pages: [1] Reply Ignore Print
Author Topic: page info and such at bottom  (Read 397 times)
misfits7702
Noobie
*
Posts: 18


I'm a big, fat, hairy, smelly, spitting llama!

page info and such at bottom
« on: October 28, 2002, 11:07:45 PM »
Reply with quote

i cant seem to find this mod, it prints out at the bottom of page:

Generated In: 0.93489384 seconds | MySQL Queires: 17 | Server Load: 4.29

if nobody know where to get it tell me some of the code and stuff or make it for me
Logged
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:page info and such at bottom
« Reply #1 on: October 29, 2002, 01:14:31 AM »
Reply with quote

Quote from: misfits7702 on October 28, 2002, 11:07:45 PMGenerated In: 0.93489384 seconds
its already in Subs.php but commented, dunno why

QuoteMySQL Queires: 17
it can be done, but will require editing everywhere a query is executed
there's been discussions about these, but long time ago (cant remember where)

QuoteServer Load: 4.29
no clue about this one...
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
1979Z28
Sr. Member
****
Posts: 324


WWW
Re:page info and such at bottom
« Reply #2 on: October 29, 2002, 02:26:07 AM »
Reply with quote

So in order to get this to work, you should un comment it? ;)
Logged
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:page info and such at bottom
« Reply #3 on: October 29, 2002, 04:08:28 AM »
Reply with quote

http://www.yabb.info/community/index.php?board=137;action=display;threadid=10597;start=0
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
groundup
Disciple of Joe, Head Cleric
Mod Team
YaBB God
*****
Posts: 2983


Error 309: Please notify the administrator of this

WWW
Re:page info and such at bottom
« Reply #4 on: October 29, 2002, 05:37:42 AM »
Reply with quote

the time thingy doesn't really work. to find out how many queries are used, just find a batch replacer and replace mysql_query with yyquery and create a function in subs called yyquery(). have that add a number each time a query is called. it is pretty self explanitory
Logged

http://www.fastfinancialfreedom.org - financial freedom is a myth
http://www.fastfinancialfreedom.org - financial freedom is a myth
http://www.fastfinancialfreedom.org - financial freedom is a myth
fastfinancialfreedom.org
misfits7702
Noobie
*
Posts: 18


I'm a big, fat, hairy, smelly, spitting llama!

Re:page info and such at bottom
« Reply #5 on: October 30, 2002, 02:56:26 AM »
Reply with quote

ok well i have no true knowledge of php so anyone please someone tell me really detailed how to do it
Logged
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:page info and such at bottom
« Reply #6 on: October 31, 2002, 06:48:57 AM »
Reply with quote

the time thing works, i uncommented it, and it works fine :)
i also just added the query counter, as groundup suggested
to do this:
0. Make backups ;)
1. open all files in Sources directory in a text editor program that can do batch replace.
2. replace "mysql_query(" with "yyDBquery("
3. in Subs.php replace totalTime function with these function totalTime($comment) {
   global $start_time,$waste,$endComment;
   list($now,$waste) = explode(" ",microtime());
   $endComment = "$comment: ".($now-$start_time);
   $start_time = $now;
   return $endComment;
}

function yyDBquery($query) {
   global $queryCounter;
   $queryCounter++;
   return mysql_query($query);
}

function yyShowTotalQuery() {
   global $queryCounter;
   $totalTime = totalTime("Page was generated in ")."secs.";
   echo "<font face=\"Verdana, Arial\" size=\"1\">$totalTime | $queryCounter queries executed.</font><br>";
}
4. upload all the contents of Sources directory
5. add this somewhere in index.php to reset the counter $queryCounter = 0; and upload it when done
6. edit forum template and add <yabb showtotalquery> right before <yabb copyright>

it will displays something like this:
Page was generated in : 0.445135secs. | 37 queries executed.
MyForum | Powered by YaBB SE
© 2001-2002, YaBB SE Dev Team. All Rights Reserved.


i dont know if they're accurate or not
in some pages, the query count is quite high
in a normal page (like edit template), there are 9 queries
« Last Edit: October 31, 2002, 06:58:31 AM by Spaceman-Spiff » Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:page info and such at bottom
« Reply #7 on: October 31, 2002, 06:59:27 AM »
Reply with quote

i think the time isnt accurate, its showing - (minus) sometimes
i'll try using mediman's code...
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:page info and such at bottom
« Reply #8 on: November 01, 2002, 11:09:10 PM »
Reply with quote

i've replaced some more mysql_query function to count it
my boardindex:
Page was generated in 0.84028 secs, and 60 queries were executed.
messageindex:
Page was generated in 0.91705 secs, and 66 queries were executed. :o :o
so many queries  ;D
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
misfits7702
Noobie
*
Posts: 18


I'm a big, fat, hairy, smelly, spitting llama!

Re:page info and such at bottom
« Reply #9 on: November 02, 2002, 02:43:11 AM »
Reply with quote

to every file!??! make a mod please someone
Logged
groundup
Disciple of Joe, Head Cleric
Mod Team
YaBB God
*****
Posts: 2983


Error 309: Please notify the administrator of this

WWW
Re:page info and such at bottom
« Reply #10 on: November 02, 2002, 03:46:12 AM »
Reply with quote

the time thing is inaccurate. Very inaccurate.

you must have done somethign wrong for your query script.

I have a mod file but I don't want to upload it. it is huge. so just go to download.com and download a "batch replacer" script
Logged

http://www.fastfinancialfreedom.org - financial freedom is a myth
http://www.fastfinancialfreedom.org - financial freedom is a myth
http://www.fastfinancialfreedom.org - financial freedom is a myth
fastfinancialfreedom.org
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:page info and such at bottom
« Reply #11 on: November 02, 2002, 04:00:57 AM »
Reply with quote

i change the time using microtime() script like in the this page: http://www.php.net/manual/en/function.microtime.php
but it was showing something like: 1534234554.9434134, so i removed the (float)$sec part, and looks like its working...

for the query part, i've replaced some more msql_query, before i didnt change the ones that have a space between mysql_query and ("
now, a normal page has 14 queries, like edit template, i dont know about the accuracy, cuz i dont want to count it one by one :P

well.. maybe i'll count the minimum number of queries...
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
Nemesis
What's an Admin?
Global Moderator
YaBB God
*****
Posts: 2199


WWW
Re:page info and such at bottom
« Reply #12 on: November 02, 2002, 04:10:22 AM »
Reply with quote

http://yapp.phpworld.net/index.php?board=13;action=display;threadid=367
Logged


Want to say thanks?
*************************************
DONATE or check out my WishList
*********************************
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:page info and such at bottom
« Reply #13 on: November 02, 2002, 04:24:40 AM »
Reply with quote

after counting, minimal queries for non-guest when executing an empty page using YSE template:
index.php: 4 queries
Subs.php: 8 queries (only counted the ones in template_header(), timeformat(), writelog(), clicklog())
Load.php: 3 queries (LoadBoard(), LoadUserSettings())
Security.php: 3 queries (banning())
total = 4 + 8 + 3 + 3 = 18

above are assuming if these functions are enabled:
- track stats & hitstats (minus 2 queries if function is disabled)
- shownews (1 query)
- todaymod (1 query)
- guest (4 queries)

count might be a bit inaccurate, but should be close ;)
i dont know how to count the queries inside BoardIndex.php x number of boards
« Last Edit: November 02, 2002, 04:26:26 AM by Spaceman-Spiff » Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  page info and such at bottom « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.062 seconds with 20 queries.