Death Kitten (diziara) wrote in component_help,
Death Kitten

  • Mood:
  • Music:

Login component?

I noticed that on the community page for this community that the post component disappears when one is not logged in. Have you guys considered putting in a login component in it's place when someone isn't logged in?

Let me know if you need help with that, I just did it in my journal using a couple of tutorials/comments with information in them from the community here. And it would be cool!

<edit reason="addition"> I decided that I might as well put the code for the different things all together in one place, since when I found the information on how to do the if, then statement for showing and not showing stuff when one is either logged in or out, as a comment under an entry, and had a little trouble finding it again when I wanted to use it. So yeah, here's the code I used in case anyone else wants to use it.

if( viewer_logged_in() ){
print_comp_header("signed in component title");
"""Content for signed in component, recommendations either an update component, or a full update component.""";
} else {
"""<form action='' method='post'>
<div class="standout"><table class="container"><tr><td>
<table cellpadding='3'>
<tr><td>Username:</td><td><input type='text' name='user' size='15' maxlength='15' /></td></tr>
<tr><td valign='top'>Password:</td><td><input type='password' name='password' size='15' maxlength='30' /><br /></td></tr>
<tr valign='top'>
<td align='center'><input name='action:login' type='submit' value='Log In' /></td></tr>

Tags: admin: deprecated, user: diziara

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened