Merge remote-tracking branch 'upstream/develop' into 1511-ostatus-bookmark-design

This commit is contained in:
Michael Vogel 2015-11-29 10:25:44 +01:00
commit 583a2f709b
32 changed files with 205 additions and 87 deletions

View file

@ -83,7 +83,6 @@ function bb2diaspora($Text,$preserve_nl = false, $fordiaspora = true) {
'return \'#\'. str_replace(\' \', \'_\', $match[2]);' 'return \'#\'. str_replace(\' \', \'_\', $match[2]);'
), $Text); ), $Text);
// Converting images with size parameters to simple images. Markdown doesn't know it. // Converting images with size parameters to simple images. Markdown doesn't know it.
$Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '[img]$3[/img]', $Text); $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '[img]$3[/img]', $Text);
@ -94,11 +93,12 @@ function bb2diaspora($Text,$preserve_nl = false, $fordiaspora = true) {
// Add all tags that maybe were removed // Add all tags that maybe were removed
if (preg_match_all("/#\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism",$OriginalText, $tags)) { if (preg_match_all("/#\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism",$OriginalText, $tags)) {
$tagline = ""; $tagline = "";
foreach($tags[2] as $tag) foreach($tags[2] as $tag) {
if (!strpos($Text, "#".$tag)) $tag = html_entity_decode($tag, ENT_QUOTES, 'UTF-8');
if (!strpos(html_entity_decode($Text, ENT_QUOTES, 'UTF-8'), "#".$tag))
$tagline .= "#".$tag." "; $tagline .= "#".$tag." ";
}
$Text = $Text."<br />".$tagline; $Text = $Text." ".$tagline;
} }
} else } else

View file

