1
JamesSAEP
theme code help needed.
  • 2006/12/17 22:25

  • JamesSAEP

  • Just can't stay away

  • Posts: 732

  • Since: 2005/2/28


Can someone look at my theme.html and tell me what is wrong. The problem is with the "login username/pwd" boxes. They are supposed to be on the same row as the "store" link. Once you login, the usermenu does line up correctly. Below is the code, and you can see it at www.4x4n.com:

<tr>
    <
td  class="subLinks">
        <
a href="<{$xoops_url}>/store">Store</a> | 
        <{if 
$xoops_isuser}>
            <
a href="<{$xoops_url}>/user.php">Profile</a> |
            <
a href="<{$xoops_url}>/edituser.php">Edit Profile</a> |
            <
a href="<{$xoops_url}>/notifications.php">Notifications</a> |
            <{
php}>
            GLOBAL 
$xoopsUser;
            
$pm_handler =& xoops_gethandler('privmessage');
            
$uid $xoopsUser->getVar('uid');
            
$criteria = new CriteriaCompo(new Criteria('read_msg'0));
            
$criteria->add(new Criteria('to_userid'$uid));
            
$msgcount $pm_handler->getCount($criteria);
            
$GLOBALS['xoopsTpl']->assign('msgcount'$msgcount);
            <{/
php}>
                <{if 
$msgcount 0}>
                <
class="highlight" href="<{$xoops_url}>/viewpmsg.php">Inbox (<span style="color:#ffff00; font-weight: bold;"><{$msgcount}></span>)</a> |
                <{else}>
                <
a href="<{$xoops_url}>/viewpmsg.php">Inbox</a> |
                <{/if}>
            <{if 
$xoops_isadmin}>
            <
a href="<{$xoops_url}>/admin.php">Administration</a> |
            <{/if}>
        <
a href="<{$xoops_url}>/user.php?op=logout">Logout</a>
        <{else}>
<
form action="<{$xoops_url}>/user.php" method="post">
    
Username
    
<input type="text" name="uname" size="12" value="<{$block.unamevalue}>" maxlength="25">
    
Password 
    
<input type="password" name="pass" size="12" maxlength="32">
    <!-- <
input type="checkbox" name="rememberme" value="On" class ="formButton" /><{$block.lang_rememberme}><br /> //-->
    
<input type="hidden" name="xoops_redirect" value="<{$xoops_requesturi}>">
    <
input type="hidden" name="op" value="login">
    <
input  id="UserFormBut" type="submit" value="ENTER">
    <{
$block.sslloginlink}><a href="<{$xoops_url}>/user.php#lost">Lost Password</a> |
    <
a href="<{$xoops_url}>/register.php">Become a Member</a>
</
form>        
        <{/if}> 
    </
td>
 </
tr>

2
spacejoee
Re: theme code help needed.
  • 2006/12/18 1:40

  • spacejoee

  • Not too shy to talk

  • Posts: 106

  • Since: 2004/7/25


Hi,
it's because you have a link just before <form>, you had two solution :
1 , add a cell for your link, and a cell for you form.
2 , this one :
<tr>
    <
td  class="subLinks">
            <{if 
$xoops_isuser}>
            <
a href="<{$xoops_url}>/store">Store</a> | 
            <
a href="<{$xoops_url}>/user.php">Profile</a> |
            <
a href="<{$xoops_url}>/edituser.php">Edit Profile</a> |
            <
a href="<{$xoops_url}>/notifications.php">Notifications</a> |
            <{
php}>
            GLOBAL 
$xoopsUser;
            
$pm_handler =& xoops_gethandler('privmessage');
            
$uid $xoopsUser->getVar('uid');
            
$criteria = new CriteriaCompo(new Criteria('read_msg'0));
            
$criteria->add(new Criteria('to_userid'$uid));
            
$msgcount $pm_handler->getCount($criteria);
            
$GLOBALS['xoopsTpl']->assign('msgcount'$msgcount);
            <{/
php}>
                <{if 
$msgcount 0}>
                <
class="highlight" href="<{$xoops_url}>/viewpmsg.php">Inbox (<span style="color:#ffff00; font-weight: bold;"><{$msgcount}></span>)</a> |
                <{else}>
                <
a href="<{$xoops_url}>/viewpmsg.php">Inbox</a> |
                <{/if}>
            <{if 
$xoops_isadmin}>
            <
a href="<{$xoops_url}>/admin.php">Administration</a> |
            <{/if}>
        <
a href="<{$xoops_url}>/user.php?op=logout">Logout</a>
        <{else}>
<
form action="<{$xoops_url}>/user.php" method="post">
            <
a href="<{$xoops_url}>/store">Store</a> | 
    
Username
    
<input type="text" name="uname" size="12" value="<{$block.unamevalue}>" maxlength="25">
    
Password 
    
<input type="password" name="pass" size="12" maxlength="32">
    <!-- <
input type="checkbox" name="rememberme" value="On" class ="formButton" /><{$block.lang_rememberme}><br /> //-->
    
<input type="hidden" name="xoops_redirect" value="<{$xoops_requesturi}>">
    <
input type="hidden" name="op" value="login">
    <
input  id="UserFormBut" type="submit" value="ENTER">
    <{
$block.sslloginlink}><a href="<{$xoops_url}>/user.php#lost">Lost Password</a> |
    <
a href="<{$xoops_url}>/register.php">Become a Member</a>
</
form>        
        <{/if}> 
    </
td>
 </
tr>


Tell me if it works

3
JamesSAEP
Re: theme code help needed.
  • 2006/12/18 14:37

  • JamesSAEP

  • Just can't stay away

  • Posts: 732

  • Since: 2005/2/28


Thanks for the reply. I used option 2 and it works well. Can you explain whey having a link before the <form> would cause my problem?

4
spacejoee
Re: theme code help needed.
  • 2006/12/18 15:14

  • spacejoee

  • Not too shy to talk

  • Posts: 106

  • Since: 2004/7/25


It's because when you add <form > it always jumps to the next line.

5
JamesSAEP
Re: theme code help needed.
  • 2006/12/18 15:16

  • JamesSAEP

  • Just can't stay away

  • Posts: 732

  • Since: 2005/2/28


Nice to know - thanks!

Login

Who's Online

174 user(s) are online (77 user(s) are browsing Support Forums)


Members: 0


Guests: 174


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits