coding errors in fresh install

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Locked
rantbot
Registered User
Posts: 83
Joined: Sun May 07, 2006 1:37 pm

coding errors in fresh install

Post by rantbot »

I've been running pages from my forum thru CSE HTML Validator and am finding large numbers of HTML errors.

I set up another forum, a fresh 2.0.22 install with subSilver template, to see which errors are inherent and which might be in the template, the mods, or my own changes. I am finding errors in the fresh install, as well.

Here is one of the errors in the fresh install. This is in the HTML code for the forum's index page.

Code: Select all

	<td class="row1" align="left"><span class="gensmall">In total there is <b>1</b> user online :: 1 Registered, 0 Hidden and 0 Guests &nbsp; [ <span style="color:#FFA34F">Administrator</span> ] &nbsp; [ <span style="color:#006600">Moderator</span> ]<br />Most users ever online was <b>1</b> on 30 Oct 2007 10:09 am<br />Registered Users: <a href="profile.php?mode=viewprofile&u=2"style="color:#FFA34F"><b>wfw</b></a></span></td>
This shows up on the forum as

Code: Select all

In total there is 1 user online :: 1 Registered, 0 Hidden and 0 Guests   [ Administrator ]   [ Moderator ]
Most users ever online was 1 on 30 Oct 2007 10:09 am
Registered Users: wfw
The problem is in the line

Code: Select all

viewprofile&u=2"style="color:#FFA34F
There should be a space between u=2" and style=.
The template for that part of the page is templates/subSilver/index_body.tpl. The faulty HTML originates in line 63 of the template,

Code: Select all

	<td class="row1" align="left"><span class="gensmall">{TOTAL_USERS_ONLINE} &nbsp; [ {L_WHOSONLINE_ADMIN} ] &nbsp; [ {L_WHOSONLINE_MOD} ]<br />{RECORD_USERS}<br />{LOGGED_IN_USER_LIST}</span></td>
It looks like LOGGED_IN_USER_LIST is the source of the problem.

How might I fix this, and put a space in there where it should be? Any ideas?
User avatar
Brf
Support Team Member
Support Team Member
Posts: 52236
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: coding errors in fresh install

Post by Brf »

in includes/page_header.php:

Code: Select all

if ( $row['user_allow_viewonline'] )
				{
					$user_online_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'>' . $row['username'] . '</a>';
					$logged_visible_online++;
				}
				else
				{
					$user_online_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'><i>' . $row['username'] . '</i></a>';
					$logged_hidden_online++;
				}
replace both instances of

Code: Select all

'"' . $style_color 
with

Code: Select all

'" ' . $style_color 
rantbot
Registered User
Posts: 83
Joined: Sun May 07, 2006 1:37 pm

Re: coding errors in fresh install

Post by rantbot »

Right you are, that fixes it. Thanks!
Locked

Return to “2.0.x Support Forum”