Home arrow Forum Login Form (Joomla-SMF) v1.4 wrong html table structure
  Welcome, Guest. Please login or register.
Did you miss your activation email?
January 08, 2009, 01:12:08 PM
Home New Posts Search Calendar


Login with username, password and session length
+  Joomla Forum
|-+  Joomla Addon Discussion
| |-+  Joomla Modules
| | |-+  Login Form (Joomla-SMF) v1.4 wrong html table structure
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: Login Form (Joomla-SMF) v1.4 wrong html table structure  (Read 1324 times)
Montty
Joomla Newbie
*

Karma: +2/-1
Offline Offline

Posts: 22



View Profile WWW
Login Form (Joomla-SMF) v1.4 wrong html table structure
« on: March 18, 2006, 11:30:54 AM »

Hello,

Just installed version 1.4 of the Login Form (Joomla-SMF) module and discovered that tthe table structure displayed when a user is not logged in is wrong.

Look for this <<<<<<< sign in the code excerpts below and read comments.

Code:
echo '
  <table cellspacing="0" cellpadding="0" width="100%" border="0">';  <<<<<<< A new Table is created here...

if ($context['user']['is_logged']) {
  ...
    Loads of code
  ...
else {
     
  echo $smf_pre_text, ' ', $txt[28], $smf_post_text, '<br />  <<<<<< but no ROW + CELL are created here!!
  <form action="index.php" name="login" method="post">
    <span class="small">',$txt[35],':</span><br/>
    <input type="text" name="username" size="12" class="inputbox" /><br />
    <span class="small">',$txt[36],':</span><br/>
    <input type="password" name="passwd" size="12" class="inputbox" /><br />
    <input type="checkbox" name="remember" class="inputbox" value="yes" alt="',_REMEMBER_ME,'" />
    <span class="small">',_REMEMBER_ME,'</span><br />
    <input type="submit" value="', $txt[34], '" class="button"/><br />
    <input type="hidden" name="option" value="login" />
    <input type="hidden" name="lang" value="',$mosConfig_lang,'" />
    <input type="hidden" name="message" value="',$message_login,'" />
  </form>
</td></tr>  <<<<< but the ROW + CELL is closed here!!!

solution - at line 223 replace:
Code:
else {
  echo $smf_pre_text, ' ', $txt[28], $smf_post_text, '<br />

by
Code:
else {
  echo '<tr><td valign="top" class="', (($moduleclass_sfx) ? 'smalltext'.$moduleclass_sfx : 'smalltext' ),'">', $smf_pre_text, ' ', $txt[28], $smf_post_text, '<br />

I took the freedom to also add the suffix option to the class of the TD to allow for some dedicated style to the "Welcome Guest" message.
To stay consistent I also added the suffix to the "Welcome UserX" when a user is logged-in.

find this (around line 92):
Code:
echo '
  <tr>
    <td valign="top" class="smalltext">';
    if ($context['in_maintenance'] && $context['user']['is_admin']) {

and replace it by:
Code:
echo '
  <tr>
    <td valign="top" class="', (($moduleclass_sfx) ? 'smalltext'.$moduleclass_sfx : 'smalltext' ),'">';
    if ($context['in_maintenance'] && $context['user']['is_admin']) {

Hope this helps  Smiley
« Last Edit: March 20, 2006, 05:06:33 PM by Montty » Logged

kippie
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 1


View Profile
Re: Login Form (Joomla-SMF) v1.4 wrong html table structure
« Reply #1 on: May 05, 2006, 05:47:19 AM »

This does not work for v 1.4.1 , can you please help with that because the lines are made a bit different.
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  



Login with username, password and session length

Powered by MySQL Powered by PHP Joomla Forum | Powered by SMF 1.1 RC1.
© 2001-2005, Lewis Media. All Rights Reserved.
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!

Joomla Hacks is a Joomla Components, Joomla Modules, Joomla Templates, & Joomla Mambots resource portal. None of the text or images in this public website may be copied without the expressed written consent of the authors. Copyright 2005 by JoomlaHacks.com. Powered by Joomla. All rights reserved.
Terms of Use
Joomla Hacks



Joomla Hacks
German Lang French Lang Italian Lang Spanish Lang Japanese Lang Chinese Lang
Search Contact About Advertise Blogs Topsites Submit News Register Login