Adding a login form beside other content.

Mudjosh - July 4, 2009 - 17:52

This may be pretty easy.. But I couldn't figure it out. I moved here from Silverstripe because they are so new and lack the necessities I have to have.

But now I am confronted with another issue.

I am designing a very simple design with a square "Contact me" image, a "Register" image/ User Profile image and a "Login / Mail" image..

These three will be inline..
In Silverstripe I did this by editing the template.. The template was html and I know html pretty decently.. I do not know php at all hardly.. Which puts me in a spot..

Is this at all possible? If so how?

Thanks a million.

(I have not searched for this answer.. I figured the search would be very general and it would take a good bit of filtering before I got anything of what I'm looking for. )

From what you wrote they

nevets - July 4, 2009 - 18:11

From what you wrote they sound like blocks would help out. In this case I would suggest five blocks, "Contact Me", "Register", "User Profile", "Login" (there is a standard login block) and "Mail". Since you can control block visibility you can display the last 4 blocks based on the users role.

Thanks for the response! I

Mudjosh - July 4, 2009 - 18:14

Thanks for the response!

I was looking at blocks and I had guessed that blocks cannot be put side by side unless they are in the left, content, and right columns.

So, am I incorrect and they can be placed side by side in the content column? (This is what I am after)

Yay! I actually figured it

Mudjosh - July 4, 2009 - 18:21

Yay! I actually figured it out myself.

For future readers:
I added the following form into my context:

<form id="user-login" method="post" accept-charset="UTF-8" action="/user">
<div><div id="edit-name-wrapper" class="form-item">
<label for="edit-name">Username: <span title="This field is required." class="form-required">*</span></label>
<input type="text" class="form-text required" value="" size="60" id="edit-name" name="name" maxlength="60" style="background-color: rgb(255, 255, 160);"/>
<div class="description">Enter your username.</div>
</div>
<div id="edit-pass-wrapper" class="form-item">
<label for="edit-pass">Password: <span title="This field is required." class="form-required">*</span></label>
<input type="password" class="form-text required" size="60" maxlength="128" id="edit-pass" name="pass"/>
<div class="description">Enter the password that accompanies your username.</div>
</div>
<input type="hidden" value="form-01ae824a51f3fcdd4adf6b13e7ecd5bb" id="form-01ae824a51f3fcdd4adf6b13e7ecd5bb" name="form_build_id"/>
<input type="hidden" value="user_login" id="edit-user-login" name="form_id"/>
<input type="submit" class="form-submit" value="Log in" id="edit-submit" name="op"/>

</div></form>

Some of it may need to be edited to work with your site though.. :P

I don't know if that is the best way to do it but it accomplishes my purposes.

Thanks for the help!

[Edited to add <code> and </code> tags; nevets]

You can add a new region and

nevets - July 4, 2009 - 18:22

You can add a new region and float the blocks left (so they end up side by side) or use the panels module.

I'll look at the panels

Mudjosh - July 4, 2009 - 18:32

I'll look at the panels module. Obviously I'm still new at Drupal.

And thanks for the code tags.. I didn't know html was allowed.. I'm used to bbcode.. :P

*Hits head as he reads above the save button*

 
 

Drupal is a registered trademark of Dries Buytaert.