logo

Member
Member
Offline Offline
Posts: 46
SVN 663: Installer is left aligned, when elements have align=center w/FIX

I had to take a break from my admin panel overhaul. Decided to find and squash some bugs.

First up, I see in the installer someone tried to center the installer tables. I checked in IE8 and FF 3.5.3, and neither was centering the tables right. Basically, what's happening is the align=center isn't working on Table elements.

One way to fix it, which doesn't seem to cause any ill effects, and is the simplest method to do is this..

Open
Code:
/installer.php


Replace All
Code:
align=center


With
Code:
style="margin-left:auto;margin-right:auto;"


I tested basic errors, and correct functionality, and it seems to work fine.

I then went back and tried a more surgical approach...

Starting with a fresh SVN copy of installer.php...

Open
Code:
/installer.php


Find (SVN Rev 663 : Line 62)
Code:

   echo '<div class="subtitlebg">'.$INSTALLER_LANG['install_check'].'</div><table align=center width=400><form method=post >'."rn";


Replace With
Code:

   echo '<div class="subtitlebg">'.$INSTALLER_LANG['install_check'].'</div><table style="margin-left:auto;margin-right:auto;" width=400><form method=post >'."rn";   


Next...

Find (SVN Rev 663 : Line 192)
Code:

<div class="subtitlebg">Database Selection</div><table align=center width=400 border=0 cellspacing=0 cellpading=0><form method=post onSubmit="return(checkForm(this));">


Replace With
Code:

<div class="subtitlebg">Database Selection</div><table style="margin-left:auto;margin-right:auto;" width=400 border=0 cellspacing=0 cellpading=0><form method=post onSubmit="return(checkForm(this));">



Next...

Find (SVN Rev 663 : Line 248)
Code:

      echo '<div class="subtitlebg">'.$dbOpt[0].' '.$INSTALLER_LANG['database_settings'].'</div><table align=center width=400 border=0 cellspacing=0 cellpading=0><form method=post onSubmit="return(checkForm(this));">'."rn";


Replace With
Code:

      echo '<div class="subtitlebg">'.$dbOpt[0].' '.$INSTALLER_LANG['database_settings'].'</div><table style="margin-left:auto;margin-right:auto;" width=400 border=0 cellspacing=0 cellpading=0><form method=post onSubmit="return(checkForm(this));">'."rn";


And Next...

Find (SVN Rev 663 : Line 322)
Code:

   echo '<div class="subtitlebg"><b>'.$_POST['eocms'].'</b> '.$INSTALLER_LANG['configuration'].'</div><table align=center width=400 border=0 cellspacing=0 cellpading=0><form method=post onSubmit="return(doubleCheck(this));">'."rn";


Replace With
Code:

   echo '<div class="subtitlebg"><b>'.$_POST['eocms'].'</b> '.$INSTALLER_LANG['configuration'].'</div><table style="margin-left:auto;margin-right:auto;" width=400 border=0 cellspacing=0 cellpading=0><form method=post onSubmit="return(doubleCheck(this));">'."rn";


And Next Again...

Find (SVN Rev 663 : Line 442)
Code:

   echo '<div class="subtitlebg"><b>'.$_POST['eocms'].'</b> '.$INSTALLER_LANG['configuration'].'</div><table align=center width=400 border=0 cellspacing=0 cellpading=0><form method=post>'."rn";


Replace With
Code:

   echo '<div class="subtitlebg"><b>'.$_POST['eocms'].'</b> '.$INSTALLER_LANG['configuration'].'</div><table style="margin-left:auto;margin-right:auto;" width=400 border=0 cellspacing=0 cellpading=0><form method=post>'."rn";


Yet Another Next...

Find (SVN Rev 663 : Line 512)
Code:

   echo '<div class="subtitlebg"><b>'.$_POST['eocms'].'</b> '.$INSTALLER_LANG['configuration'].'</div><table align=center width=400 border=0 cellspacing=0 cellpading=0><form method=post>'."rn";


Replace With
Code:

   echo '<div class="subtitlebg"><b>'.$_POST['eocms'].'</b> '.$INSTALLER_LANG['configuration'].'</div><table style="margin-left:auto;margin-right:auto;" width=400 border=0 cellspacing=0 cellpading=0><form method=post>'."rn";


And Yet Another Next...

