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 http://www.4x4n.com:

<tr>
    <
td  class="subLinks">
        <
a href="<{$xoops_url}>/store">Storea> | 
        <{if 
$xoops_isuser}>
            <
a href="<{$xoops_url}>/user.php">Profilea> |
            <
a href="<{$xoops_url}>/edituser.php">Edit Profilea> |
            <
a href="<{$xoops_url}>/notifications.php">Notificationsa> |
            <{
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">Inboxa> |
                <{/if}>
            <{if 
$xoops_isadmin}>
            <
a href="<{$xoops_url}>/admin.php">Administrationa> |
            <{/if}>
        <
a href="<{$xoops_url}>/user.php?op=logout">Logouta>
        <{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="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 Passworda> |
    <
a href="<{$xoops_url}>/register.php">Become a Membera>
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 , 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">Storea> | 
            <
a href="<{$xoops_url}>/user.php">Profilea> |
            <
a href="<{$xoops_url}>/edituser.php">Edit Profilea> |
            <
a href="<{$xoops_url}>/notifications.php">Notificationsa> |
            <{
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">Inboxa> |
                <{/if}>
            <{if 
$xoops_isadmin}>
            <
a href="<{$xoops_url}>/admin.php">Administrationa> |
            <{/if}>
        <
a href="<{$xoops_url}>/user.php?op=logout">Logouta>
        <{else}>
<
form action="<{$xoops_url}>/user.php" method="post">
            <
a href="<{$xoops_url}>/store">Storea> | 
    
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="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 Passworda> |
    <
a href="<{$xoops_url}>/register.php">Become a Membera>
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 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 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

242 user(s) are online (47 user(s) are browsing Support Forums)


Members: 0


Guests: 242


more...

Donat-O-Meter

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

Latest GitHub Commits