Blogzerk Forums
Welcome, Guest. Please login or register.
September 04, 2010, 12:41:30 AM
100 Posts in 33 Topics by 13 Members
Latest Member: duonexus
Home Help Search Login Register
Blogzerk Forums  |  Tips and Tricks  |  Look and Feel  |  HOWTO: Create a Custom Login Component « previous next »
Pages: [1] Go Down Print
Author Topic: HOWTO: Create a Custom Login Component  (Read 2694 times)
Zerkie
Blogzerk Administrator
Administrator
Jr. Member
*****
Offline Offline

Posts: 57


View Profile WWW
HOWTO: Create a Custom Login Component
« on: January 10, 2006, 01:19:20 PM »

While most of the system components in Blogzerk/Blogware can be customized, some cannot. The Login Form is one of these. In this howto, we'll create a custom component to modify the login form to add link to log in to the User Control Panel or request a forgotten password.

Step 1: Create a New Component
Create a custom component. Name the component MyLogin or something that will be memorable and separate it from the standard login form. In the content for the component, copy and paste the following:

Code:
<div class="component">
<div class="componentHead">Login</div>
<div class="componentContent">
<div class="componentLogin">
<form method=post action="/blog/">
<input type=hidden name=cmd value="login">
<table border="0" cellpadding="2" cellspacing="0"
class="componentLogin"><tr>
<td align="right" nowrap>Username:</td>
<td align="left" nowrap><input type=text name=username value=""
size=10></td>
</tr><tr>
<td align="right" nowrap>Password:</td>
<td align="left" nowrap><input type=password name=password value=""
size=10></td>
</tr><tr>
<td>&nbsp;</td>
<td align="left" nowrap>
<div style="margin-top:2px;">
<input type="submit" class="buttonWhite" value="Login"></div></td>
</tr><tr>
<td align="right" colspan="2">
<div style="margin:8px 0 6px 0;"><a
href="/blog/cmd=manage_notices">Create Reader Account</a></div>
<div style="margin:8px 0 6px 0;"><a
href="http://www.blogware.com/users/index.cgi">Log in to the Reader Control Panel or
Retrieve a Lost Password</div></td>
</tr></table>
</form>
</div> <!-- componentLogin -->
</div> <!-- componentContent -->
</div> <!-- component -->

Save the component.

Step 2: Replace the System Component
Using the Layout Editor, drag the Login Form component to the Inactive column. Then, drag the Custom:MyLogin (or whatever you used for the name) to the spot where the Login Form component was.
Save your changes. Now view your blog and your custom component with the new link should show up.

Step 3: Customization
If you want to customize the link text to be something instead of Log in to the Reader Control Panel or
Retrieve a Lost Password
, edit the component and change that text. Be sure to keep the <a> tags around it intact.
Logged

Pages: [1] Go Up Print 
« previous next »
Jump to: