Merge branch 'iconpopup' of https://github.com/fabrixxm/friendika into fabrixxm-iconpopup
Conflicts: mod/dfrn_poll.php
This commit is contained in:
commit
379af25215
12 changed files with 163 additions and 7 deletions
64
boot.php
64
boot.php
|
@ -2668,6 +2668,70 @@ function extract_item_authors($arr,$uid) {
|
||||||
return array();
|
return array();
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
if(! function_exists('item_photo_menu')){
|
||||||
|
function item_photo_menu($item){
|
||||||
|
$a = get_app();
|
||||||
|
|
||||||
|
if (!isset($a->authors)){
|
||||||
|
$rr = q("SELECT id, network, url FROM contact WHERE uid=%d AND self!=1", intval(local_user()));
|
||||||
|
$authors = array();
|
||||||
|
foreach($rr as $r) $authors[$r['url']]= $r;
|
||||||
|
$a->authors = $authors;
|
||||||
|
}
|
||||||
|
|
||||||
|
$contact_url="";
|
||||||
|
$pm_url="";
|
||||||
|
|
||||||
|
$status_link="";
|
||||||
|
$photo_link="";
|
||||||
|
$profile_link = ((strlen($item['author-link'])) ? $item['author-link'] : $item['url']);
|
||||||
|
$redirect_url = $a->get_baseurl() . '/redir/' . $item['cid'] ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if(strlen($item['author-link'])) {
|
||||||
|
if(link_compare($item['author-link'],$item['url']) && ($item['network'] === 'dfrn') && (! $item['self'])) {
|
||||||
|
$status_link = $redirect_url."?url=status";
|
||||||
|
$profile_link = $redirect_url."?url=profile";
|
||||||
|
$photos_link = $redirect_url."?url=photos";
|
||||||
|
$pm_url = $a->get_baseurl() . '/message/new/' . $item['cid'] ;
|
||||||
|
$contact_url = $item['self']?"":$a->get_baseurl() . '/contacts/' . $item['cid'] ;
|
||||||
|
}
|
||||||
|
elseif(isset($a->authors[$item['author-link']])) {
|
||||||
|
$redirect_url = $a->get_baseurl() . '/redir/' . $a->authors[$item['author-link']]['id'];
|
||||||
|
$status_link = $redirect_url."?url=status";
|
||||||
|
$profile_link = $redirect_url."?url=profile";
|
||||||
|
$photos_link = $redirect_url."?url=photos";
|
||||||
|
|
||||||
|
if ($a->authors[$item['author-link']]['network']==='dfrn'){
|
||||||
|
$pm_url = $a->get_baseurl() . '/message/new/' . $a->authors[$item['author-link']]['id'];
|
||||||
|
}
|
||||||
|
$contact_url = $item['self']?"":$a->get_baseurl() . '/contacts/' . $a->authors[$item['author-link']]['id'] ;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$menu = Array(
|
||||||
|
t("View status") => $status_link,
|
||||||
|
t("View profile") => $profile_link,
|
||||||
|
t("View photos") => $photos_link,
|
||||||
|
t("Edit contact") => $contact_url,
|
||||||
|
t("Send PM") => $pm_url,
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
$args = array($item, &$menu);
|
||||||
|
|
||||||
|
call_hooks('item_photo_menu', $args);
|
||||||
|
|
||||||
|
$o = "";
|
||||||
|
foreach($menu as $k=>$v){
|
||||||
|
if ($v!="") $o .= "<li><a href='$v'>$k</a></li>\n";
|
||||||
|
}
|
||||||
|
return $o;
|
||||||
|
}}
|
||||||
|
|
||||||
if(! function_exists('lang_selector')) {
|
if(! function_exists('lang_selector')) {
|
||||||
function lang_selector() {
|
function lang_selector() {
|
||||||
global $lang;
|
global $lang;
|
||||||
|
|
|
@ -489,6 +489,10 @@ function dfrn_poll_content(&$a) {
|
||||||
dbesc($session_id)
|
dbesc($session_id)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
|
||||||
|
>>>>>>> 890753e5b545ca5777c6c9084e99cacf42a3b485
|
||||||
|
|
||||||
goaway($dest);
|
goaway($dest);
|
||||||
}
|
}
|
||||||
|
|
|
@ -172,7 +172,9 @@ function message_content(&$a) {
|
||||||
'$linkurl' => t('Please enter a link URL:')
|
'$linkurl' => t('Please enter a link URL:')
|
||||||
));
|
));
|
||||||
|
|
||||||
$select = contact_select('messageto','message-to-select', false, 4, true);
|
$preselect = (isset($a->argv[2])?array($a->argv[2]):false);
|
||||||
|
|
||||||
|
$select = contact_select('messageto','message-to-select', $preselect, 4, true);
|
||||||
$tpl = load_view_file('view/prv_message.tpl');
|
$tpl = load_view_file('view/prv_message.tpl');
|
||||||
$o .= replace_macros($tpl,array(
|
$o .= replace_macros($tpl,array(
|
||||||
'$header' => t('Send Private Message'),
|
'$header' => t('Send Private Message'),
|
||||||
|
|
|
@ -217,6 +217,7 @@ function network_content(&$a, $update = 0) {
|
||||||
intval($a->pager['start']),
|
intval($a->pager['start']),
|
||||||
intval($a->pager['itemspage'])
|
intval($a->pager['itemspage'])
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
|
@ -328,6 +329,7 @@ function network_content(&$a, $update = 0) {
|
||||||
'$id' => $item['item_id'],
|
'$id' => $item['item_id'],
|
||||||
'$linktitle' => t('View $name\'s profile'),
|
'$linktitle' => t('View $name\'s profile'),
|
||||||
'$profile_url' => $profile_link,
|
'$profile_url' => $profile_link,
|
||||||
|
'$item_photo_menu' => item_photo_menu($item),
|
||||||
'$name' => $profile_name,
|
'$name' => $profile_name,
|
||||||
'$sparkle' => $sparkle,
|
'$sparkle' => $sparkle,
|
||||||
'$lock' => $lock,
|
'$lock' => $lock,
|
||||||
|
@ -551,6 +553,7 @@ function network_content(&$a, $update = 0) {
|
||||||
$indent .= ' shiny';
|
$indent .= ' shiny';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Build the HTML
|
// Build the HTML
|
||||||
|
|
||||||
$tmp_item = replace_macros($template,array(
|
$tmp_item = replace_macros($template,array(
|
||||||
|
@ -561,6 +564,7 @@ function network_content(&$a, $update = 0) {
|
||||||
'$wall' => t('Wall-to-Wall'),
|
'$wall' => t('Wall-to-Wall'),
|
||||||
'$vwall' => t('via Wall-To-Wall:'),
|
'$vwall' => t('via Wall-To-Wall:'),
|
||||||
'$profile_url' => $profile_link,
|
'$profile_url' => $profile_link,
|
||||||
|
'$item_photo_menu' => item_photo_menu($item),
|
||||||
'$name' => $profile_name,
|
'$name' => $profile_name,
|
||||||
'$thumb' => $profile_avatar,
|
'$thumb' => $profile_avatar,
|
||||||
'$osparkle' => $osparkle,
|
'$osparkle' => $osparkle,
|
||||||
|
|
|
@ -454,10 +454,12 @@ function profile_content(&$a, $update = 0) {
|
||||||
if(strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC','now - 12 hours')) > 0)
|
if(strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC','now - 12 hours')) > 0)
|
||||||
$indent .= ' shiny';
|
$indent .= ' shiny';
|
||||||
|
|
||||||
|
|
||||||
$tmp_item = replace_macros($template,array(
|
$tmp_item = replace_macros($template,array(
|
||||||
'$id' => $item['item_id'],
|
'$id' => $item['item_id'],
|
||||||
'$linktitle' => t('View $name\'s profile'),
|
'$linktitle' => t('View $name\'s profile'),
|
||||||
'$profile_url' => $profile_link,
|
'$profile_url' => $profile_link,
|
||||||
|
'$item_photo_menu' => item_photo_menu($item),
|
||||||
'$name' => $profile_name,
|
'$name' => $profile_name,
|
||||||
'$thumb' => $profile_avatar,
|
'$thumb' => $profile_avatar,
|
||||||
'$sparkle' => $sparkle,
|
'$sparkle' => $sparkle,
|
||||||
|
|
|
@ -115,6 +115,7 @@ function search_content(&$a) {
|
||||||
'$id' => $item['item_id'],
|
'$id' => $item['item_id'],
|
||||||
'$linktitle' => t('View $name\'s profile'),
|
'$linktitle' => t('View $name\'s profile'),
|
||||||
'$profile_url' => $profile_link,
|
'$profile_url' => $profile_link,
|
||||||
|
'$item_photo_menu' => item_photo_menu($item),
|
||||||
'$name' => $profile_name,
|
'$name' => $profile_name,
|
||||||
'$sparkle' => $sparkle,
|
'$sparkle' => $sparkle,
|
||||||
'$lock' => $lock,
|
'$lock' => $lock,
|
||||||
|
|
|
@ -1,9 +1,17 @@
|
||||||
<div class="wall-item-outside-wrapper$indent" id="wall-item-outside-wrapper-$id" >
|
<div class="wall-item-outside-wrapper$indent" id="wall-item-outside-wrapper-$id" >
|
||||||
<div class="wall-item-content-wrapper$indent" id="wall-item-content-wrapper-$id" >
|
<div class="wall-item-content-wrapper$indent" id="wall-item-content-wrapper-$id" >
|
||||||
<span class="wall-item-info" id="wall-item-info-$id">
|
<span class="wall-item-info" id="wall-item-info-$id">
|
||||||
<div class="wall-item-photo-wrapper" id="wall-item-photo-wrapper-$id" >
|
<div class="wall-item-photo-wrapper" id="wall-item-photo-wrapper-$id"
|
||||||
|
onmouseover="if (typeof t$id != 'undefined') clearTimeout(t$id); openMenu('wall-item-photo-menu-button-$id')"
|
||||||
|
onmouseout="t$id=setTimeout('closeMenu(\'wall-item-photo-menu-button-$id\'); closeMenu(\'wall-item-photo-menu-$id\');',200)">
|
||||||
<a href="$profile_url" title="$linktitle" class="wall-item-photo-link" id="wall-item-photo-link-$id">
|
<a href="$profile_url" title="$linktitle" class="wall-item-photo-link" id="wall-item-photo-link-$id">
|
||||||
<img src="$thumb" class="wall-item-photo$sparkle" id="wall-item-photo-$id" height="80" width="80" alt="$name" /></a>
|
<img src="$thumb" class="wall-item-photo$sparkle" id="wall-item-photo-$id" height="80" width="80" alt="$name" /></a>
|
||||||
|
<span onclick="openClose('wall-item-photo-menu-$id');" class="fakelink wall-item-photo-menu-button" id="wall-item-photo-menu-button-$id">menu</span>
|
||||||
|
<div class="wall-item-photo-menu" id="wall-item-photo-menu-$id">
|
||||||
|
<ul>
|
||||||
|
$item_photo_menu
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="wall-item-photo-end"></div>
|
<div class="wall-item-photo-end"></div>
|
||||||
<div class="wall-item-wrapper" id="wall-item-wrapper-$id" >
|
<div class="wall-item-wrapper" id="wall-item-wrapper-$id" >
|
||||||
|
|
BIN
view/theme/duepuntozero/photo-menu.jpg
Normal file
BIN
view/theme/duepuntozero/photo-menu.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 459 B |
|
@ -866,6 +866,37 @@ input#dfrn-url {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
width: 100px;
|
width: 100px;
|
||||||
}
|
}
|
||||||
|
.wall-item-photo-menu-button {
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
background-image: url("photo-menu.jpg");
|
||||||
|
background-position: top left;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
margin: 0px; padding: 0px;
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
top: 74px; left:10px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-indent: 40px;
|
||||||
|
display: none;
|
||||||
|
|
||||||
|
}
|
||||||
|
.wall-item-photo-menu {
|
||||||
|
width: auto;
|
||||||
|
border: 2px solid #444444;
|
||||||
|
background: #FFFFFF;
|
||||||
|
position: absolute;
|
||||||
|
left: 10px; top: 90px;
|
||||||
|
display: none;
|
||||||
|
z-index: 10000;
|
||||||
|
}
|
||||||
|
.wall-item-photo-menu ul { margin:0px; padding: 0px; list-style: none }
|
||||||
|
.wall-item-photo-menu li a { display: block; padding: 2px; }
|
||||||
|
.wall-item-photo-menu li a:hover { color: #FFFFFF; background: #3465A4; text-decoration: none; }
|
||||||
|
|
||||||
|
|
||||||
|
.comment .wall-item-photo-menu-button { top: 44px;}
|
||||||
|
.comment .wall-item-photo-menu { top: 60px; }
|
||||||
|
|
||||||
.wallwall .wwto {
|
.wallwall .wwto {
|
||||||
left: 50px;
|
left: 50px;
|
||||||
|
@ -878,6 +909,7 @@ input#dfrn-url {
|
||||||
width: 30px;
|
width: 30px;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wallwall .wall-item-photo-end {
|
.wallwall .wall-item-photo-end {
|
||||||
clear: both;
|
clear: both;
|
||||||
}
|
}
|
||||||
|
|
BIN
view/theme/loozah/photo-menu.jpg
Normal file
BIN
view/theme/loozah/photo-menu.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 464 B |
|
@ -959,6 +959,7 @@ input#dfrn-url {
|
||||||
.wall-item-content-wrapper {
|
.wall-item-content-wrapper {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
border: 1px solid #CCC;
|
border: 1px solid #CCC;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wall-item-content-wrapper.comment {
|
.wall-item-content-wrapper.comment {
|
||||||
|
@ -973,6 +974,35 @@ input#dfrn-url {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.wall-item-photo-menu-button {
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
background-image: url("photo-menu.jpg");
|
||||||
|
background-position: top left;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
margin: 0px; padding: 0px;
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
top: 74px; left:10px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-indent: 40px;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.wall-item-photo-menu {
|
||||||
|
width: auto;
|
||||||
|
border: 2px solid #444444;
|
||||||
|
background: #FFFFFF;
|
||||||
|
position: absolute;
|
||||||
|
left: 10px; top: 90px;
|
||||||
|
display: none;
|
||||||
|
z-index: 10000;
|
||||||
|
}
|
||||||
|
.wall-item-photo-menu ul { margin:0px; padding: 0px; list-style: none }
|
||||||
|
.wall-item-photo-menu li a { display: block; padding: 2px; }
|
||||||
|
.wall-item-photo-menu li a:hover { color: #FFFFFF; background: #3465A4; text-decoration: none; }
|
||||||
|
|
||||||
|
|
||||||
.wall-item-arrowphoto-wrapper {
|
.wall-item-arrowphoto-wrapper {
|
||||||
margin-top: 40px;
|
margin-top: 40px;
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
|
|
|
@ -1,9 +1,18 @@
|
||||||
<div class="wall-item-outside-wrapper$indent" id="wall-item-outside-wrapper-$id" >
|
<div class="wall-item-outside-wrapper$indent" id="wall-item-outside-wrapper-$id" >
|
||||||
<div class="wall-item-content-wrapper$indent" id="wall-item-content-wrapper-$id" >
|
<div class="wall-item-content-wrapper$indent" id="wall-item-content-wrapper-$id" >
|
||||||
<span class="wall-item-info" id="wall-item-info-$id">
|
<span class="wall-item-info" id="wall-item-info-$id">
|
||||||
<div class="wall-item-photo-wrapper" id="wall-item-photo-wrapper-$id" >
|
<div class="wall-item-photo-wrapper" id="wall-item-photo-wrapper-$id"
|
||||||
|
onmouseover="if (typeof t$id != 'undefined') clearTimeout(t$id); openMenu('wall-item-photo-menu-button-$id')"
|
||||||
|
onmouseout="t$id=setTimeout('closeMenu(\'wall-item-photo-menu-button-$id\'); closeMenu(\'wall-item-photo-menu-$id\');',200)">
|
||||||
<a href="$profile_url" title="$linktitle" class="wall-item-photo-link" id="wall-item-photo-link-$id">
|
<a href="$profile_url" title="$linktitle" class="wall-item-photo-link" id="wall-item-photo-link-$id">
|
||||||
<img src="$thumb" class="wall-item-photo$sparkle" id="wall-item-photo-$id" height="80" width="80" alt="$name" /></a>
|
<img src="$thumb" class="wall-item-photo$sparkle" id="wall-item-photo-$id" height="80" width="80" alt="$name" />
|
||||||
|
</a>
|
||||||
|
<span onclick="openClose('wall-item-photo-menu-$id');" class="fakelink wall-item-photo-menu-button" id="wall-item-photo-menu-button-$id">menu</span>
|
||||||
|
<div class="wall-item-photo-menu" id="wall-item-photo-menu-$id">
|
||||||
|
<ul>
|
||||||
|
$item_photo_menu
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="wall-item-photo-end"></div>
|
<div class="wall-item-photo-end"></div>
|
||||||
<div class="wall-item-wrapper" id="wall-item-wrapper-$id" >
|
<div class="wall-item-wrapper" id="wall-item-wrapper-$id" >
|
||||||
|
|
Loading…
Reference in a new issue