Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > 123 Flash Chat Server Software > 123 Flash Chat Support

Closed Thread
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-23-2006, 12:14 PM
Junior Member
 
Join Date: Dec 2005
Posts: 23
Default PostNuke Chat Block produce wc3 validation errors

Hi:

I need to attain wc3 validation. Among the errors still left are 9 related with the Chat Block.

http://validator.w3.org/check?uri=ww...icaboricua.com

Errors are listed below..

Error Line 869 column 485: document type does not allow element "P" here; missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag.
...tatus="Chatear Ahora";return true'><p><img src=images/chat-puerto-rico.gif al


Error Line 869 column 501: required attribute "ALT" not specified.
...hora";return true'><p><img src=images/chat-puerto-rico.gif align="middle" bor


Error Line 869 column 620: required attribute "TYPE" not specified.
...r /><script language=Javascript src=./modules/chat/functions_phpnuke.php></sc


Error Line 869 column 664: end tag for element "SCRIPT" which is not open.
...s/chat/functions_phpnuke.php></script> <script language="Javascript" type="


Error Line 882 column 137: end tag for element "B" which is not open.
...n false;\"><b>" + room_name[i] + '</b></a> (' + chater_nums[i] + ')</span><b


Error Line 882 column 141: end tag for element "A" which is not open.
...lse;\"><b>" + room_name[i] + '</b></a> (' + chater_nums[i] + ')</span><br>..


Error Line 882 column 174: end tag for element "SPAN" which is not open.
...></a> (' + chater_nums[i] + ')</span><br>');


Error Line 894 column 4: end tag for element "UL" which is not open.
</ul></div

The code is this:
Code:
define("_CHAT_TITLE","Flash Chat Server de Politica Boricua");
define("_CHAT_NOW","Chatear Ahora");
define("_CHAT_USERLIST","Personas en el chat: ");
define("_CHAT_NONE_USER","Nadie");
define("_CHAT_THEREARE","Hay...");
define("_CHAT_CONNECTIONS","personas conectadas al chat server");
define("_CHAT_ROOMS","Salas");
define("_CHAT_LOGON_USERS","Logeados");

$ModName = "chat";

include "modules/$ModName/config.php";


$content = "";
$userListStr = "";
//$room_id = "";

$room = array();


$online_file = $chat_data_path."online.txt";

if (!file_exists($online_file))
{
   echo "Can't find $online_file";
   
}
else if (!$trow = file($online_file))
{
   echo "Read $online_file error";
   
}
else
{
   $room_data = explode("|", $trow[0]);
   
   
   if (count($room_data) == 3)
   {
      $room['connections'] =    intval($room_data[0]);
      $room['logon_users'] =    intval($room_data[1]);
      $room['room_numbers'] = intval($room_data[2]);
   }
   
   $d = dir($chat_data_path);
   
   while (false !== ($entry = $d->read())) 
   {
     $rest = substr($entry, 0, 5);
     if ($rest == "room_")
     {
      
      if (file_exists($chat_data_path.$entry))
      {
         
         $f_users = file($chat_data_path.$entry);
         
         for ($i = 0; $i < count($f_users); $i ++)
         {
            $f_line = trim($f_users[$i]);
            
            if ($f_line != "")
            {
               $userListStr = ($userListStr == "") ? $f_line : $userListStr. ", " . $f_line;
            }
         }
         
      }        
     }
   
   }
   $d->close();
   
   $userListStr = ($userListStr == "") ? _CHAT_NONE_USER : $userListStr;

}

$c_connections = $room['connections'];
$c_rooms = $room['room_numbers'];
$c_logon_users = $room['logon_users'];   
      
      
$content  = "   <script language='Javascript' type='text/javascript'>\n";
$content .= "   <!--\n";
$content .= "      function startChat()\n";
$content .= "      {\n";
$content .= "         window.open('modules.php?op=modload&name=".$ModName."&file=index&123flashchat=chat', '_123flashchat', 'HEIGHT=476,resizable=yes,WIDTH=634');\n";
$content .= "      }\n";
$content .= "   //-->\n";
$content .= "   </script>\n";

$content .= _CHAT_THEREARE . " <b>" . $c_connections . "</b> "._CHAT_CONNECTIONS;
$content .= "<br><br>". _CHAT_THEREARE . " <b>" . $c_rooms. "</b> ". _CHAT_ROOMS;
$content .= "<br><br>". _CHAT_THEREARE . " <b>" . $c_logon_users . "</b> "._CHAT_LOGON_USERS;
$content .= "<br><br>". _CHAT_USERLIST . " <b>" . $userListStr . "</b>";
$content .= "<br><br><center>Puedes accesar el chat haciendo CLICK <a href='http://www.politicaboricua.com' onclick='startChat();return false;' onmouseover='window.status=\""._CHAT_NOW."\";return true'>AQUI!!</a>";
$content .= "<a href='http://www.politicaboricua.com' onclick='startChat();return false;' onmouseover='window.status=\""._CHAT_NOW."\";return true'><p><img src=images/chat-puerto-rico.gif align=\"middle\" border=\"0\" alt=\"Puerto Rico\"></a><br>";

echo $content;

echo "<br /><br /><script language=Javascript src=./modules/chat/functions_phpnuke.php></script>";
print <<<EOT
   <script language="Javascript" type="text/javascript">
   <!--
      function openChat()
      {
         window.open('modules.php?name=$ModName&123flashchat=chat', '_123flashchat', 'HEIGHT=476,resizable=yes,WIDTH=634');
      }
      function openChatById(id)
      {
         window.open('modules.php?name=$ModName&123flashchat=chat&room_id=' + id , '_123flashchat', 'HEIGHT=476,resizable=yes,WIDTH=634');
      }

for(i = 0; i<room_id.length; i++)
{
   document.write("<span><a href=\"Chat-Boricua\" onclick =\"openChatById(" + room_id[i] +  ");return false;\"><b>" + room_name[i] + '</b></a>  (' + chater_nums[i] + ')</span><br>');
   if(chater_names[i] == null || chater_names[i] == '')
   {
      document.write('Conectados: Nadie.<br><br>');
   }
   else
   {
      document.write('Conectados: ' + chater_names[i] + '.<br><br>');
   }
}
-->
</script>
</ul>
EOT;
Please note that my site have been accepted for a very important local web competition sponsored by a major TV channel. I need to reduce errors and attain wc3 validation. Any help will be appreciated.

Later
Closed Thread

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 01:05 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.