move 'Connect' button to local chanview page, remove from remote profile pages - still requires some theming love
This commit is contained in:
		
							
								
								
									
										6
									
								
								boot.php
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								boot.php
									
									
									
									
									
								
							| @@ -1334,12 +1334,6 @@ if(! function_exists('profile_sidebar')) { | ||||
| 			} | ||||
| 		} | ||||
|  | ||||
| 		if(get_my_url() && $profile['unkmail']) | ||||
| 			$wallmessage = t('Message'); | ||||
| 		else | ||||
| 			$wallmessage = false; | ||||
|  | ||||
|  | ||||
|  | ||||
| 		// show edit profile to yourself | ||||
| 		if($is_owner) { | ||||
|   | ||||
| @@ -2,9 +2,22 @@ | ||||
|  | ||||
|  | ||||
| function vcard_from_xchan($xchan) { | ||||
|  | ||||
| 	$connect = false; | ||||
| 	if(local_user()) { | ||||
| 		$r = q("select * from abook where abook_xchan = '%s' and abook_channel = %d limit 1", | ||||
| 			dbesc($xchan['xchan_hash']), | ||||
| 			intval(local_user()) | ||||
| 		); | ||||
| 		if(! $r) | ||||
| 			$connect = t('Connect'); | ||||
| 	} | ||||
| 	 | ||||
| 	return replace_macros(get_markup_template('xchan_vcard.tpl'),array( | ||||
| 		'$name'  => $xchan['xchan_name'], | ||||
| 		'$photo' => $xchan['xchan_photo_l'] | ||||
| 		'$name'    => $xchan['xchan_name'], | ||||
| 		'$photo'   => $xchan['xchan_photo_l'], | ||||
| 		'$url'     => $xchan['xchan_addr'], | ||||
| 		'$connect' => $connect | ||||
| 	)); | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -47,16 +47,6 @@ | ||||
| 	{{ if $homepage }}<dl class="homepage"><dt class="homepage-label">$homepage</dt><dd class="homepage-url"><a href="$profile.homepage" >$profile.homepage</a></dd></dl>{{ endif }} | ||||
|  | ||||
| 	 | ||||
| 	<div id="profile-extra-links"> | ||||
| 		<ul> | ||||
| 			{{ if $connect }} | ||||
| 				<li><a id="dfrn-request-link" href="dfrn_request/$profile.nickname">$connect</a></li> | ||||
| 			{{ endif }} | ||||
| 			{{ if $wallmessage }} | ||||
| 				<li><a id="wallmessage-link" href="wallmessage/$profile.nickname">$wallmessage</a></li> | ||||
| 			{{ endif }} | ||||
| 		</ul> | ||||
| 	</div> | ||||
| </div> | ||||
|  | ||||
| $contact_block | ||||
|   | ||||
| @@ -2,3 +2,14 @@ | ||||
| <div class="fn">$name</div> | ||||
| <div id="profile-photo-wrapper"><img class="vcard-photo photo" src="$photo" alt="name" /></div> | ||||
| </div> | ||||
|  | ||||
|  | ||||
| 	 | ||||
| <div id="profile-extra-links"> | ||||
| <ul> | ||||
| {{ if $connect }} | ||||
| 	<li><a id="follow-link" href="follow?f=&url=$follow">$connect</a></li> | ||||
| {{ endif }} | ||||
| </ul> | ||||
| </div> | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user