The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
makelabelcode...
Can someone please help me with this? I want to be able to call up this file for the information in it for the server load and add it to quik stats. I know it's not right yet.
Code:
makelabelcode('Server Uptime', 'uptime.php'); |
#2
|
||||
|
||||
What?
|
#3
|
||||
|
||||
There's a small hack out that gives the server uptime according to the db. Here is the code I have in my phpinclude:
Code:
//Server Uptime Code $result = mysql_query("show status"); while ($row = mysql_fetch_array($result)){ if ($row['Variable_name'] == "Uptime") { $uptime = $row['Value']; } } $days = ((($uptime/60)/60)/24); $wholeday = (int) $days; $hours = (($days - $wholeday)*24); $wholehour = (int) $hours; $minutes = (($hours - $wholehour)*60); $wholeminute = (int) $minutes; Code:
makelabelcode('Server Uptime', 'whatever I need to put here'); |
#4
|
||||
|
||||
Code:
makelabelcode('Server Uptime', "whatever variables you want here"); $days $wholedays $hours $wholehours $minutes $wholeminutes So for example you can do this: Code:
makelabelcode('Server Uptime', "$wholedays days, $wholehours hours and $wholeminutes minutes."); |
#5
|
||||
|
||||
Thanks, Chen. I forgot about the double quotes. I was trying to do it with single quotes.
Is there an easier way to have it say like 1 day instead of 1 days than what I did here? Maybe a global way for all of the s variables instead of having to do them one at a time here? PHP Code:
PHP Code:
|
#6
|
||||
|
||||
There's no easier way, no.
|
#7
|
||||
|
||||
Thanks, Chen. I didn't think there was an easier way.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|