Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

2506 Posts in 649 Topics- by 1315 Members - Latest Member: jfields

eTicket CommunitySupportTips & Tricks (Moderators: jason, Hummdis)Topic: Database Look Cleanup...
Pages: [1]   Go Down
Print
Author Topic: Database Look Cleanup...  (Read 1508 times)
0 Members and 1 Guest are viewing this topic.
Hummdis
Moderator
Super Member
*****

Karma: +13/-0
Offline Offline

Posts: 558



WWW
« on: March 24, 2009, 09:08:31 AM »

Have you ever noticed the look of the page when you optimize the DB or when you check the status of the DB?  The layout is not the greatest is it?  I've changed that. Smiley

Here's what you need to do:

1. Open the file inc/admin_db.php and right about line 40 you should see:

Code:
$vars['optimize'][] = LANG_DB_OPTIMIZING ." $table... " . table_status($table, 'Data_free') . LANG_DB_OPTIMIZED;

Now, change that line from whatever you have to this:

Code:
$vars['optimize'][] = "<TD WIDTH='40%' CLASS='mainTable'> " . LANG_DB_OPTIMIZING ." $table" . "</TD><TD WIDTH='60%' CLASS='mainTable'>" . table_status($table, 'Data_free') . LANG_DB_OPTIMIZED . "</TD>";

2. Next, open the inc/admin_db.html.php file and around line 92 you should see the following code (hint: it's the very end of this file):

Code:
<?php
} elseif ($_POST['suba'] == 'optimize') {
?>

    <DIV CLASS="admin" ID="db">
    <?php
    
foreach($vars['optimize'] as $result) {
echo $result
    
}
    
?>

    </DIV>
<?php
}
?>

Or something of that sort....I had to do my best to remember what the original code looked like. Smiley  Now, change this section to this:

Code:
<?php
} elseif ($_POST['suba'] == 'optimize') {
?>

    <DIV CLASS="admin" ID="db">
    <?php
    
foreach($vars['optimize'] as $result) {
?>

    <TABLE BORDER="0" WIDTH="50%">
        <TR><?php echo $result;?></TR>
</TABLE>
<?php
    
}
    
?>

    </DIV>
<?php
}
?>

That's it!  Save your files and visit the Database page, then click on the "Database Status" button and the "Optimize Database" buttons.  Much easier to read! Smiley
Logged

Don't PM me directly for help.  Post to the forums, that's what they are for after all.  PM's to me that request help will be ignored.

Hummdis Communications - Freelance Website Design & IT Consulting
Hauzer
New Member
*

Karma: +0/-0
Offline Offline

Posts: 12


« Reply #1 on: March 28, 2009, 10:38:25 AM »

Whoa, thanks for the Tip.

Just so you users know, instead of optimizing and listing all the text, it instead lists it with tables behind them. It's definitely worth doing, it's not even too complex.

Thanks,
Hauzer.
Logged
Hummdis
Moderator
Super Member
*****

Karma: +13/-0
Offline Offline

Posts: 558



WWW
« Reply #2 on: April 27, 2009, 04:26:29 PM »

I wrote this before eTicket had the DB functionality that is does now...if that matters at all. Smiley
Logged

Don't PM me directly for help.  Post to the forums, that's what they are for after all.  PM's to me that request help will be ignored.

Hummdis Communications - Freelance Website Design & IT Consulting
eTicket Community
   

 Logged
Pages: [1]   Go Up
Print
eTicket CommunitySupportTips & Tricks (Moderators: jason, Hummdis)Topic: Database Look Cleanup...
Jump to: