lots more zcard tweaks
This commit is contained in:
parent
3da8f9b13c
commit
315ce6d880
1
boot.php
1
boot.php
@ -650,7 +650,6 @@ class App {
|
|||||||
private $perms = null; // observer permissions
|
private $perms = null; // observer permissions
|
||||||
private $widgets = array(); // widgets for this page
|
private $widgets = array(); // widgets for this page
|
||||||
|
|
||||||
|
|
||||||
public $groups;
|
public $groups;
|
||||||
public $language;
|
public $language;
|
||||||
public $module_loaded = false;
|
public $module_loaded = false;
|
||||||
|
@ -913,7 +913,7 @@ function profile_load(&$a, $nickname, $profile = '') {
|
|||||||
* @return HTML string suitable for sidebar inclusion
|
* @return HTML string suitable for sidebar inclusion
|
||||||
* Exceptions: Returns empty string if passed $profile is wrong type or not populated
|
* Exceptions: Returns empty string if passed $profile is wrong type or not populated
|
||||||
*/
|
*/
|
||||||
function profile_sidebar($profile, $block = 0, $show_connect = true) {
|
function profile_sidebar($profile, $block = 0, $show_connect = true, $zcard = false) {
|
||||||
|
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
|
|
||||||
@ -1058,6 +1058,7 @@ function profile_sidebar($profile, $block = 0, $show_connect = true) {
|
|||||||
$z = widget_rating(array('target' => $profile['channel_hash']));
|
$z = widget_rating(array('target' => $profile['channel_hash']));
|
||||||
|
|
||||||
$o .= replace_macros($tpl, array(
|
$o .= replace_macros($tpl, array(
|
||||||
|
'$zcard' => $zcard,
|
||||||
'$profile' => $profile,
|
'$profile' => $profile,
|
||||||
'$connect' => $connect,
|
'$connect' => $connect,
|
||||||
'$connect_url' => $connect_url,
|
'$connect_url' => $connect_url,
|
||||||
@ -1796,8 +1797,8 @@ function get_zcard($channel,$observer_hash = '',$args = array()) {
|
|||||||
$cover_size = PHOTO_RES_COVER_425;
|
$cover_size = PHOTO_RES_COVER_425;
|
||||||
$pphoto = array('type' => $channel['xchan_photo_mimetype'], 'width' => 80 , 'height' => 80, 'href' => $channel['xchan_photo_m']);
|
$pphoto = array('type' => $channel['xchan_photo_mimetype'], 'width' => 80 , 'height' => 80, 'href' => $channel['xchan_photo_m']);
|
||||||
}
|
}
|
||||||
elseif($maxwidth <= 850) {
|
elseif($maxwidth <= 900) {
|
||||||
$width = 850;
|
$width = 900;
|
||||||
$size = 'hz_medium';
|
$size = 'hz_medium';
|
||||||
$cover_size = PHOTO_RES_COVER_850;
|
$cover_size = PHOTO_RES_COVER_850;
|
||||||
$pphoto = array('type' => $channel['xchan_photo_mimetype'], 'width' => 160 , 'height' => 160, 'href' => $channel['xchan_photo_l']);
|
$pphoto = array('type' => $channel['xchan_photo_mimetype'], 'width' => 160 , 'height' => 160, 'href' => $channel['xchan_photo_l']);
|
||||||
@ -1832,6 +1833,7 @@ function get_zcard($channel,$observer_hash = '',$args = array()) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$o .= replace_macros(get_markup_template('zcard.tpl'),array(
|
$o .= replace_macros(get_markup_template('zcard.tpl'),array(
|
||||||
|
'$maxwidth' => $maxwidth,
|
||||||
'$scale' => $scale,
|
'$scale' => $scale,
|
||||||
'$translate' => $translate,
|
'$translate' => $translate,
|
||||||
'$size' => $size,
|
'$size' => $size,
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
require_once('include/dir_fns.php');
|
require_once('include/dir_fns.php');
|
||||||
require_once('include/contact_widgets.php');
|
require_once('include/contact_widgets.php');
|
||||||
require_once('include/attach.php');
|
require_once('include/attach.php');
|
||||||
|
require_once('include/Contact.php');
|
||||||
|
|
||||||
function widget_profile($args) {
|
function widget_profile($args) {
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
@ -16,6 +16,16 @@ function widget_profile($args) {
|
|||||||
return profile_sidebar($a->profile, $block, true);
|
return profile_sidebar($a->profile, $block, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function widget_zcard($args) {
|
||||||
|
$a = get_app();
|
||||||
|
$block = (((get_config('system', 'block_public')) && (! local_channel()) && (! remote_channel())) ? true : false);
|
||||||
|
$channel = channelx_by_n($a->profile_uid);
|
||||||
|
return get_zcard($channel,get_observer_hash(),array('width' => 875));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// FIXME The problem with the next widget is that we don't have a search function for webpages that we can send the links to.
|
// FIXME The problem with the next widget is that we don't have a search function for webpages that we can send the links to.
|
||||||
// Then we should also provide an option to search webpages and conversations.
|
// Then we should also provide an option to search webpages and conversations.
|
||||||
|
|
||||||
@ -369,6 +379,17 @@ function widget_fullprofile($arr) {
|
|||||||
return profile_sidebar($a->profile, $block);
|
return profile_sidebar($a->profile, $block);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function widget_shortprofile($arr) {
|
||||||
|
$a = get_app();
|
||||||
|
if(! $a->profile['profile_uid'])
|
||||||
|
return;
|
||||||
|
|
||||||
|
$block = (((get_config('system', 'block_public')) && (! local_channel()) && (! remote_channel())) ? true : false);
|
||||||
|
|
||||||
|
return profile_sidebar($a->profile, $block, true, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function widget_categories($arr) {
|
function widget_categories($arr) {
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
|
|
||||||
|
0
library/jgrowl/jquery.jgrowl.map
Normal file
0
library/jgrowl/jquery.jgrowl.map
Normal file
@ -1,8 +1,11 @@
|
|||||||
<div class="vcard">
|
<div class="vcard">
|
||||||
|
{{if ! $zcard}}
|
||||||
<div id="profile-photo-wrapper"><img class="photo" src="{{$profile.photo}}?rev={{$profile.picdate}}" alt="{{$profile.name}}"></div>
|
<div id="profile-photo-wrapper"><img class="photo" src="{{$profile.photo}}?rev={{$profile.picdate}}" alt="{{$profile.name}}"></div>
|
||||||
|
{{/if}}
|
||||||
{{if $connect}}
|
{{if $connect}}
|
||||||
<div class="connect-btn-wrapper"><a href="{{$connect_url}}" class="btn btn-block btn-success btn-sm"><i class="icon-plus"></i> {{$connect}}</a></div>
|
<div class="connect-btn-wrapper"><a href="{{$connect_url}}" class="btn btn-block btn-success btn-sm"><i class="icon-plus"></i> {{$connect}}</a></div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
{{if ! $zcard}}
|
||||||
{{if $profile.edit}}
|
{{if $profile.edit}}
|
||||||
<div class="dropdown">
|
<div class="dropdown">
|
||||||
<a class="profile-edit-side-link dropdown-toggle" data-toggle="dropdown" title="{{$profile.edit.3}}" href="#" ><i class="icon-pencil" title="{{$profile.edit.1}}" ></i></a>
|
<a class="profile-edit-side-link dropdown-toggle" data-toggle="dropdown" title="{{$profile.edit.3}}" href="#" ><i class="icon-pencil" title="{{$profile.edit.1}}" ></i></a>
|
||||||
@ -17,9 +20,12 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
{{if ! $zcard}}
|
||||||
<div class="fn">{{$profile.name}}{{if $profile.online}} <i class="icon-asterisk online-now" title="{{$profile.online}}"></i>{{/if}}</div>
|
<div class="fn">{{$profile.name}}{{if $profile.online}} <i class="icon-asterisk online-now" title="{{$profile.online}}"></i>{{/if}}</div>
|
||||||
{{if $reddress}}<div class="reddress" oncopy="return false;">{{$profile.reddress}}</div>{{/if}}
|
{{if $reddress}}<div class="reddress" oncopy="return false;">{{$profile.reddress}}</div>{{/if}}
|
||||||
|
{{/if}}
|
||||||
{{if $pdesc}}<div class="title">{{$profile.pdesc}}</div>{{/if}}
|
{{if $pdesc}}<div class="title">{{$profile.pdesc}}</div>{{/if}}
|
||||||
|
|
||||||
|
|
||||||
|
@ -41,41 +41,50 @@
|
|||||||
}
|
}
|
||||||
{{elseif $size == 'hz_medium'}}
|
{{elseif $size == 'hz_medium'}}
|
||||||
.hz_card {
|
.hz_card {
|
||||||
-moz-transform: translate(-{{$translate}}%, -{{$translate}}%) scale({{$scale}}, {{$scale}});
|
/* -moz-transform: translate(-{{$translate}}%, -{{$translate}}%) scale({{$scale}}, {{$scale}});
|
||||||
transform: translate(-{{$translate}}%, -{{$translate}}%) scale({{$scale}}, {{$scale}});
|
transform: translate(-{{$translate}}%, -{{$translate}}%) scale({{$scale}}, {{$scale}}); */
|
||||||
font-family: sans-serif, arial, freesans;
|
font-family: sans-serif, arial, freesans;
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
height: 390px;
|
||||||
}
|
}
|
||||||
.hz_cover_photo {
|
.hz_cover_photo img {
|
||||||
max-width: 100%;
|
width: {{$maxwidth}}px;
|
||||||
|
/* max-width: 100%; */
|
||||||
}
|
}
|
||||||
.hz_profile_photo {
|
.hz_profile_photo {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: -300px;
|
top: -165px;
|
||||||
left: 30px;
|
left: 30px;
|
||||||
|
|
||||||
|
width: 150px;
|
||||||
|
height: 150px;
|
||||||
|
}
|
||||||
|
.hz_profile_photo img {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
border: 1px solid #ddd;
|
border: 1px solid #ddd;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
-moz-border-radius: 5px;
|
-moz-border-radius: 5px;
|
||||||
padding: 10px;
|
padding: 5px;
|
||||||
width: 320px;
|
width: 150px;
|
||||||
height: 320px;
|
height: 150px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hz_name {
|
.hz_name {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: -100px;
|
top: -100px;
|
||||||
left: 400px;
|
left: 210px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 48px;
|
font-size: 32px;
|
||||||
text-rendering: optimizelegibility;
|
text-rendering: optimizelegibility;
|
||||||
text-shadow: 0 0 3px rgba(0, 0, 0, 0.8);
|
text-shadow: 0 0 3px rgba(0, 0, 0, 0.8);
|
||||||
}
|
}
|
||||||
.hz_addr {
|
.hz_addr {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: -110px;
|
top: -100px;
|
||||||
left: 400px;
|
left: 210px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 24px;
|
font-size: 18px;
|
||||||
text-rendering: optimizelegibility;
|
text-rendering: optimizelegibility;
|
||||||
text-shadow: 0 0 3px rgba(0, 0, 0, 0.8);
|
text-shadow: 0 0 3px rgba(0, 0, 0, 0.8);
|
||||||
}
|
}
|
||||||
@ -130,6 +139,6 @@
|
|||||||
<div class="hz_name">{{$zcard.chan.xchan_name}}</div>
|
<div class="hz_name">{{$zcard.chan.xchan_name}}</div>
|
||||||
<div class="hz_addr">{{$zcard.chan.channel_addr}}</div>
|
<div class="hz_addr">{{$zcard.chan.channel_addr}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="hz_profile_photo"><img style="width: {{$pphoto.width}}px; height: {{$pphoto.height}}px;" src="{{$pphoto.href}}" alt="{{$zcard.chan.xchan_name}}" /></div>
|
<div class="hz_profile_photo"><img src="{{$pphoto.href}}" alt="{{$zcard.chan.xchan_name}}" /></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user