예제 #1
0
function rm_fb_connect()
{
    ?>
			<p class="rm-fb-connect"><?php 
    jfb_output_facebook_btn();
    ?>
</p>
        <?php 
}
function wpfbbtn_append_button()
{
    if (isset($_GET['redirect_to'])) {
        $redirectTo = $_GET['redirect_to'];
    } else {
        $redirectTo = htmlspecialchars($_SERVER['REQUEST_URI']);
    }
    if (strpos($redirectTo, 'login')) {
        $redirectTo = '/';
    }
    jfb_output_facebook_btn();
    jfb_output_facebook_init();
    jfb_output_facebook_callback($redirectTo);
}
예제 #3
0
    function widget($args, $instance)
    {
        //Get args and output the title
        extract($args);
        echo $before_widget;
        $title = apply_filters('widget_title', $instance['title']);
        if ($title) {
            echo $before_title . $title . $after_title;
        }
        //If logged in, show "Welcome, User!"
        if (is_user_logged_in()) {
            ?>
            <div style='text-align:center'>
              <?php 
            $userdata = wp_get_current_user();
            echo __('Welcome') . ', ' . $userdata->display_name;
            ?>
!<br />
              <small>
                <a href="<?php 
            echo get_option('siteurl');
            ?>
/wp-admin/profile.php"><?php 
            _e("Edit Profile");
            ?>
</a> | <a href=" <?php 
            echo wp_logout_url($_SERVER['REQUEST_URI']);
            ?>
"><?php 
            _e("Logout");
            ?>
</a>
              </small>
            </div>
        <?php 
            //Otherwise, show the login form (with Facebook Connect button)
        } else {
            ?>
            <form name='loginform' id='loginform' action='<?php 
            echo site_url('wp-login.php', 'login_post');
            ?>
' method='post'>
                <label>User:</label><br />
                <input type='text' name='log' id='user_login' class='input' tabindex='20' /><input type='submit' name='wp-submit' id='wp-submit' value='Login' tabindex='23' /><br />
                <label>Pass:</label><br />
                <input type='password' name='pwd' id='user_pass' class='input' tabindex='21' />
                <span id="forgotText"><a href="<?php 
            echo get_option('siteurl');
            ?>
/wp-login.php?action=lostpassword" rel="nofollow" ><?php 
            _e('Forgot');
            ?>
?</a></span><br />
                <?php 
            //echo "<input name='rememberme' type='hidden' id='rememberme' value='forever' />";
            ?>
                <?php 
            echo wp_register('', '');
            ?>
                <input type='hidden' name='redirect_to' value='<?php 
            echo htmlspecialchars($_SERVER['REQUEST_URI']);
            ?>
' />
            </form>
            <?php 
            global $opt_jfb_hide_button;
            if (!get_option($opt_jfb_hide_button)) {
                jfb_output_facebook_btn();
                //jfb_output_facebook_init(); This is output in wp_footer as of 1.5.4
                //jfb_output_facebook_callback(); This is output in wp_footer as of 1.9.0
            }
        }
        echo $after_widget;
    }
예제 #4
0
파일: Main.php 프로젝트: nxtclass/NXTClass
function jfb_bp_add_fb_login_button()
{
    if (!is_user_logged_in()) {
        echo "<p></p>";
        jfb_output_facebook_btn();
    }
}
예제 #5
0
<?php

/**
 * ICE API: feature extensions, BuddyPress Facebook Auto-Connect feature template file
 *
 * @author Marshall Sorenson <*****@*****.**>
 * @link http://infinity.presscrew.com/
 * @copyright Copyright (C) 2010-2011 Marshall Sorenson
 * @license http://www.gnu.org/licenses/gpl.html GPLv2 or later
 * @package ICE-extensions
 * @subpackage features
 * @since 1.0
 */
/* @var $this ICE_Feature_Renderer */
?>
<div <?php 
$this->render_attrs();
?>
>
	<?php 
jfb_output_facebook_btn();
?>
</div>