@ -60,10 +60,12 @@ function get_forumlist($uid, $showhidden = true, $lastitem, $showprivate = false
* Sidebar widget to show subcribed friendica forums. If activated * Sidebar widget to show subcribed friendica forums. If activated
* in the settings, it appears at the notwork page sidebar * in the settings, it appears at the notwork page sidebar
* *
* @param App $a * @param int $uid
* @param int $cid
* The contact id which is used to mark a forum as "selected"
* @return string * @return string
*/ */
function widget_forumlist($a) { function widget_forumlist($uid,$cid = 0) {
if(! intval(feature_enabled(local_user(),'forumlist_widget'))) if(! intval(feature_enabled(local_user(),'forumlist_widget')))
return; return;
@ -73,7 +75,7 @@ function widget_forumlist($a) {
//sort by last updated item //sort by last updated item
$lastitem = true; $lastitem = true;
$contacts = get_forumlist($a->user['uid'],true,$lastitem, true); $contacts = get_forumlist($uid,true,$lastitem, true);
$total = count($contacts); $total = count($contacts);
$visible_forums = 10; $visible_forums = 10;
@ -83,11 +85,14 @@ function widget_forumlist($a) {
foreach($contacts as $contact) { foreach($contacts as $contact) {
$selected = (($cid == $contact['id']) ? ' forum-selected' : '');
$entry = array( $entry = array(
'url' => $a->get_baseurl() . '/network?f=&cid=' . $contact['id'], 'url' => z_root() . '/network?f=&cid=' . $contact['id'],
'external_url' => $a->get_baseurl() . '/redir/' . $contact['id'], 'external_url' => z_root() . '/redir/' . $contact['id'],
'name' => $contact['name'], 'name' => $contact['name'],
'cid' => $contact['id'], 'cid' => $contact['id'],
'selected' => $selected,
'micro' => proxy_url($contact['micro'], false, PROXY_SIZE_MICRO), 'micro' => proxy_url($contact['micro'], false, PROXY_SIZE_MICRO),
'id' => ++$id, 'id' => ++$id,
); );

View file

@ -213,9 +213,20 @@ function mini_group_select($uid,$gid = 0) {
} }
/**
* @brief Create group sidebar widget
function group_side($every="contacts",$each="group",$edit = false, $group_id = 0, $cid = 0) { *
* @param string $every
* @param string $each
* @param string $editmode
* 'standard' => include link 'Edit groups'
* 'extended' => include link 'Create new group'
* 'full' => include link 'Create new group' and provide for each group a link to edit this group
* @param int $group_id
* @param int $cid
* @return string
*/
function group_side($every="contacts",$each="group",$editmode = "standard", $group_id = 0, $cid = 0) {
$o = ''; $o = '';
@ -239,13 +250,13 @@ function group_side($every="contacts",$each="group",$edit = false, $group_id = 0
$member_of = array(); $member_of = array();
if($cid) { if($cid) {
$member_of = groups_containing(local_user(),$cid); $member_of = groups_containing(local_user(),$cid);
} }
if(count($r)) { if(count($r)) {
foreach($r as $rr) { foreach($r as $rr) {
$selected = (($group_id == $rr['id']) ? ' group-selected' : ''); $selected = (($group_id == $rr['id']) ? ' group-selected' : '');
if ($edit) { if ($editmode == "full") {
$groupedit = array( $groupedit = array(
'href' => "group/".$rr['id'], 'href' => "group/".$rr['id'],
'title' => t('edit'), 'title' => t('edit'),
@ -269,14 +280,17 @@ function group_side($every="contacts",$each="group",$edit = false, $group_id = 0
$tpl = get_markup_template("group_side.tpl"); $tpl = get_markup_template("group_side.tpl");
$o = replace_macros($tpl, array( $o = replace_macros($tpl, array(
'$title' => t('Groups'), '$title' => t('Groups'),
'newgroup' => (($editmode == "extended") || ($editmode == "full") ? 1 : ''),
'$editgroupstext' => t('Edit groups'),
'grouppage' => "group/",
'$edittext' => t('Edit group'), '$edittext' => t('Edit group'),
'$createtext' => t('Create a new group'), '$createtext' => t('Create a new group'),
'$creategroup' => t('Group Name: '), '$creategroup' => t('Group Name: '),
'$form_security_token' => get_form_security_token("group_edit"), '$form_security_token' => get_form_security_token("group_edit"),
'$ungrouped' => (($every === 'contacts') ? t('Contacts not in any group') : ''), '$ungrouped' => (($every === 'contacts') ? t('Contacts not in any group') : ''),
'$groups' => $groups, '$groups' => $groups,
'$add' => t('add'), '$add' => t('add'),
)); ));

View file

@ -216,7 +216,12 @@ if(! function_exists('profile_sidebar')) {
} }
if ($connect AND ($profile['network'] != NETWORK_DFRN) AND !isset($profile['remoteconnect'])) if ($connect AND ($profile['network'] != NETWORK_DFRN) AND !isset($profile['remoteconnect']))
$connect = false; $connect = false;
if ($connect)
$subscribe_feed = t("Atom feed");
else
$subscribe_feed = false;
if (isset($profile['remoteconnect'])) if (isset($profile['remoteconnect']))
$remoteconnect = $profile['remoteconnect']; $remoteconnect = $profile['remoteconnect'];
@ -337,6 +342,7 @@ if(! function_exists('profile_sidebar')) {
'$profile' => $p, '$profile' => $p,
'$connect' => $connect, '$connect' => $connect,
'$remoteconnect' => $remoteconnect, '$remoteconnect' => $remoteconnect,
'$subscribe_feed' => $subscribe_feed,
'$wallmessage' => $wallmessage, '$wallmessage' => $wallmessage,
'$location' => $location, '$location' => $location,
'$gender' => $gender, '$gender' => $gender,

View file

@ -55,7 +55,7 @@ function contacts_init(&$a) {
$findpeople_widget .= findpeople_widget(); $findpeople_widget .= findpeople_widget();
} }
$groups_widget .= group_side('contacts','group',false,0,$contact_id); $groups_widget .= group_side('contacts','group','full',0,$contact_id);
$a->page['aside'] .= replace_macros(get_markup_template("contacts-widget-sidebar.tpl"),array( $a->page['aside'] .= replace_macros(get_markup_template("contacts-widget-sidebar.tpl"),array(
'$vcard_widget' => $vcard_widget, '$vcard_widget' => $vcard_widget,

View file

@ -205,6 +205,7 @@ function dirfind_content(&$a, $prefix = "") {
'details' => $contact_details['location'], 'details' => $contact_details['location'],
'tags' => $contact_details['keywords'], 'tags' => $contact_details['keywords'],
'about' => $contact_details['about'], 'about' => $contact_details['about'],
'account_type' => (($contact_details['community']) ? t('Forum') : ''),
'network' => network_to_name($jj->network, $jj->url), 'network' => network_to_name($jj->network, $jj->url),
'id' => ++$id, 'id' => ++$id,
); );

View file

@ -7,7 +7,7 @@ function validate_members(&$item) {
function group_init(&$a) { function group_init(&$a) {
if(local_user()) { if(local_user()) {
require_once('include/group.php'); require_once('include/group.php');
$a->page['aside'] = group_side('contacts','group',false,(($a->argc > 1) ? intval($a->argv[1]) : 0)); $a->page['aside'] = group_side('contacts','group','extended',(($a->argc > 1) ? intval($a->argv[1]) : 0));
} }
} }

View file

@ -362,8 +362,7 @@ function item_post(&$a) {
if((local_user()) && (local_user() == $profile_uid)) { if((local_user()) && (local_user() == $profile_uid)) {
$self = true; $self = true;
$r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `self` = 1 LIMIT 1", $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `self` = 1 LIMIT 1",
intval($_SESSION['uid']) intval($_SESSION['uid']));
);
} }
elseif(remote_user()) { elseif(remote_user()) {
if(is_array($_SESSION['remote'])) { if(is_array($_SESSION['remote'])) {

View file

@ -79,6 +79,7 @@ function match_content(&$a) {
'details' => $contact_details['location'], 'details' => $contact_details['location'],
'tags' => $contact_details['keywords'], 'tags' => $contact_details['keywords'],
'about' => $contact_details['about'], 'about' => $contact_details['about'],
'account_type' => (($contact_details['community']) ? t('Forum') : ''),
'thumb' => proxy_url($jj->photo, false, PROXY_SIZE_THUMB), 'thumb' => proxy_url($jj->photo, false, PROXY_SIZE_THUMB),
'inttxt' => ' ' . t('is interested in:'), 'inttxt' => ' ' . t('is interested in:'),
'conntxt' => t('Connect'), 'conntxt' => t('Connect'),

View file

@ -6,6 +6,8 @@ function network_init(&$a) {
} }
$is_a_date_query = false; $is_a_date_query = false;
if(x($_GET['cid']) && intval($_GET['cid']) != 0)
$cid = $_GET['cid'];
if($a->argc > 1) { if($a->argc > 1) {
for($x = 1; $x < $a->argc; $x ++) { for($x = 1; $x < $a->argc; $x ++) {
@ -145,8 +147,8 @@ function network_init(&$a) {
)); ));
} }
$a->page['aside'] .= (feature_enabled(local_user(),'groups') ? group_side('network/0','network',true,$group_id) : ''); $a->page['aside'] .= (feature_enabled(local_user(),'groups') ? group_side('network/0','network','standard',$group_id) : '');
$a->page['aside'] .= (feature_enabled(local_user(),'forumlist_widget') ? widget_forumlist($a) : ''); $a->page['aside'] .= (feature_enabled(local_user(),'forumlist_widget') ? widget_forumlist(local_user(),$cid) : '');
$a->page['aside'] .= posted_date_widget($a->get_baseurl() . '/network',local_user(),false); $a->page['aside'] .= posted_date_widget($a->get_baseurl() . '/network',local_user(),false);
$a->page['aside'] .= networks_widget($a->get_baseurl(true) . '/network',(x($_GET, 'nets') ? $_GET['nets'] : '')); $a->page['aside'] .= networks_widget($a->get_baseurl(true) . '/network',(x($_GET, 'nets') ? $_GET['nets'] : ''));
$a->page['aside'] .= saved_searches($search); $a->page['aside'] .= saved_searches($search);

View file

@ -15,7 +15,7 @@ function nogroup_init(&$a) {
if(! x($a->page,'aside')) if(! x($a->page,'aside'))
$a->page['aside'] = ''; $a->page['aside'] = '';
$a->page['aside'] .= group_side('contacts','group',false,0,$contact_id); $a->page['aside'] .= group_side('contacts','group','extended',0,$contact_id);
} }

View file

@ -280,7 +280,8 @@ function parseurl_getsiteinfo($url, $no_guessing = false, $do_oembed = true, $co
if (isset($keywords)) { if (isset($keywords)) {
$siteinfo["keywords"] = array(); $siteinfo["keywords"] = array();
foreach ($keywords as $keyword) foreach ($keywords as $keyword)
$siteinfo["keywords"][] = trim($keyword); if (!in_array(trim($keyword), $siteinfo["keywords"]))
$siteinfo["keywords"][] = trim($keyword);
} }
//$list = $xpath->query("head/meta[@property]"); //$list = $xpath->query("head/meta[@property]");

View file

@ -36,7 +36,7 @@ function suggest_init(&$a) {
} }
// Now check how the user responded to the confirmation query // Now check how the user responded to the confirmation query
if(!$_REQUEST['canceled']) { if(!$_REQUEST['canceled']) {
q("insert into gcign ( uid, gcid ) values ( %d, %d ) ", q("INSERT INTO `gcign` ( `uid`, `gcid` ) VALUES ( %d, %d ) ",
intval(local_user()), intval(local_user()),
intval($_GET['ignore']) intval($_GET['ignore'])
); );
@ -90,8 +90,9 @@ function suggest_content(&$a) {
'name' => $rr['name'], 'name' => $rr['name'],
'thumb' => proxy_url($rr['photo'], false, PROXY_SIZE_THUMB), 'thumb' => proxy_url($rr['photo'], false, PROXY_SIZE_THUMB),
'details' => $contact_details['location'], 'details' => $contact_details['location'],
'tags' => $contact_details['keywords'], 'tags' => $contact_details['keywords'],
'about' => $contact_details['about'], 'about' => $contact_details['about'],
'account_type' => (($contact_details['community']) ? t('Forum') : ''),
'ignlnk' => $ignlnk, 'ignlnk' => $ignlnk,
'ignid' => $rr['id'], 'ignid' => $rr['id'],
'conntxt' => t('Connect'), 'conntxt' => t('Connect'),

View file

@ -26,7 +26,7 @@ function viewcontacts_content(&$a) {
} }
$r = q("SELECT COUNT(*) as `total` FROM `contact` WHERE `uid` = %d AND `blocked` = 0 AND `pending` = 0 AND `hidden` = 0 AND `archive` = 0 ", $r = q("SELECT COUNT(*) AS `total` FROM `contact` WHERE `uid` = %d AND `blocked` = 0 AND `pending` = 0 AND `hidden` = 0 AND `archive` = 0 ",
intval($a->profile['uid']) intval($a->profile['uid'])
); );
if(count($r)) if(count($r))
@ -68,8 +68,9 @@ function viewcontacts_content(&$a) {
'name' => htmlentities(substr($rr['name'],0,20)), 'name' => htmlentities(substr($rr['name'],0,20)),
'username' => htmlentities($rr['name']), 'username' => htmlentities($rr['name']),
'details' => $contact_details['location'], 'details' => $contact_details['location'],
'tags' => $contact_details['keywords'], 'tags' => $contact_details['keywords'],
'about' => $contact_details['about'], 'about' => $contact_details['about'],
'account_type' => (($contact_details['community']) ? t('Forum') : ''),
'url' => $url, 'url' => $url,
'sparkle' => '', 'sparkle' => '',
'itemurl' => (($contact_details['addr'] != "") ? $contact_details['addr'] : $rr['url']), 'itemurl' => (($contact_details['addr'] != "") ? $contact_details['addr'] : $rr['url']),

View file

@ -1,38 +1,42 @@
<div class="widget" id="group-sidebar"> <div class="widget" id="group-sidebar">
<h3>{{$title}}</h3> <h3>{{$title}}</h3>
<div id="sidebar-group-list"> <div id="sidebar-group-list">
<ul role="menu" id="sidebar-group-ul"> <ul role="menu" id="sidebar-group-ul">
{{foreach $groups as $group}} {{foreach $groups as $group}}
<li role="menuitem" class="sidebar-group-li group-{{$group.id}}"> <li role="menuitem" class="sidebar-group-li group-{{$group.id}}">
{{if $group.cid}} {{if ! $newgroup}}<span class="notify badge pull-right"></span>{{/if}}
<input type="checkbox" {{if $group.cid}}
class="{{if $group.selected}}ticked{{else}}unticked {{/if}} action" <input type="checkbox"
onclick="contactgroupChangeMember('{{$group.id}}','{{$group.cid}}');return true;" class="{{if $group.selected}}ticked{{else}}unticked {{/if}} action"
{{if $group.ismember}}checked="checked"{{/if}} onclick="contactgroupChangeMember('{{$group.id}}','{{$group.cid}}');return true;"
/> {{if $group.ismember}}checked="checked"{{/if}}
{{/if}} />
{{if $group.edit}} {{/if}}
<a class="groupsideedit" href="{{$group.edit.href}}" title="{{$edittext}}"><span id="edit-sidebar-group-element-{{$group.id}}" class="group-edit-icon iconspacer small-pencil"><span class="sr-only">{{$edittext}}</span></span></a> {{if $group.edit}}
{{/if}} <a class="groupsideedit" href="{{$group.edit.href}}" title="{{$edittext}}">
<a id="sidebar-group-element-{{$group.id}}" class="sidebar-group-element {{if $group.selected}}group-selected{{/if}}" href="{{$group.href}}">{{$group.text}}</a> <span id="edit-sidebar-group-element-{{$group.id}}" class="group-edit-icon iconspacer small-pencil"><span class="sr-only">{{$edittext}}</span></span>
<span class="notify"></span> </a>
</li> {{/if}}
{{/foreach}} <a id="sidebar-group-element-{{$group.id}}" class="sidebar-group-element {{if $group.selected}}group-selected{{/if}}" href="{{$group.href}}">{{$group.text}}</a>
</ul> </li>
{{/foreach}}
</ul>
</div> </div>
<div id="sidebar-new-group">
<a onclick="javascript:$('#group-new-form').fadeIn('fast');return false;">{{$createtext}}</a> {{if $newgroup}}
<form id="group-new-form" action="group/new" method="post" style="display:none;"> <div id="sidebar-new-group">
<input type="hidden" name="form_security_token" value="{{$form_security_token}}"> <a onclick="javascript:$('#group-new-form').fadeIn('fast');return false;">{{$createtext}}</a>
<input name="groupname" id="id_groupname" placeholder="{{$creategroup}}"> <form id="group-new-form" action="group/new" method="post" style="display:none;">
</form> <input type="hidden" name="form_security_token" value="{{$form_security_token}}">
</div> <input name="groupname" id="id_groupname" placeholder="{{$creategroup}}">
{{if $ungrouped}} </form>
<div id="sidebar-ungrouped"> </div>
<a href="nogroup">{{$ungrouped}}</a> {{else}}
</div> <div id="sidebar-edit-groups"><a href="{{$grouppage}}">{{$editgroupstext}}</a></div>
{{/if}} {{/if}}
{{if $ungrouped}}<div id="sidebar-ungrouped"><a href="nogroup">{{$ungrouped}}</a></div>{{/if}}
</div> </div>

View file

@ -55,6 +55,9 @@
{{if $wallmessage}} {{if $wallmessage}}
<li><a id="wallmessage-link" href="wallmessage/{{$profile.nickname}}">{{$wallmessage}}</a></li> <li><a id="wallmessage-link" href="wallmessage/{{$profile.nickname}}">{{$wallmessage}}</a></li>
{{/if}} {{/if}}
{{if $subscribe_feed}}
<li><a id="subscribe-feed-link" href="dfrn_poll/{{$profile.nickname}}">{{$subscribe_feed}}</a></li>
{{/if}}
</ul> </ul>
</div> </div>
</div> </div>

View file

@ -24,7 +24,7 @@ function showHideForumlist() {
<a href="{{$forum.external_url}}" title="{{$forum.link_desc}}" class="label sparkle" target="_blank"> <a href="{{$forum.external_url}}" title="{{$forum.link_desc}}" class="label sparkle" target="_blank">
<img class="forumlist-img" src="{{$forum.micro}}" alt="{{$forum.link_desc}}" /> <img class="forumlist-img" src="{{$forum.micro}}" alt="{{$forum.link_desc}}" />
</a> </a>
<a class="forum-widget-link" id="forum-widget-link-{{$forum.id}}" href="{{$forum.url}}" >{{$forum.name}}</a> <a class="forum-widget-link {{if $forum.selected}}forum-selected{{/if}}" id="forum-widget-link-{{$forum.id}}" href="{{$forum.url}}" >{{$forum.name}}</a>
</li> </li>
{{/if}} {{/if}}
@ -34,7 +34,7 @@ function showHideForumlist() {
<a href="{{$forum.external_url}}" title="{{$forum.link_desc}}" class="label sparkle" target="_blank"> <a href="{{$forum.external_url}}" title="{{$forum.link_desc}}" class="label sparkle" target="_blank">
<img class="forumlist-img" src="{{$forum.micro}}" alt="{{$forum.link_desc}}" /> <img class="forumlist-img" src="{{$forum.micro}}" alt="{{$forum.link_desc}}" />
</a> </a>
<a class="forum-widget-link" id="forum-widget-link-{{$forum.id}}" href="{{$forum.url}}" >{{$forum.name}}</a> <a class="forum-widget-link {{if $forum.selected}}forum-selected{{/if}}" id="forum-widget-link-{{$forum.id}}" href="{{$forum.url}}" >{{$forum.name}}</a>
</li> </li>
{{/if}} {{/if}}
{{/foreach}} {{/foreach}}

View file

@ -205,6 +205,7 @@ aside {
font-weight: bold; font-weight: bold;
background: #3465a4 url('friendica-16.png') no-repeat 95% center; background: #3465a4 url('friendica-16.png') no-repeat 95% center;
} }
#subscribe-feed-link,
#wallmessage-link { #wallmessage-link {
display: block; display: block;
color: #FFFFFF; color: #FFFFFF;
@ -340,7 +341,7 @@ div.wall-item-content-wrapper.shiny {
margin-bottom: 10px; margin-bottom: 10px;
} }
.group-selected, .nets-selected, .fileas-selected, .categories-selected { .group-selected, .nets-selected, .fileas-selected, .categories-selected, .forum-selected {
padding: 3px; padding: 3px;
-moz-border-radius: 3px; -moz-border-radius: 3px;
border-radius: 3px; border-radius: 3px;

View file

@ -47,6 +47,9 @@
{{if $wallmessage}} {{if $wallmessage}}
<li><a id="wallmessage-link" href="wallmessage/{{$profile.nickname}}">{{$wallmessage}}</a></li> <li><a id="wallmessage-link" href="wallmessage/{{$profile.nickname}}">{{$wallmessage}}</a></li>
{{/if}} {{/if}}
{{if $subscribe_feed}}
<li><a id="subscribe-feed-link" href="dfrn_poll/{{$profile.nickname}}">{{$subscribe_feed}}</a></li>
{{/if}}
</ul> </ul>
</div> </div>
</div> </div>

View file

@ -511,7 +511,7 @@ footer {
margin-bottom: 10px; margin-bottom: 10px;
} }
.group-selected, .nets-selected, .fileas-selected, .categories-selected { .group-selected, .nets-selected, .fileas-selected, .categories-selected, .forum-selected {
padding: 3px; padding: 3px;
-moz-border-radius: 3px; -moz-border-radius: 3px;
-webkit-border-radius: 3px; -webkit-border-radius: 3px;

View file

@ -284,6 +284,7 @@ aside {
/* float:left;*/ /* float:left;*/
} }
#subscribe-feed-link,
#dfrn-request-link { #dfrn-request-link {
display: block; display: block;
color: #FFFFFF; color: #FFFFFF;
@ -489,7 +490,7 @@ div.wall-item-content-wrapper.shiny {
margin-bottom: 10px; margin-bottom: 10px;
} }
.group-selected, .nets-selected, .fileas-selected, .categories-selected { .group-selected, .nets-selected, .fileas-selected, .categories-selected, .forum-selected {
padding: 3px; padding: 3px;
-moz-border-radius: 3px; -moz-border-radius: 3px;
-webkit-border-radius: 3px; -webkit-border-radius: 3px;

View file

@ -43,10 +43,11 @@
{{if $wallmessage}} {{if $wallmessage}}
<li><a id="wallmessage-link" href="wallmessage/{{$profile.nickname}}">{{$wallmessage}}</a></li> <li><a id="wallmessage-link" href="wallmessage/{{$profile.nickname}}">{{$wallmessage}}</a></li>
{{/if}} {{/if}}
{{if $subscribe_feed}}
<li><a id="subscribe-feed-link" href="dfrn_poll/{{$profile.nickname}}">{{$subscribe_feed}}</a></li>
{{/if}}
</ul> </ul>
</div> </div>
</div> </div>
{{$contact_block}} {{$contact_block}}

View file

@ -838,6 +838,7 @@ aside #profile-extra-links li {
margin: 0px; margin: 0px;
list-style: none; list-style: none;
} }
aside #subscribe-feed-link,
aside #wallmessage-link { aside #wallmessage-link {
display: block; display: block;
-moz-border-radius: 5px 5px 5px 5px; -moz-border-radius: 5px 5px 5px 5px;
@ -850,6 +851,7 @@ aside #wallmessage-link {
padding: 4px 2px 2px 35px; padding: 4px 2px 2px 35px;
margin-top: 3px; margin-top: 3px;
} }
aside #subscribe-feed:hover,
aside #wallmessage-link:hover { aside #wallmessage-link:hover {
text-decoration: none; text-decoration: none;
background-color: #19aeff; background-color: #19aeff;

View file

@ -854,6 +854,7 @@ aside #wallmessage-link:hover {
text-decoration: none; text-decoration: none;
background-color: #ccff42; background-color: #ccff42;
} }
aside #subscribe-feed-link,
aside #dfrn-request-link { aside #dfrn-request-link {
display: block; display: block;
-moz-border-radius: 5px 5px 5px 5px; -moz-border-radius: 5px 5px 5px 5px;
@ -865,6 +866,7 @@ aside #dfrn-request-link {
text-transform: uppercase; text-transform: uppercase;
padding: 4px 2px 2px 35px; padding: 4px 2px 2px 35px;
} }
aside #subscribe-feed-link:hover,
aside #dfrn-request-link:hover { aside #dfrn-request-link:hover {
text-decoration: none; text-decoration: none;
background-color: #ccff42; background-color: #ccff42;

View file

@ -854,6 +854,7 @@ aside #wallmessage-link:hover {
text-decoration: none; text-decoration: none;
background-color: #86608e; background-color: #86608e;
} }
aside #subscribe-feed-link,
aside #dfrn-request-link { aside #dfrn-request-link {
display: block; display: block;
-moz-border-radius: 5px 5px 5px 5px; -moz-border-radius: 5px 5px 5px 5px;
@ -865,6 +866,7 @@ aside #dfrn-request-link {
text-transform: uppercase; text-transform: uppercase;
padding: 4px 2px 2px 35px; padding: 4px 2px 2px 35px;
} }
aside #subscribe-feed-link:hover,
aside #dfrn-request-link:hover { aside #dfrn-request-link:hover {
text-decoration: none; text-decoration: none;
background-color: #86608e; background-color: #86608e;

View file

@ -73,6 +73,9 @@
{{if $wallmessage}} {{if $wallmessage}}
<li><a id="wallmessage-link" href="wallmessage/{{$profile.nickname}}">{{$wallmessage}}</a></li> <li><a id="wallmessage-link" href="wallmessage/{{$profile.nickname}}">{{$wallmessage}}</a></li>
{{/if}} {{/if}}
{{if $subscribe_feed}}
<li><a id="subscribe-feed-link" href="dfrn_poll/{{$profile.nickname}}">{{$subscribe_feed}}</a></li>
{{/if}}
</ul> </ul>
</div> </div>
</div> </div>

View file

@ -0,0 +1,46 @@
<script>
function showHideForumlist() {
if( $("li[id^='forum-widget-entry-extended-']").is(':visible')) {
$("li[id^='forum-widget-entry-extended-']").hide();
$("li#forum-widget-collapse").html(window.showMore);
}
else {
$("li[id^='forum-widget-entry-extended-']").show();
$("li#forum-widget-collapse").html(window.showFewer);
}
}
</script>
<div id="forumlist-sidebar" class="widget">
<h3 id="forumlist">{{$title}}</h3>
<ul id="forumlist-sidbar-ul" role="menu">
{{foreach $forums as $forum}}
{{if $forum.id <= $visible_forums}}
<li class="forum-widget-entry forum-{{$forum.cid}} tool {{if $forum.selected}}selected{{/if}}" id="forum-widget-entry-{{$forum.id}}" role="menuitem">
<span class="notify badge pull-right"></span>
<a href="{{$forum.external_url}}" title="{{$forum.link_desc}}" class="label sparkle" target="_blank">
<img class="forumlist-img" src="{{$forum.micro}}" alt="{{$forum.link_desc}}" />
</a>
<a class="forum-widget-link" id="forum-widget-link-{{$forum.id}}" href="{{$forum.url}}" >{{$forum.name}}</a>
</li>
{{/if}}
{{if $forum.id > $visible_forums}}
<li class="forum-widget-entry forum-{{$forum.cid}} tool {{if $forum.selected}}selected{{/if}}" id="forum-widget-entry-extended-{{$forum.id}}" role="menuitem" style="display: none;">
<span class="notify badge pull-right"></span>
<a href="{{$forum.external_url}}" title="{{$forum.link_desc}}" class="label sparkle" target="_blank">
<img class="forumlist-img" src="{{$forum.micro}}" alt="{{$forum.link_desc}}" />
</a>
<a class="forum-widget-link" id="forum-widget-link-{{$forum.id}}" href="{{$forum.url}}" >{{$forum.name}}</a>
</li>
{{/if}}
{{/foreach}}
{{if $total > $visible_forums }}
<li onclick="showHideForumlist(); return false;" id="forum-widget-collapse" class="forum-widget-link fakelink tool">{{$showmore}}</li>
{{/if}}
</ul>
</div>

View file

@ -690,6 +690,7 @@ aside h4 {
list-style: none; list-style: none;
} }
#subscribe-feed-link,
#dfrn-request-link { #dfrn-request-link {
box-shadow: inset 0px 1px 0px 0px #a65151; box-shadow: inset 0px 1px 0px 0px #a65151;
-moz-box-shadow: inset 0px 1px 0px 0px #a65151; -moz-box-shadow: inset 0px 1px 0px 0px #a65151;
@ -725,6 +726,7 @@ aside h4 {
background-color: #3465a4; background-color: #3465a4;
} }
#subscribe-feed-link:hover,
#dfrn-request-link:hover { #dfrn-request-link:hover {
background: -webkit-gradient( linear, left top, left bottom, color-stop(0.05, #1873a2), color-stop(1, #6da6c4) ); background: -webkit-gradient( linear, left top, left bottom, color-stop(0.05, #1873a2), color-stop(1, #6da6c4) );
background: -moz-linear-gradient( center top, #1873a2 5%, #6da6c4 100% ); background: -moz-linear-gradient( center top, #1873a2 5%, #6da6c4 100% );
@ -732,6 +734,7 @@ aside h4 {
background-color: #1873a2; background-color: #1873a2;
} }
#subscribe-feed-link:active,
#dfrn-request-link:active { #dfrn-request-link:active {
position: relative; position: relative;
top: 1px; top: 1px;
@ -854,7 +857,8 @@ li.widget-list {
padding: 3px 24px; padding: 3px 24px;
} }
#sidebar-new-group { #sidebar-new-group,
#sidebar-edit-groups {
padding: 7px; padding: 7px;
width: 165px; width: 165px;
margin: auto; margin: auto;

View file

@ -347,7 +347,7 @@ code {
display: inline-block; display: inline-block;
min-width: 10px; min-width: 10px;
padding: 3px 7px; padding: 3px 7px;
font-size: 12px; font-size: 10px;
font-weight: 700; font-weight: 700;
line-height: 1; line-height: 1;
color: #fff; color: #fff;
@ -382,7 +382,7 @@ code {
#sidebar-group-list .tool:hover { #sidebar-group-list .tool:hover {
background: #EEE; background: #EEE;
} }
#sidebar-group-list .notify { /*#sidebar-group-list .notify {
min-width: 10px; min-width: 10px;
text-align: center; text-align: center;
color: #FFF; color: #FFF;
@ -391,6 +391,9 @@ code {
padding: 3px; padding: 3px;
border-radius: 10px; border-radius: 10px;
display: none; display: none;
}*/
#sidebar-group-list .notify {
display: none;
} }
#sidebar-group-list .notify.show { display: inline-block; } #sidebar-group-list .notify.show { display: inline-block; }
.tool .label { .tool .label {
@ -416,7 +419,7 @@ code {
opacity: 1; opacity: 1;
} }
.sidebar-group-li:hover, #sidebar-new-group:hover, #forum-widget-collapse:hover, .sidebar-group-li:hover, #sidebar-new-group:hover, #sidebar-edit-groups:hover, #forum-widget-collapse:hover,
#sidebar-ungrouped:hover, .side-link:hover, .nets-ul li:hover, #forumlist-sidebar li:hover, #forumlist-sidebar-right li:hover, #sidebar-ungrouped:hover, .side-link:hover, .nets-ul li:hover, #forumlist-sidebar li:hover, #forumlist-sidebar-right li:hover,
.nets-all:hover, .saved-search-li:hover, li.tool:hover, .admin.link:hover, aside h4 a:hover, right_aside h4 a:hover, #message-new:hover { .nets-all:hover, .saved-search-li:hover, li.tool:hover, .admin.link:hover, aside h4 a:hover, right_aside h4 a:hover, #message-new:hover {
/* background-color: #ddd; */ /* background-color: #ddd; */
@ -432,11 +435,11 @@ code {
/* color: #000; */ /* color: #000; */
} }
.group-selected, .nets-selected, .fileas-selected { .group-selected, .nets-selected, .fileas-selected, .forum-selected {
font-weight: bold; font-weight: bold;
} }
#forum-widget-showmore, #sidebar-new-group, #forum-widget-collapse, #forumlist-rsidebar-right, #sidebar-ungrouped, #forum-widget-showmore, #sidebar-new-group, #sidebar-edit-groups, #forum-widget-collapse, #forumlist-rsidebar-right, #sidebar-ungrouped,
.side-link, #peoplefind-desc, #connect-desc, .nets-all, .admin.link, #message-new { .side-link, #peoplefind-desc, #connect-desc, .nets-all, .admin.link, #message-new {
padding-left: 10px; padding-left: 10px;
padding-top: 3px; padding-top: 3px;
@ -464,7 +467,7 @@ code {
display: inline-block; display: inline-block;
} }
a.nets-link, .side-link a, #sidebar-new-group a, a.savedsearchterm, a.fileas-link, aside h4 a, right_aside h4 a { a.nets-link, .side-link a, #sidebar-new-group a, #sidebar-edit-groups a, a.savedsearchterm, a.fileas-link, aside h4 a, right_aside h4 a {
display: block; display: block;
color: #737373; color: #737373;
} }
@ -1004,9 +1007,11 @@ aside #profile-extra-links ul {
} }
aside #profile-extra-links li { aside #profile-extra-links li {
padding: 0px; padding: 0px;
padding-bottom: 4px;
margin: 0px; margin: 0px;
list-style: none; list-style: none;
} }
aside #subscribe-feed-link,
aside #dfrn-request-link, aside #dfrn-request-link,
aside #wallmessage-link { aside #wallmessage-link {
display: block; display: block;
@ -1019,6 +1024,7 @@ aside #wallmessage-link {
text-transform: uppercase; text-transform: uppercase;
padding: 4px 2px 2px 35px; padding: 4px 2px 2px 35px;
} }
aside #subscribe-feed-link:hover,
aside #dfrn-request-link:hover, aside #dfrn-request-link:hover,
aside #wallmessage-link:hover { aside #wallmessage-link:hover {
text-decoration: none; text-decoration: none;

View file

@ -66,6 +66,9 @@
{{if $wallmessage}} {{if $wallmessage}}
<li><a id="wallmessage-link" href="wallmessage/{{$profile.nickname}}">{{$wallmessage}}</a></li> <li><a id="wallmessage-link" href="wallmessage/{{$profile.nickname}}">{{$wallmessage}}</a></li>
{{/if}} {{/if}}
{{if $subscribe_feed}}
<li><a id="subscribe-feed-link" href="dfrn_poll/{{$profile.nickname}}">{{$subscribe_feed}}</a></li>
{{/if}}
</ul> </ul>
</div> </div>
</div> </div>

View file

@ -20,21 +20,21 @@ function showHideForumlist() {
{{foreach $forums as $forum}} {{foreach $forums as $forum}}
{{if $forum.id <= $visible_forums}} {{if $forum.id <= $visible_forums}}
<li class="forum-widget-entry forum-{{$forum.cid}}" id="forum-widget-entry-{{$forum.id}}" role="menuitem"> <li class="forum-widget-entry forum-{{$forum.cid}}" id="forum-widget-entry-{{$forum.id}}" role="menuitem">
<span class="notify badge pull-right"></span>
<a href="{{$forum.external_url}}" title="{{$forum.link_desc}}" class="label sparkle" target="_blank"> <a href="{{$forum.external_url}}" title="{{$forum.link_desc}}" class="label sparkle" target="_blank">
<img class="forumlist-img" src="{{$forum.micro}}" alt="{{$forum.link_desc}}" /> <img class="forumlist-img" src="{{$forum.micro}}" alt="{{$forum.link_desc}}" />
</a> </a>
<a class="forum-widget-link" id="forum-widget-link-{{$forum.id}}" href="{{$forum.url}}" >{{$forum.name}}</a> <a class="forum-widget-link {{if $forum.selected}}forum-selected{{/if}}" id="forum-widget-link-{{$forum.id}}" href="{{$forum.url}}" >{{$forum.name}}</a>
<span class="notify badge pull-right"></span>
</li> </li>
{{/if}} {{/if}}
{{if $forum.id > $visible_forums}} {{if $forum.id > $visible_forums}}
<li class="forum-widget-entry forum-{{$forum.cid}}" id="forum-widget-entry-extended-{{$forum.id}}" role="menuitem" style="display: none;"> <li class="forum-widget-entry forum-{{$forum.cid}}" id="forum-widget-entry-extended-{{$forum.id}}" role="menuitem" style="display: none;">
<span class="notify padge pull-right"></span>
<a href="{{$forum.external_url}}" title="{{$forum.link_desc}}" class="label sparkle" target="_blank"> <a href="{{$forum.external_url}}" title="{{$forum.link_desc}}" class="label sparkle" target="_blank">
<img class="forumlist-img" src="{{$forum.micro}}" alt="{{$forum.link_desc}}" /> <img class="forumlist-img" src="{{$forum.micro}}" alt="{{$forum.link_desc}}" />
</a> </a>
<a class="forum-widget-link" id="forum-widget-link-{{$forum.id}}" href="{{$forum.url}}" >{{$forum.name}}</a> <a class="forum-widget-link {{if $forum.selected}}forum-selected{{/if}}" id="forum-widget-link-{{$forum.id}}" href="{{$forum.url}}" >{{$forum.name}}</a>
<span class="notify padge pull-right"></span>
</li> </li>
{{/if}} {{/if}}
{{/foreach}} {{/foreach}}

View file

@ -222,6 +222,9 @@ function vier_community_info() {
require_once('include/forums.php'); require_once('include/forums.php');
if(x($_GET['cid']) && intval($_GET['cid']) != 0)
$cid = $_GET['cid'];
//sort by last updated item //sort by last updated item
$lastitem = true; $lastitem = true;
@ -235,11 +238,14 @@ function vier_community_info() {
foreach($contacts as $contact) { foreach($contacts as $contact) {
$selected = (($cid == $contact['id']) ? ' forum-selected' : '');
$entry = array( $entry = array(
'url' => $a->get_baseurl() . '/network?f=&cid=' . $contact['id'], 'url' => z_root() . '/network?f=&cid=' . $contact['id'],
'external_url' => $a->get_baseurl() . '/redir/' . $contact['id'], 'external_url' => z_root() . '/redir/' . $contact['id'],
'name' => $contact['name'], 'name' => $contact['name'],
'cid' => $contact['id'], 'cid' => $contact['id'],
'selected' => $selected,
'micro' => proxy_url($contact['micro'], false, PROXY_SIZE_MICRO), 'micro' => proxy_url($contact['micro'], false, PROXY_SIZE_MICRO),
'id' => ++$id, 'id' => ++$id,
); );