Quote:
Originally Posted by Ron1n
Yes, that is for debugging.
I dont get that... i just send it to the vB date formatter, so I dont see why you get a timestamp instead of a date. Point me to your download section.
|
Sorry it was a misunderstanding What I was seeing as an unformatted date 986574321 was actually a username somebody used! So the date formatting is fine. It was just the way the table lined up.
A. HTML issues: However, there seems to be a problem in the table layout of the stats panel. There are several issues where the column counts don't line up. If you turn border="1" on in the template called downloads_util_stats, you'll see it quite obviously. That is why I thought this username was a date problem.. There are also some headings missing.
in the template called downloads_util_stats
1. The table heading "Stats" doesn't cover all the columns beneath it.
It covers 3 columns in a span with the word Stats
<td class="thead" width="100%" colspan="3">Stats</td></tr>
2. Then it has headings for "Date" and "Downloads" at one column each
<tr><td class="alt2" align="center">Date</td><td class="alt2" align="center">Downloads</td> So there is a mismatch there
However next it sends out the template downloads_utils_statsbit, which has 6 columns!
<tr>
<td class="alt2">$name</td>
<td class="alt2">$date</td>
<td class="alt2">$author</td>
<td class="alt2">$downloads</td>
<td class="alt2">$grade</td>
<td class="alt2">$status</td>
</tr>
So
1 needs a span of 6
2 needs to have the missing headings put in or have the spans adjusted.
I was able to sort this all out if you want me to send you the templates let me know, but my hack is probably not as good as what you could do. I think the gist of the problem is that this downloads_utils_statsbit template is used for tables of different column counts; ($_GET['act'] == 'my') where the column count is six, ($_GET['act'] == 'stats') where it appears it should have two columns, and ($_GET['act'] == 'my') where the column count look like it will be three. That means that either separate templates, blank columns or a dynamic downloads_utils_statsbit template are needed.
Just a couple more things I noticed:
C.The stats thing has a little bug where it will report top downloaders as people who have never downloaded anything, so the query should probably be adjusted to not report people who haven't downloaded anything.
D. Similarly it will report top downloaders as people who don't have any downloads.
E. It will report some blank lines in Most Popular. Maybe for the same reason.
Quote:
Glad you fixed it, but that 1 space is not a problem. If it were, that would mean your webserver doesnt support integrating php into regular html pages, which is probably not the case. If it is, it means that something on your server is VERY strange.
Your server is messed up... wow.
|
No not really. In PHP, anything that is included after the final
?> is output to the browser. Once you've begun sending output, in this case, a space, or in the other example of a diagnostic "echo" output to the browser, it can be a big problem if you follow up with trying to send http headers or cookies. Some browsers can get confused and not know how to process them.
Anyway examples like this are all over the web:
http://www.xoops.org/modules/newbb/v...&post_id=51514
Therefore, there are numerous bits of instructions in PHP coding and installation instructions exhorting people to be sure not to include extraneous lines or spaces following the closing tag.
Many thanks for this excellent hack,
Matt