]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #2113 from annando/1511-manage-notifications
authorfabrixxm <fabrix.xm@gmail.com>
Mon, 30 Nov 2015 11:04:53 +0000 (12:04 +0100)
committerfabrixxm <fabrix.xm@gmail.com>
Mon, 30 Nov 2015 11:04:53 +0000 (12:04 +0100)
The manage page now shows the notifications

44 files changed:
include/Contact.php
include/acl_selectors.php
include/bb2diaspora.php
include/bbcode.php
include/contact_widgets.php
include/cron.php
include/forums.php
include/identity.php
include/items.php
include/ostatus.php
include/text.php
mod/admin.php
mod/contacts.php
mod/item.php
mod/network.php
mod/parse_url.php
mod/viewcontacts.php
view/templates/admin_site.tpl
view/templates/profile_vcard.tpl
view/templates/viewcontact_template.tpl
view/templates/widget_forumlist.tpl
view/theme/duepuntozero/deriv/darkzero.css
view/theme/duepuntozero/deriv/easterbunny.css
view/theme/duepuntozero/deriv/greenzero.css
view/theme/duepuntozero/deriv/purplezero.css
view/theme/duepuntozero/style.css
view/theme/duepuntozero/templates/profile_vcard.tpl
view/theme/frost-mobile/style.css
view/theme/frost/style.css
view/theme/frost/templates/profile_vcard.tpl
view/theme/quattro/dark/style.css
view/theme/quattro/green/style.css
view/theme/quattro/lilac/style.css
view/theme/quattro/quattro.less
view/theme/quattro/templates/profile_vcard.tpl
view/theme/quattro/templates/widget_forumlist.tpl [new file with mode: 0644]
view/theme/smoothly/style.css
view/theme/vier/breathe.css
view/theme/vier/dark.css
view/theme/vier/flat.css
view/theme/vier/style.css
view/theme/vier/templates/profile_vcard.tpl
view/theme/vier/templates/widget_forumlist_right.tpl
view/theme/vier/theme.php

