The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
AdminCP Quick Stats Improvement Details »» | |||||||||||||||||||||||||||||||||
Improved AdminCP Quick Stats:
In admincp/index.php CHANGE LINE 21 FROM: Code:
$specialtemplates = array('maxloggedin', 'acpstats'); Code:
$specialtemplates = array('maxloggedin'); CHANGE LINE 177-179 FROM: (adds "New Window" link at top of AdminCP) Code:
<a href="<?php echo $forumhomelink; ?>" target="_blank"><?php echo $vbphrase['forum_home_page']; ?></a> | <a href="index.php?<?php echo $vbulletin->session->vars['sessionurl']; ?>do=cplogout" onclick="return confirm('<?php echo $vbphrase['sure_you_want_to_log_out_of_cp']; ?>');" target="_top"><?php echo $vbphrase['log_out']; ?></a> </td> TO: Code:
<a href="../<?php echo $vbulletin->options['forumhome']; ?>.php<?php echo $vbulletin->session->vars['sessionurl_q']; ?>" ><?php echo $vbphrase['forum_home_page']; ?></a> | <a href="../<?php echo $vbulletin->options['forumhome']; ?>.php<?php echo $vbulletin->session->vars['sessionurl_q']; ?>" target="_blank">Forum Home (new window)</a> | <a href="index.php?<?php echo $vbulletin->session->vars['sessionurl']; ?>do=cplogout" onclick="return confirm('<?php echo $vbphrase['sure_you_want_to_log_out_of_cp']; ?>');" target="_top"><?php echo $vbphrase['log_out']; ?></a> </td> FIND THIS STARTING AT LINE 817: Code:
// ##### Messages to Moderate $messagecount = $db->query_first(" SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "moderation AS moderation INNER JOIN " . TABLE_PREFIX . "visitormessage AS visitormessage ON (visitormessage.vmid = moderation.primaryid) WHERE moderation.type = 'visitormessage' "); $mailqueue = $vbulletin->db->query_first(" SELECT COUNT(mailqueueid) AS queued FROM " . TABLE_PREFIX . "mailqueue "); REPLACE WITH THIS: Code:
// ##### Messages to Moderate $messagecount = $db->query_first(" SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "moderation AS moderation INNER JOIN " . TABLE_PREFIX . "visitormessage AS visitormessage ON (visitormessage.vmid = moderation.primaryid) WHERE moderation.type = 'visitormessage' "); // ##### Server Load if ($_REQUEST['show'] == 'serverload' || empty($_REQUEST['show'])) { $loadavg = @file_get_contents("/proc/loadavg"); $method = ''; if ($loadavg) { $regs = explode(" ",$loadavg); $serverload='Server Loads: <b>' . $regs[0] .'</b> ' . $regs[1] . ' : ' . $regs[2]; $method = 'file_get_contents("/proc/loadavg")'; } elseif ( $stats = @exec('uptime') ) { preg_match('/averages?: ([0-9\.]+),[\s]+([0-9\.]+),[\s]+([0-9\.]+)/',$stats,$regs); $serverload = '<b>Server Load:</b> ' . $regs[0] .' <font size="1">(1 min, 5 min, 15 min)</font>'; $method = 'exec(uptime)'; } else { $serverload = 'failed'; } }; // ##### Users Online $datecut = TIMENOW - $vbulletin->options['cookietimeout']; $guestsarry = $db->query_first("SELECT COUNT(host) AS sessions FROM " . TABLE_PREFIX . "session WHERE userid = 0 AND lastactivity > $datecut"); $membersarry = $db->query_read("SELECT DISTINCT userid FROM " . TABLE_PREFIX . "session WHERE userid <> 0 AND lastactivity > $datecut"); $guests = intval($guestsarry['sessions']); $members = intval($db->num_rows($membersarry)); $mailqueue = $vbulletin->db->query_first(" SELECT COUNT(mailqueueid) AS queued FROM " . TABLE_PREFIX . "mailqueue "); FIND IN LINE 868: (reorganizes stats and adds additional stats) Code:
print_cells_row(array( $vbphrase['mysql_max_packet_size'], vb_number_format($maxpacket, 2, 1), $vbphrase['new_posts_today'], vb_number_format($vbulletin->acpstats['newposts']), $vbphrase['queued_emails'], vb_number_format($mailqueue['queued']) ), 0, 0, -5, 'top', 1, 1); } else { REPLACE WITH: Code:
print_cells_row(array( $vbphrase['mysql_max_packet_size'], vb_number_format($maxpacket, 2, 1), $vbphrase['users_online'], construct_phrase($vbphrase['x_y_members_z_guests'], vb_number_format($guests + $members), vb_number_format($members), vb_number_format($guests)), $vbphrase['new_posts_today'], vb_number_format($vbulletin->acpstats['newposts']) ), 0, 0, -5, 'top', 1, 1); print_cells_row(array( 'vBulletin Software Version', $vbulletin->options['templateversion'], 'Server Load (1 min, 5 min, 15 min)', $loadavg = '' . $regs[1] .' | '. $regs[2] .' | '. $regs[3] .'', $vbphrase['queued_emails'], vb_number_format($mailqueue['queued']) ), 0, 0, -5, 'top', 1, 1); } else { FIND IN LINE 910/911: (Adds Memory Usage data block) Code:
print_table_footer(); ($hook = vBulletinHook::fetch_hook('admin_index_main1')) ? eval($hook) : false; REPLACE WITH: Code:
print_table_footer(); if ($_REQUEST['show'] == 'memoryusage' || empty($_REQUEST['show'])) { print_form_header('', ''); exec('free -m', $mem); print_table_header('Memory Usage');print_description_row('<pre>'.implode('<br />', $mem).'</pre>'); print_table_footer(); } ($hook = vBulletinHook::fetch_hook('admin_index_main1')) ? eval($hook) : false; FIND IN LINE 1020: Code:
'http://www.vbulletin.com/docs/html/' => $vbphrase['reference_manual'] PLACE THIS DIRECTLY BELOW IT: (Adds vbulletin.org in the quick links) Code:
'http://www.vbulletin.org/' => 'vBulletin.org' Add the attached file (server_info.php) to your AdminCP folder. (Edit line 116 to include your database information: "localhost", "dbuser", "dbpassword", "dbname") See attached images for the enhancements. Enjoy! Download Now
Screenshots
Show Your Support
|
Comments |
#2
|
|||
|
|||
Love this. Please plugin this.
|
#3
|
||||
|
||||
It can't be done. It requires editing files.
Plugins can do some useful staff, but can't touch files. |
#4
|
|||
|
|||
Can you help me vb 4.2.0?
|
#5
|
|||
|
|||
Looks like you may have forgetten to add this part:
Code:
************************************* FIND IN LINE 817: // ##### Messages to Moderate $messagecount = $db->query_first(" SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "moderation AS moderation INNER JOIN " . TABLE_PREFIX . "visitormessage AS visitormessage ON (visitormessage.vmid = moderation.primaryid) WHERE moderation.type = 'visitormessage' "); And place this directly after: // ##### Server Load if ($_REQUEST['show'] == 'serverload' || empty($_REQUEST['show'])) { $loadavg = @file_get_contents("/proc/loadavg"); $method = ''; if ($loadavg) { $regs = explode(" ",$loadavg); $serverload='Server Loads: <b>' . $regs[0] .'</b> ' . $regs[1] . ' : ' . $regs[2]; $method = 'file_get_contents("/proc/loadavg")'; } elseif ( $stats = @exec('uptime') ) { preg_match('/averages?: ([0-9\.]+),[\s]+([0-9\.]+),[\s]+([0-9\.]+)/',$stats,$regs); $serverload = '<b>Server Load:</b> ' . $regs[0] .' <font size="1">(1 min, 5 min, 15 min)</font>'; $method = 'exec(uptime)'; } else { $serverload = 'failed'; } }; // ##### Users Online $datecut = TIMENOW - $vbulletin->options['cookietimeout']; $guestsarry = $db->query_first("SELECT COUNT(host) AS sessions FROM " . TABLE_PREFIX . "session WHERE userid = 0 AND lastactivity > $datecut"); $membersarry = $db->query_read("SELECT DISTINCT userid FROM " . TABLE_PREFIX . "session WHERE userid <> 0 AND lastactivity > $datecut"); $guests = intval($guestsarry['sessions']); $members = intval($db->num_rows($membersarry)); ************************************** and this: Code:
************************************* FIND near Line 910: print_table_footer(); ($hook = vBulletinHook::fetch_hook('admin_index_main1')) ? eval($hook) : false; REPLACE WITH: print_table_footer(); if ($_REQUEST['show'] == 'memoryusage' || empty($_REQUEST['show'])) { print_form_header('', ''); exec('free -m', $mem); print_table_header('Memory Usage');print_description_row('<pre>'.implode('<br />', $mem).'</pre>'); print_table_footer(); } ($hook = vBulletinHook::fetch_hook('admin_index_main1')) ? eval($hook) : false; ************************************* |
#6
|
|||
|
|||
Yes done everything exactly
here is my index.php have tried everything without success |
#7
|
|||
|
|||
Try this one, it is the full AdminCP index.php file minus the header and footer, just cut and paste it into yours and see if it works.
Let me know! |
#8
|
|||
|
|||
Unfortunately it did not work
|
#9
|
|||
|
|||
Must be something with 4.2.0, if you upgrade to 4.2.2 or 4.2.3 it'll work.
|
#10
|
|||
|
|||
Quote:
so have now update made to 4.2.3 but still it does not work still same error |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|