qr enhancements

This commit is contained in:
friendica 2014-01-08 14:11:39 -08:00
parent 73102f0c26
commit 29db236981
4 changed files with 17 additions and 4 deletions

View File

@ -133,7 +133,7 @@ function bb_parse_crypt($match) {
}
function bb_qr($match) {
return '<img class="zrl" src="' . z_root() . '/photo/qr?f=&qr=' . urlencode($match[1]) . '" alt="' . t('QR code') . '" />';
return '<img class="zrl" src="' . z_root() . '/photo/qr?f=&qr=' . urlencode($match[1]) . '" alt="' . t('QR code') . '" title="' . urlencode($match[1]) . '" />';
}

View File

@ -70,6 +70,8 @@ function dirprofile_init(&$a) {
$profile_link = chanlink_url($rr['url']);
$pdesc = (($rr['description']) ? $rr['description'] . '<br />' : '');
$qrlink = zid($rr['url']);
$connect_link = ((local_user()) ? z_root() . '/follow?f=&url=' . urlencode($rr['address']) : '');
if(in_array($rr['hash'],$contacts))
@ -145,6 +147,7 @@ function dirprofile_init(&$a) {
$entry = replace_macros(get_markup_template('direntry_large.tpl'), array(
'$id' => ++$t,
'$profile_link' => $profile_link,
'$qrlink' => $qrlink,
'$photo' => $rr['photo_l'],
'$alttext' => $rr['name'] . ' ' . $rr['address'],
'$name' => $rr['name'],

View File

@ -37,3 +37,8 @@
div.dirtagblock.widget {
overflow: hidden;
}
.dirpopup {
float: left;
width: 225px;
}

View File

@ -2,11 +2,16 @@
<div class="generic-content-wrapper">
<div class="contact-photo-wrapper" id="directory-photo-wrapper-{{$id}}" >
<div class="contact-photo" id="directory-photo-{{$id}}" >
<a href="{{$profile_link}}" class="directory-profile-link" id="directory-profile-link-{{$id}}" ><img class="directory-photo-img" style="height:175px; width:175px;" src="{{$photo}}" alt="{{$alttext}}" title="{{$alttext}}" /></a>
</div>
<div class="contact-photo dirpopup" id="directory-photo-{{$id}}" >
<a href="{{$profile_link}}" class="directory-profile-link" id="directory-profile-link-{{$id}}" ><img class="directory-photo-img" style="height:175px; width:175px;" src="{{$photo}}" alt="{{$alttext}}" title="{{$alttext}}" /></a>
</div>
<div class="contact-photo dirpopup" id="directory-qr-{{$id}}" >
<img class="directory-photo-img" style="height:175px; width:175px;" src="photo/qr?f=&qr={{$qrlink}}" alt="QR" title="{{$qrlink}}" />
</div>
</div>
<div class="clear"></div>
<div class="contact-name" id="directory-name-{{$id}}" >{{$name}}</div>
{{if $connect}}
<div class="directory-connect"><a href="{{$connect}}">{{$conn_label}}</a></div>