aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-02-08 18:16:42 -0800
committerredmatrix <git@macgirvin.com>2016-02-08 18:16:42 -0800
commit315ce6d880855444c0cea683810b9b2fbd80c0d3 (patch)
treeac5563685ba1d7037cbe9d90e92b18c24140495d
parent3da8f9b13c92adab25507ab5cd36cdec27889cac (diff)
downloadvolse-hubzilla-315ce6d880855444c0cea683810b9b2fbd80c0d3.tar.gz
volse-hubzilla-315ce6d880855444c0cea683810b9b2fbd80c0d3.tar.bz2
volse-hubzilla-315ce6d880855444c0cea683810b9b2fbd80c0d3.zip
lots more zcard tweaks
-rwxr-xr-xboot.php1
-rw-r--r--include/identity.php10
-rw-r--r--include/widgets.php23
-rw-r--r--library/jgrowl/jquery.jgrowl.map0
-rwxr-xr-xview/tpl/profile_vcard.tpl6
-rw-r--r--view/tpl/zcard.tpl37
6 files changed, 57 insertions, 20 deletions
diff --git a/boot.php b/boot.php
index ce26f3a09..cc46cf870 100755
--- a/boot.php
+++ b/boot.php
@@ -650,7 +650,6 @@ class App {
private $perms = null; // observer permissions
private $widgets = array(); // widgets for this page
-
public $groups;
public $language;
public $module_loaded = false;
diff --git a/include/identity.php b/include/identity.php
index 641f188f4..9d41e9633 100644
--- a/include/identity.php
+++ b/include/identity.php
@@ -913,7 +913,7 @@ function profile_load(&$a, $nickname, $profile = '') {
* @return HTML string suitable for sidebar inclusion
* 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();
@@ -1056,8 +1056,9 @@ function profile_sidebar($profile, $block = 0, $show_connect = true) {
if(! feature_enabled($profile['uid'],'hide_rating'))
$z = widget_rating(array('target' => $profile['channel_hash']));
-
+
$o .= replace_macros($tpl, array(
+ '$zcard' => $zcard,
'$profile' => $profile,
'$connect' => $connect,
'$connect_url' => $connect_url,
@@ -1796,8 +1797,8 @@ function get_zcard($channel,$observer_hash = '',$args = array()) {
$cover_size = PHOTO_RES_COVER_425;
$pphoto = array('type' => $channel['xchan_photo_mimetype'], 'width' => 80 , 'height' => 80, 'href' => $channel['xchan_photo_m']);
}
- elseif($maxwidth <= 850) {
- $width = 850;
+ elseif($maxwidth <= 900) {
+ $width = 900;
$size = 'hz_medium';
$cover_size = PHOTO_RES_COVER_850;
$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(
+ '$maxwidth' => $maxwidth,
'$scale' => $scale,
'$translate' => $translate,
'$size' => $size,
diff --git a/include/widgets.php b/include/widgets.php
index 8073058c6..fa2b3de4d 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -8,7 +8,7 @@
require_once('include/dir_fns.php');
require_once('include/contact_widgets.php');
require_once('include/attach.php');
-
+require_once('include/Contact.php');
function widget_profile($args) {
$a = get_app();
@@ -16,6 +16,16 @@ function widget_profile($args) {
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.
// 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);
}
+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) {
$a = get_app();
diff --git a/library/jgrowl/jquery.jgrowl.map b/library/jgrowl/jquery.jgrowl.map
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/library/jgrowl/jquery.jgrowl.map
diff --git a/view/tpl/profile_vcard.tpl b/view/tpl/profile_vcard.tpl
index 5857ae5d1..56c262564 100755
--- a/view/tpl/profile_vcard.tpl
+++ b/view/tpl/profile_vcard.tpl
@@ -1,8 +1,11 @@
<div class="vcard">
+ {{if ! $zcard}}
<div id="profile-photo-wrapper"><img class="photo" src="{{$profile.photo}}?rev={{$profile.picdate}}" alt="{{$profile.name}}"></div>
+ {{/if}}
{{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>
{{/if}}
+ {{if ! $zcard}}
{{if $profile.edit}}
<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>
@@ -17,9 +20,12 @@
</ul>
</div>
{{/if}}
+ {{/if}}
+ {{if ! $zcard}}
<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}}
{{if $pdesc}}<div class="title">{{$profile.pdesc}}</div>{{/if}}
diff --git a/view/tpl/zcard.tpl b/view/tpl/zcard.tpl
index b73b1011c..908f07631 100644
--- a/view/tpl/zcard.tpl
+++ b/view/tpl/zcard.tpl
@@ -41,41 +41,50 @@
}
{{elseif $size == 'hz_medium'}}
.hz_card {
- -moz-transform: translate(-{{$translate}}%, -{{$translate}}%) scale({{$scale}}, {{$scale}});
- transform: translate(-{{$translate}}%, -{{$translate}}%) scale({{$scale}}, {{$scale}});
+/* -moz-transform: translate(-{{$translate}}%, -{{$translate}}%) scale({{$scale}}, {{$scale}});
+ transform: translate(-{{$translate}}%, -{{$translate}}%) scale({{$scale}}, {{$scale}}); */
font-family: sans-serif, arial, freesans;
+ width: 100%;
+ overflow: hidden;
+ height: 390px;
}
-.hz_cover_photo {
- max-width: 100%;
+.hz_cover_photo img {
+ width: {{$maxwidth}}px;
+/* max-width: 100%; */
}
.hz_profile_photo {
position: relative;
- top: -300px;
+ top: -165px;
left: 30px;
+
+ width: 150px;
+ height: 150px;
+}
+.hz_profile_photo img {
background-color: white;
border: 1px solid #ddd;
border-radius: 5px;
-moz-border-radius: 5px;
- padding: 10px;
- width: 320px;
- height: 320px;
+ padding: 5px;
+ width: 150px;
+ height: 150px;
}
.hz_name {
position: relative;
top: -100px;
- left: 400px;
+ left: 210px;
color: #fff;
- font-size: 48px;
+ font-size: 32px;
text-rendering: optimizelegibility;
text-shadow: 0 0 3px rgba(0, 0, 0, 0.8);
}
.hz_addr {
position: relative;
- top: -110px;
- left: 400px;
+ top: -100px;
+ left: 210px;
color: #fff;
- font-size: 24px;
+ font-size: 18px;
text-rendering: optimizelegibility;
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_addr">{{$zcard.chan.channel_addr}}</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>