Hi,
I have a file, loginform.php that i want to have just under the header, before the main page starts. the file looks like this:
<div id="loginbox">
<?php
global $user_ID, $user_identity;
get_currentuserinfo();
if (!$user_ID):
?>
<div style="float:left;margin-right:5px;color:yellow;">Register, upload AVATAR, save SCORES, meet FRIENDS!</div>
<form name="loginform" id="loginform" action="<?php echo get_settings('siteurl'); ?>/wp-login.php" method="post">
<label>
<?php _e('Username') ?>:
<input type="text" name="log" id="log" value="" size="10" tabindex="7" />
</label>
<label>
<?php _e('Password') ?>:
<input type="password" name="pwd" id="pwd" value="" size="10" tabindex="8" />
</label>
<label>
<input type="checkbox" name="rememberme" value="forever" tabindex="9" /> <?php _e("Remember me"); ?>
</label>
<input type="submit" name="submit" value="Login" tabindex="10" class="button" />
<?php wp_register('', ''); ?>
<input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI'];?>"/>
</form>
</div>
<?php else: ?>
<?php // check for buddypress or mingle ?>
<div style="float:left;">Welcome back, <?php echo $user_identity; ?>!</div>
<div style="float:right;margin-right:10px;">
<?php if ( defined('MNGL_PLUGIN_NAME') ) : ?>
/profile/" title="View Your Profile Page"><font color="yellow">Profile
|
/profile-settings/" title="Change Your Settings"><font color="yellow">Settings
|
/friends/" title="View Your Friends"><font color="yellow">Friends
|
/friend-requests/" title="Add New Friends"><font color="yellow">Friend Requests
<?php elseif ( defined('BP_VERSION') ) : ?>
<?php global $bp; ?>
loggedin_user->domain . BP_ACTIVITY_SLUG . '/'; ?>">Activity
|
">Members
|
loggedin_user->domain ?>">Profile
|
loggedin_user->domain . $bp->myscore->slug . '/'; ?>">My Scores
<?php endif; ?>
|
<?php
if ( ! is_user_logged_in() )
$link = '' . __('Log in') . '';
else
$link = "Log out";
echo apply_filters('loginout', $link);
?>
</div>
<?php endif; ?>
</div>
<div class="clear"></div>
When i try to call this file with this string. <?php include (TEMPLATEPATH . '/loginform.php'); ?>
the whole site goes white.
This is how i try to do it:
<?php get_header();
<?php include (TEMPLATEPATH . '/loginform.php'); ?>
// this outputs the headline on your mainpage within an h2 tag
if($k_option['general']['headline'] != '')
{
echo '<div id="feature_info">';
echo '<h2>'.$k_option['general']['headline'].'</h2>';
echo '</div>';
}
I don't know what i'm doing wrong here, can you help me?
Thank you.














