Пример #1
0
<?php 
    }
}
?>

	<p class="submit right">
		<input type="submit" name="Submit" value="<?php 
echo esc_attr__('Update Profile &raquo;');
?>
" />
	</p>

</form>

<form method="post" action="<?php 
profile_tab_link($user->ID, 'edit');
?>
">

	<p class="submit left">
		<?php 
bb_nonce_field('edit-profile_' . $user->ID);
?>
		<?php 
user_delete_button();
?>
	</p>

</form>

<?php 
Пример #2
0
echo get_user_display_name($user->ID);
?>
</span> <small>(<span class="nickname"><?php 
echo get_user_name($user->ID);
?>
</span>)</small></h2>

<?php 
if ($updated) {
    ?>
<div class="notice">
<p><?php 
    _e('Profile updated');
    ?>
. <a href="<?php 
    profile_tab_link($user_id, 'edit');
    ?>
"><?php 
    _e('Edit again &raquo;');
    ?>
</a></p>
</div>
<?php 
} elseif ($user_id == bb_get_current_user_info('id')) {
    ?>
<p>
<?php 
    _e('This is how your profile appears to a logged in member.');
    ?>

<?php 
Пример #3
0
function li_foot_script()
{
    //ob_start();
    global $bb_current_user;
    $_linkedin_need_email_form = FALSE;
    $user =& $bb_current_user->data;
    if ($_SESSION['oauth']['linkedin']['authorized'] === TRUE && bb_is_user_logged_in() && !li_check_if_email_set(bb_get_user_email($user->ID))) {
        //if ( li_get_prompt_status_by_userid(bb_get_user_id($user->ID))) {
        //echo $_SERVER['REQUEST_URI'];
        //echo $_SERVER['PHP_SELF'];
        //echo '/forum/profile/'.(get_user_name($user->ID).'/edit');
        // make sure not show on profile edit tab as we want users to edit email
        if (strpos($_SERVER['REQUEST_URI'], '/forum/profile/' . (get_user_name($user->ID) . '/edit')) !== FALSE) {
            $_linkedin_need_email_form = FALSE;
        } else {
            $_linkedin_need_email_form = TRUE;
        }
        //}
    }
    ?>
	
	<div id="li-root"></div>
	<!-- begin LinkedIn Connect footer -->
	<?php 
    if ($_linkedin_need_email_form) {
        /*<form method="post" action="<?php $_SERVER['PHP_SELF'] ?>">
        		<label for="user_email">Email</label>
        		<input name="user_email" id="user_email" type="text" value="">
        		</br>
        		<label for="user_email_validate">Enter Email Again</label>
        		<input name="user_email_validate" id="user_email_validate" type="text" value="">
        		
        		<p class="submit left">
        		  <input type="submit" name="Defer" value="Skip">
        		</p>
        		<p class="submit right">
        		  <input type="submit" name="Submit" value="Update Email »">
        		</p>
        		</form>*/
        ?>
		<div id="linkedin_email_form">
			<a id="linkedin_email_form_close" style="cursor: pointer">x</a> 
			<br/> 

			<p>LinkedIn won’t give us an email address.</p>
			<p>Please click <a id="linkedin_email_form_close_button" 
				href="<?php 
        profile_tab_link(bb_get_user_id($user->ID), 'edit');
        ?>
" style="color:white;">here</a> to update it in your profile.</p>
			<br/>
			<p>That allows you to receive answers to comments on your posts by email.</p>
		</div>
		<div id="backgroundPopup"></div>  
	<?php 
    }
    //ob_flush();
    ?>
	
	<script>
	<?php 
    if ($_linkedin_need_email_form) {
        ?>
		//SETTING UP OUR POPUP
		//0 means disabled; 1 means enabled;
		var popupStatus = 0;

		function loadPopup(){
		if(popupStatus==0){
		$("#backgroundPopup").css({
		"opacity": "0.7"
		});
		$("#backgroundPopup").fadeIn("slow");
		$("#linkedin_email_form").fadeIn("slow");
		popupStatus = 1;
		}
		}
		function disablePopup(){
		if(popupStatus==1){
		$("#backgroundPopup").fadeOut("slow");
		$("#linkedin_email_form").fadeOut("slow");
		popupStatus = 0;
		}
		}
		//centering popup
		function centerPopup(){
		//request data for centering
		var windowWidth = document.documentElement.clientWidth;
		var windowHeight = document.documentElement.clientHeight;
		var popupHeight = $("#linkedin_email_form").height();
		var popupWidth = $("#linkedin_email_form").width();
		//centering
		$("#linkedin_email_form").css({
		"position": "absolute",
		"top": windowHeight/2-popupHeight/2,
		"left": windowWidth/2-popupWidth/2
		});
		//only need force for IE6
		$("#backgroundPopup").css({
		"height": windowHeight
		});
		}

		$(document).ready(function(){
			
			centerPopup();
			loadPopup();

			$("#linkedin_email_form_close").click(function(){
				disablePopup();
			});
			
			$("#linkedin_email_form_close_button").click(function(){
				disablePopup();
			});

			$("#backgroundPopup").click(function(){
				disablePopup();
			});
			
		});
		
		 
	<?php 
    }
    ?>
		var addUrlParam = function(search, key, val){
		  var newParam = key + '=' + val,
		  params = '?' + newParam;
	
		  if (search) {
		    params = search.replace(new RegExp('[\?&]' + key + '[^&]*'), '$1' + newParam);
		    if (params === search) {
		      params += '&' + newParam;
		    }
		  }
		  return params;
		};
		
		function li_login_action(){
			document.location = document.location.pathname + addUrlParam(document.location.search, 'li_bb_connect', escape(document.location));
		}; 
		
		function li_revoke_action() {
			document.location = document.location.pathname + addUrlParam(document.location.search, 'li_bb_revoke', escape(document.location));
		};
	</script>
	
	<!-- end Linkedin Connect footer -->
<?php 
}