Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Oct 11th, 2010  |  syntax: None  |  size: 2.52 KB  |  views: 38  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. /*
  3.         Plugin Name: Buddypress Twitstyle Login
  4.         Plugin URI:
  5.         Description:
  6.         Author: Charl Kruger
  7.         Author URI:
  8.         Version: 1.0
  9.  
  10.  
  11.     This program is free software; you can redistribute it and/or modify
  12.     it under the terms of the GNU General Public License as published by
  13.     the Free Software Foundation; either version 2 of the License, or
  14.     (at your option) any later version.
  15.  
  16.     This program is distributed in the hope that it will be useful,
  17.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  18.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  19.     GNU General Public License for more details.
  20.  
  21.     You should have received a copy of the GNU General Public License
  22.     along with this program; if not, write to the Free Software
  23.     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  24. */
  25.  
  26.  
  27.  
  28.  
  29.  
  30. //add css
  31. function twitstyle_login_header() {
  32.         echo '<link rel="stylesheet" type="text/css" href="'.WP_PLUGIN_URL.'/buddypress-twitstyle-login/twitstyle-login.css" media="screen" />'."\n";
  33. }
  34. add_action('wp_head', 'twitstyle_login_header');
  35.  
  36. //add js
  37.  
  38. function twitstyle_login_scripts() {
  39.   wp_enqueue_script( "buddypress-twitstyle-login", path_join(WP_PLUGIN_URL, basename( dirname( __FILE__ ) )."/twitstyle-login.js"), array( 'jquery' ) );
  40. }
  41. add_action('wp_print_scripts', 'twitstyle_login_scripts');
  42.  
  43. //the form
  44.  
  45. function twitstyle() {
  46. ?>
  47. <div id="container">
  48.   <div id="topnav" class="topnav"> Have an account? <a href="login" class="signin"><span>Sign in</span></a> </div>
  49.   <fieldset id="signin_menu">
  50.     <form method="post" id="signin" action="https://twitter.com/sessions">
  51.       <label for="username">Username or email</label>
  52.       <input id="username" name="username" value="" title="username" tabindex="4" type="text">
  53.       </p>
  54.       <p>
  55.         <label for="password">Password</label>
  56.         <input id="password" name="password" value="" title="password" tabindex="5" type="password">
  57.       </p>
  58.       <p class="remember">
  59.         <input id="signin_submit" value="Sign in" tabindex="6" type="submit">
  60.         <input id="remember" name="remember_me" value="1" tabindex="7" type="checkbox">
  61.         <label for="remember">Remember me</label>
  62.       </p>
  63.       <p class="forgot"> <a href="#" id="resend_password_link">Forgot your password?</a> </p>
  64.       <p class="forgot-username"> <A id=forgot_username_link
  65. title="If you remember your password, try logging in with your email"
  66. href="#">Forgot your username?</A> </p>
  67.     </form>
  68.   </fieldset>
  69. </div>
  70. <?php
  71.  
  72. }
  73. add_action( 'bp_before_header', 'twitstyle' );
  74.  
  75. ?>
clone this paste RAW Paste Data