TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,026
  • Total Topics: 21,333
  • Online today: 916
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 135
  • Total: 136
  • lurkalot

XHTML Validation

Started by GTS, April 09, 2006, 12:11:16 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

GTS

I wanted to suggest a few changes, that would make TP more "Valid XHTML 1.0 Transitional" (so that the buttons in the page footer have a meaning).

The TP version i use is 0.86 (updated) with SMF 1.0.7.

I did a few changes in the TPortal_shoutbox() funcion in Themes/default/TPortalBlocks.template.php, the functionality didn't change at all, so i'll just paste the whole function.
// TPortal shoutbox
function TPortal_shoutbox()
{
        global $context, $settings, $options, $scripturl, $txt, $modSettings;

        // Show the shoutbox, takes settings from tpadmin
       if(isset($context['TPortal']['querystring']))
             $tp_where=$context['TPortal']['querystring'];
       else
              $tp_where='';

       if(!isset($context['TPortal']['shoutbox']))
             $context['TPortal']['shoutbox']='';

if($context['TPortal']['shoutbox_usescroll']=='1')
echo '
<div id="marqueecontainer" onmouseover="copyspeed=pausespeed" onmouseout="copyspeed=marqueespeed">
<div id="vmarquee" class="smalltext" style="text-align: left;position: absolute; width: 98%;">
'.$context['TPortal']['shoutbox'].'
</div>
</div>';
else
echo '<table style="table-layout: fixed;  height: '.$context['TPortal']['shoutbox_height'].'px;" cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td class="smalltext"><div style="height: '.$context['TPortal']['shoutbox_height'].'px; overflow: auto; width: 100%;">', $context['TPortal']['shoutbox'], '
       </div></td></tr></table>';

       echo '
       <form class="smalltext" style="margin-top: 8px; text-align: center;" name="tp-shoutbox" action="'.$scripturl.'?action=tpmod&amp;id=shout" method="post">';


       if(($context['TPortal']['guest_shout']) || (!$context['TPortal']['guest_shout'] && !$context['user']['is_guest']))
             echo '<textarea class="smalltext" name="tp-shout" style="margin-top: 1ex; width: 80%; height: 50px;" rows="0" cols="0"></textarea><br /><input style="margin-top: 4px;" class="smalltext" type="submit" name="shout_send" value="'.$txt['shout!'].'" />';

       if($context['user']['is_guest'] && $context['TPortal']['guest_shout'])
             echo '<br /><input style="margin-top: 4px;" size="20" class="smalltext" type="text" name="tp-shout-name" value="'.$txt['tp-guest'].'" />';
       else
             echo '<input type="hidden" name="tp-shout-name" value="'.$context['user']['name'].'">';

       echo '<input name="tp-shout-url" type="hidden" value="'.$tp_where.'" />
       </form>';
}


Replacing the function with the above one should remove about 8 validation errors, if you use the ShoutBox.
Furthermore i did some small change to the TPortal_sidebar() function in the same file.

I replaced the line
<script language="Javascript">
with:
<script language="Javascript" type="text/javascript"><!--

and
</script>';
with
// --></script>';

That removed another 2 validation errors :)

Oh, and i added some missing </td></tr> to the black22_TP theme (BoardIndex.template.php)

        echo '</table>
       ';
                     }
                }
         echo '</table>';
        }


I bet you see where they are missing ;)

I may have done some other corrections, but if i did, i can't remember them :D

Regards,
GTS

Edit: damn typos.

This website is proudly hosted on Crocweb Cloud Website Hosting.