Hi
Gibt es eine möglichkeit die Loginfelder einer SMF 2.0 RC5 Installation in Wordpress einzufügen(in der Sidebar)
Ich habe für den login in der Sidebar ein Text-widget mit folgenden code verwendet:
<?php
global $user_ID, $user_identity;
get_currentuserinfo();
if (!$user_ID):
?>
<h2><?php _e('Login'); ?></h2>
<form name="loginform" id="loginform" action="<?php echo get_settings('siteurl'); ?>/wp-login.php" method="post">
<div>
<label><?php _e('Login') ?>:
<br />
<input type="text" name="log" id="log" value="" size="20" tabindex="7" />
</label>
<br />
<label><?php _e('Password') ?>:
<br />
<input type="password" name="pwd" id="pwd" value="" size="20" tabindex="8" />
</label>
<br />
<input type="submit" name="submit" value="<?php _e('Login'); ?> »" tabindex="9" />
<?php wp_register('', ''); ?>
<input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>"/>
</div>
</form>
<?php
else:
?>
<h2><?php echo $user_identity; ?></h2>
<ul>
<?php wp_register(); ?>
<li><a href="<?php echo get_settings('siteurl') . '/wp-login.php?action=logout&redirect_to=' . $_SERVER['REQUEST_URI']; ?>"><?php _e('Logout'); ?></a></li>
</ul>
<?php
endif;
?>
</li>
Alles anzeigen
zudem möchte ich noch die Links "Registrieren" und "Logout" so verlinken das man sich 1. bei SMF registriert und 2. bei SMF auslogt.
Ich weiß nicht wie viel arbeit das ist(hab keine ahnung in php)
Ziel des ganze ist es das die Modifikation [WIP] WordPress 3.0+ / SMF 2.0 RC4+ User Integration
perfekt funktioniert
da ja die bedingung gestellt ist:
- All user registrations and logins/logouts must go through SMF
Testaccount:
benutzername: testuser
PW: test12
WP version:3.1.2
SMF: 2.0 RC5
Links: WP SMF
Danke im voraus
mfg pspracers
PS.:Spende über Paypal ist auch möglich
Edit:
Ich glaube zu wissen das das der code für die loginfelder des themes sein dürften
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
elseif (!empty($context['show_login_bar']))
{
echo '
<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/sha1.js"></script>
<form id="guest_form" action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" ', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<div class="info">', $txt['login_or_register'], '</div>
<input type="text" name="user" size="10" class="input_text" />
<input type="password" name="passwrd" size="10" class="input_password" />
<select name="cookielength">
<option value="60">', $txt['one_hour'], '</option>
<option value="1440">', $txt['one_day'], '</option>
<option value="10080">', $txt['one_week'], '</option>
<option value="43200">', $txt['one_month'], '</option>
<option value="-1" selected="selected">', $txt['forever'], '</option>
</select>
<input type="submit" value="', $txt['login'], '" class="button_submit" /><br />
<div class="info">', $txt['quick_login_dec'], '</div>';
if (!empty($modSettings['enableOpenID']))
echo '
<br /><input type="text" name="openid_identifier" id="openid_url" size="25" class="input_text openid_login" />';
echo '
<input type="hidden" name="hash_passwrd" value="" />
</form>';
}
echo '
</div>
<div class="news normaltext">
<form id="search_form" action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
<input type="text" name="search" value="" class="input_text" />
<input type="submit" name="submit" value="', $txt['search'], '" class="button_submit" />
<input type="hidden" name="advanced" value="0" />';
Alles anzeigen