index b98c9f7056295774c8395d894e83b85ee8f6c7b1..fe73557de3c346d7762abc1be26f425adc326ae3 100644 (file)
@@ -286,7 +286,7 @@ function get_contact_details_by_url($url, $uid = -1) {
 }
 
 if(! function_exists('contact_photo_menu')){
-function contact_photo_menu($contact) {
+function contact_photo_menu($contact, $uid = 0) {
 
        $a = get_app();
 
@@ -298,6 +298,33 @@ function contact_photo_menu($contact) {
        $contact_drop_link = "";
        $poke_link="";
 
+       if ($uid == 0)
+               $uid = local_user();
+
+       if ($contact["uid"] != $uid) {
+               if ($uid == 0) {
+                       $profile_link = zrl($contact['url']);
+                       $menu = Array('profile' => array(t("View Profile"), $profile_link, true));
+
+                       return $menu;
+               }
+
+               $r = q("SELECT * FROM `contact` WHERE `nurl` = '%s' AND `network` = '%s' AND `uid` = %d",
+                       dbesc($contact["nurl"]), dbesc($contact["network"]), intval($uid));
+               if ($r)
+                       return contact_photo_menu($r[0], $uid);
+               else {
+                       $profile_link = zrl($contact['url']);
+                       $connlnk = 'follow/?url='.$contact['url'];
+                       $menu = Array(
+                               'profile' => array(t("View Profile"), $profile_link, true),
+                               'follow' => array(t("Connect/Follow"), $connlnk, true)
+                               );
+
+                       return $menu;
+               }
+       }
+
        $sparkle = false;
        if($contact['network'] === NETWORK_DFRN) {
                $sparkle = true;
index a1154399a713035c43a8f83751006cdcd8228989..4ef3d05ea3959fb9ba46070436f7c33e2b034612 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 
 require_once("include/contact_selectors.php");
+require_once("include/contact_widgets.php");
 require_once("include/features.php");
 require_once("mod/proxy.php");
 
@@ -425,6 +426,8 @@ function acl_lookup(&$a, $out_type = 'json') {
                $group_count = 0;
        }
 
+       $sql_extra2 .= " ".unavailable_networks();
+
        if ($type=='' || $type=='c'){
                $r = q("SELECT COUNT(*) AS c FROM `contact`
                                WHERE `uid` = %d AND `self` = 0
index fc05e720f4f7b1c7a16896532d7e534d315cc7d1..a8b39f741ac84a2d066066e129176cf0dff82b9a 100644 (file)
@@ -83,7 +83,6 @@ function bb2diaspora($Text,$preserve_nl = false, $fordiaspora = true) {
                'return \'#\'. str_replace(\' \', \'_\', $match[2]);'
        ), $Text);
 
-
        // 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);
 
@@ -94,11 +93,12 @@ function bb2diaspora($Text,$preserve_nl = false, $fordiaspora = true) {
                // Add all tags that maybe were removed
                if (preg_match_all("/#\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism",$OriginalText, $tags)) {
                        $tagline = "";
-                       foreach($tags[2] as $tag)
-                               if (!strpos($Text, "#".$tag))
+                       foreach($tags[2] as $tag) {
+                               $tag = html_entity_decode($tag, ENT_QUOTES, 'UTF-8');
+                               if (!strpos(html_entity_decode($Text, ENT_QUOTES, 'UTF-8'), "#".$tag))
                                        $tagline .= "#".$tag." ";
-
-                       $Text = $Text."<br />".$tagline;
+                       }
+                       $Text = $Text." ".$tagline;
                }
 
        } else
index 81536d37200fdd5083a38685c306282856f8d0cb..acf6979d84544788a5eb8a2292ad2f77912b64ef 100644 (file)
@@ -99,10 +99,19 @@ function bb_attachment($Text, $simplehtml = false, $tryoembed = true) {
                                $image = "";
                        }
 
-                       if ($simplehtml == 7)
-                               $text = sprintf('<a href="%s" title="%s" class="attachment thumbnail" rel="nofollow external">%s</a>',
-                                               $url, $title, $title);
-                       elseif (($simplehtml != 4) AND ($simplehtml != 0))
+                       if ($simplehtml == 7) {
+                               $title2 = $title;
+
+                               $test1 = trim(html_entity_decode($match[1],ENT_QUOTES,'UTF-8'));
+                               $test2 = trim(html_entity_decode($title,ENT_QUOTES,'UTF-8'));
+
+                               // If the link description is similar to the text above then don't add the link description
+                               if (($title != "") AND ((strpos($test1,$test2) !== false) OR
+                                       (similar_text($test1,$test2) / strlen($title)) > 0.9))
+                                       $title2 = $url;
+                               $text = sprintf('<a href="%s" title="%s" class="attachment thumbnail" rel="nofollow external">%s</a><br />',
+                                               $url, $title, $title2);
+                       } elseif (($simplehtml != 4) AND ($simplehtml != 0))
                                $text = sprintf('<a href="%s" target="_blank">%s</a><br>', $url, $title);
                        else {
                                $text = sprintf('<span class="type-%s">', $type);
@@ -950,11 +959,13 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true, $simplehtml = fal
        $Text = preg_replace_callback("&\[url=/posts/([^\[\]]*)\](.*)\[\/url\]&Usi", 'bb_DiasporaLinks', $Text);
 
        // if the HTML is used to generate plain text, then don't do this search, but replace all URL of that kind to text
-       if (!$forplaintext)
-               $Text = preg_replace("/([^\]\='".'"'."]|^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,]+)/ism", '$1<a href="$2" target="_blank">$2</a>', $Text);
-       else {
-               $Text = preg_replace("(\[url\]([$URLSearchString]*)\[\/url\])ism"," $1 ",$Text);
-               $Text = preg_replace_callback("&\[url=([^\[\]]*)\]\[img\](.*)\[\/img\]\[\/url\]&Usi", 'bb_RemovePictureLinks', $Text);
+       if ($simplehtml != 7) {
+               if (!$forplaintext)
+                       $Text = preg_replace("/([^\]\='".'"'."]|^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,]+)/ism", '$1<a href="$2" target="_blank">$2</a>', $Text);
+               else {
+                       $Text = preg_replace("(\[url\]([$URLSearchString]*)\[\/url\])ism"," $1 ",$Text);
+                       $Text = preg_replace_callback("&\[url=([^\[\]]*)\]\[img\](.*)\[\/img\]\[\/url\]&Usi", 'bb_RemovePictureLinks', $Text);
+               }
        }
 
        if ($tryoembed)
index 810671a91cceee3e4ce78a646b56b7ef443a79d3..bbbd941b5609df3ae7321bc708599e17c6de4ccc 100644 (file)
@@ -20,12 +20,12 @@ function findpeople_widget() {
        if(get_config('system','invitation_only')) {
                $x = get_pconfig(local_user(),'system','invites_remaining');
                if($x || is_site_admin()) {
-                       $a->page['aside'] .= '<div class="side-link" id="side-invite-remain">' 
-                       . sprintf( tt('%d invitation available','%d invitations available',$x), $x) 
+                       $a->page['aside'] .= '<div class="side-link" id="side-invite-remain">'
+                       . sprintf( tt('%d invitation available','%d invitations available',$x), $x)
                        . '</div>' . $inv;
                }
        }
+
        return replace_macros(get_markup_template('peoplefind.tpl'),array(
                '$findpeople' => t('Find People'),
                '$desc' => t('Enter name or interest'),
@@ -40,18 +40,55 @@ function findpeople_widget() {
 
 }
 
+function unavailable_networks() {
+       $network_filter = "";
+
+       $networks = array();
+
+       if (!plugin_enabled("appnet"))
+               $networks[] = NETWORK_APPNET;
+
+       if (!plugin_enabled("fbpost") AND !plugin_enabled("facebook"))
+               $networks[] = NETWORK_FACEBOOK;
+
+       if (!plugin_enabled("statusnet"))
+               $networks[] = NETWORK_STATUSNET;
+
+       if (!plugin_enabled("pumpio"))
+               $networks[] = NETWORK_PUMPIO;
+
+       if (!plugin_enabled("twitter"))
+               $networks[] = NETWORK_TWITTER;
+
+       if (get_config("system","ostatus_disabled"))
+               $networks[] = NETWORK_OSTATUS;
+
+       if (!get_config("system","diaspora_enabled"))
+               $networks[] = NETWORK_DIASPORA;
+
+       if (!sizeof($networks))
+               return "";
+
+       $network_filter = implode("','", $networks);
+
+       $network_filter = "AND `network` NOT IN ('$network_filter')";
+
+       return $network_filter;
+}
 
 function networks_widget($baseurl,$selected = '') {
 
        $a = get_app();
 
-       if(! local_user())
+       if(!local_user())
                return '';
 
-       if(! feature_enabled(local_user(),'networks'))
+       if(!feature_enabled(local_user(),'networks'))
                return '';
 
-       $r = q("SELECT DISTINCT(`network`) FROM `contact` WHERE `uid` = %d AND `self` = 0 ORDER BY `network`",
+       $extra_sql = unavailable_networks();
+
+       $r = q("SELECT DISTINCT(`network`) FROM `contact` WHERE `uid` = %d AND NOT `self` $extra_sql ORDER BY `network`",
                intval(local_user())
        );
 
@@ -180,7 +217,7 @@ function common_friends_visitor_widget($profile_uid) {
        }
 
        if($cid == 0 && $zcid == 0)
-               return; 
+               return;
 
        require_once('include/socgraph.php');
 
@@ -204,6 +241,6 @@ function common_friends_visitor_widget($profile_uid) {
                '$linkmore' => (($t > 5) ? 'true' : ''),
                '$more' => t('show more'),
                '$items' => $r
-       )); 
+       ));
 
 };
index 7b2244b55eda9a4c370ec5104479a11b57d796e6..d95d8bc601bfa7b19d7a5d89eaaa977c0c9e780a 100644 (file)
@@ -189,6 +189,27 @@ function cron_run(&$argv, &$argc){
                        q('DELETE FROM `photo` WHERE `uid` = 0 AND `resource-id` LIKE "pic:%%" AND `created` < NOW() - INTERVAL %d SECOND', $cachetime);
                }
 
+               // maximum table size in megabyte
+               $max_tablesize = intval(get_config('system','optimize_max_tablesize')) * 1000000;
+               if ($max_tablesize == 0)
+                       $max_tablesize = 100 * 1000000; // Default are 100 MB
+
+               // Optimize some tables that need to be optimized
+               $r = q("SHOW TABLE STATUS");
+               foreach($r as $table) {
+
+                       // Don't optimize tables that needn't to be optimized
+                       if ($table["Data_free"] == 0)
+                               continue;
+
+                       // Don't optimize tables that are too large
+                       if ($table["Data_length"] > $max_tablesize)
+                               continue;
+
+                       // So optimize it
+                       q("OPTIMIZE TABLE `%s`", dbesc($table["Name"]));
+               }
+
                set_config('system','cache_last_cleared', time());
        }
 
index 59bf5a6b079af9a32d935bcf19b17186b8292a53..995a29cad1411d0ec6280068ac9bfca52d1b00e1 100644 (file)
@@ -60,10 +60,12 @@ function get_forumlist($uid, $showhidden = true, $lastitem, $showprivate = false
  * Sidebar widget to show subcribed friendica forums. If activated
  * 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
  */
-function widget_forumlist($a) {
+function widget_forumlist($uid,$cid = 0) {
 
        if(! intval(feature_enabled(local_user(),'forumlist_widget')))
                return;
@@ -73,7 +75,7 @@ function widget_forumlist($a) {
        //sort by last updated item
        $lastitem = true;
 
-       $contacts = get_forumlist($a->user['uid'],true,$lastitem, true);
+       $contacts = get_forumlist($uid,true,$lastitem, true);
        $total = count($contacts);
        $visible_forums = 10;
 
@@ -83,11 +85,14 @@ function widget_forumlist($a) {
 
                foreach($contacts as $contact) {
 
+                       $selected = (($cid == $contact['id']) ? ' forum-selected' : '');
+
                        $entry = array(
-                               'url' => $a->get_baseurl() . '/network?f=&cid=' . $contact['id'],
-                               'external_url' => $a->get_baseurl() . '/redir/' . $contact['id'],
+                               'url' => z_root() . '/network?f=&cid=' . $contact['id'],
+                               'external_url' => z_root() . '/redir/' . $contact['id'],
                                'name' => $contact['name'],
                                'cid' => $contact['id'],
+                               'selected'      => $selected,
                                'micro' => proxy_url($contact['micro'], false, PROXY_SIZE_MICRO),
                                'id' => ++$id,
                        );
index a785ce981dc8074873c9fb354b2e72a4e31f310d..48fd5056dc98a10a85b3c97ad1156d956b8fa988 100644 (file)
@@ -216,12 +216,17 @@ if(! function_exists('profile_sidebar')) {
                }
 
                if ($connect AND ($profile['network'] != NETWORK_DFRN) AND !isset($profile['remoteconnect']))
-                               $connect = false;
+                       $connect = false;
 
                if (isset($profile['remoteconnect']))
                        $remoteconnect = $profile['remoteconnect'];
 
-               if( get_my_url() && $profile['unkmail'] && ($profile['uid'] != local_user()) )
+               if ($connect AND ($profile['network'] == NETWORK_DFRN) AND !isset($remoteconnect))
+                       $subscribe_feed = t("Atom feed");
+               else
+                       $subscribe_feed = false;
+
+               if(get_my_url() && $profile['unkmail'] && ($profile['uid'] != local_user()))
                        $wallmessage = t('Message');
                else
                        $wallmessage = false;
@@ -337,6 +342,7 @@ if(! function_exists('profile_sidebar')) {
                        '$profile' => $p,
                        '$connect'  => $connect,
                        '$remoteconnect'  => $remoteconnect,
+                       '$subscribe_feed' => $subscribe_feed,
                        '$wallmessage' => $wallmessage,
                        '$location' => $location,
                        '$gender'   => $gender,
index 53f4784c2d053fe06661a979d4ffdca507d71937..65d66b77a17801e597fe54bdba71907d508716e4 100644 (file)
@@ -4171,14 +4171,13 @@ function new_follower($importer,$contact,$datarray,$item,$sharing = false) {
                        );
                }
                // send email notification to owner?
-       }
-       else {
+       } else {
 
                // create contact record
 
-               $r = q("INSERT INTO `contact` ( `uid`, `created`, `url`, `nurl`, `name`, `nick`, `photo`, `network`, `rel`,
-                       `blocked`, `readonly`, `pending`, `writable` )
-                       VALUES ( %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, 0, 0, 1, 1 ) ",
+               $r = q("INSERT INTO `contact` (`uid`, `created`, `url`, `nurl`, `name`, `nick`, `photo`, `network`, `rel`,
+                       `blocked`, `readonly`, `pending`, `writable`)
+                       VALUES (%d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, 0, 0, 1, 1)",
                        intval($importer['uid']),
                        dbesc(datetime_convert()),
                        dbesc($url),
@@ -4193,27 +4192,38 @@ function new_follower($importer,$contact,$datarray,$item,$sharing = false) {
                                intval($importer['uid']),
                                dbesc($url)
                );
-               if(count($r))
+               if(count($r)) {
                                $contact_record = $r[0];
 
-               // create notification
-               $hash = random_string();
+                               $photos = import_profile_photo($photo,$importer["uid"],$contact_record["id"]);
 
-               if(is_array($contact_record)) {
-                       $ret = q("INSERT INTO `intro` ( `uid`, `contact-id`, `blocked`, `knowyou`, `hash`, `datetime`)
-                               VALUES ( %d, %d, 0, 0, '%s', '%s' )",
-                               intval($importer['uid']),
-                               intval($contact_record['id']),
-                               dbesc($hash),
-                               dbesc(datetime_convert())
-                       );
+                               q("UPDATE `contact` SET `photo` = '%s', `thumb` = '%s', `micro` = '%s' WHERE `id` = %d",
+                                       dbesc($photos[0]),
+                                       dbesc($photos[1]),
+                                       dbesc($photos[2]),
+                                       intval($contact_record["id"])
+                               );
                }
 
+
                $r = q("SELECT * FROM `user` WHERE `uid` = %d LIMIT 1",
                        intval($importer['uid'])
                );
                $a = get_app();
-               if(count($r)) {
+               if(count($r) AND !in_array($r[0]['page-flags'], array(PAGE_SOAPBOX, PAGE_FREELOVE))) {
+
+                       // create notification
+                       $hash = random_string();
+
+                       if(is_array($contact_record)) {
+                               $ret = q("INSERT INTO `intro` ( `uid`, `contact-id`, `blocked`, `knowyou`, `hash`, `datetime`)
+                                       VALUES ( %d, %d, 0, 0, '%s', '%s' )",
+                                       intval($importer['uid']),
+                                       intval($contact_record['id']),
+                                       dbesc($hash),
+                                       dbesc(datetime_convert())
+                               );
+                       }
 
                        if(intval($r[0]['def_gid'])) {
                                require_once('include/group.php');
@@ -4221,7 +4231,7 @@ function new_follower($importer,$contact,$datarray,$item,$sharing = false) {
                        }
 
                        if(($r[0]['notify-flags'] & NOTIFY_INTRO) &&
-                               in_array($r[0]['page-flags'], array(PAGE_NORMAL, PAGE_SOAPBOX, PAGE_FREELOVE))) {
+                               in_array($r[0]['page-flags'], array(PAGE_NORMAL))) {
 
                                notification(array(
                                        'type'         => NOTIFY_INTRO,
@@ -4239,7 +4249,13 @@ function new_follower($importer,$contact,$datarray,$item,$sharing = false) {
                                ));
 
                        }
+               } elseif (count($r) AND in_array($r[0]['page-flags'], array(PAGE_SOAPBOX, PAGE_FREELOVE))) {
+                       $r = q("UPDATE `contact` SET `pending` = 0 WHERE `uid` = %d AND `url` = '%s' AND `pending` LIMIT 1",
+                                       intval($importer['uid']),
+                                       dbesc($url)
+                       );
                }
+
        }
 }
 
@@ -4645,7 +4661,7 @@ function item_getfeedtags($item) {
        if($cnt) {
                for($x = 0; $x < $cnt; $x ++) {
                        if($matches[1][$x])
-                               $ret[] = array('#',$matches[1][$x], $matches[2][$x]);
+                               $ret[$matches[2][$x]] = array('#',$matches[1][$x], $matches[2][$x]);
                }
        }
        $matches = false;
index ce254ed61ad012328d362234882b6738c03c5cea..ebd5741e5157a44977a4f6452857c2f509199191 100644 (file)
@@ -1201,6 +1201,14 @@ function ostatus_get_attachment($doc, $root, $item) {
                        break;
        }
 
+       if (($siteinfo["type"] != "photo") AND isset($siteinfo["image"])) {
+               $photodata = get_photo_info($siteinfo["image"]);
+
+               $attributes = array("rel" => "preview", "href" => $siteinfo["image"], "media:width" => $photodata[0], "media:height" => $photodata[1]);
+               xml_add_element($doc, $root, "link", "", $attributes);
+       }
+
+
        $arr = explode('[/attach],',$item['attach']);
        if(count($arr)) {
                foreach($arr as $r) {
@@ -1229,7 +1237,7 @@ function ostatus_add_author($doc, $owner, $profile) {
        $author = $doc->createElement("author");
        xml_add_element($doc, $author, "activity:object-type", ACTIVITY_OBJ_PERSON);
        xml_add_element($doc, $author, "uri", $owner["url"]);
-       xml_add_element($doc, $author, "name", $owner["nick"]);
+       xml_add_element($doc, $author, "name", $profile["name"]);
 
        $attributes = array("rel" => "alternate", "type" => "text/html", "href" => $owner["url"]);
        xml_add_element($doc, $author, "link", "", $attributes);
@@ -1327,6 +1335,7 @@ function ostatus_entry($doc, $item, $owner, $toplevel = false) {
        if ($item['title'] != "")
                $body = "[b]".$item['title']."[/b]\n\n".$body;
 
+       //$body = bb_remove_share_information($body);
        $body = bbcode($body, false, false, 7);
 
        xml_add_element($doc, $entry, "content", $body, array("type" => "html"));
@@ -1440,7 +1449,7 @@ function ostatus_feed(&$a, $owner_nick, $last_update) {
                $root->appendChild($entry);
        }
 
-       return($doc->saveXML());
+       return(trim($doc->saveXML()));
 }
 
 function ostatus_salmon($item,$owner) {
@@ -1452,6 +1461,6 @@ function ostatus_salmon($item,$owner) {
 
        $doc->appendChild($entry);
 
-       return($doc->saveXML());
+       return(trim($doc->saveXML()));
 }
 ?>
index f210bff72100c363ee4355fb0a07eed4a86d90f8..73c441e26aaaabd8c47d0c46a552214d9c2d07a4 100644 (file)
@@ -943,6 +943,9 @@ function micropro($contact, $redirect = false, $class = '', $textmode = false) {
        if($class)
                $class = ' ' . $class;
 
+       if ($contact["addr"] == "")
+               $contact["addr"] = $contact["url"];
+
        $url = $contact['url'];
        $sparkle = '';
        $redir = false;
@@ -966,7 +969,7 @@ function micropro($contact, $redirect = false, $class = '', $textmode = false) {
                        . (($click) ? ' fakelink' : '') . '" '
                        . (($redir) ? ' target="redir" ' : '')
                        . (($url) ? ' href="' . $url . '"' : '') . $click
-                       . '" title="' . $contact['name'] . ' [' . $contact['url'] . ']" alt="' . $contact['name']
+                       . '" title="' . $contact['name'] . ' [' . $contact['addr'] . ']" alt="' . $contact['name']
                        . '" >'. $contact['name'] . '</a></div>' . "\r\n";
        }
        else {
@@ -974,7 +977,7 @@ function micropro($contact, $redirect = false, $class = '', $textmode = false) {
                        . (($click) ? ' fakelink' : '') . '" '
                        . (($redir) ? ' target="redir" ' : '')
                        . (($url) ? ' href="' . $url . '"' : '') . $click . ' ><img class="contact-block-img' . $class . $sparkle . '" src="'
-                       . proxy_url($contact['micro'], false, PROXY_SIZE_THUMB) . '" title="' . $contact['name'] . ' [' . $contact['url'] . ']" alt="' . $contact['name']
+                       . proxy_url($contact['micro'], false, PROXY_SIZE_THUMB) . '" title="' . $contact['name'] . ' [' . $contact['addr'] . ']" alt="' . $contact['name']
                        . '" /></a></div>' . "\r\n";
        }
 }}
index d9a17dcad7010939fdbd2208c778e60914f0613c..8d2a7688f8f500e2b7cbcb5905cb43dfdce6d080 100644 (file)
@@ -409,6 +409,7 @@ function admin_page_site_post(&$a){
        $poll_interval          =       ((x($_POST,'poll_interval'))            ? intval(trim($_POST['poll_interval']))         : 0);
        $maxloadavg             =       ((x($_POST,'maxloadavg'))               ? intval(trim($_POST['maxloadavg']))            : 50);
        $maxloadavg_frontend    =       ((x($_POST,'maxloadavg_frontend'))      ? intval(trim($_POST['maxloadavg_frontend']))   : 50);
+       $optimize_max_tablesize =       ((x($_POST,'optimize_max_tablesize'))   ? intval(trim($_POST['optimize_max_tablesize'])): 100);
        $poco_completion        =       ((x($_POST,'poco_completion'))          ? intval(trim($_POST['poco_completion']))       : false);
        $poco_requery_days      =       ((x($_POST,'poco_requery_days'))        ? intval(trim($_POST['poco_requery_days']))     : 7);
        $poco_discovery         =       ((x($_POST,'poco_discovery'))           ? intval(trim($_POST['poco_discovery']))        : 0);
@@ -490,6 +491,7 @@ function admin_page_site_post(&$a){
        set_config('system','poll_interval',$poll_interval);
        set_config('system','maxloadavg',$maxloadavg);
        set_config('system','maxloadavg_frontend',$maxloadavg_frontend);
+       set_config('system','optimize_max_tablesize',$optimize_max_tablesize);
        set_config('system','poco_completion',$poco_completion);
        set_config('system','poco_requery_days',$poco_requery_days);
        set_config('system','poco_discovery',$poco_discovery);
@@ -772,6 +774,7 @@ function admin_page_site(&$a) {
                '$poll_interval'        => array('poll_interval', t("Poll interval"), (x(get_config('system','poll_interval'))?get_config('system','poll_interval'):2), t("Delay background polling processes by this many seconds to reduce system load. If 0, use delivery interval.")),
                '$maxloadavg'           => array('maxloadavg', t("Maximum Load Average"), ((intval(get_config('system','maxloadavg')) > 0)?get_config('system','maxloadavg'):50), t("Maximum system load before delivery and poll processes are deferred - default 50.")),
                '$maxloadavg_frontend'  => array('maxloadavg_frontend', t("Maximum Load Average (Frontend)"), ((intval(get_config('system','maxloadavg_frontend')) > 0)?get_config('system','maxloadavg_frontend'):50), t("Maximum system load before the frontend quits service - default 50.")),
+               '$optimize_max_tablesize'=> array('optimize_max_tablesize', t("Maximum table size for optimization"), ((intval(get_config('system','optimize_max_tablesize')) > 0)?get_config('system','optimize_max_tablesize'):100), t("Maximum table size (in MB) for the automatic optimization - default 100 MB. Enter -1 to disable it.")),
 
                '$poco_completion'      => array('poco_completion', t("Periodical check of global contacts"), get_config('system','poco_completion'), t("If enabled, the global contacts are checked periodically for missing or outdated data and the vitality of the contacts and servers.")),
                '$poco_requery_days'    => array('poco_requery_days', t("Days between requery"), get_config('system','poco_requery_days'), t("Number of days after which a server is requeried for his contacts.")),
index 1dc886363ae1ddf699f4aa41a19a6a4d6c799e9f..9fdcf277b855bb716b37cb21599dcefbea02a5ac 100644 (file)
@@ -56,7 +56,7 @@ function contacts_init(&$a) {
        }
 
        $groups_widget .= group_side('contacts','group','full',0,$contact_id);
-       
+
        $a->page['aside'] .= replace_macros(get_markup_template("contacts-widget-sidebar.tpl"),array(
                '$vcard_widget' => $vcard_widget,
                '$findpeople_widget' => $findpeople_widget,
@@ -786,8 +786,9 @@ function contacts_content(&$a) {
                $total = $r[0]['total'];
        }
 
+       $sql_extra3 = unavailable_networks();
 
-       $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `pending` = 0 $sql_extra $sql_extra2 ORDER BY `name` ASC LIMIT %d , %d ",
+       $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `pending` = 0 $sql_extra $sql_extra2 $sql_extra3 ORDER BY `name` ASC LIMIT %d , %d ",
                intval($_SESSION['uid']),
                intval($a->pager['start']),
                intval($a->pager['itemspage'])
index 91a94974e9a232cd0b7c1e2a55893fe0ee69c41b..a2b88a8e305f00474a3adecb034adb5a6ed71ddf 100644 (file)
@@ -362,8 +362,7 @@ function item_post(&$a) {
        if((local_user()) && (local_user() == $profile_uid)) {
                $self = true;
                $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `self` = 1 LIMIT 1",
-                       intval($_SESSION['uid'])
-               );
+                       intval($_SESSION['uid']));
        }
        elseif(remote_user()) {
                if(is_array($_SESSION['remote'])) {
index fd22f3e192f7d0d9a8fa7f272b462c9cce9bdd4f..8e7a2b8e1ea1174b9bd0069924d5fcd1881be0e8 100644 (file)
@@ -6,6 +6,8 @@ function network_init(&$a) {
        }
 
        $is_a_date_query = false;
+       if(x($_GET['cid']) && intval($_GET['cid']) != 0)
+               $cid = $_GET['cid'];
 
        if($a->argc > 1) {
                for($x = 1; $x < $a->argc; $x ++) {
@@ -146,20 +148,12 @@ function network_init(&$a) {
        }
 
        $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'] .= networks_widget($a->get_baseurl(true) . '/network',(x($_GET, 'nets') ? $_GET['nets'] : ''));
        $a->page['aside'] .= saved_searches($search);
        $a->page['aside'] .= fileas_widget($a->get_baseurl(true) . '/network',(x($_GET, 'file') ? $_GET['file'] : ''));
 
-       if(x($_GET['cid']) && intval($_GET['cid']) != 0) {
-               $r = q("SELECT `url` FROM `contact` WHERE `id` = %d",
-                       intval($_GET['cid']));
-               if ($r) {
-                       $a->page['aside'] = "";
-                       profile_load($a, "", 0, get_contact_details_by_url($r[0]["url"]));
-               }
-       }
 }
 
 function saved_searches($search) {
@@ -583,7 +577,7 @@ function network_content(&$a, $update = 0) {
        }
        elseif($cid) {
 
-               $r = q("SELECT `id`,`name`,`network`,`writable`,`nurl` FROM `contact` WHERE `id` = %d
+               $r = q("SELECT `id`,`name`,`network`,`writable`,`nurl`, `forum`, `prv`, `addr`, `thumb`, `location` FROM `contact` WHERE `id` = %d
                                AND `blocked` = 0 AND `pending` = 0 LIMIT 1",
                        intval($cid)
                );
@@ -594,8 +588,18 @@ function network_content(&$a, $update = 0) {
                                            ON $sql_table.$sql_parent = `temp1`.`parent` ";
                        $sql_extra = "";
 
-                       $o = replace_macros(get_markup_template("section_title.tpl"),array(
-                               '$title' => sprintf( t('Contact: %s'), htmlentities($r[0]['name']))
+                       $entries[0] = array(
+                               'id' => 'network',
+                               'name' => htmlentities($r[0]['name']),
+                               'itemurl' => (($r[0]['addr']) ? ($r[0]['addr']) : ($r[0]['nurl'])),
+                               'thumb' => proxy_url($r[0]['thumb'], false, PROXY_SIZE_THUMB),
+                               'account_type' => (($r[0]['forum']) || ($r[0]['prv']) ? t('Forum') : ''),
+                               'details' => $r[0]['location'],
+                       );
+
+                       $o = replace_macros(get_markup_template("viewcontact_template.tpl"),array(
+                               'contacts' => $entries,
+                               'id' => 'network',
                        )) . $o;
 
                        if($r[0]['network'] === NETWORK_OSTATUS && $r[0]['writable'] && (! get_pconfig(local_user(),'system','nowarn_insecure'))) {
index 97eebb89ab630ae2b9aa5a8417733baaa5fb4d43..ef051d9f6b433c0e8152c39168c0debd8cfbee0a 100644 (file)
@@ -280,7 +280,8 @@ function parseurl_getsiteinfo($url, $no_guessing = false, $do_oembed = true, $co
        if (isset($keywords)) {
                $siteinfo["keywords"] = array();
                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]");
index c7f139e1e48aa9732773db0c98f586928a6c789d..d16a48e349190f447ac0d3cbf4087ea088f3e164 100644 (file)
@@ -26,19 +26,30 @@ 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 ",
-               intval($a->profile['uid'])
+       $r = q("SELECT COUNT(*) AS `total` FROM `contact`
+               WHERE `uid` = %d AND `blocked` = 0 AND `pending` = 0 AND `hidden` = 0 AND `archive` = 0
+                       AND `network` IN ('%s', '%s', '%s')",
+               intval($a->profile['uid']),
+               dbesc(NETWORK_DFRN),
+               dbesc(NETWORK_DIASPORA),
+               dbesc(NETWORK_OSTATUS)
        );
        if(count($r))
                $a->set_pager_total($r[0]['total']);
 
-       $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `blocked` = 0 AND `pending` = 0 AND `hidden` = 0 AND `archive` = 0 ORDER BY `name` ASC LIMIT %d , %d ",
+       $r = q("SELECT * FROM `contact`
+               WHERE `uid` = %d AND `blocked` = 0 AND `pending` = 0 AND `hidden` = 0 AND `archive` = 0
+                       AND `network` IN ('%s', '%s', '%s')
+               ORDER BY `name` ASC LIMIT %d, %d",
                intval($a->profile['uid']),
+               dbesc(NETWORK_DFRN),
+               dbesc(NETWORK_DIASPORA),
+               dbesc(NETWORK_OSTATUS),
                intval($a->pager['start']),
                intval($a->pager['itemspage'])
        );
-       if(! count($r)) {
-               info( t('No contacts.') . EOL );
+       if(!count($r)) {
+               info(t('No contacts.').EOL);
                return $o;
        }
 
@@ -64,6 +75,7 @@ function viewcontacts_content(&$a) {
                $contacts[] = array(
                        'id' => $rr['id'],
                        'img_hover' => sprintf( t('Visit %s\'s profile [%s]'), $rr['name'], $rr['url']),
+                       'photo_menu' => contact_photo_menu($rr),
                        'thumb' => proxy_url($rr['thumb'], false, PROXY_SIZE_THUMB),
                        'name' => htmlentities(substr($rr['name'],0,20)),
                        'username' => htmlentities($rr['name']),
index 13270e2ebae29607246f055f354cc939876b2e83..c1e70614ce65518a5ef2bf870c5ea9a87f82c17a 100644 (file)
        {{include file="field_input.tpl" field=$poll_interval}}
        {{include file="field_input.tpl" field=$maxloadavg}}
        {{include file="field_input.tpl" field=$maxloadavg_frontend}}
+       {{include file="field_input.tpl" field=$optimize_max_tablesize}}
        {{include file="field_input.tpl" field=$abandon_days}}
        {{include file="field_input.tpl" field=$lockpath}}
        {{include file="field_input.tpl" field=$temppath}}
index 05e44432fd2d33635edd787841f3d7eace0f2079..fa209bf46fa35e83da9b1d1b631e5bbb9a80f3db 100644 (file)
@@ -55,6 +55,9 @@
                        {{if $wallmessage}}
                                <li><a id="wallmessage-link" href="wallmessage/{{$profile.nickname}}">{{$wallmessage}}</a></li>
                        {{/if}}
+                       {{if $subscribe_feed}}
+                               <li><a id="subscribe-feed-link" href="dfrn_poll/{{$profile.nickname}}">{{$subscribe_feed}}</a></li>
+                       {{/if}}
                </ul>
        </div>
 </div>
index 455551c680acff6b2de283e32f4b42cb276ce127..205ad736d5c5065568977c8a244d139bc8c6fd86 100644 (file)
@@ -1,9 +1,11 @@
 
 {{include file="section_title.tpl"}}
 
+<div id="viewcontact_wrapper-{{$id}}">
 {{foreach $contacts as $contact}}
        {{include file="contact_template.tpl"}}
 {{/foreach}}
+</div>
 
 <div id="view-contact-end"></div>
 
index 54d7df82d219cdd0da068913dc32626f87210e58..32da71f816633b51fc3d08ad4bfa683238847714 100644 (file)
@@ -24,7 +24,7 @@ function showHideForumlist() {
                        <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>
+                       <a class="forum-widget-link {{if $forum.selected}}forum-selected{{/if}}" id="forum-widget-link-{{$forum.id}}" href="{{$forum.url}}" >{{$forum.name}}</a>
                </li>
                {{/if}}
        
@@ -34,7 +34,7 @@ function showHideForumlist() {
                        <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>
+                       <a class="forum-widget-link {{if $forum.selected}}forum-selected{{/if}}" id="forum-widget-link-{{$forum.id}}" href="{{$forum.url}}" >{{$forum.name}}</a>
                </li>
                {{/if}}
                {{/foreach}}
index fe2ad73cf2e84f8dac86a197bf50bb7434a1012d..908574f7064565105179372217e93e3bce7dc3ee 100644 (file)
@@ -20,6 +20,9 @@ div.wall-item-content-wrapper.shiny {  background-image: url('ingdarkzero/shiny.
 
 nav #banner #logo-text a { color: #ffffff; }
 
+/* Contact-Header for the Network Stream */
+#viewcontact_wrapper-network {background-image: url('imgdarkzero/head.jpg');}
+
 .wall-item-content-wrapper { 
        border: 1px solid #444444; 
        background: #444444;  
index 0619644eaf0323c16152fb8e8d32baab8d284081..34bf58f46055d73cce868b300f82dd5337a97e33 100644 (file)
@@ -25,8 +25,10 @@ section { background: #EEFFFF; }
 a, a:visited { color: #0000FF; text-decoration: none; }
 a:hover {text-decoration: underline; }
 
+/* Contact-Header for the Network Stream */
+#viewcontact_wrapper-network { background: #FFDDFF; }
 
-aside        background-image: url('imgeasterbunny/border.jpg'); }
+aside {        background-image: url('imgeasterbunny/border.jpg'); }
 .tabs {        background-image: url('imgeasterbunny/head.jpg'); }
 div.wall-item-content-wrapper.shiny {  background-image: url('imgeasterbunny/shiny.png'); }
 
index 0f6f7881edc26265930b60addddd82d29dd3c250..d446a616111490c9c8633f22636db7206aaaffa4 100644 (file)
@@ -21,6 +21,7 @@ body {        background-image: url('imggreenzero/head.jpg'); }
 aside { background-image: url('imggreenzero/border.jpg'); }
 section { background-image: url('imggreenzero/border.jpg'); }
 .tabs {        background-image: url('imggreenzero/head.jpg'); }
+#viewcontact_wrapper-network { background: #DBEAD7; }
 div.wall-item-content-wrapper.shiny {  background-image: url('imggreenzero/shiny.png'); }
 
 .fakelink, .fakelink:visited, .fakelink:hover, .fakelink:link {
index d59cf5dcabc4d13cea70d79d1b2419ef4704868b..29718576830f88094a2aaebc5d6055192e4e090d 100644 (file)
@@ -3,8 +3,9 @@ a:hover {text-decoration: underline; }
 
 
 body {         background-image: url('imgpurplezero/head.jpg'); }
-aside        background-image: url('imgpurplezero/border.jpg'); }
+aside {        background-image: url('imgpurplezero/border.jpg'); }
 section {      background-image: url('imgpurplezero/border.jpg'); }
+#viewcontact_wrapper-network { background: #ECCAEB; }
 .tabs {        background-image: url('imgpurplezero/head.jpg'); }
 div.wall-item-content-wrapper.shiny {  background-image: url('imgpurplezero/shiny.png'); }
 
index 2729e012786cb3f65a3431d1f50db11c417b7b28..903846e694bed9c1ef75a973019c89ca4d7fff19 100644 (file)
@@ -205,6 +205,7 @@ aside {
        font-weight: bold;
        background: #3465a4 url('friendica-16.png') no-repeat 95% center;
 }
+#subscribe-feed-link,
 #wallmessage-link {
        display: block;
        color: #FFFFFF;
@@ -277,6 +278,31 @@ div.wall-item-content-wrapper.shiny {
        margin: 15px 0 15px 150px;
 }
 
+/* Contact-Header for the Network Stream */
+#viewcontact_wrapper-network {
+       width: 100%;
+       min-height: 100px;
+       background-color: #DBE6F1;
+       border-bottom: 1px solid #babdb6;
+}
+#contact-entry-wrapper-network {
+       float: none;
+       width: auto;
+       height: auto;
+       padding: 10px;
+       margin: 0px
+}
+#contact-entry-accounttype-network {
+       font-size: 20px;
+}
+#contact-entry-name-network {
+       font-size: 24.5px;
+}
+/*#contact-entry-name-network>.contact-entry-details, #contact-entry-url-network,
+#contact-entry-details-network, contact-entry-network-network {
+       color: #000;
+}*/
+
 /* from default */
 #jot-perms-icon,
 #profile-location,
@@ -340,7 +366,7 @@ div.wall-item-content-wrapper.shiny {
        margin-bottom: 10px;
 }
 
-.group-selected, .nets-selected, .fileas-selected, .categories-selected {
+.group-selected, .nets-selected, .fileas-selected, .categories-selected, .forum-selected {
        padding: 3px;
        -moz-border-radius: 3px;
        border-radius: 3px;
index bf2eb27349815370e1ff6fe0f488569d6b9bb187..fb5d4e420e68ca02c75127244a61be459f3a66f4 100644 (file)
@@ -47,6 +47,9 @@
                        {{if $wallmessage}}
                                <li><a id="wallmessage-link" href="wallmessage/{{$profile.nickname}}">{{$wallmessage}}</a></li>
                        {{/if}}
+                       {{if $subscribe_feed}}
+                               <li><a id="subscribe-feed-link" href="dfrn_poll/{{$profile.nickname}}">{{$subscribe_feed}}</a></li>
+                       {{/if}}
                </ul>
        </div>
 </div>
index 4485c056ffedea5c70dc09acf25bdfb19799d38e..a4af7f907536b2170bed1e8954b11c75a700248c 100644 (file)
@@ -421,6 +421,27 @@ section {
        clear: both;\r
 }\r
 \r
+/* Contact-Header for the Network Stream */\r
+#viewcontact_wrapper-network {\r
+       width: 100%;\r
+       min-height: 100px;\r
+       background-color: #FAFAFA;\r
+       border: 1px solid #DDDDDD;\r
+       border-radius: 5px;\r
+}\r
+#contact-entry-wrapper-network {\r
+       float: none;\r
+       width: auto;\r
+       height: auto;\r
+       padding: 10px;\r
+       margin: 0;\r
+}\r
+#contact-entry-accounttype-network {\r
+       font-size: 0.9em;\r
+}\r
+#contact-entry-name-network {\r
+       font-size: 1.5em;\r
+}\r
 \r
 /* footer */\r
 footer {\r
@@ -511,7 +532,7 @@ footer {
        margin-bottom: 10px;\r
 }\r
 \r
-.group-selected, .nets-selected, .fileas-selected, .categories-selected {\r
+.group-selected, .nets-selected, .fileas-selected, .categories-selected, .forum-selected {\r
        padding: 3px;\r
        -moz-border-radius: 3px;\r
        -webkit-border-radius: 3px;\r
index 0e51128e29edd5724324bf69cd21293ba826b380..7b2b1358c04c2a8c14b69697a17e5519e99ac47c 100644 (file)
@@ -284,6 +284,7 @@ aside {
 /*     float:left;*/
 }
 
+#subscribe-feed-link,
 #dfrn-request-link {
        display: block;
        color: #FFFFFF;
@@ -383,6 +384,27 @@ section {
        padding-top: 3em;
 }
 
+/* Contact-Header for the Network Stream */
+#viewcontact_wrapper-network {
+       width: 100%;
+       min-height: 100px;
+       background-color: #FAFAFA;
+       border: 1px solid #DDDDDD;
+       border-radius: 5px;
+}
+#contact-entry-wrapper-network {
+       float: none;
+       width: auto;
+       height: auto;
+       padding: 10px;
+       margin: 0;
+}
+#contact-entry-accounttype-network {
+       font-size: 0.9em;
+}
+#contact-entry-name-network {
+       font-size: 1.5em;
+}
 
 /* footer */
 footer {
@@ -489,7 +511,7 @@ div.wall-item-content-wrapper.shiny {
        margin-bottom: 10px;
 }
 
-.group-selected, .nets-selected, .fileas-selected, .categories-selected {
+.group-selected, .nets-selected, .fileas-selected, .categories-selected, .forum-selected {
        padding: 3px;
        -moz-border-radius: 3px;
        -webkit-border-radius: 3px;
index 515740871385e0951b5100fa77e4b9cbb51b5e94..b8f59ccaa8cd084dc43913dd4dfa418cd6533d86 100644 (file)
                        {{if $wallmessage}}
                                <li><a id="wallmessage-link" href="wallmessage/{{$profile.nickname}}">{{$wallmessage}}</a></li>
                        {{/if}}
+                       {{if $subscribe_feed}}
+                               <li><a id="subscribe-feed-link" href="dfrn_poll/{{$profile.nickname}}">{{$subscribe_feed}}</a></li>
+                       {{/if}}
                </ul>
        </div>
 </div>
 
 {{$contact_block}}
-
-
index 25102ba31d900ef499670e440f49d268123a920d..1ff2de70063cf0e336048c1b12ff64eaf627aa3b 100644 (file)
@@ -791,6 +791,29 @@ ul.menu-popup .toolbar a:hover {
   color: #9eabb0;
   display: block;
 }
+/* Contact-Header for the Network Stream */
+#viewcontact_wrapper-network {
+  width: 100%;
+  min-height: 100px;
+  background-color: #eff0f1;
+  border-bottom: 1px solid #cccccc;
+}
+#viewcontact_wrapper-network #contact-entry-wrapper-network {
+  float: none;
+  width: auto;
+  height: auto;
+  padding: 10px;
+}
+#viewcontact_wrapper-network #contact-entry-wrapper-network #contact-entry-accounttype-network {
+  font-size: 22px;
+}
+#viewcontact_wrapper-network #contact-entry-wrapper-network #contact-entry-name-network {
+  font-size: 24.5px;
+  font-weight: normal;
+}
+#viewcontact_wrapper-network #contact-entry-wrapper-network .contact-details {
+  font-size: 12px;
+}
 /* aside 230px*/
 aside {
   display: table-cell;
@@ -869,6 +892,21 @@ aside #dfrn-request-link:hover {
   text-decoration: none;
   background-color: #19aeff;
 }
+aside #subscribe-feed-link {
+  display: block;
+  -moz-border-radius: 5px 5px 5px 5px;
+  -webkit-border-radius: 5px 5px 5px 5px;
+  border-radius: 5px 5px 5px 5px;
+  color: #ffffff;
+  background: #005c94 url('../../../images/connect-bg.png') no-repeat left center;
+  font-weight: bold;
+  text-transform: uppercase;
+  padding: 4px 2px 2px 35px;
+}
+aside #subscribe-feed-link:hover {
+  text-decoration: none;
+  background-color: #19aeff;
+}
 aside #profiles-menu {
   width: 20em;
 }
index 78de88654292add54764fa4d1c2de792de74cf80..2b05335e0f0df55bbff63757d9b971e3865a8eca 100644 (file)
@@ -791,6 +791,29 @@ ul.menu-popup .toolbar a:hover {
   color: #9eabb0;
   display: block;
 }
+/* Contact-Header for the Network Stream */
+#viewcontact_wrapper-network {
+  width: 100%;
+  min-height: 100px;
+  background-color: #eff0f1;
+  border-bottom: 1px solid #cccccc;
+}
+#viewcontact_wrapper-network #contact-entry-wrapper-network {
+  float: none;
+  width: auto;
+  height: auto;
+  padding: 10px;
+}
+#viewcontact_wrapper-network #contact-entry-wrapper-network #contact-entry-accounttype-network {
+  font-size: 22px;
+}
+#viewcontact_wrapper-network #contact-entry-wrapper-network #contact-entry-name-network {
+  font-size: 24.5px;
+  font-weight: normal;
+}
+#viewcontact_wrapper-network #contact-entry-wrapper-network .contact-details {
+  font-size: 12px;
+}
 /* aside 230px*/
 aside {
   display: table-cell;
@@ -869,6 +892,21 @@ aside #dfrn-request-link:hover {
   text-decoration: none;
   background-color: #ccff42;
 }
+aside #subscribe-feed-link {
+  display: block;
+  -moz-border-radius: 5px 5px 5px 5px;
+  -webkit-border-radius: 5px 5px 5px 5px;
+  border-radius: 5px 5px 5px 5px;
+  color: #ffffff;
+  background: #009100 url('../../../images/connect-bg.png') no-repeat left center;
+  font-weight: bold;
+  text-transform: uppercase;
+  padding: 4px 2px 2px 35px;
+}
+aside #subscribe-feed-link:hover {
+  text-decoration: none;
+  background-color: #ccff42;
+}
 aside #profiles-menu {
   width: 20em;
 }
index 1ca27b895c058a3b527ee732039270b5bb4bd2fc..ec0982a75e22e9f08055a6e4186b5dc709f7993b 100644 (file)
@@ -791,6 +791,29 @@ ul.menu-popup .toolbar a:hover {
   color: #9eabb0;
   display: block;
 }
+/* Contact-Header for the Network Stream */
+#viewcontact_wrapper-network {
+  width: 100%;
+  min-height: 100px;
+  background-color: #eff0f1;
+  border-bottom: 1px solid #cccccc;
+}
+#viewcontact_wrapper-network #contact-entry-wrapper-network {
+  float: none;
+  width: auto;
+  height: auto;
+  padding: 10px;
+}
+#viewcontact_wrapper-network #contact-entry-wrapper-network #contact-entry-accounttype-network {
+  font-size: 22px;
+}
+#viewcontact_wrapper-network #contact-entry-wrapper-network #contact-entry-name-network {
+  font-size: 24.5px;
+  font-weight: normal;
+}
+#viewcontact_wrapper-network #contact-entry-wrapper-network .contact-details {
+  font-size: 12px;
+}
 /* aside 230px*/
 aside {
   display: table-cell;
@@ -869,6 +892,21 @@ aside #dfrn-request-link:hover {
   text-decoration: none;
   background-color: #86608e;
 }
+aside #subscribe-feed-link {
+  display: block;
+  -moz-border-radius: 5px 5px 5px 5px;
+  -webkit-border-radius: 5px 5px 5px 5px;
+  border-radius: 5px 5px 5px 5px;
+  color: #ffffff;
+  background: #521f5c url('../../../images/connect-bg.png') no-repeat left center;
+  font-weight: bold;
+  text-transform: uppercase;
+  padding: 4px 2px 2px 35px;
+}
+aside #subscribe-feed-link:hover {
+  text-decoration: none;
+  background-color: #86608e;
+}
 aside #profiles-menu {
   width: 20em;
 }
index db1f42d769b12690943dabde461562ab558a5f1a..b6bed2c9cb6cf3560e3fd59fd2a3b5a3fa53f39c 100644 (file)
@@ -301,7 +301,22 @@ ul.menu-popup {
        .notif-when { font-size: 10px; color: @MenuItemDetail; display: block; }
 }
 
-
+/* Contact-Header for the Network Stream */
+#viewcontact_wrapper-network {
+       width: 100%;
+       min-height: 100px;
+       background-color: #eff0f1;
+       border-bottom: 1px solid #cccccc;
+       #contact-entry-wrapper-network {
+               float: none;
+               width: auto;
+               height: auto;
+               padding: 10px;
+               #contact-entry-accounttype-network { font-size: 22px; }
+               #contact-entry-name-network { font-size: 24.5px; font-weight: normal; }
+               .contact-details { font-size: 12px; }
+       }
+}
 
 
 /* aside 230px*/
@@ -352,6 +367,17 @@ aside {
 
                &:hover { text-decoration: none; background-color: @AsideConnectHoverBg; }
        }
+       #subscribe-feed-link {
+               display: block;
+               .rounded();
+               color: @AsideConnect;
+               background: @AsideConnectBg url('../../../images/connect-bg.png') no-repeat left center;
+               font-weight: bold;
+               text-transform:uppercase;
+               padding: 4px 2px 2px 35px;
+
+               &:hover { text-decoration: none; background-color: @AsideConnectHoverBg; }
+       }
 
        #profiles-menu { width: 20em; }
 
index dfa6d0445d6d0b625009914882ab1e5a5b81834b..7a06e7588f241e47602064f72491fa68b6bc7de3 100644 (file)
@@ -73,6 +73,9 @@
                        {{if $wallmessage}}
                                <li><a id="wallmessage-link" href="wallmessage/{{$profile.nickname}}">{{$wallmessage}}</a></li>
                        {{/if}}
+                       {{if $subscribe_feed}}
+                               <li><a id="subscribe-feed-link" href="dfrn_poll/{{$profile.nickname}}">{{$subscribe_feed}}</a></li>
+                       {{/if}}
                </ul>
        </div>
 </div>
diff --git a/view/theme/quattro/templates/widget_forumlist.tpl b/view/theme/quattro/templates/widget_forumlist.tpl
new file mode 100644 (file)
index 0000000..35c54bc
--- /dev/null
@@ -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>
index f441ea541245ad29dc6f99b9d38a9bd2ffea63a9..45d2629dae0a09c8a0941ee029f0d60073d9f6a0 100644 (file)
@@ -149,6 +149,30 @@ section {
        padding-bottom: 2em;
 }
 
+/* Contact-Header for the Network Stream */
+#viewcontact_wrapper-network {
+       width: 100%;
+       min-height: 110px;
+       background-color: #FAFAFA;
+       box-shadow: 0 0 8px #BDBDBD;
+       border-bottom: 1px solid #dedede;
+       border: 1px solid #7C7D7B;
+       border-radius: 5px;
+}
+#contact-entry-wrapper-network {
+       float: none;
+       width: auto;
+       height: auto;
+       padding: 10px;
+       margin: 0;
+}
+#contact-entry-accounttype-network {
+       font-size: 20px;
+}
+#contact-entry-name-network {
+       font-size: 24.5px;
+}
+
 .lframe {
        border: 1px solid #7C7D7B;
        box-shadow: 3px 3px 6px #959494;
@@ -690,6 +714,7 @@ aside h4 {
        list-style: none;
 }
 
+#subscribe-feed-link,
 #dfrn-request-link {
        box-shadow: inset 0px 1px 0px 0px #a65151;
                -moz-box-shadow: inset 0px 1px 0px 0px #a65151;
@@ -725,6 +750,7 @@ aside h4 {
        background-color: #3465a4;
 }
 
+#subscribe-feed-link:hover,
 #dfrn-request-link:hover {
        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% );
@@ -732,6 +758,7 @@ aside h4 {
        background-color: #1873a2;
 }
 
+#subscribe-feed-link:active,
 #dfrn-request-link:active {
        position: relative;
        top: 1px;
index 049c1bf4b6189eddbc3c9fce7981bbff5b43e48c..5a36de03e02418526e8f374e8e7d1fdadd671fbd 100644 (file)
@@ -122,3 +122,7 @@ div.pager, ul.tabs {
 .mail-list-wrapper {
   border-radius: 5px;
 }
+
+#viewcontact_wrapper-network {
+  border-radius: 5px;
+}
index 01045b6ff4a3cb519a8091c688b14babda91b7d3..8e128ae27fb5fd21288010266925824b135912a4 100644 (file)
@@ -57,5 +57,9 @@ input#side-peoplefind-submit, input#side-follow-submit {
 }
 
 li :hover {
-       color: #767676 !important;      
+       color: #767676 !important;
+}
+
+#viewcontact_wrapper-network {
+       background-color: #343434;
 }
index a00d19c39c767eb6ab6869885e5793206576b78b..03e18f1070f81c822860214f8a11b533192ddcf8 100644 (file)
@@ -16,3 +16,8 @@ aside {
 right_aside {
   border-left: 1px solid #D2D2D2;
 }
+
+#viewcontact_wrapper-network {
+  background-color: #FFF;
+  border-bottom: 1px solid #D2D2D2;
+}
\ No newline at end of file
index a9c5e7ec8e2d9532cfca34ebe2b77458ba545522..2892862daf6b331e0dd81ad64c2fcf6e9b7810c5 100644 (file)
@@ -435,7 +435,7 @@ code {
 /*  color: #000; */
 }
 
-.group-selected, .nets-selected, .fileas-selected {
+.group-selected, .nets-selected, .fileas-selected, .forum-selected {
   font-weight: bold;
 }
 
@@ -1026,9 +1026,11 @@ aside #profile-extra-links ul {
 }
 aside #profile-extra-links li {
   padding: 0px;
+  padding-bottom: 4px;
   margin: 0px;
   list-style: none;
 }
+aside #subscribe-feed-link,
 aside #dfrn-request-link,
 aside #wallmessage-link {
   display: block;
@@ -1041,6 +1043,7 @@ aside #wallmessage-link {
   text-transform: uppercase;
   padding: 4px 2px 2px 35px;
 }
+aside #subscribe-feed-link:hover,
 aside #dfrn-request-link:hover,
 aside #wallmessage-link:hover {
   text-decoration: none;
@@ -1218,6 +1221,31 @@ section.minimal {
   height: 100%;
 }
 
+/* Contact-Header for the Network Stream */
+#viewcontact_wrapper-network {
+  width: 100%;
+  min-height: 100px;
+  background-color: #FAFAFA;
+  box-shadow: 1px 2px 0px 0px #D8D8D8;
+  border-bottom: 1px solid #D2D2D2;
+}
+#contact-entry-wrapper-network {
+  float: none;
+  width: auto;
+  height: auto;
+  padding: 10px;
+  margin: 0;
+}
+#contact-entry-accounttype-network {
+  font-size: 20px;
+}
+#contact-entry-name-network {
+  font-size: 24.5px;
+}
+.contact-entry-photo img {
+  border-radius: 4px;
+}
+
 /* wall item */
 .tread-wrapper {
 /*    border-bottom: 1px solid #BDCDD4; */
index c5a51ccbafe9ebae73e67815868e37cec4918830..1882c155833872d7edc2d3c79f3101569df2560c 100644 (file)
@@ -66,6 +66,9 @@
                        {{if $wallmessage}}
                                <li><a id="wallmessage-link" href="wallmessage/{{$profile.nickname}}">{{$wallmessage}}</a></li>
                        {{/if}}
+                       {{if $subscribe_feed}}
+                               <li><a id="subscribe-feed-link" href="dfrn_poll/{{$profile.nickname}}">{{$subscribe_feed}}</a></li>
+                       {{/if}}
                </ul>
        </div>
 </div>
index 49e7723e8e1d405eca2d3cb736d0c6967e212b17..93f8e8f105fdf7287342eb93ef66767e17798604 100644 (file)
@@ -20,21 +20,21 @@ function showHideForumlist() {
                {{foreach $forums as $forum}}
                {{if $forum.id <= $visible_forums}}
                <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">
                                <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>
-                       <span class="notify badge pull-right"></span>
+                       <a class="forum-widget-link {{if $forum.selected}}forum-selected{{/if}}" 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}}" 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">
                                <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>
-                       <span class="notify padge pull-right"></span>
+                       <a class="forum-widget-link {{if $forum.selected}}forum-selected{{/if}}" id="forum-widget-link-{{$forum.id}}" href="{{$forum.url}}" >{{$forum.name}}</a>
                </li>
                {{/if}}
                {{/foreach}}
index 789ba1daf1cabdca0567eced5d4ac5f110a7e5b5..91c384f805d1692253879f31a7bdb4dd3e0ef540 100644 (file)
@@ -222,6 +222,9 @@ function vier_community_info() {
 
                require_once('include/forums.php');
 
+               if(x($_GET['cid']) && intval($_GET['cid']) != 0)
+                       $cid = $_GET['cid'];
+
                //sort by last updated item
                $lastitem = true;
 
@@ -235,11 +238,14 @@ function vier_community_info() {
 
                        foreach($contacts as $contact) {
 
+                               $selected = (($cid == $contact['id']) ? ' forum-selected' : '');
+
                                $entry = array(
-                                       'url' => $a->get_baseurl() . '/network?f=&cid=' . $contact['id'],
-                                       'external_url' => $a->get_baseurl() . '/redir/' . $contact['id'],
+                                       'url' => z_root() . '/network?f=&cid=' . $contact['id'],
+                                       'external_url' => z_root() . '/redir/' . $contact['id'],
                                        'name' => $contact['name'],
                                        'cid' => $contact['id'],
+                                       'selected'      => $selected,
                                        'micro' => proxy_url($contact['micro'], false, PROXY_SIZE_MICRO),
                                        'id' => ++$id,
                                );