NaturalBornSkinner: Free Horizontal Login block for phpfox

Jump to content

Free Horizontal Login block for phpfox Bookmark

User is offline Ahtesham 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 6
  • Joined: 17-April 11
  • 0
  • Gender:Male
  • PHPFox Version:2.0.6
  • Country Flag:India
Kudos: -8
Neutral

Find Posts Tutorial info

  • Added on: 22 June 2011 - 02:32 PM
  • Views: 2,268
Description: I want to show you how to make horizontal block in phpfox v2.x

Hi

I m not a very good developer,
but i m still working on phpfox,

i faced very hard problems to customize it,

But now i got everything whatever i want on that script.
i m working on this last 3 months.

Now i can show everyone how to make Horizontal Login block,

Create a new block

admincp >> cms >> blocks >> new block

with these details

Product: phpfox Module: user Title: horizontal-login-block
Type: php code
controller: --core.index-visitor
Placement: Block 7

Put this code

<?php 
defined('PHPFOX') or exit('NO DICE!'); 
?>
{$sCreateJs}
<TABLE align="center">
<form method="post" action="{url link="user.login"}" id="js_login_form" onsubmit="{$sGetJsForm}">
<TR>
<TD>
<label for="login"><b>{if Phpfox::getParam('user.login_type') == 'user_name'}{phrase var='user.user_name'}{elseif Phpfox::getParam('user.login_type') == 'email'}{phrase var='user.email'}{else}{phrase var='user.login'}{/if}:</b></label>
<input type="text" name="val[login]" id="login" value="{$sDefaultEmailInfo}" size="30" />
</TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<TD>
<label for="password"><b>{phrase var='user.password'}:</b></label>
<input type="password" name="val[password]" id="password" value="" size="30" />
</TD>
<TD>
<div class="table_clear">
<input type="submit" value="{phrase var='user.login_button'}" class="button" />
</TD>
<td><label><input type="checkbox" class="checkbox" name="val[remember_me]" value="" /><b> {phrase var='user.remember'}</b></label> | <a href="{url link='user.password.request'}"><b>{phrase var='user.forgot_your_password'}</b></a></td>
</TR>
</form>	
</TABLE>





and then save, go to tools >> maintenance >> cache manager, and clear cache.

then go to cms>>blocks>>manage blocks

click on site wide, now see [user::login-block] in right side panel, click on green icon to change that on red
Done.

now you have horizontal login

if you have facebook enable, please use blow code



<?php 
defined('PHPFOX') or exit('NO DICE!'); 
?>
{$sCreateJs}
	
<TABLE align="left">
<form method="post" action="{url link="user.login"}" id="js_login_form" onsubmit="{$sGetJsForm}">

<TR>
<TD>
&nbsp; &nbsp; &nbsp; &nbsp; <label for="login"><b>{if Phpfox::getParam('user.login_type') == 'user_name'}{phrase var='user.user_name'}{elseif Phpfox::getParam('user.login_type') == 'email'}{phrase var='user.email'}{else}{phrase var='user.login'}{/if}:</b></label>
<input type="text" name="val[login]" id="login" value="{$sDefaultEmailInfo}" size="30" />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <label><input type="checkbox" class="checkbox" name="val[remember_me]" value="" /><b> {phrase var='user.remember'}</b></label>
</TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<TD>
<label for="password"><b>{phrase var='user.password'}:</b></label>
			<input type="password" name="val[password]" id="password" value="" size="30" />
			<br />
		&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;	&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="{url link='user.password.request'}"><b>{phrase var='user.forgot_your_password'}</b></a>
			</TD>
			<TD>

		
		<div class="table_clear">
			<input type="submit" value="{phrase var='user.login_button'}" class="button" />

</TD>
<td>{plugin call='user.template_controller_login_block__end'}</td>
</TR>
</form>	
</TABLE>

-8

Share:

Powered by (IM) Tutorials 1.1.0 © 2012, by Michael McCune