[aur-dev] [PATCH] removed obsolete inline CSS in index.php
--- web/html/index.php | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/html/index.php b/web/html/index.php index 895fc8a..54d6004 100644 --- a/web/html/index.php +++ b/web/html/index.php @@ -38,7 +38,7 @@ $result = db_query($q,$dbh); # Table 2 print '<table class="boxSoft">'; print '<tr>'; -print '<th colspan="2" class="boxSoftTitle" style="text-align: right">'; +print '<th colspan="2" class="boxSoftTitle">'; print ' <a href="/rss2.php"><img src="/images/rss.gif"></a> <span class="f3">'.__("Recent Updates").' <span class="f5"></span></span>'; print '</th>'; print '</tr>'; @@ -51,7 +51,7 @@ while ($row = mysql_fetch_assoc($result)) { print $row["Name"]." ".$row["Version"]."</a></span></span>"; print '</td>'; - print '<td class="boxSoft" style="text-align: right">'; + print '<td class="boxSoft">'; # figure out the mod string $mod_int = intval($row["ModifiedTS"]); @@ -124,7 +124,7 @@ if (!empty($user)) { print "<table class='boxSoft'>"; print "<tr>"; - print "<th colspan='2' class='boxSoftTitle' style='text-align: right'>"; + print "<th colspan='2' class='boxSoftTitle'>"; print "<span class='f3'>".__("My Statistics")."</span>"; print "</th>"; print "</tr>"; @@ -168,7 +168,7 @@ if (!empty($user)) { print "<table class='boxSoft'>"; print "<tr>"; -print "<th colspan='2' class='boxSoftTitle' style='text-align: right'>"; +print "<th colspan='2' class='boxSoftTitle'>"; print "<span class='f3'>".__("Statistics")."</span>"; print "</th>"; print "</tr>"; -- 1.4.4.4
+ print "<th colspan='2' class='boxSoftTitle'>"; print "<span class='f3'>".__("My Statistics")."</span>"; print "</th>"; print "</tr>"; @@ -168,7 +168,7 @@ if (!empty($user)) { print "<table class='boxSoft'>";
print "<tr>"; -print "<th colspan='2' class='boxSoftTitle' style='text-align: right'>"; +print "<th colspan='2' class='boxSoftTitle'>"; print "<span class='f3'>".__("Statistics")."</span>"; print "</th>"; print "</tr>"; -- 1.4.4.4
Oh hi Michael, good, but, i have to be annoying again (and sorry) but what about with the double and simple quotes subject? i know that the file was originally written bad, but try at least to don't copy and paste things like: print "</th>"; print "</tr>"; Remember, double quotes and simple quotes are important even if you think that 'both works'. I tried to said you this in the other mail, and i thought that you understood (i hope this time you will), thanks anyway, but please try to clean the code (or maybe i say optimize it?) before submit a patch, isn't the idea to patch and re-patch with bad-written-code. Thanks! -- Angel Velásquez angvp @ irc.freenode.net Linux Counter: #359909 Arch Linux Trusted User
Angel Velásquez wrote:
Oh hi Michael, good, but, i have to be annoying again (and sorry) but what about with the double and simple quotes subject? i know that the file was originally written bad, but try at least to don't copy and paste things like: print "</th>"; print "</tr>"; Remember, double quotes and simple quotes are important even if you think that 'both works'. I tried to said you this in the other mail, and i thought that you understood (i hope this time you will), thanks anyway, but please try to clean the code (or maybe i say optimize it?) before submit a patch, isn't the idea to patch and re-patch with bad-written-code.
Ok, to get that sorted out (you're not annoying btw ;)). On the other hand I should not touch bigger parts of a file to omit big diffs, but if I introduce a change to one single line I should fix the quoting as well, leaving the sorrounding code in bad quoting? Sorry if I missunderstood something here, I hesitated to change the quoting here because I think that's part of another patch, introducing mixed quoting is IMHO even worse. Or would it have been OK if I'd have changed the quoting style of the html blocks in this case? Again, sorry if I missunderstood something. Michael -- Michael Klier
Angel Velásquez wrote:
Oh hi Michael, good, but, i have to be annoying again (and sorry) but what about with the double and simple quotes subject? i know that the file was originally written bad, but try at least to don't copy and paste things like: print "</th>"; print "</tr>"; Remember, double quotes and simple quotes are important even if you think that 'both works'. I tried to said you this in the other mail, and i thought that you understood (i hope this time you will), thanks anyway, but please try to clean the code (or maybe i say optimize it?) before submit a patch, isn't the idea to patch and re-patch with bad-written-code. Thanks!
Here's another attempt (patch attached to the mail this time), I hope I got it right this time :). Now I've change the quoting style like you said for the changed line as well as the surrounding html block. In one case I've also fixed the indentation (to use tabs) as it seemed the right step to me (that still leaves enough bad quoting to fix, but I was asked to also keep the diffs short). Kind Regards, Michael -- Michael Klier
On Sun, Jun 8, 2008 at 1:06 AM, Michael Klier <chi@chimeric.de> wrote:
Angel Velásquez wrote:
Oh hi Michael, good, but, i have to be annoying again (and sorry) but what about with the double and simple quotes subject? i know that the file was originally written bad, but try at least to don't copy and paste things like: print "</th>"; print "</tr>"; Remember, double quotes and simple quotes are important even if you think that 'both works'. I tried to said you this in the other mail, and i thought that you understood (i hope this time you will), thanks anyway, but please try to clean the code (or maybe i say optimize it?) before submit a patch, isn't the idea to patch and re-patch with bad-written-code. Thanks!
Here's another attempt (patch attached to the mail this time), I hope I got it right this time :). Now I've change the quoting style like you said for the changed line as well as the surrounding html block. In one case I've also fixed the indentation (to use tabs) as it seemed the right step to me (that still leaves enough bad quoting to fix, but I was asked to also keep the diffs short).
Kind Regards, Michael
-- Michael Klier
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFISsAAAuL1i4MI9VERAtzzAJ9opmnUI16MpmaYHx54MSrWd3sBGgCgjK3U GlAV71ZvIo+GZp2C+wNM9YY= =brxq -----END PGP SIGNATURE-----
I've applied the first patch (what quotes you use isn't really vital) and my own, this one splits the html entirely from the index page and puts it in a template file. If you want please please take a look at this, what you're already doing is awesome and that template is html soup. I couldn't even indent it. -- Callan Barrett
On Sun, 8 Jun 2008 01:18:30 +0800 "Callan Barrett" <wizzomafizzo@gmail.com> wrote:
On Sun, Jun 8, 2008 at 1:06 AM, Michael Klier <chi@chimeric.de> wrote:
Angel Velásquez wrote:
Oh hi Michael, good, but, i have to be annoying again (and sorry) but what about with the double and simple quotes subject? i know that the file was originally written bad, but try at least to don't copy and paste things like: print "</th>"; print "</tr>"; Remember, double quotes and simple quotes are important even if you think that 'both works'. I tried to said you this in the other mail, and i thought that you understood (i hope this time you will), thanks anyway, but please try to clean the code (or maybe i say optimize it?) before submit a patch, isn't the idea to patch and re-patch with bad-written-code. Thanks!
Here's another attempt (patch attached to the mail this time), I hope I got it right this time :). Now I've change the quoting style like you said for the changed line as well as the surrounding html block. In one case I've also fixed the indentation (to use tabs) as it seemed the right step to me (that still leaves enough bad quoting to fix, but I was asked to also keep the diffs short).
Kind Regards, Michael
-- Michael Klier
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFISsAAAuL1i4MI9VERAtzzAJ9opmnUI16MpmaYHx54MSrWd3sBGgCgjK3U GlAV71ZvIo+GZp2C+wNM9YY= =brxq -----END PGP SIGNATURE-----
I've applied the first patch (what quotes you use isn't really vital) and my own, this one splits the html entirely from the index page and puts it in a template file. If you want please please take a look at this, what you're already doing is awesome and that template is html soup. I couldn't even indent it.
Hmm I don't think that the index page should be sent to a template file. I think the point of the template file is to take html out of functions and the libraries. The code in web/html shouldn't be considered as functions/libraries but rather just html (unfortunately it's not the case right how hehe). So I'm thinking the logic parts of index.html should be put into a library rather than the html parts being put into a template.
On Sun, 8 Jun 2008 01:18:30 +0800 "Callan Barrett" <wizzomafizzo@gmail.com> wrote:
I've applied the first patch (what quotes you use isn't really vital) and my own, this one splits the html entirely from the index page and puts it in a template file. If you want please please take a look at this, what you're already doing is awesome and that template is html soup. I couldn't even indent it.
Just to clarify what I mean is: When moving code if you find PHP logic and things that could be functions in web/html those parts should be moved to web/lib. If you find copius amounts of HTML in web/lib those parts should be moved to web/template. So you really shouldn't move HTML that's in web/html to template unless you want to make it into a widget like login form, search form, updated packages info box, etc.
On Sun, Jun 8, 2008 at 1:49 AM, Loui <louipc.ist@gmail.com> wrote:
On Sun, 8 Jun 2008 01:18:30 +0800 "Callan Barrett" <wizzomafizzo@gmail.com> wrote:
I've applied the first patch (what quotes you use isn't really vital) and my own, this one splits the html entirely from the index page and puts it in a template file. If you want please please take a look at this, what you're already doing is awesome and that template is html soup. I couldn't even indent it.
Just to clarify what I mean is: When moving code if you find PHP logic and things that could be functions in web/html those parts should be moved to web/lib. If you find copius amounts of HTML in web/lib those parts should be moved to web/template. So you really shouldn't move HTML that's in web/html to template unless you want to make it into a widget like login form, search form, updated packages info box, etc.
Ok, bit of an accident that I also applied my own patch. Reverted now and Michael's patch is applied. I'll make a new thread with my patch, we'll figure out how it should look. -- Callan Barrett
On Sat, 7 Jun 2008 16:50:53 +0200 Michael Klier <chi@chimeric.de> wrote:
--- web/html/index.php | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/web/html/index.php b/web/html/index.php index 895fc8a..54d6004 100644 --- a/web/html/index.php +++ b/web/html/index.php [...]
Short and sweet heck yeah. Thanks. Looks like Callan beat me to it though.
On Sat, 7 Jun 2008 16:50:53 +0200 Michael Klier <chi@chimeric.de> wrote:
--- web/html/index.php | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/web/html/index.php b/web/html/index.php index 895fc8a..54d6004 100644 --- a/web/html/index.php +++ b/web/html/index.php @@ -38,7 +38,7 @@ $result = db_query($q,$dbh); # Table 2 print '<table class="boxSoft">'; print '<tr>'; -print '<th colspan="2" class="boxSoftTitle" style="text-align: right">'; +print '<th colspan="2" class="boxSoftTitle">'; print ' <a href="/rss2.php"><img src="/images/rss.gif"></a> <span class="f3">'.__("Recent Updates").' <span class="f5"></span></span>'; print '</th>'; print '</tr>'; @@ -51,7 +51,7 @@ while ($row = mysql_fetch_assoc($result)) { print $row["Name"]." ".$row["Version"]."</a></span></span>";
print '</td>'; - print '<td class="boxSoft" style="text-align: right">'; + print '<td class="boxSoft">';
# figure out the mod string $mod_int = intval($row["ModifiedTS"]); @@ -124,7 +124,7 @@ if (!empty($user)) { print "<table class='boxSoft'>";
print "<tr>"; - print "<th colspan='2' class='boxSoftTitle' style='text-align: right'>"; + print "<th colspan='2' class='boxSoftTitle'>"; print "<span class='f3'>".__("My Statistics")."</span>"; print "</th>"; print "</tr>"; @@ -168,7 +168,7 @@ if (!empty($user)) { print "<table class='boxSoft'>";
print "<tr>"; -print "<th colspan='2' class='boxSoftTitle' style='text-align: right'>"; +print "<th colspan='2' class='boxSoftTitle'>"; print "<span class='f3'>".__("Statistics")."</span>"; print "</th>"; print "</tr>";
Applied to testing.
participants (4)
-
Angel Velásquez
-
Callan Barrett
-
Loui
-
Michael Klier