1
xKillswitchx
I dont know if there is anyway around this, so I need your help with login box.

OK, Ive made my extra theme, but instead of calling on blocks for the navigation, Ive gone in and coded teh themeleft and themeright to hold them.

My question is, is there anyway to call only a specific block from the themeright.html file? Im trying to get the login box and usermenu in, but if I copy the code from the blockitself, it doesnt show up. If i edit it to normal html, all shows up, but the login doesnt disappear when your logged in, and the usermenu never goes away.

Because Im not using the blocks in the layout themselves, I need to call only the login / usermenu block, hopefully there is a way to do this.

Thanks for any help.

Edit - Can I call a block with an include? Grab the block straight from the modules/system/templates/blocks folder??

2
stefan88
Re: I dont know if there is anyway around this, so I need your help with login box.
  • 2006/3/9 23:10

  • stefan88

  • Community Support Member

  • Posts: 1085

  • Since: 2004/9/20


This is not exactly what you are asking for, but...
it is a code in theme.html that will give you a ligin as part of it:

<form style="margin-top: 0px; margin-bottom: 0px" action="<{$xoops_url}>/user.php" method="post">
              &
nbsp;<img src="<{$xoops_imageurl}>images/username_small.jpg" alt="Username" border="0" width="16" height="16" align="middle" /> 
              <
input name="uname" type="text" value="" size="14" />
              <
img src="<{$xoops_imageurl}>images/password_small.jpg" alt="Password" border="0" width="16" height="16" align="middle" />
              <
input name="pass" type="password" value="" size="12" /> 
              <
input name="op" type="hidden" value="login" />
              <
input name="submit" type="submit" value="<{$smarty.const._LOGIN}>" />&nbsp
            </
form
    <{/if}></
td
          <
td align="left" class="headercenter"
    <{if !
$xoops_isuser}> <{else}> 
            <
form style="margin-top: 0px; margin-bottom: 0px" action="<{$xoops_url}>/register.php" method="post"
              <
input name="submit" type="submit" value="<{$smarty.const._REGISTER}>" /> 
            </
form>


You shuld execute it something like <{if !$xoops_isuser}>
..

3
xKillswitchx
Re: I dont know if there is anyway around this, so I need your help with login box.

Thanks Ill try that. Im probably going about all this the hard way but its really helping me learn alot about Xoops.

4
xKillswitchx
Re: I dont know if there is anyway around this, so I need your help with login box.

When I put that code in it caused everything in the rightblocktheme.html file not to show up.

5
stefan88
Re: I dont know if there is anyway around this, so I need your help with login box.
  • 2006/3/9 23:33

  • stefan88

  • Community Support Member

  • Posts: 1085

  • Since: 2004/9/20


I use it in a table before the columns/blocks part of the theme...
..

6
stefan88
Re: I dont know if there is anyway around this, so I need your help with login box.
  • 2006/3/9 23:54

  • stefan88

  • Community Support Member

  • Posts: 1085

  • Since: 2004/9/20


<{if $xoops_isuser}>
<
a href="<{$xoops_url}>/user.php?op=logout">LOGOUT</a
<{else}> 
<
form action="<{$xoops_url}>/user.php" method="post">
<
input name="uname" type="text" value="" size="14" />
<
input name="pass" type="password" value="" size="12" /> 
<
input name="op" type="hidden" value="login" />
<
input name="submit" type="submit" value="<{$smarty.const._LOGIN}>" />&nbsp
</
form
<{/if}>

<
br/>
    

<{if !
$xoops_isuser}>
<
form action="<{$xoops_url}>/register.php" method="post"
<
input name="submit" type="submit" value="<{$smarty.const._REGISTER}>" /> 
</
form
<{/if}>


You should be able to use this
..

7
nachenko
Re: I dont know if there is anyway around this, so I need your help with login box.
  • 2007/3/10 17:48

  • nachenko

  • Quite a regular

  • Posts: 356

  • Since: 2005/1/18


Quote:
Edit - Can I call a block with an include? Grab the block straight from the modules/system/templates/blocks folder??


yes, you can. Look how I called the submenu function so the submenus of a module and the main menu is separated:

http://www.marruecosdigital.net/xoops/modules/mylinks/

Look the row Enlaces > Enviar enlace. This is the submenu of the Mylinks module.

I used Boox module, that allows you to create custom blocks anywhere in the theme. You have to include some code, but Boox gives you it:

The code in the theme template was:

<{php}>
-- Code given by Boox --
<{/php}>

Then, in the Box, I wrote a PHP piece of code to call the submenu:

Quote:
require_once (XOOPS_ROOT_PATH."/modules/system/blocks/system_blocks.php");
$mainmenu = b_system_main_show();


But this does not show anything in screen, only gives the data, you have to write more PHP code to process the data returned by the fucntion and put it on screen.

8
wizanda
Re: I dont know if there is anyway around this, so I need your help with login box.
  • 2007/3/10 18:06

  • wizanda

  • Home away from home

  • Posts: 1588

  • Since: 2004/3/21


<{if !$xoops_isuser}>
<
form action="<{$xoops_url}>/user.php" method="post" style="margin: 5px;"><input type="hidden" name="xoops_redirect" value="<{$xoops_requesturi}>" /><input type="hidden" name="op" value="login" /> Username: <input type="text" name="uname" size="16"  /> Password: <input type="password" name="pass" size="16"  /><input type="submit" value="login" /><img src="<{$xoops_imageurl}>images/icon_mini_faq.gif" alt="" /><a href="<{$xoops_url}>/user.php#lost"Forgot Password </a><img src="<{$xoops_imageurl}>images/icon_mini_register.gif" alt="" /><a href="<{$xoops_url}>/register.php"Register </a></form>
<{else}>
<
img src="<{$xoops_imageurl}>images/icon_mini_profile.gif" alt="" /><a href="<{$xoops_url}>/user.php"Account </a><img src="<{$xoops_imageurl}>images/icon_mini_groups.gif" alt="" /><a href="<{$xoops_url}>/edituser.php"Edit </a><img src="<{$xoops_imageurl}>images/icon_mini_members.gif" alt="" /><a href="<{$xoops_url}>/notifications.php"Notification </a><img src="<{$xoops_imageurl}>images/icon_mini_message.gif" alt="" /><a href="<{$xoops_url}>/viewpmsg.php"Message </a>
<{if 
$xoops_isadmin}>
<
img src="<{$xoops_imageurl}>images/icon_mini_groups.gif" alt="" /><a href="<{$xoops_url}>/admin.php"Administration </a>
<{/if}>
<
img src="<{$xoops_imageurl}>images/icon_mini_login.gif" alt="" /><a href="<{$xoops_url}>/user.php?op=logout"Logout </a>
<{/if}>

Login

Username:
Password:

Lost Password? Register now!

Who's Online

59 user(s) are online (35 user(s) are browsing Support Forums)


Members: 0


Guests: 59


more...

Donat-O-Meter

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

Latest GitHub Commits