Find (SVN Rev 663 : Line 671)
Code:

         echo '<div class="subtitlebg"><b>'.$_POST['eocms'].'</b> '.$INSTALLER_LANG['db_defaults'].'</div><table align=center width=400 border=0 cellspacing=0 cellpading=0><form method=post>'."rn";


Replace With
Code:

         echo '<div class="subtitlebg"><b>'.$_POST['eocms'].'</b> '.$INSTALLER_LANG['db_defaults'].'</div><table style="margin-left:auto;margin-right:auto;" width=400 border=0 cellspacing=0 cellpading=0><form method=post>'."rn";


Another One...

Find (SVN Rev 663 : Line 779)
Code:

      echo '<div class="subtitlebg"><b>'.$_POST['eocms'].'</b> '.$INSTALLER_LANG['db_default_settings'].'</div><table align=center width=400 border=0 cellspacing=0 cellpading=0><form method=post>'."rn";


Replace With
Code:

      echo '<div class="subtitlebg"><b>'.$_POST['eocms'].'</b> '.$INSTALLER_LANG['db_default_settings'].'</div><table style="margin-left:auto;margin-right:auto;" width=400 border=0 cellspacing=0 cellpading=0><form method=post>'."rn";


Again, this appears to work fine... tested a few basic errors and correct functionality and it seems to center right. There's a LOT of tables that still have the align=center tag, but they appear to all be inside the rows of the correctly aligned table, so it works out.
eoCMS Developer
eoCMS Developer
Offline Offline
avatar
Posts: 1528
Re: SVN 663: Installer is left aligned, when elements have align=center w/FIX

Changed all the things to align="center" etc. Loads of things were missing "". Should be the same as the margin

Please do not PM me requesting support or anything, use the forums, thats what they are here for
Global Moderator
Global Moderator
Offline Offline
Posts: 122
Re: SVN 663: Installer is left aligned, when elements have align=center w/FIX

You should consider using <strong> instead of <b> if you're going for XHTML or just more valid HTML.  (And I am not just talking about document validation.)
Same as using style="" to declare styling, rather than using things such as align="center".  Not to say that they should always have double quotes.

Saying just in case.  Sorry for intruding. >.<;
Last Edit: 27th September, 2009, 09:24:02 AM by Arwym

Arwym's Domain  ||  SBM: A PHP Bookmarks Script (coming soon)
eoCMS Developer
eoCMS Developer
Offline Offline
avatar
Posts: 1528
Re: SVN 663: Installer is left aligned, when elements have align=center w/FIX

Dont worry, i am nearly done with my new ajax installer ^_^ So all these problems will go bye bye

Please do not PM me requesting support or anything, use the forums, thats what they are here for
Global Moderator
Global Moderator
Offline Offline
Posts: 122
Re: SVN 663: Installer is left aligned, when elements have align=center w/FIX

When I hit reply to post on this thread just now, I got this error:
Quote:
Notice: Undefined index: message in /home/garbages/public_html/eocms.com/Layouts/Reply.php on line 28

Notice: Undefined index: token in /home/garbages/public_html/eocms.com/Layouts/Reply.php on line 28

Quote:
    * The token sent with the form is incorrect please re-submit the form
    * Your message is empty


Anyway, I can't wait to see the new version!  I haven't opted for downloading from the SVN, at least for now, because of the installer.  I'd rather not run into problems during installation.
Last Edit: 30th September, 2009, 05:33:34 PM by Arwym

Arwym's Domain  ||  SBM: A PHP Bookmarks Script (coming soon)
eoCMS Developer
eoCMS Developer
Offline Offline
avatar
Posts: 1528
Re: SVN 663: Installer is left aligned, when elements have align=center w/FIX

Fixed those errors Arwym, this can be marked as fixed too TGPEG as this installer is no longer being used Wink

Please do not PM me requesting support or anything, use the forums, thats what they are here for
eoCMS Designer
eoCMS Designer
Offline Offline
avatar
Posts: 1290
tbarkass_willamson@hotmail.com
Re: SVN 663: Installer is left aligned, when elements have align=center w/FIX

This bug has been deemed [Fixed] by an eoCMS developer. If you dispute the Fix, please PM a developer, giving details of why. This topic can then be unlocked allowing for further discussion.

Seen a bug? Report it!

Jump to:


0.1 seconds Queries: 14