]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #2569 from tobiasd/doc-settings-de
authorMichael Vogel <icarus@dabo.de>
Tue, 7 Jun 2016 05:57:29 +0000 (07:57 +0200)
committerMichael Vogel <icarus@dabo.de>
Tue, 7 Jun 2016 05:57:29 +0000 (07:57 +0200)
German translation of doc/Settings

76 files changed:
boot.php
database.sql
doc/htconfig.md
include/Contact.php
include/PConfig.php [new file with mode: 0644]
include/Photo.php
include/api.php
include/bbcode.php
include/config.php
include/conversation.php
include/dbm.php [new file with mode: 0644]
include/dbstructure.php
include/group.php
include/identity.php
include/nav.php
include/ostatus.php
include/plaintext.php
include/poller.php
index.php
js/main.js
mod/allfriends.php
mod/common.php
mod/content.php
mod/directory.php
mod/dirfind.php
mod/display.php
mod/hovercard.php [new file with mode: 0644]
mod/match.php
mod/message.php
mod/nogroup.php
mod/profile.php
mod/suggest.php
mod/viewcontacts.php
mod/wallmessage.php
object/Item.php
update.php
view/fonts/friendica_shashape.ttf
view/fonts/shashape.css
view/fonts/shashape.jpg
view/templates/diaspora_vcard.tpl
view/templates/hovercard.tpl [new file with mode: 0644]
view/templates/nav.tpl
view/templates/profile_vcard.tpl
view/theme/cleanzero/templates/nav.tpl
view/theme/decaf-mobile/templates/nav.tpl
view/theme/decaf-mobile/templates/profile_vcard.tpl
view/theme/diabook/templates/nav.tpl
view/theme/dispy/templates/nav.tpl
view/theme/duepuntozero/templates/nav.tpl
view/theme/duepuntozero/templates/profile_vcard.tpl
view/theme/facepark/templates/nav.tpl
view/theme/frio/css/hovercard.css
view/theme/frio/css/style.css
view/theme/frio/js/hovercard.js
view/theme/frio/js/theme.js
view/theme/frio/templates/contact_template.tpl
view/theme/frio/templates/fileas_widget.tpl [new file with mode: 0644]
view/theme/frio/templates/follow.tpl [new file with mode: 0644]
view/theme/frio/templates/group_side.tpl [new file with mode: 0644]
view/theme/frio/templates/mail_head.tpl [new file with mode: 0644]
view/theme/frio/templates/nav.tpl
view/theme/frio/templates/nets.tpl [new file with mode: 0644]
view/theme/frio/templates/peoplefind.tpl [new file with mode: 0644]
view/theme/frio/templates/profile_vcard.tpl
view/theme/frio/templates/search_item.tpl
view/theme/frio/templates/threaded_conversation.tpl
view/theme/frio/templates/wall_thread.tpl
view/theme/frost-mobile/templates/nav.tpl
view/theme/frost-mobile/templates/profile_vcard.tpl
view/theme/frost/templates/nav.tpl
view/theme/frost/templates/profile_vcard.tpl
view/theme/quattro/templates/nav.tpl
view/theme/quattro/templates/profile_vcard.tpl
view/theme/smoothly/templates/nav.tpl
view/theme/testbubble/templates/nav.tpl
view/theme/vier/templates/profile_vcard.tpl

index 8434d34c705d3cbb5bef44953f9bdb8b43d45cbf..99229972ebc11f32e1ef183833c8e9f7e1a178de 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -38,7 +38,7 @@ define ( 'FRIENDICA_PLATFORM',     'Friendica');
 define ( 'FRIENDICA_CODENAME',     'Asparagus');
 define ( 'FRIENDICA_VERSION',      '3.5-dev' );
 define ( 'DFRN_PROTOCOL_VERSION',  '2.23'    );
-define ( 'DB_UPDATE_VERSION',      1195      );
+define ( 'DB_UPDATE_VERSION',      1196      );
 
 /**
  * @brief Constant with a HTML line break.
@@ -1896,31 +1896,6 @@ function is_site_admin() {
        return false;
 }
 
-
-function load_contact_links($uid) {
-
-       $a = get_app();
-
-       $ret = array();
-
-       if(! $uid || x($a->contacts,'empty'))
-               return;
-
-       $r = q("SELECT `id`,`network`,`url`,`thumb`, `rel` FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 AND `thumb` != ''",
-                       intval($uid)
-       );
-       if(count($r)) {
-               foreach($r as $rr){
-                       $url = normalise_link($rr['url']);
-                       $ret[$url] = $rr;
-               }
-       } else
-               $ret['empty'] = true;
-
-       $a->contacts = $ret;
-       return;
-}
-
 /**
  * @brief Returns querystring as string from a mapped array.
  *
index 07fb65b96d9ebf59e68fa119e926d062c6605b13..8269a8bba086e80c68479eb3a439cdf4f43e6a53 100644 (file)
@@ -1,6 +1,6 @@
 -- ------------------------------------------
 -- Friendica 3.5-dev (Asparagus)
--- DB_UPDATE_VERSION 1195
+-- DB_UPDATE_VERSION 1196
 -- ------------------------------------------
 
 
@@ -511,7 +511,7 @@ CREATE TABLE IF NOT EXISTS `item` (
         INDEX `extid` (`extid`),
         INDEX `uid_id` (`uid`,`id`),
         INDEX `uid_created` (`uid`,`created`),
-        INDEX `uid_unseen` (`uid`,`unseen`),
+        INDEX `uid_unseen_contactid` (`uid`,`unseen`,`contact-id`),
         INDEX `uid_network_received` (`uid`,`network`,`received`),
         INDEX `uid_received` (`uid`,`received`),
         INDEX `uid_network_commented` (`uid`,`network`,`commented`),
index 77e63671abcae6cc3b8b4522fb836da6bfa10919..2435da2baacfa3556e786161b99c0b5db6497967 100644 (file)
@@ -38,6 +38,8 @@ line to your .htconfig.php:
 * max_connections_level - The maximum level of connections that are allowed to let the poller start. It is a percentage value. Default value is 75.
 * max_contact_queue - Default value is 500.
 * max_batch_queue - Default value is 1000.
+* max_processes_backend - Maximum number of concurrent database processes for background tasks. Default value is 5.
+* max_processes_frontend - Maximum number of concurrent database processes for foreground tasks. Default value is 20.
 * no_oembed (Boolean) - Don't use OEmbed to fetch more information about a link.
 * no_oembed_rich_content (Boolean) - Don't show the rich content (e.g. embedded PDF).
 * no_smilies (Boolean) - Don't show smilies.
index 79a14ab581c84dd3de3ab61d9e3efe8174bf27c1..6297cdbe746d2183aa398aebaeed96c9f379fa5e 100644 (file)
@@ -192,72 +192,86 @@ function unmark_for_death($contact) {
        );
 }}
 
-function get_contact_details_by_url($url, $uid = -1) {
+/**
+ * @brief Get contact data for a given profile link
+ *
+ * The function looks at several places (contact table and gcontact table) for the contact
+ *
+ * @param string $url The profile link
+ * @param int $uid User id
+ * @param array $default If not data was found take this data as default value
+ *
+ * @return array Contact data
+ */
+function get_contact_details_by_url($url, $uid = -1, $default = array()) {
        if ($uid == -1)
                $uid = local_user();
 
-       $r = q("SELECT `id` AS `gid`, `url`, `name`, `nick`, `addr`, `photo`, `location`, `about`, `keywords`, `gender`, `community`, `network` FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1",
-               dbesc(normalise_link($url)));
-
-       if ($r) {
-               $profile = $r[0];
-
-               if ((($profile["addr"] == "") OR ($profile["name"] == "")) AND
-                       in_array($profile["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS)))
-                       proc_run('php',"include/update_gcontact.php", $profile["gid"]);
-       }
+       // Fetch contact data from the contact table for the user and given network
+       $r = q("SELECT `id`, `id` AS `cid`, 0 AS `gid`, `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`,
+                       `keywords`, `gender`, `photo`, `thumb`, `forum`, `prv`, (`forum` | `prv`) AS `community`, `bd` AS `birthday`, `self`
+               FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d AND `network` IN ('%s', '')",
+                       dbesc(normalise_link($url)), intval($uid), dbesc($profile["network"]));
 
-       // Fetching further contact data from the contact table
-       $r = q("SELECT `id`, `uid`, `url`, `network`, `name`, `nick`, `addr`, `location`, `about`, `keywords`, `gender`, `photo`, `thumb`, `addr`, `forum`, `prv`, `bd`, `self` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d AND `network` IN ('%s', '')",
-               dbesc(normalise_link($url)), intval($uid), dbesc($profile["network"]));
+       // Is the contact present for the user in a different network? (Can happen with OStatus and the "Statusnet" addon)
+       if (!count($r) AND !isset($profile))
+               $r = q("SELECT `id`, `id` AS `cid`, 0 AS `gid`, `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`,
+                               `keywords`, `gender`, `photo`, `thumb`, `forum`, `prv`, (`forum` | `prv`) AS `community`, `bd` AS `birthday`, `self`
+                       FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d",
+                               dbesc(normalise_link($url)), intval($uid));
 
+       // Fetch the data from the contact table with "uid=0" (which is filled automatically)
        if (!count($r) AND !isset($profile))
-               $r = q("SELECT `id`, `uid`, `url`, `network`, `name`, `nick`, `addr`, `location`, `about`, `keywords`, `gender`, `photo`, `thumb`, `addr`, `forum`, `prv`, `bd`, `self` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d",
-                       dbesc(normalise_link($url)), intval($uid));
+               $r = q("SELECT `id`, 0 AS `cid`, 0 AS `gid`, `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`,
+                               `keywords`, `gender`, `photo`, `thumb`, `forum`, `prv`, (`forum` | `prv`) AS `community`, `bd` AS `birthday`, 0 AS `self`
+                       FROM `contact` WHERE `nurl` = '%s' AND `uid` = 0",
+                               dbesc(normalise_link($url)));
 
+       // Fetch the data from the gcontact table
        if (!count($r) AND !isset($profile))
-               $r = q("SELECT `id`, `uid`, `url`, `network`, `name`, `nick`, `addr`, `location`, `about`, `keywords`, `gender`, `photo`, `thumb`, `addr`, `forum`, `prv`, `bd` FROM `contact` WHERE `nurl` = '%s' AND `uid` = 0",
-                       dbesc(normalise_link($url)));
+               $r = q("SELECT 0 AS `id`, 0 AS `cid`, `id` AS `gid`, 0 AS `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`,
+                               `keywords`, `gender`, `photo`, `photo` AS `thumb`, `community` AS `forum`, 0 AS `prv`, `community`, `birthday`, 0 AS `self`
+                       FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1",
+                               dbesc(normalise_link($url)));
 
        if ($r) {
-               if (!isset($profile["url"]) AND $r[0]["url"])
-                       $profile["url"] = $r[0]["url"];
-               if (!isset($profile["name"]) AND $r[0]["name"])
-                       $profile["name"] = $r[0]["name"];
-               if (!isset($profile["nick"]) AND $r[0]["nick"])
-                       $profile["nick"] = $r[0]["nick"];
-               if (!isset($profile["addr"]) AND $r[0]["addr"])
-                       $profile["addr"] = $r[0]["addr"];
-               if ((!isset($profile["photo"]) OR $r[0]["self"]) AND $r[0]["photo"])
-                       $profile["photo"] = $r[0]["photo"];
-               if (!isset($profile["location"]) AND $r[0]["location"])
-                       $profile["location"] = $r[0]["location"];
-               if (!isset($profile["about"]) AND $r[0]["about"])
-                       $profile["about"] = $r[0]["about"];
-               if (!isset($profile["keywords"]) AND $r[0]["keywords"])
-                       $profile["keywords"] = $r[0]["keywords"];
-               if (!isset($profile["gender"]) AND $r[0]["gender"])
-                       $profile["gender"] = $r[0]["gender"];
-               if (isset($r[0]["forum"]) OR isset($r[0]["prv"]))
-                       $profile["community"] = ($r[0]["forum"] OR $r[0]["prv"]);
-               if (!isset($profile["network"]) AND $r[0]["network"])
-                       $profile["network"] = $r[0]["network"];
-               if (!isset($profile["addr"]) AND $r[0]["addr"])
-                       $profile["addr"] = $r[0]["addr"];
-               if (!isset($profile["bd"]) AND $r[0]["bd"])
-                       $profile["bd"] = $r[0]["bd"];
-               if (isset($r[0]["thumb"]))
-                       $profile["thumb"] = $r[0]["thumb"];
-               if ($r[0]["uid"] == 0)
-                       $profile["cid"] = 0;
-               else
-                       $profile["cid"] = $r[0]["id"];
-       } else
-               $profile["cid"] = 0;
+               $profile = $r[0];
+
+               // "bd" always contains the upcoming birthday of a contact.
+               // "birthday" might contain the birthday including the year of birth.
+               if ($profile["birthday"] != "0000-00-00") {
+                       $bd_timestamp = strtotime($profile["birthday"]);
+                       $month = date("m", $bd_timestamp);
+                       $day = date("d", $bd_timestamp);
+
+                       $current_timestamp = time();
+                       $current_year = date("Y", $current_timestamp);
+                       $current_month = date("m", $current_timestamp);
+                       $current_day = date("d", $current_timestamp);
+
+                       $profile["bd"] = $current_year."-".$month."-".$day;
+                       $current = $current_year."-".$current_month."-".$current_day;
+
+                       if ($profile["bd"] < $current)
+                               $profile["bd"] = (++$current_year)."-".$month."-".$day;
+               } else
+                       $profile["bd"] = "0000-00-00";
+       } else {
+               $profile = $default;
+               if (!isset($profile["thumb"]) AND isset($profile["photo"]))
+                       $profile["thumb"] = $profile["photo"];
+       }
+
+       if ((($profile["addr"] == "") OR ($profile["name"] == "")) AND ($profile["gid"] != 0) AND
+               in_array($profile["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS)))
+               proc_run('php',"include/update_gcontact.php", $profile["gid"]);
 
+       // Show contact details of Diaspora contacts only if connected
        if (($profile["cid"] == 0) AND ($profile["network"] == NETWORK_DIASPORA)) {
                $profile["location"] = "";
                $profile["about"] = "";
+               $profile["gender"] = "";
+               $profile["birthday"] = "0000-00-00";
        }
 
        return($profile);
diff --git a/include/PConfig.php b/include/PConfig.php
new file mode 100644 (file)
index 0000000..9ef1136
--- /dev/null
@@ -0,0 +1,216 @@
+<?php
+
+/**
+ * @file include/PConfig.php
+ * @brief contains the class with methods for the management
+ * of the user configuration
+ */
+
+/**
+ * @brief Management of user configuration
+ */
+class PConfig {
+
+       /**
+        * @brief Loads all configuration values of a user's config family into a cached storage.
+        *
+        * All configuration values of the given user are stored in global cache
+        * which is available under the global variable $a->config[$uid].
+        *
+        * @param string $uid
+        *  The user_id
+        * @param string $family
+        *  The category of the configuration value
+        * @return void
+        */
+       public static function load($uid,$family) {
+               global $a;
+               $r = q("SELECT `v`,`k` FROM `pconfig` WHERE `cat` = '%s' AND `uid` = %d",
+                       dbesc($family),
+                       intval($uid)
+               );
+               if(count($r)) {
+                       foreach($r as $rr) {
+                               $k = $rr['k'];
+                               $a->config[$uid][$family][$k] = $rr['v'];
+                       }
+               } else if ($family != 'config') {
+                       // Negative caching
+                       $a->config[$uid][$family] = "!<unset>!";
+               }
+       }
+
+       /**
+        * @brief Get a particular user's config variable given the category name
+        * ($family) and a key.
+        *
+        * Get a particular user's config value from the given category ($family)
+        * and the $key from a cached storage in $a->config[$uid].
+        *
+        * @param string $uid
+        *  The user_id
+        * @param string $family
+        *  The category of the configuration value
+        * @param string $key
+        *  The configuration key to query
+        * @param boolean $instore
+        * Determines if the key already exists in the DB
+        * @return mixed Stored value or false if it does not exist
+        */
+       public static function get($uid,$family, $key, $instore = false) {
+
+               global $a;
+
+               if(! $instore) {
+                       // Looking if the whole family isn't set
+                       if(isset($a->config[$uid][$family])) {
+                               if($a->config[$uid][$family] === '!<unset>!') {
+                                       return false;
+                               }
+                       }
+
+                       if(isset($a->config[$uid][$family][$key])) {
+                               if($a->config[$uid][$family][$key] === '!<unset>!') {
+                                       return false;
+                               }
+                               return $a->config[$uid][$family][$key];
+                       }
+               }
+
+               // If APC is enabled then fetch the data from there, else try XCache
+               /*if (function_exists("apc_fetch") AND function_exists("apc_exists"))
+                       if (apc_exists($uid."|".$family."|".$key)) {
+                               $val = apc_fetch($uid."|".$family."|".$key);
+                               $a->config[$uid][$family][$key] = $val;
+
+                               if ($val === '!<unset>!')
+                                       return false;
+                               else
+                                       return $val;
+                       }
+               elseif (function_exists("xcache_get") AND function_exists("xcache_isset"))
+                       if (xcache_isset($uid."|".$family."|".$key)) {
+                               $val = xcache_get($uid."|".$family."|".$key);
+                               $a->config[$uid][$family][$key] = $val;
+
+                               if ($val === '!<unset>!')
+                                       return false;
+                               else
+                                       return $val;
+                       }*/
+
+
+               $ret = q("SELECT `v` FROM `pconfig` WHERE `uid` = %d AND `cat` = '%s' AND `k` = '%s' LIMIT 1",
+                       intval($uid),
+                       dbesc($family),
+                       dbesc($key)
+               );
+
+               if(count($ret)) {
+                       $val = (preg_match("|^a:[0-9]+:{.*}$|s", $ret[0]['v'])?unserialize( $ret[0]['v']):$ret[0]['v']);
+                       $a->config[$uid][$family][$key] = $val;
+
+                       // If APC is enabled then store the data there, else try XCache
+                       /*if (function_exists("apc_store"))
+                               apc_store($uid."|".$family."|".$key, $val, 600);
+                       elseif (function_exists("xcache_set"))
+                               xcache_set($uid."|".$family."|".$key, $val, 600);*/
+
+                       return $val;
+               }
+               else {
+                       $a->config[$uid][$family][$key] = '!<unset>!';
+
+                       // If APC is enabled then store the data there, else try XCache
+                       /*if (function_exists("apc_store"))
+                               apc_store($uid."|".$family."|".$key, '!<unset>!', 600);
+                       elseif (function_exists("xcache_set"))
+                               xcache_set($uid."|".$family."|".$key, '!<unset>!', 600);*/
+               }
+               return false;
+       }
+
+       /**
+        * @brief Sets a configuration value for a user
+        *
+        * Stores a config value ($value) in the category ($family) under the key ($key)
+        * for the user_id $uid.
+        *
+        * @note Please do not store booleans - convert to 0/1 integer values!
+        *
+        * @param string $uid
+        *  The user_id
+        * @param string $family
+        *  The category of the configuration value
+        * @param string $key
+        *  The configuration key to set
+        * @param string $value
+        *  The value to store
+        * @return mixed Stored $value or false
+        */
+       public static function set($uid,$family,$key,$value) {
+
+               global $a;
+
+               // manage array value
+               $dbvalue = (is_array($value)?serialize($value):$value);
+
+               if(get_pconfig($uid,$family,$key,true) === false) {
+                       $a->config[$uid][$family][$key] = $value;
+                       $ret = q("INSERT INTO `pconfig` ( `uid`, `cat`, `k`, `v` ) VALUES ( %d, '%s', '%s', '%s' ) ",
+                               intval($uid),
+                               dbesc($family),
+                               dbesc($key),
+                               dbesc($dbvalue)
+                       );
+                       if($ret) 
+                               return $value;
+                       return $ret;
+               }
+               $ret = q("UPDATE `pconfig` SET `v` = '%s' WHERE `uid` = %d AND `cat` = '%s' AND `k` = '%s'",
+                       dbesc($dbvalue),
+                       intval($uid),
+                       dbesc($family),
+                       dbesc($key)
+               );
+
+               $a->config[$uid][$family][$key] = $value;
+
+               // If APC is enabled then store the data there, else try XCache
+               /*if (function_exists("apc_store"))
+                       apc_store($uid."|".$family."|".$key, $value, 600);
+               elseif (function_exists("xcache_set"))
+                       xcache_set($uid."|".$family."|".$key, $value, 600);*/
+
+
+               if($ret)
+                       return $value;
+               return $ret;
+       }
+
+       /**
+        * @brief Deletes the given key from the users's configuration.
+        *
+        * Removes the configured value from the stored cache in $a->config[$uid]
+        * and removes it from the database.
+        *
+        * @param string $uid The user_id
+        * @param string $family
+        *  The category of the configuration value
+        * @param string $key
+        *  The configuration key to delete
+        * @return mixed
+        */
+       public static function delete($uid,$family,$key) {
+
+               global $a;
+               if(x($a->config[$uid][$family],$key))
+                       unset($a->config[$uid][$family][$key]);
+               $ret = q("DELETE FROM `pconfig` WHERE `uid` = %d AND `cat` = '%s' AND `k` = '%s'",
+                       intval($uid),
+                       dbesc($family),
+                       dbesc($key)
+               );
+               return $ret;
+       }
+}
index 91fce55a86f868c4959291618fa4b8af77c4bba6..d87bce478704fccb6489097269e2e83163a4fd5f 100644 (file)
@@ -823,9 +823,12 @@ function get_photo_info($url) {
 
        $data = Cache::get($url);
 
-       if (is_null($data)) {
-               $img_str = fetch_url($url, true, $redirects, 4);
+       // Unserialise to be able to check in the next step if the cached data is alright.
+       if (!is_null($data))
+               $data = unserialize($data);
 
+       if (is_null($data) OR !$data) {
+               $img_str = fetch_url($url, true, $redirects, 4);
                $filesize = strlen($img_str);
 
                if (function_exists("getimagesizefromstring"))
@@ -846,8 +849,7 @@ function get_photo_info($url) {
                        $data["size"] = $filesize;
 
                Cache::set($url, serialize($data));
-       } else
-               $data = unserialize($data);
+       }
 
        return $data;
 }
index 488e858445648baedf6eb8a0f2a7aa99b936451a..f32dc97c6c4fc5516cb72ad08a12a42766410bef 100644 (file)
                                                        api_login($a);
                                        }
 
-                                       load_contact_links(api_user());
-
                                        logger('API call for ' . $a->user['username'] . ': ' . $a->query_string);
                                        logger('API parameters: ' . print_r($_REQUEST,true));
 
index bc307677702bc6ce40c1cd45734f4d1ff92ae2ea..6cce25bcf4ab1a92df350176a682d02b3cad0e1f 100644 (file)
@@ -489,13 +489,16 @@ function bb_ShareAttributes($share, $simplehtml) {
                                $text .= "<br /><br />".$link;
                        break;
                default:
-                       $headline = trim($share[1]).'<div class="shared_header">';
+                       $headline = trim($share[1])."\n";
+                       $headline .= '<div class="shared-wrapper">'."\n";
+                       $headline .= '<div class="shared_header">'."\n";
                        if ($avatar != "")
                                $headline .= '<img src="'.proxy_url($avatar, false, PROXY_SIZE_MICRO).'" height="32" width="32" >';
 
                        $headline .= sprintf(t('<span><a href="%s" target="_blank">%s</a> wrote the following <a href="%s" target="_blank">post</a>'.$reldate.':</span>'), $profile, $author, $link);
-                       $headline .= "</div>";
-                       $text = $headline.'<blockquote class="shared_content">'.trim($share[3])."</blockquote>";
+                       $headline .= "</div>\n";
+                       $text = $headline.'<blockquote class="shared_content">'.trim($share[3])."</blockquote>\n";
+                       $text .= "<div>\n";
                        break;
        }
        return($text);
@@ -809,7 +812,10 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true, $simplehtml = fal
                $Text = preg_replace("/([@])\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism",
                        '$1<span class="vcard"><a href="$2" class="url" title="$3"><span class="fn nickname mention">$3</span></a></span>',
                        $Text);
-
+       elseif (!$simplehtml)
+               $Text = preg_replace("/([@])\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism",
+                       '$1<a href="$2" class="userinfo mention" title="$3">$3</a>',
+                       $Text);
 
        // Bookmarks in red - will be converted to bookmarks in friendica
        $Text = preg_replace("/#\^\[url\]([$URLSearchString]*)\[\/url\]/ism", '[bookmark=$1]$1[/bookmark]', $Text);
@@ -851,6 +857,9 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true, $simplehtml = fal
        if ($tryoembed)
                $Text = preg_replace_callback("/\[url\]([$URLSearchString]*)\[\/url\]/ism",'tryoembed',$Text);
 
+       $Text = preg_replace("/([#])\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism",
+                               '$1<a href="$2" class="tag" title="$3">$3</a>', $Text);
+
        $Text = preg_replace("/\[url\]([$URLSearchString]*)\[\/url\]/ism", '<a href="$1" target="_blank">$1</a>', $Text);
        $Text = preg_replace("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '<a href="$1" target="_blank">$2</a>', $Text);
        //$Text = preg_replace("/\[url\=([$URLSearchString]*)\]([$URLSearchString]*)\[\/url\]/ism", '<a href="$1" target="_blank">$2</a>', $Text);
index b27274e9a946671f321062bf0d78827b6f8ac784..585caf43ae1b3207f5bb317b71e90840da60532d 100644 (file)
@@ -1,8 +1,11 @@
 <?php
 
+require_once("include/PConfig.php");
+
 /**
- *
- * Arbitrary configuration storage
+ * @file include/config.php
+ * 
+ *  @brief Arbitrary configuration storage
  * Note:
  * Please do not store booleans - convert to 0/1 integer values
  * The get_?config() functions return boolean false for keys that are unset,
  * configurations need to be fixed as of 10/08/2011.
  */
 
-
-// retrieve a "family" of config variables from database to cached storage
-
-if(! function_exists('load_config')) {
+/**
+ * @brief Loads all configuration values of family into a cached storage.
+ *
+ * All configuration values of the system are stored in global cache
+ * which is available under the global variable $a->config
+ *
+ * @param string $family
+ *  The category of the configuration value
+ * @return void
+ */
 function load_config($family) {
        global $a;
 
@@ -33,17 +42,27 @@ function load_config($family) {
                // Negative caching
                $a->config[$family] = "!<unset>!";
        }
-}}
-
-// get a particular config variable given the family name
-// and key. Returns false if not set.
-// $instore is only used by the set_config function
-// to determine if the key already exists in the DB
-// If a key is found in the DB but doesn't exist in
-// local config cache, pull it into the cache so we don't have
-// to hit the DB again for this item.
+}
 
-if(! function_exists('get_config')) {
+/**
+ * @brief Get a particular user's config variable given the category name
+ * ($family) and a key.
+ *
+ * Get a particular config value from the given category ($family)
+ * and the $key from a cached storage in $a->config[$uid].
+ * $instore is only used by the set_config function
+ * to determine if the key already exists in the DB
+ * If a key is found in the DB but doesn't exist in
+ * local config cache, pull it into the cache so we don't have
+ * to hit the DB again for this item.
+ *
+ * @param string $family
+ *  The category of the configuration value
+ * @param string $key
+ *  The configuration key to query
+ * @param boolean $instore Determines if the key already exists in the DB
+ * @return mixed Stored value or false if it does not exist
+ */
 function get_config($family, $key, $instore = false) {
 
        global $a;
@@ -114,13 +133,24 @@ function get_config($family, $key, $instore = false) {
                        xcache_set($family."|".$key, '!<unset>!', 600);*/
        }
        return false;
-}}
-
-// Store a config value ($value) in the category ($family)
-// under the key ($key)
-// Return the value, or false if the database update failed
+}
 
-if(! function_exists('set_config')) {
+/**
+ * @brief Sets a configuration value for system config
+ *
+ * Stores a config value ($value) in the category ($family) under the key ($key)
+ * for the user_id $uid.
+ *
+ * Note: Please do not store booleans - convert to 0/1 integer values!
+ *
+ * @param string $family
+ *  The category of the configuration value
+ * @param string $key
+ *  The configuration key to set
+ * @param string $value
+ *  The value to store
+ * @return mixed Stored $value or false if the database update failed
+ */
 function set_config($family,$key,$value) {
        global $a;
 
@@ -164,104 +194,20 @@ function set_config($family,$key,$value) {
        if($ret)
                return $value;
        return $ret;
-}}
-
-
-if(! function_exists('load_pconfig')) {
-function load_pconfig($uid,$family) {
-       global $a;
-       $r = q("SELECT `v`,`k` FROM `pconfig` WHERE `cat` = '%s' AND `uid` = %d",
-               dbesc($family),
-               intval($uid)
-       );
-       if(count($r)) {
-               foreach($r as $rr) {
-                       $k = $rr['k'];
-                       $a->config[$uid][$family][$k] = $rr['v'];
-               }
-       } else if ($family != 'config') {
-               // Negative caching
-               $a->config[$uid][$family] = "!<unset>!";
-       }
-}}
-
-
-
-if(! function_exists('get_pconfig')) {
-function get_pconfig($uid,$family, $key, $instore = false) {
-
-       global $a;
-
-       if(! $instore) {
-               // Looking if the whole family isn't set
-               if(isset($a->config[$uid][$family])) {
-                       if($a->config[$uid][$family] === '!<unset>!') {
-                               return false;
-                       }
-               }
-
-               if(isset($a->config[$uid][$family][$key])) {
-                       if($a->config[$uid][$family][$key] === '!<unset>!') {
-                               return false;
-                       }
-                       return $a->config[$uid][$family][$key];
-               }
-       }
-
-       // If APC is enabled then fetch the data from there, else try XCache
-       /*if (function_exists("apc_fetch") AND function_exists("apc_exists"))
-               if (apc_exists($uid."|".$family."|".$key)) {
-                       $val = apc_fetch($uid."|".$family."|".$key);
-                       $a->config[$uid][$family][$key] = $val;
-
-                       if ($val === '!<unset>!')
-                               return false;
-                       else
-                               return $val;
-               }
-       elseif (function_exists("xcache_get") AND function_exists("xcache_isset"))
-               if (xcache_isset($uid."|".$family."|".$key)) {
-                       $val = xcache_get($uid."|".$family."|".$key);
-                       $a->config[$uid][$family][$key] = $val;
-
-                       if ($val === '!<unset>!')
-                               return false;
-                       else
-                               return $val;
-               }*/
-
-
-       $ret = q("SELECT `v` FROM `pconfig` WHERE `uid` = %d AND `cat` = '%s' AND `k` = '%s' LIMIT 1",
-               intval($uid),
-               dbesc($family),
-               dbesc($key)
-       );
-
-       if(count($ret)) {
-               $val = (preg_match("|^a:[0-9]+:{.*}$|s", $ret[0]['v'])?unserialize( $ret[0]['v']):$ret[0]['v']);
-               $a->config[$uid][$family][$key] = $val;
+}
 
-               // If APC is enabled then store the data there, else try XCache
-               /*if (function_exists("apc_store"))
-                       apc_store($uid."|".$family."|".$key, $val, 600);
-               elseif (function_exists("xcache_set"))
-                       xcache_set($uid."|".$family."|".$key, $val, 600);*/
-
-               return $val;
-       }
-       else {
-               $a->config[$uid][$family][$key] = '!<unset>!';
-
-               // If APC is enabled then store the data there, else try XCache
-               /*if (function_exists("apc_store"))
-                       apc_store($uid."|".$family."|".$key, '!<unset>!', 600);
-               elseif (function_exists("xcache_set"))
-                       xcache_set($uid."|".$family."|".$key, '!<unset>!', 600);*/
-       }
-       return false;
-}}
-
-if(! function_exists('del_config')) {
+/**
+ * @brief Deletes the given key from the system configuration.
+ *
+ * Removes the configured value from the stored cache in $a->config
+ * and removes it from the database.
+ *
+ * @param string $family
+ *  The category of the configuration value
+ * @param string $key
+ *  The configuration key to delete
+ * @return mixed
+ */
 function del_config($family,$key) {
 
        global $a;
@@ -278,64 +224,74 @@ function del_config($family,$key) {
                xcache_unset($family."|".$key);*/
 
        return $ret;
-}}
-
+}
 
+/**
+ * @brief (Deprecated) Loads all configuration values of a user's config family into a cached storage.
+ *
+ * Note: This function is deprecated. Use PConfig::load() instead.
+ *
+ * @param string $uid
+ *  The user_id
+ * @param string $family
+ *  The category of the configuration value
+ * @return void
+ */
+function load_pconfig($uid,$family) {
+       return PConfig::load($uid, $family);
+}
 
-// Same as above functions except these are for personal config storage and take an
-// additional $uid argument.
+/**
+ * @brief (Deprecated) Get a particular user's config variable given the category name
+ * ($family) and a key.
+ *
+ * Note: This function is deprecated. Use PConfig::get() instead.
+ *
+ * @param string $uid
+ *  The user_id
+ * @param string $family
+ *  The category of the configuration value
+ * @param string $key
+ *  The configuration key to query
+ * @param boolean $instore
+ * Determines if the key already exists in the DB
+ * @return mixed Stored value or false if it does not exist
+ */
+function get_pconfig($uid,$family, $key, $instore = false) {
+       return PConfig::get($uid, $family, $key, $instore);
+}
 
-if(! function_exists('set_pconfig')) {
+/**
+ * @brief (Deprecated) Sets a configuration value for a user
+ *
+ * Note: This function is deprecated. Use PConfig::set() instead.
+ *
+ * @param string $uid
+ *  The user_id
+ * @param string $family
+ *  The category of the configuration value
+ * @param string $key
+ *  The configuration key to set
+ * @param string $value
+ *  The value to store
+ * @return mixed Stored $value or false
+ */
 function set_pconfig($uid,$family,$key,$value) {
+       return PConfig::set($uid, $family, $key, $value);
+}
 
-       global $a;
-
-       // manage array value
-       $dbvalue = (is_array($value)?serialize($value):$value);
-
-       if(get_pconfig($uid,$family,$key,true) === false) {
-               $a->config[$uid][$family][$key] = $value;
-               $ret = q("INSERT INTO `pconfig` ( `uid`, `cat`, `k`, `v` ) VALUES ( %d, '%s', '%s', '%s' ) ",
-                       intval($uid),
-                       dbesc($family),
-                       dbesc($key),
-                       dbesc($dbvalue)
-               );
-               if($ret) 
-                       return $value;
-               return $ret;
-       }
-       $ret = q("UPDATE `pconfig` SET `v` = '%s' WHERE `uid` = %d AND `cat` = '%s' AND `k` = '%s'",
-               dbesc($dbvalue),
-               intval($uid),
-               dbesc($family),
-               dbesc($key)
-       );
-
-       $a->config[$uid][$family][$key] = $value;
-
-       // If APC is enabled then store the data there, else try XCache
-       /*if (function_exists("apc_store"))
-               apc_store($uid."|".$family."|".$key, $value, 600);
-       elseif (function_exists("xcache_set"))
-               xcache_set($uid."|".$family."|".$key, $value, 600);*/
-
-
-       if($ret)
-               return $value;
-       return $ret;
-}}
-
-if(! function_exists('del_pconfig')) {
+/**
+ * @brief (Deprecated) Deletes the given key from the users's configuration.
+ *
+ * Note: This function is deprecated. Use PConfig::delete() instead.
+ *
+ * @param string $uid The user_id
+ * @param string $family
+ *  The category of the configuration value
+ * @param string $key
+ *  The configuration key to delete
+ * @return mixed
+ */
 function del_pconfig($uid,$family,$key) {
-
-       global $a;
-       if(x($a->config[$uid][$family],$key))
-               unset($a->config[$uid][$family][$key]);
-       $ret = q("DELETE FROM `pconfig` WHERE `uid` = %d AND `cat` = '%s' AND `k` = '%s'",
-               intval($uid),
-               dbesc($family),
-               dbesc($key)
-       );
-       return $ret;
-}}
+       return PConfig::delete($uid, $family, $key);
+}
index d889ba002021f3e27919bac2a4afa8a49befed4a..38f6e76862c5a4bad2faea85b8006ff86bc9ac65 100644 (file)
@@ -389,6 +389,7 @@ if(!function_exists('conversation')) {
 function conversation(&$a, $items, $mode, $update, $preview = false) {
 
        require_once('include/bbcode.php');
+       require_once('include/Contact.php');
        require_once('mod/proxy.php');
 
        $ssl_state = ((local_user()) ? true : false);
@@ -494,8 +495,6 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
        else
                $return_url = $_SESSION['return_url'] = $a->query_string;
 
-       load_contact_links(local_user());
-
        $cb = array('items' => $items, 'mode' => $mode, 'update' => $update, 'preview' => $preview);
        call_hooks('conversation_start',$cb);
 
@@ -610,11 +609,12 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
                                else
                                        $profile_link = zrl($profile_link);
 
-                               $normalised = normalise_link((strlen($item['author-link'])) ? $item['author-link'] : $item['url']);
-                               if(($normalised != 'mailbox') && (x($a->contacts[$normalised])))
-                                       $profile_avatar = $a->contacts[$normalised]['thumb'];
+                               // Don't rely on the author-avatar. It is better to use the data from the contact table
+                               $author_contact = get_contact_details_by_url($item['author-link'], $profile_owner);
+                               if ($author_contact["thumb"])
+                                       $profile_avatar = $author_contact["thumb"];
                                else
-                                       $profile_avatar = $a->remove_baseurl(((strlen($item['author-avatar'])) ? $item['author-avatar'] : $item['thumb']));
+                                       $profile_avatar = $item['author-avatar'];
 
                                $locate = array('location' => $item['location'], 'coord' => $item['coord'], 'html' => '');
                                call_hooks('render_location',$locate);
@@ -682,7 +682,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
                                        'name' => $profile_name_e,
                                        'sparkle' => $sparkle,
                                        'lock' => $lock,
-                                       'thumb' => proxy_url($profile_avatar, false, PROXY_SIZE_THUMB),
+                                       'thumb' => App::remove_baseurl(proxy_url($profile_avatar, false, PROXY_SIZE_THUMB)),
                                        'title' => $item['title_e'],
                                        'body' => $body_e,
                                        'tags' => $tags_e,
@@ -812,15 +812,7 @@ function best_link_url($item,&$sparkle,$ssl_state = false) {
 
        $clean_url = normalise_link($item['author-link']);
 
-       if((local_user()) && (local_user() == $item['uid'])) {
-               if(isset($a->contacts) && x($a->contacts,$clean_url)) {
-                       if($a->contacts[$clean_url]['network'] === NETWORK_DFRN) {
-                               $best_url = 'redir/'.$a->contacts[$clean_url]['id'];
-                               $sparkle = true;
-                       } else
-                               $best_url = $a->contacts[$clean_url]['url'];
-               }
-       } elseif (local_user()) {
+       if (local_user()) {
                $r = q("SELECT `id` FROM `contact` WHERE `network` = '%s' AND `uid` = %d AND `nurl` = '%s' LIMIT 1",
                        dbesc(NETWORK_DFRN), intval(local_user()), dbesc(normalise_link($clean_url)));
                if ($r) {
@@ -845,11 +837,9 @@ function item_photo_menu($item){
 
        $ssl_state = false;
 
-       if(local_user()) {
+       if(local_user())
                $ssl_state = true;
-                if(! count($a->contacts))
-                       load_contact_links(local_user());
-       }
+
        $sub_link="";
        $poke_link="";
        $contact_url="";
@@ -857,6 +847,7 @@ function item_photo_menu($item){
        $status_link="";
        $photos_link="";
        $posts_link="";
+       $network = "";
 
        if((local_user()) && local_user() == $item['uid'] && $item['parent'] == $item['id'] && (! $item['self'])) {
                $sub_link = 'javascript:dosubthread(' . $item['id'] . '); return false;';
@@ -867,46 +858,32 @@ function item_photo_menu($item){
        if($profile_link === 'mailbox')
                $profile_link = '';
 
+       $cid = 0;
+       $network = "";
+       $rel = 0;
+       $r = q("SELECT `id`, `network`, `rel` FROM `contact` WHERE `uid` = %d AND `nurl` = '%s' LIMIT 1",
+               intval(local_user()), dbesc(normalise_link($item['author-link'])));
+       if ($r) {
+               $cid = $r[0]["id"];
+               $network = $r[0]["network"];
+               $rel = $r[0]["rel"];
+       }
+
        if($sparkle) {
-               $cid = intval(basename($profile_link));
-               $status_link = $profile_link . "?url=status";
-               $photos_link = $profile_link . "?url=photos";
-               $profile_link = $profile_link . "?url=profile";
-               $pm_url = 'message/new/' . $cid;
+               $status_link = $profile_link."?url=status";
+               $photos_link = $profile_link."?url=photos";
+               $profile_link = $profile_link."?url=profile";
                $zurl = '';
-       }
-       else {
+       } else
                $profile_link = zrl($profile_link);
-               if(local_user() && local_user() == $item['uid'] && link_compare($item['url'],$item['author-link'])) {
-                       $cid = $item['contact-id'];
-               } else {
-                       $r = q("SELECT `id`, `network` FROM `contact` WHERE `uid` = %d AND `nurl` = '%s' LIMIT 1",
-                               intval(local_user()), dbesc(normalise_link($item['author-link'])));
-                       if ($r) {
-                               $cid = $r[0]["id"];
-
-                               if ($r[0]["network"] == NETWORK_DIASPORA)
-                                       $pm_url = 'message/new/' . $cid;
-
-                       } else
-                               $cid = 0;
-               }
-       }
-       if(($cid) && (! $item['self'])) {
-               $poke_link = 'poke/?f=&c=' . $cid;
-               $contact_url = 'contacts/' . $cid;
-               $posts_link = 'contacts/' . $cid . '/posts';
 
-               $clean_url = normalise_link($item['author-link']);
-
-               if((local_user()) && (local_user() == $item['uid'])) {
-                       if(isset($a->contacts) && x($a->contacts,$clean_url)) {
-                               if($a->contacts[$clean_url]['network'] === NETWORK_DIASPORA) {
-                                       $pm_url = 'message/new/' . $cid;
-                               }
-                       }
-               }
+       if($cid && !$item['self']) {
+               $poke_link = 'poke/?f=&c='.$cid;
+               $contact_url = 'contacts/'.$cid;
+               $posts_link = 'contacts/'.$cid.'/posts';
 
+               if (in_array($network, array(NETWORK_DFRN, NETWORK_DIASPORA)))
+                       $pm_url = 'message/new/'.$cid;
        }
 
        if (local_user()) {
@@ -920,10 +897,10 @@ function item_photo_menu($item){
                        t("Send PM") => $pm_url
                );
 
-               if ($a->contacts[$clean_url]['network'] === NETWORK_DFRN)
+               if ($network == NETWORK_DFRN)
                        $menu[t("Poke")] = $poke_link;
 
-               if ((($cid == 0) OR ($a->contacts[$clean_url]['rel'] == CONTACT_IS_FOLLOWER)) AND
+               if ((($cid == 0) OR ($rel == CONTACT_IS_FOLLOWER)) AND
                        in_array($item['network'], array(NETWORK_DFRN, NETWORK_OSTATUS, NETWORK_DIASPORA)))
                        $menu[t("Connect/Follow")] = "follow?url=".urlencode($item['author-link']);
        } else
diff --git a/include/dbm.php b/include/dbm.php
new file mode 100644 (file)
index 0000000..3f93694
--- /dev/null
@@ -0,0 +1,39 @@
+<?php
+/**
+ * @brief This class contain functions for the database management
+ *
+ */
+class dbm {
+       /**
+        * @brief Return a list of database processes
+        *
+        * @return array
+        *      'list' => List of processes, separated in their different states
+        *      'amount' => Number of concurrent database processes
+        */
+       public static function processlist() {
+               $r = q("SHOW PROCESSLIST");
+               $s = array();
+
+               $processes = 0;
+               $states = array();
+               foreach ($r AS $process) {
+                       $state = trim($process["State"]);
+
+                       // Filter out all idle processes
+                       if (!in_array($state, array("", "init", "statistics"))) {
+                               ++$states[$state];
+                               ++$processes;
+                       }
+               }
+
+               $statelist = "";
+               foreach ($states AS $state => $usage) {
+                       if ($statelist != "")
+                               $statelist .= ", ";
+                       $statelist .= $state.": ".$usage;
+               }
+               return(array("list" => $statelist, "amount" => $processes));
+       }
+}
+?>
index e6064b397148bf770c683c29ad6fce890b9eaf60..f89a3ff9268b60737edc5bcb4086e34478ed17ff 100644 (file)
@@ -847,7 +847,7 @@ function db_definition() {
                                        "extid" => array("extid"),
                                        "uid_id" => array("uid","id"),
                                        "uid_created" => array("uid","created"),
-                                       "uid_unseen" => array("uid","unseen"),
+                                       "uid_unseen_contactid" => array("uid","unseen","contact-id"),
                                        "uid_network_received" => array("uid","network","received"),
                                        "uid_received" => array("uid","received"),
                                        "uid_network_commented" => array("uid","network","commented"),
index 00b66ad58628f0db729447ed57987440b4a19e2f..53c0b78d841b5854f1eb08604a3c69aef0d2aad0 100644 (file)
@@ -366,7 +366,7 @@ function groups_containing($uid,$c) {
 function groups_count_unseen() {
 
        $r = q("SELECT `group`.`id`, `group`.`name`,
-                       (SELECT COUNT(*) FROM `item`
+                       (SELECT COUNT(*) FROM `item` FORCE INDEX (`uid_unseen_contactid`)
                                WHERE `uid` = %d AND `unseen` AND
                                        `contact-id` IN (SELECT `contact-id` FROM `group_member`
                                                                WHERE `group_member`.`gid` = `group`.`id` AND `group_member`.`uid` = %d)) AS `count`
index 888a09ee6ff88c945384a278a1a0c2b4af3f6dc8..48a6c5bbf7d8ddb072b8e0c16ee80e98cb0fafbb 100644 (file)
@@ -246,10 +246,30 @@ function profile_sidebar($profile, $block = 0) {
        else
                $subscribe_feed = false;
 
-       if(get_my_url() && $profile['unkmail'] && ($profile['uid'] != local_user()))
+       if (remote_user() OR (get_my_url() && $profile['unkmail'] && ($profile['uid'] != local_user()))) {
                $wallmessage = t('Message');
-       else
+               $wallmessage_link = "wallmessage/".$profile["nickname"];
+
+               if (remote_user()) {
+                       $r = q("SELECT `url` FROM `contact` WHERE `uid` = %d AND `id` = '%s' AND `rel` = %d",
+                               intval($profile['uid']),
+                               intval(remote_user()),
+                               intval(CONTACT_IS_FRIEND));
+               } else {
+                       $r = q("SELECT `url` FROM `contact` WHERE `uid` = %d AND `nurl` = '%s' AND `rel` = %d",
+                               intval($profile['uid']),
+                               dbesc(normalise_link(get_my_url())),
+                               intval(CONTACT_IS_FRIEND));
+               }
+               if ($r) {
+                       $remote_url = $r[0]["url"];
+                       $message_path = preg_replace("=(.*)/profile/(.*)=ism", "$1/message/new/", $remote_url);
+                       $wallmessage_link = $message_path.base64_encode($profile["addr"]);
+               }
+       } else {
                $wallmessage = false;
+               $wallmessage_link = false;
+       }
 
        // show edit profile to yourself
        if ($profile['uid'] == local_user() && feature_enabled(local_user(),'multi_profiles')) {
@@ -325,18 +345,21 @@ function profile_sidebar($profile, $block = 0) {
                        ? trim(substr($profile['name'],0,strpos($profile['name'],' '))) : $profile['name']);
        $lastname = (($firstname === $profile['name']) ? '' : trim(substr($profile['name'],strlen($firstname))));
 
-       $diaspora = array(
-               'guid' => $profile['guid'],
-               'podloc' => $a->get_baseurl(),
-               'searchable' => (($profile['publish'] && $profile['net-publish']) ? 'true' : 'false' ),
-               'nickname' => $profile['nickname'],
-               'fullname' => $profile['name'],
-               'firstname' => $firstname,
-               'lastname' => $lastname,
-               'photo300' => $a->get_baseurl() . '/photo/custom/300/' . $profile['uid'] . '.jpg',
-               'photo100' => $a->get_baseurl() . '/photo/custom/100/' . $profile['uid'] . '.jpg',
-               'photo50' => $a->get_baseurl() . '/photo/custom/50/'  . $profile['uid'] . '.jpg',
-       );
+       if ($profile['guid'] != "")
+               $diaspora = array(
+                       'guid' => $profile['guid'],
+                       'podloc' => $a->get_baseurl(),
+                       'searchable' => (($profile['publish'] && $profile['net-publish']) ? 'true' : 'false' ),
+                       'nickname' => $profile['nickname'],
+                       'fullname' => $profile['name'],
+                       'firstname' => $firstname,
+                       'lastname' => $lastname,
+                       'photo300' => $a->get_baseurl() . '/photo/custom/300/' . $profile['uid'] . '.jpg',
+                       'photo100' => $a->get_baseurl() . '/photo/custom/100/' . $profile['uid'] . '.jpg',
+                       'photo50' => $a->get_baseurl() . '/photo/custom/50/'  . $profile['uid'] . '.jpg',
+               );
+       else
+               $diaspora = false;
 
        if (!$block){
                $contact_block = contact_block();
@@ -386,6 +409,7 @@ function profile_sidebar($profile, $block = 0) {
                '$remoteconnect'  => $remoteconnect,
                '$subscribe_feed' => $subscribe_feed,
                '$wallmessage' => $wallmessage,
+               '$wallmessage_link' => $wallmessage_link,
                '$account_type' => $account_type,
                '$location' => $location,
                '$gender'   => $gender,
@@ -400,7 +424,6 @@ function profile_sidebar($profile, $block = 0) {
                '$contact_block' => $contact_block,
        ));
 
-
        $arr = array('profile' => &$profile, 'entry' => &$o);
 
        call_hooks('profile_sidebar', $arr);
index 8f82bc4d0220d20993228df77ae83c0047b7363b..e6460c046b7a857d83f5c3eb1edf5a43b4d2b37b 100644 (file)
@@ -170,7 +170,7 @@ function nav_info(&$a) {
                        if(in_array($_SESSION['page_flags'], array(PAGE_NORMAL, PAGE_SOAPBOX, PAGE_FREELOVE))) {
                                $nav['notifications'] = array('notifications',  t('Notifications'), "", t('Notifications'));
                                $nav['notifications']['all']=array('notifications/system', t('See all notifications'), "", "");
-                               $nav['notifications']['mark'] = array('', t('Mark all system notifications seen'), '','');
+                               $nav['notifications']['mark'] = array('', t('Mark as seen'), '',t('Mark all system notifications seen'));
                        }
                }
 
index 918dec5f32156e35160d6da0a690b840fb419951..7ac26846d246ab575259e89e5c6fa9a8fde632e7 100644 (file)
@@ -493,6 +493,7 @@ class ostatus {
                                                $orig_body = $xpath->query('atom:content/text()', $activityobjects)->item(0)->nodeValue;
 
                                        $orig_created = $xpath->query('atom:published/text()', $activityobjects)->item(0)->nodeValue;
+                                       $orig_edited = $xpath->query('atom:updated/text()', $activityobjects)->item(0)->nodeValue;
 
                                        $orig_contact = $contact;
                                        $orig_author = self::fetchauthor($xpath, $activityobjects, $importer, $orig_contact, false);
@@ -502,6 +503,7 @@ class ostatus {
                                        $item["author-avatar"] = $orig_author["author-avatar"];
                                        $item["body"] = add_page_info_to_body(html2bbcode($orig_body));
                                        $item["created"] = $orig_created;
+                                       $item["edited"] = $orig_edited;
 
                                        $item["uri"] = $orig_uri;
                                        $item["plink"] = $orig_link;
index e18604334b2041f3c0b5fe6f62f28978ae66fd2f..793f9935a74ba061ce1b5b5ba4c8af7e90838dbf 100644 (file)
@@ -189,6 +189,13 @@ function get_attached_data($body) {
                        if (count($pictures) == 1) {
                                // Checking, if the link goes to a picture
                                $data = parseurl_getsiteinfo_cached($pictures[0][1], true);
+
+                               // Workaround:
+                               // Sometimes photo posts to the own album are not detected at the start.
+                               // So we seem to cannot use the cache for these cases. That's strange.
+                               if (($data["type"] != "photo") AND strstr($pictures[0][1], "/photos/"))
+                                       $data = parseurl_getsiteinfo($pictures[0][1], true);
+
                                if ($data["type"] == "photo") {
                                        $post["type"] = "photo";
                                        if (isset($data["images"][0])) {
index 3a28b177c343e152c55f2f671d888fccfcb2003a..a391ea8c7528f654bd944ca1328ca7e01d86fb5b 100644 (file)
@@ -11,6 +11,7 @@ if (!file_exists("boot.php") AND (sizeof($_SERVER["argv"]) != 0)) {
 }
 
 require_once("boot.php");
+require_once("dbm.php");
 
 function poller_run(&$argv, &$argc){
        global $a, $db;
@@ -26,6 +27,20 @@ function poller_run(&$argv, &$argc){
                unset($db_host, $db_user, $db_pass, $db_data);
        };
 
+       $max_processes = get_config('system', 'max_processes_backend');
+       if (intval($max_processes) == 0)
+               $max_processes = 5;
+
+       $processlist = dbm::processlist();
+       if ($processlist["list"] != "") {
+               logger("Processcheck: Processes: ".$processlist["amount"]." - Processlist: ".$processlist["list"], LOGGER_DEBUG);
+
+               if ($processlist["amount"] > $max_processes) {
+                       logger("Processcheck: Maximum number of processes for backend tasks (".$max_processes.") reached.", LOGGER_DEBUG);
+                       return;
+               }
+       }
+
        if (poller_max_connections_reached())
                return;
 
@@ -59,6 +74,17 @@ function poller_run(&$argv, &$argc){
 
        while ($r = q("SELECT * FROM `workerqueue` WHERE `executed` = '0000-00-00 00:00:00' ORDER BY `created` LIMIT 1")) {
 
+               // Log the type of database processes
+               $processlist = dbm::processlist();
+               if ($processlist["amount"] != "") {
+                       logger("Processcheck: Processes: ".$processlist["amount"]." - Processlist: ".$processlist["list"], LOGGER_DEBUG);
+
+                       if ($processlist["amount"] > $max_processes) {
+                               logger("Processcheck: Maximum number of processes for backend tasks (".$max_processes.") reached.", LOGGER_DEBUG);
+                               return;
+                       }
+               }
+
                // Constantly check the number of available database connections to let the frontend be accessible at any time
                if (poller_max_connections_reached())
                        return;
index 73f46cfbef2367570be09c6985e9605568c0801e..bf4ee378af840ccb0810f7cfa686921a251863ba 100644 (file)
--- a/index.php
+++ b/index.php
@@ -41,10 +41,11 @@ $install = ((file_exists('.htconfig.php') && filesize('.htconfig.php')) ? false
  */
 
 require_once("include/dba.php");
+require_once("include/dbm.php");
 
 if(!$install) {
        $db = new dba($db_host, $db_user, $db_pass, $db_data, $install);
-           unset($db_host, $db_user, $db_pass, $db_data);
+           unset($db_host, $db_user, $db_pass, $db_data);
 
        /**
         * Load configs from db. Overwrite configs from .htconfig.php
@@ -53,6 +54,21 @@ if(!$install) {
        load_config('config');
        load_config('system');
 
+       $processlist = dbm::processlist();
+       if ($processlist["list"] != "") {
+
+               logger("Processcheck: Processes: ".$processlist["amount"]." - Processlist: ".$processlist["list"], LOGGER_DEBUG);
+
+               $max_processes = get_config('system', 'max_processes_frontend');
+               if (intval($max_processes) == 0)
+                       $max_processes = 20;
+
+               if ($processlist["amount"] > $max_processes) {
+                       logger("Processcheck: Maximum number of processes for frontend tasks (".$max_processes.") reached.", LOGGER_DEBUG);
+                       system_unavailable();
+               }
+       }
+
        $maxsysload_frontend = intval(get_config('system','maxloadavg_frontend'));
        if($maxsysload_frontend < 1)
                $maxsysload_frontend = 50;
@@ -442,9 +458,9 @@ if($a->is_mobile || $a->is_tablet) {
                $link = 'toggle_mobile?off=1&address=' . curPageURL();
        }
        $a->page['footer'] = replace_macros(get_markup_template("toggle_mobile_footer.tpl"), array(
-                               '$toggle_link' => $link,
-                               '$toggle_text' => t('toggle mobile')
-                        ));
+                               '$toggle_link' => $link,
+                               '$toggle_text' => t('toggle mobile')
+                        ));
 }
 
 /**
index 9914c3801f8e2486e00b0e169e8c04de41ac2fe9..2d0b2da36ac533b8da509b88f987294b011589cd 100644 (file)
                        /* autocomplete @nicknames */
                        $(".comment-edit-form  textarea").editor_autocomplete(baseurl+"/acl");
                        /* autocomplete bbcode */
+                     $(".comment-edit-form  textarea").bbco_autocomplete('bbcode');
-
                      $(".comment-edit-form  textarea").bbco_autocomplete('bbcode');
+                       
                        // setup videos, since VideoJS won't take care of any loaded via AJAX
                        if(typeof videojs != 'undefined') videojs.autoSetup();
                });
index 356a389b83693ce291ae4b4afce726dcad7e0105..498b9d7dbf1cf62b0b61eff85aec17e8575ace5b 100644 (file)
@@ -49,7 +49,7 @@ function allfriends_content(&$a) {
        foreach($r as $rr) {
 
                //get further details of the contact
-               $contact_details = get_contact_details_by_url($rr['url'], $uid);
+               $contact_details = get_contact_details_by_url($rr['url'], $uid, $rr);
 
                $photo_menu = '';
 
@@ -61,16 +61,18 @@ function allfriends_content(&$a) {
                }
                else {
                        $connlnk = $a->get_baseurl() . '/follow/?url=' . $rr['url'];
-                       $photo_menu = array(array(t("View Profile"), zrl($rr['url'])));
-                       $photo_menu[] = array(t("Connect/Follow"), $connlnk);
+                       $photo_menu = array(
+                               'profile' => array(t("View Profile"), zrl($rr['url'])),
+                               'follow' => array(t("Connect/Follow"), $connlnk)
+                       );
                }
 
                $entry = array(
                        'url'           => $rr['url'],
                        'itemurl'       => (($contact_details['addr'] != "") ? $contact_details['addr'] : $rr['url']),
-                       'name'          => htmlentities($rr['name']),
-                       'thumb'         => proxy_url($rr['photo'], false, PROXY_SIZE_THUMB),
-                       'img_hover'     => htmlentities($rr['name']),
+                       'name'          => htmlentities($contact_details['name']),
+                       'thumb'         => proxy_url($contact_details['thumb'], false, PROXY_SIZE_THUMB),
+                       'img_hover'     => htmlentities($contact_details['name']),
                        'details'       => $contact_details['location'],
                        'tags'          => $contact_details['keywords'],
                        'about'         => $contact_details['about'],
index 62a5185fed84c4a00256bab9447fc56c64b530b2..9b2c69f6d70c4955b12daaa6cca20ddf9e49f7de 100644 (file)
@@ -109,14 +109,14 @@ function common_content(&$a) {
                $rr[id] = $rr[cid];
 
                $photo_menu = '';
-               $photo_menu = contact_photo_menu ($rr);
+               $photo_menu = contact_photo_menu($rr);
 
                $entry = array(
                        'url'           => $rr['url'],
                        'itemurl'       => (($contact_details['addr'] != "") ? $contact_details['addr'] : $rr['url']),
-                       'name'          => $rr['name'],
-                       'thumb'         => proxy_url($rr['photo'], false, PROXY_SIZE_THUMB),
-                       'img_hover'     => htmlentities($rr['name']),
+                       'name'          => $contact_details['name'],
+                       'thumb'         => proxy_url($contact_details['thumb'], false, PROXY_SIZE_THUMB),
+                       'img_hover'     => htmlentities($contact_details['name']),
                        'details'       => $contact_details['location'],
                        'tags'          => $contact_details['keywords'],
                        'about'         => $contact_details['about'],
index 49cff74d2d9f4e4eac2ffcce3529f87fafcabc55..71ed927636623ed5eb504d366772c273b0646256 100644 (file)
@@ -416,11 +416,12 @@ function render_content(&$a, $items, $mode, $update, $preview = false) {
                                else
                                        $profile_link = zrl($profile_link);
 
-                               $normalised = normalise_link((strlen($item['author-link'])) ? $item['author-link'] : $item['url']);
-                               if(($normalised != 'mailbox') && (x($a->contacts[$normalised])))
-                                       $profile_avatar = $a->contacts[$normalised]['thumb'];
+                               // Don't rely on the author-avatar. It is better to use the data from the contact table
+                               $author_contact = get_contact_details_by_url($item['author-link'], $profile_owner);
+                               if ($author_contact["thumb"])
+                                       $profile_avatar = $author_contact["thumb"];
                                else
-                                       $profile_avatar = $a->remove_baseurl(((strlen($item['author-avatar'])) ? $item['author-avatar'] : $item['thumb']));
+                                       $profile_avatar = $item['author-avatar'];
 
                                $locate = array('location' => $item['location'], 'coord' => $item['coord'], 'html' => '');
                                call_hooks('render_location',$locate);
@@ -787,11 +788,12 @@ function render_content(&$a, $items, $mode, $update, $preview = false) {
                                else
                                        $profile_link = zrl($profile_link);
 
-                               $normalised = normalise_link((strlen($item['author-link'])) ? $item['author-link'] : $item['url']);
-                               if(($normalised != 'mailbox') && (x($a->contacts,$normalised)))
-                                       $profile_avatar = $a->contacts[$normalised]['thumb'];
+                               // Don't rely on the author-avatar. It is better to use the data from the contact table
+                               $author_contact = get_contact_details_by_url($item['author-link'], $profile_owner);
+                               if ($author_contact["thumb"])
+                                       $profile_avatar = $author_contact["thumb"];
                                else
-                                       $profile_avatar = $a->remove_baseurl(((strlen($item['author-avatar']) && $diff_author) ? $item['author-avatar'] : $thumb));
+                                       $profile_avatar = $item['author-avatar'];
 
                                $like    = ((x($alike,$item['uri'])) ? format_like($alike[$item['uri']],$alike[$item['uri'] . '-l'],'like',$item['uri']) : '');
                                $dislike = ((x($dlike,$item['uri'])) ? format_like($dlike[$item['uri']],$dlike[$item['uri'] . '-l'],'dislike',$item['uri']) : '');
@@ -805,9 +807,9 @@ function render_content(&$a, $items, $mode, $update, $preview = false) {
 
                                $shiny = "";
                                if(strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC','now - 12 hours')) > 0)
-                                       $shiny = 'shiny'; 
+                                       $shiny = 'shiny';
 
-                               // 
+                               //
                                localize_item($item);
 
 
index 625f6c95aca781eee24e1a3f895361f8c455e1b6..9050a050a60e7211d24544477ad91af7d630b3c6 100644 (file)
@@ -159,7 +159,9 @@ function directory_content(&$a) {
                                $location_e = $location;
                        }
 
-                       $photo_menu = array(array(t("View Profile"), zrl($profile_link)));
+                       $photo_menu = array(
+                               'profile' => array(t("View Profile"), zrl($profile_link))
+                       );
 
                        $entry = array(
                                'id' => $rr['id'],
index 106c4c76a6060fc75ec1722aca1c0c7a7ba487cb..f193a5c45c6786cac7ae9615d3cc52b6eee41605 100644 (file)
@@ -133,6 +133,8 @@ function dirfind_content(&$a, $prefix = "") {
                                if (poco_alternate_ostatus_url($result["url"]))
                                         continue;
 
+                               $result = get_contact_details_by_url($result["url"], local_user(), $result);
+
                                if ($result["name"] == "") {
                                        $urlparts = parse_url($result["url"]);
                                        $result["name"] = end(explode("/", $urlparts["path"]));
@@ -194,8 +196,10 @@ function dirfind_content(&$a, $prefix = "") {
                                } else {
                                        $connlnk = $a->get_baseurl().'/follow/?url='.(($jj->connect) ? $jj->connect : $jj->url);
                                        $conntxt = t('Connect');
-                                       $photo_menu = array(array(t("View Profile"), zrl($jj->url)));
-                                       $photo_menu[] = array(t("Connect/Follow"), $connlnk);
+                                       $photo_menu = array(
+                                               'profile' => array(t("View Profile"), zrl($jj->url)),
+                                               'follow' => array(t("Connect/Follow"), $connlnk)
+                                       );
                                }
 
                                $jj->photo = str_replace("http:///photo/", get_server()."/photo/", $jj->photo);
index 21fff7866c289f397fd18741f976edc3ed0aadda..949ba5ab46d8d3f8b3bacf19d07513ede5e193bf 100644 (file)
@@ -112,6 +112,8 @@ function display_init(&$a) {
 
 function display_fetchauthor($a, $item) {
 
+       require_once("include/Contact.php");
+
        $profiledata = array();
        $profiledata["uid"] = -1;
        $profiledata["nickname"] = $item["author-name"];
@@ -176,61 +178,9 @@ function display_fetchauthor($a, $item) {
                $profiledata["about"] = "";
        }
 
-       // Don't show details from Diaspora contacts if you don't follow the contact
-       $showdetails = ($profiledata["network"] != NETWORK_DIASPORA);
-
-       // Fetching further contact data from the contact table
-       $r = q("SELECT `uid`, `network`, `name`, `photo`, `nick`, `addr`, `location`, `about`, `gender`, `keywords`
-               FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d AND `network` = '%s' AND `rel` IN (%d, %d)",
-               dbesc(normalise_link($profiledata["url"])), intval(local_user()), dbesc($item["network"]),
-               intval(CONTACT_IS_SHARING), intval(CONTACT_IS_FRIEND));
-       if (!count($r))
-               $r = q("SELECT `uid`, `network`, `name`, `photo`, `nick`, `addr`, `location`, `about`, `gender`, `keywords`
-                       FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d AND `rel` IN (%d, %d)",
-                       dbesc(normalise_link($profiledata["url"])), intval(local_user()),
-                       intval(CONTACT_IS_SHARING), intval(CONTACT_IS_FRIEND));
-
-       if (count($r)) {
-               $profiledata["name"] = $r[0]["name"];
-               $profiledata["photo"] = $r[0]["photo"];
-               $profiledata["nickname"] = $r[0]["nick"];
-               $profiledata["addr"] = $r[0]["addr"];
-               $profiledata["keywords"] = $r[0]["keywords"];
-               $profiledata["network"] = $r[0]["network"];
-
-               if (local_user() OR $showdetails) {
-                       $showdetails = true;
-                       $profiledata["address"] = $r[0]["location"];
-                       $profiledata["about"] = $r[0]["about"];
-                       $profiledata["gender"] = $r[0]["gender"];
-               }
-       }
-
-       // Fetching profile data from global contacts
-       if ($profiledata["network"] != NETWORK_FEED) {
-               $r = q("SELECT `name`, `photo`, `nick`, `addr`, `location`, `about`, `gender`, `keywords`, `network` FROM `gcontact` WHERE `nurl` = '%s'", dbesc(normalise_link($profiledata["url"])));
-               if (count($r)) {
-                       $profiledata["name"] = $r[0]["name"];
-                       $profiledata["photo"] = $r[0]["photo"];
-                       $profiledata["nickname"] = $r[0]["nick"];
-                       $profiledata["addr"] = $r[0]["addr"];
-                       $profiledata["network"] = $r[0]["network"];
-
-                       if ($r[0]["keywords"])
-                               $profiledata["keywords"] = $r[0]["keywords"];
+       $profiledata = get_contact_details_by_url($profiledata["url"], local_user(), $profiledata);
 
-                       if ($showdetails) {
-                               if ($r[0]["location"])
-                                       $profiledata["address"] = $r[0]["location"];
-
-                               if ($r[0]["about"])
-                                       $profiledata["about"] = $r[0]["about"];
-
-                               if ($r[0]["gender"])
-                                       $profiledata["gender"] = $r[0]["gender"];
-                       }
-               }
-       }
+       $profiledata["photo"] = App::remove_baseurl($profiledata["photo"]);
 
        if (local_user()) {
                if (in_array($profiledata["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS)))
@@ -482,9 +432,7 @@ function display_content(&$a, $update = 0) {
                $title = trim(html2plain(bbcode($r[0]["title"], false, false), 0, true));
                $author_name = $r[0]["author-name"];
 
-               $image = "";
-               if ($image == "")
-                       $image = $r[0]["thumb"];
+               $image = $a->remove_baseurl($r[0]["thumb"]);
 
                if ($title == "")
                        $title = $author_name;
diff --git a/mod/hovercard.php b/mod/hovercard.php
new file mode 100644 (file)
index 0000000..4a6619b
--- /dev/null
@@ -0,0 +1,121 @@
+<?php
+
+/**
+ * Name: Frio Hovercard
+ * Description: Hovercard addon for the frio theme
+ * Version: 0.1
+ * Author: Rabuzarus <https://github.com/rabuzarus>
+ * License: GNU AFFERO GENERAL PUBLIC LICENSE (Version 3)
+ */
+
+require_once("include/socgraph.php");
+require_once("include/Contact.php");
+
+function hovercard_init(&$a) {
+       // Just for testing purposes
+       $_GET["mode"] = "minimal";
+}
+function hovercard_content() {
+       $profileurl     =       (x($_REQUEST,'profileurl')      ? $_REQUEST['profileurl']       : "");
+       $datatype       =       (x($_REQUEST,'datatype')        ?$_REQUEST['datatype']          : "json");
+
+       // Get out if the system doesn't have public access allowed
+       if(intval(get_config('system','block_public')))
+               http_status_exit(401);
+
+       // Return the raw content of the template. We use this to make templates usable for js functions.
+       // Look at hovercard.js (function getHoverCardTemplate()).
+       // This part should be moved in it's own module. Maybe we could make more templates accessabel.
+       // (We need to discuss possible security lacks before doing this)
+       if ($datatype == "tpl") {
+               $templatecontent = get_template_content("hovercard.tpl");
+               echo $templatecontent;
+               killme();
+       }
+
+       // If a contact is connected the url is internally changed to "redir/CID". We need the pure url to search for
+       // the contact. So we strip out the contact id from the internal url and look in the contact table for
+       // the real url (nurl)
+       if(local_user() && strpos($profileurl, "redir/") === 0) {
+               $cid = intval(substr($profileurl, 6));
+               $r = q("SELECT `nurl`, `self`  FROM `contact` WHERE `id` = '%d' LIMIT 1", intval($cid));
+               $profileurl = ($r[0]["nurl"] ? $r[0]["nurl"] : "");
+               $self = ($r[0]["self"] ? $r[0]["self"] : "");
+       }
+
+       // if it's the url containing https it should be converted to http
+       $nurl = normalise_link(clean_contact_url($profileurl));
+       if($nurl) {
+               // Search for contact data
+               $contact = get_contact_details_by_url($nurl);
+       }
+
+       if(!is_array($contact))
+               return;
+
+       // Get the photo_menu - the menu if possible contact actions
+       if(local_user())
+               $actions = contact_photo_menu($contact);
+
+
+       // Move the contact data to the profile array so we can deliver it to
+       //
+       $profile = array(
+               'name' => $contact["name"],
+               'nick'  => $contact["nick"],
+               'addr'  => (($contact["addr"] != "") ? $contact["addr"] : $contact["url"]),
+               'thumb' => proxy_url($contact["thumb"], false, PROXY_SIZE_THUMB),
+               'url' => ($cid ? ("redir/".$cid) : zrl($contact["url"])),
+               'nurl' => $contact["nurl"], // We additionally store the nurl as identifier
+//             'alias' => $contact["alias"],
+               'location' => $contact["location"],
+               'gender' => $contact["gender"],
+               'about' => $contact["about"],
+               'network' => format_network_name($contact["network"], $contact["url"]),
+               'tags' => intval($contact["keywords"]),
+//             'nsfw' => intval($contact["nsfw"]),
+//             'server_url' => $contact["server_url"],
+               'bd' => (($contact["birthday"] == "0000-00-00") ? "" : $contact["birthday"]),
+//             'generation' => $contact["generation"],
+               'account_type' => ($contact['community'] ? t("Forum") : ""),
+               'actions' => $actions,
+       );
+
+       if($datatype == "html") {
+               $t = get_markup_template("hovercard.tpl");
+
+               $o = replace_macros($t, array(
+                       '$profile' => $profile,
+               ));
+
+               return $o;
+
+       } else {
+               json_return_and_die($profile);
+       }
+}
+
+/**
+ * @brief Get the raw content of a template file
+ * 
+ * @param string $template The name of the template
+ * @param string $root Directory of the template
+ * 
+ * @return string|bool Output the raw content if existent, otherwise false
+ */
+function get_template_content($template, $root = "") {
+
+       // We load the whole template system to get the filename.
+       // Maybe we can do it a little bit smarter if I get time.
+       $t = get_markup_template($template, $root);
+       $filename = $t->filename;
+
+       // Get the content of the template file
+       if(file_exists($filename)) {
+               $content = file_get_contents($filename);
+
+               return $content;
+       }
+
+       return false;
+}
index 3b0367b4290e1efd02ccbd945eca34fb4e79bb4d..8341911577be4311375e31b5432bcc503b69e542 100644 (file)
@@ -67,8 +67,10 @@ function match_content(&$a) {
                                if (!count($match)) {
                                        $jj->photo = str_replace("http:///photo/", get_server()."/photo/", $jj->photo);
                                        $connlnk = $a->get_baseurl() . '/follow/?url=' . $jj->url;
-                                       $photo_menu = array(array(t("View Profile"), zrl($jj->url)));
-                                       $photo_menu[] = array(t("Connect/Follow"), $connlnk);
+                                       $photo_menu = array(
+                                               'profile' => array(t("View Profile"), zrl($jj->url)),
+                                               'follow' => array(t("Connect/Follow"), $connlnk)
+                                       );
 
                                        $contact_details = get_contact_details_by_url($jj->url, local_user());
 
index 8108ff96bdc6dde958f04c4f7524c7c19d4e3267..b5c6c064dc652a8ed37d7714f1e2729860e70e58 100644 (file)
@@ -305,15 +305,29 @@ function message_content(&$a) {
                $prename = $preurl = $preid = '';
 
                if($preselect) {
-                       $r = q("select name, url, id from contact where uid = %d and id = %d limit 1",
+                       $r = q("SELECT `name`, `url`, `id` FROM `contact` WHERE `uid` = %d AND `id` = %d LIMIT 1",
                                intval(local_user()),
                                intval($a->argv[2])
                        );
+                       if(!$r) {
+                               $r = q("SELECT `name`, `url`, `id` FROM `contact` WHERE `uid` = %d AND `nurl` = '%s' LIMIT 1",
+                                       intval(local_user()),
+                                       dbesc(normalise_link(base64_decode($a->argv[2])))
+                               );
+                       }
+                       if(!$r) {
+                               $r = q("SELECT `name`, `url`, `id` FROM `contact` WHERE `uid` = %d AND `addr` = '%s' LIMIT 1",
+                                       intval(local_user()),
+                                       dbesc(base64_decode($a->argv[2]))
+                               );
+                       }
                        if(count($r)) {
                                $prename = $r[0]['name'];
                                $preurl = $r[0]['url'];
                                $preid = $r[0]['id'];
-                       }
+                               $preselect = array($preid);
+                       } else
+                               $preselect = false;
                }
 
                $prefill = (($preselect) ? $prename  : '');
@@ -342,7 +356,6 @@ function message_content(&$a) {
                        '$wait' => t('Please wait'),
                        '$submit' => t('Submit')
                ));
-
                return $o;
        }
 
@@ -446,9 +459,11 @@ function message_content(&$a) {
                        if($message['from-url'] == $myprofile) {
                                $from_url = $myprofile;
                                $sparkle = '';
-                       }
-                       else {
-                               $from_url = 'redir/' . $message['contact-id'];
+                       } elseif ($message['contact-id'] != 0) {
+                               $from_url = 'redir/'.$message['contact-id'];
+                               $sparkle = ' sparkle';
+                       } else {
+                               $from_url = $message['from-url']."?zrl=".urlencode($myprofile);
                                $sparkle = ' sparkle';
                        }
 
@@ -462,8 +477,7 @@ function message_content(&$a) {
                                $subject_e = template_escape($message['title']);
                                $body_e = template_escape(Smilies::replace(bbcode($message['body'])));
                                $to_name_e = template_escape($message['name']);
-                       }
-                       else {
+                       } else {
                                $from_name_e = $message['from-name'];
                                $subject_e = $message['title'];
                                $body_e = Smilies::replace(bbcode($message['body']));
@@ -475,7 +489,7 @@ function message_content(&$a) {
                                'from_name' => $from_name_e,
                                'from_url' => $from_url,
                                'sparkle' => $sparkle,
-                               'from_photo' => $message['from-photo'],
+                               'from_photo' => proxy_url($message['from-photo'], false, PROXY_SIZE_THUMB),
                                'subject' => $subject_e,
                                'body' => $body_e,
                                'delete' => t('Delete message'),
index 9f6e9784331851b702434245f24256313612d6e4..2f0985c9dbba0db74ae2be74bfc4d31a110c0f6d 100644 (file)
@@ -35,18 +35,18 @@ function nogroup_content(&$a) {
        if(count($r)) {
                foreach($r as $rr) {
 
-                       $contact_details = get_contact_details_by_url($rr['url'], local_user());
+                       $contact_details = get_contact_details_by_url($rr['url'], local_user(), $rr);
 
                        $contacts[] = array(
-                               'img_hover' => sprintf( t('Visit %s\'s profile [%s]'),$rr['name'],$rr['url']),
+                               'img_hover' => sprintf(t('Visit %s\'s profile [%s]'), $contact_details['name'], $rr['url']),
                                'edit_hover' => t('Edit contact'),
                                'photo_menu' => contact_photo_menu($rr),
                                'id' => $rr['id'],
                                'alt_text' => $alt_text,
                                'dir_icon' => $dir_icon,
-                               'thumb' => $rr['thumb'],
-                               'name' => $rr['name'],
-                               'username' => $rr['name'],
+                               'thumb' => proxy_url($contact_details['thumb'], false, PROXY_SIZE_THUMB),
+                               'name' => $contact_details['name'],
+                               'username' => $contact_details['name'],
                                'details'       => $contact_details['location'],
                                'tags'          => $contact_details['keywords'],
                                'about'         => $contact_details['about'],
index 26bd395230b8d937df35ceb1c5fcb10891116227..58e3a160721cc78014f7c1f3b49c6db09fb9c3ef 100644 (file)
@@ -284,7 +284,7 @@ function profile_content(&$a, $update = 0) {
 
                $r = q("SELECT `thread`.`iid` AS `item_id`, `thread`.`network` AS `item_network`,
                        `thread`.`uid` AS `contact-uid`
-                       FROM `thread` INNER JOIN `item` ON `item`.`id` = `thread`.`iid`
+                       FROM `thread` FORCE INDEX (`uid_created`) INNER JOIN `item` ON `item`.`id` = `thread`.`iid`
                        $sql_post_table INNER JOIN `contact` ON `contact`.`id` = `thread`.`contact-id`
                        AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
                        WHERE `thread`.`uid` = %d AND `thread`.`visible` = 1 AND `thread`.`deleted` = 0
index b73c2cd1b61eef34a248ff9e507d92b4182f419b..00033b2d246feba8b84f961dc4edf4a8587844aa 100644 (file)
@@ -78,17 +78,20 @@ function suggest_content(&$a) {
 
                $connlnk = $a->get_baseurl() . '/follow/?url=' . (($rr['connect']) ? $rr['connect'] : $rr['url']);
                $ignlnk = $a->get_baseurl() . '/suggest?ignore=' . $rr['id'];
-               $photo_menu = array(array(t("View Profile"), zrl($rr["url"])));
-               $photo_menu[] = array(t("Connect/Follow"), $connlnk);
-               $photo_menu[] = array(t('Ignore/Hide'), $ignlnk);
-               $contact_details = get_contact_details_by_url($rr["url"], local_user());
+               $photo_menu = array(
+                       'profile' => array(t("View Profile"), zrl($rr["url"])),
+                       'follow' => array(t("Connect/Follow"), $connlnk),
+                       'hide' => array(t('Ignore/Hide'), $ignlnk)
+               );
+
+               $contact_details = get_contact_details_by_url($rr["url"], local_user(), $rr);
 
                $entry = array(
                        'url' => zrl($rr['url']),
                        'itemurl' => (($contact_details['addr'] != "") ? $contact_details['addr'] : $rr['url']),
                        'img_hover' => $rr['url'],
-                       'name' => $rr['name'],
-                       'thumb' => proxy_url($rr['photo'], false, PROXY_SIZE_THUMB),
+                       'name' => $contact_details['name'],
+                       'thumb' => proxy_url($contact_details['thumb'], false, PROXY_SIZE_THUMB),
                        'details'       => $contact_details['location'],
                        'tags'          => $contact_details['keywords'],
                        'about'         => $contact_details['about'],
index 04520e0d9309cc163ffe86c165625ef0e96233cd..2e36a3bd7a2224998389b7c451bb449b75ea9ee9 100644 (file)
@@ -90,15 +90,15 @@ function viewcontacts_content(&$a) {
                else
                        $url = zrl($url);
 
-               $contact_details = get_contact_details_by_url($rr['url'], $a->profile['uid']);
+               $contact_details = get_contact_details_by_url($rr['url'], $a->profile['uid'], $rr);
 
                $contacts[] = array(
                        'id' => $rr['id'],
-                       'img_hover' => sprintf( t('Visit %s\'s profile [%s]'), $rr['name'], $rr['url']),
+                       'img_hover' => sprintf( t('Visit %s\'s profile [%s]'), $contact_details['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']),
+                       'thumb' => proxy_url($contact_details['thumb'], false, PROXY_SIZE_THUMB),
+                       'name' => htmlentities(substr($contact_details['name'],0,20)),
+                       'username' => htmlentities($contact_details['name']),
                        'details'       => $contact_details['location'],
                        'tags'          => $contact_details['keywords'],
                        'about'         => $contact_details['about'],
index b8859badd3d30504f6ea7c57f914e3a9be31ad5d..8642624a476e4b75c3c0f7dbb99cf5ba0e5ebbab 100644 (file)
@@ -48,7 +48,7 @@ function wallmessage_post(&$a) {
        $body = str_replace("\r\n","\n",$body);
        $body = str_replace("\n\n","\n",$body);
 
-       
+
        $ret = send_wallmessage($user, $body, $subject, $replyto);
 
        switch($ret){
@@ -68,8 +68,8 @@ function wallmessage_post(&$a) {
                        info( t('Message sent.') . EOL );
        }
 
-//     goaway($a->get_baseurl() . '/profile/' . $user['nickname']);
-       
+       goaway('profile/'.$user['nickname']);
+
 }
 
 
index 59659cdaff2e4816df0f42bcdfc4447ef10d51a3..a907ff228a141574f1bfc6b2dfe5e6f47c8342a1 100644 (file)
@@ -150,11 +150,12 @@ class Item extends BaseObject {
                else
                        $profile_link = zrl($profile_link);
 
-               $normalised = normalise_link((strlen($item['author-link'])) ? $item['author-link'] : $item['url']);
-               if(($normalised != 'mailbox') && (x($a->contacts,$normalised)))
-                       $profile_avatar = $a->contacts[$normalised]['thumb'];
+               // Don't rely on the author-avatar. It is better to use the data from the contact table
+               $author_contact = get_contact_details_by_url($item['author-link'], $profile_owner);
+               if ($author_contact["thumb"])
+                       $profile_avatar = $author_contact["thumb"];
                else
-                       $profile_avatar = (((strlen($item['author-avatar'])) && $diff_author) ? $item['author-avatar'] : $a->remove_baseurl($this->get_data_value('thumb')));
+                       $profile_avatar = $item['author-avatar'];
 
                $locate = array('location' => $item['location'], 'coord' => $item['coord'], 'html' => '');
                call_hooks('render_location',$locate);
@@ -363,7 +364,7 @@ class Item extends BaseObject {
                        'profile_url' => $profile_link,
                        'item_photo_menu' => item_photo_menu($item),
                        'name' => $name_e,
-                       'thumb' => proxy_url($profile_avatar, false, PROXY_SIZE_THUMB),
+                       'thumb' => $a->remove_baseurl(proxy_url($profile_avatar, false, PROXY_SIZE_THUMB)),
                        'osparkle' => $osparkle,
                        'sparkle' => $sparkle,
                        'title' => $title_e,
index b74edf7bbd98ce3acfb21df354bc5e64b7e8dab5..1189ac4a91b2c5e385e280f7a3908e95ee4e806d 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-define('UPDATE_VERSION' , 1195);
+define('UPDATE_VERSION' , 1196);
 
 /**
  *
index 0bb5a577a06c650a9f2211e0d7f53c33d121c370..a70fa4ae12ce6b67a0d2356d8e02bb2824e3f13a 100644 (file)
Binary files a/view/fonts/friendica_shashape.ttf and b/view/fonts/friendica_shashape.ttf differ
index 5f4494dde7b4fbfe5e1fd7293b75c04b4bdf070d..b1a00323146ac08f6ae13d831b7a24aed4d720d4 100644 (file)
 .shashape.profile:before{
     content: "p";
 }
-.shashape.skip:before{
+.shashape.profileneg:before{
     content: "q";
 }
-.shashape.reload:before{
+.shashape.heard:before{
     content: "r";
 }
 .shashape.search:before{
@@ -74,9 +74,6 @@
 .shashape.time:before{
     content: "t";
 }
-.shashape.undo:before{
-    content: "u";
-}
 .shashape.logout:before,
 .shashape.logged-in:before{
     content: "v";
 .shashape.nolike:before{
     content: "C";
 }
-/* uppercase D is not defined at the moment
- .shashape.hash:before{
+.shashape.grrrr:before{
     content: "D";
-} */
+}
 .shashape.arrow7:before{
     content: "E";
 }
 .shashape.follow:before{
     content: "F";
 }
-.shashape.follower:before{
+.shashape.retweet:before{
     content: "G";
 }
 .shashape.hand:before{
 .shashape.arrow-updown:before{
     content: "K";
 }
-/* uppercase L is not defined at the moment
-.shashape.lock:before{
+.shashape.arrow-sideup:before{
     content: "L";
-} */
+}
 .shashape.arrow-left:before{
     content: "M";
 }
     content: "#";
 }
 .shashape.tag:before{
-    content: "=";
+    content: "&";
 }
 .shashape.lock-open:before{
-    content: "?";
+    content: "(";
 }
 .shashape.lock-closed:before{
     content: ")";
 }
+.shashape.blank:before {
+    content: "_";
+}
+.shashape.ellipsis:before {
+    content: "§";
+}
+.shashape.ok.before,
 .shashape.yes:before{
     content: "+";
 }
 .shashape.hmm:before{
-    content: ",";
+    content: "%";
 }
+.shashape.mark:before,
 .shashape.no:before{
     content: "-";
 }
-.shashape.blank:before{
+.shashape.see:before{
     content: ".";
 }
-.shashape.see:before{
+.shashape.see2:before{
     content: ":";
 }
-.shashape.blind:before{
+.shashape.see3:before{
     content: ";";
 }
+.shashape.blind:before{
+    content: ",";
+}
 .shashape.edit:before{
     content: "<";
 }
 .shashape.stamp:before{
     content: ">";
 }
-.shashape.heart:before{
-    content: "_";
+.shashape.comment:before {
+    content: "*";
+}
+.shashape.ask:before {
+    content: "?";
+}
+.shashape.skip:before {
+    content: "{";
+}
+.shashape.reload:before {
+    content: "[";
+}
+.shashape.reloadreverse:before {
+    content: "]";
+}
+.shashape.undo:before {
+    content: "]";
 }
-
index a4f20ce645d098fd2d01a8f08e56ecad7dda9f6a..6e0fff004db4761f1cdf0b22f8c0a2763717b7a2 100644 (file)
Binary files a/view/fonts/shashape.jpg and b/view/fonts/shashape.jpg differ
index 58419bd13d0f181a8de17fbba08220d8e45b01b2..45b9fa4ff7a83e10891f8d43ace0b05764abc5af 100644 (file)
@@ -1,4 +1,4 @@
-
+{{if $diaspora}}
 <div style="display:none;">
        <dl class="entity_uid">
                <dt>Uid</dt>
@@ -61,3 +61,4 @@
                </dd>
        </dl>
 </div>
+{{/if}}
diff --git a/view/templates/hovercard.tpl b/view/templates/hovercard.tpl
new file mode 100644 (file)
index 0000000..b7acd6c
--- /dev/null
@@ -0,0 +1,39 @@
+<div class="basic-content" >
+       <div class="hover-card-details">
+               <div class="hover-card-header left-align">
+                       <div class="hover-card-pic left-align">
+                               <span class="image-wrapper medium">
+                                       <a href="{{$profile.url}}" title="{{$profile.name}}"><img href="" class="left-align thumbnail" src="{{$profile.thumb}}"></a>
+                               </span>
+                       </div>
+                       <div class="hover-card-content">
+                               <div class="profile-entry-name">
+                                       <h4 class="left-align1"><a href="{{$profile.url}}">{{$profile.name}}</a></h4>{{if $profile.account_type}}<span>{{$profile.account_type}}</span>{{/if}}
+                               </div>
+                               <div class="profile-details">
+                                       <span class="profile-addr">{{$profile.addr}}</span>
+                                       {{if $profile.network}}<span class="profile-network"> ({{$profile.network}})</span>{{/if}}
+                               </div>
+                               {{*{{if $profile.about}}<div class="profile-details profile-about">{{$profile.about}}</div>{{/if}}*}}
+       
+                       </div>
+                       <div class="hover-card-actions  right-aligned">
+                               {{* here are the differnt actions like privat message, poke, delete and so on *}}
+                               {{* @todo we have two different photo menus one for contacts and one for items at the network stream. We currently use the contact photo menu, so the items options are missing We need to move them *}}
+                               <div class="hover-card-actions-social">
+                                       {{if $profile.actions.pm}}<a class="btn btn-labeled btn-primary btn-sm" onclick="addToModal('{{$profile.actions.pm.1}}')" title="{{$profile.actions.pm.0}}"><i class="fa fa-envelope" aria-hidden="true"></i></a>{{/if}}
+                                       {{if $profile.actions.poke}}<a class="btn btn-labeled btn-primary btn-sm" onclick="addToModal('{{$profile.actions.poke.1}}')" title="{{$profile.actions.poke.0}}"><i class="fa fa-heartbeat" aria-hidden="true"></i></a>{{/if}}
+                               </div>
+                               <div class="hover-card-actions-connection">
+                                       {{if $profile.actions.network}}<a class="btn btn-labeled btn-primary btn-sm" href="{{$profile.actions.network.1}}" title="{{$profile.actions.network.0}}"><i class="fa fa-cloud" aria-hidden="true"></i></a>{{/if}}
+                                       {{if $profile.actions.edit}}<a class="btn btn-labeled btn-primary btn-sm" href="{{$profile.actions.edit.1}}" title="{{$profile.actions.edit.0}}"><i class="fa fa-pencil" aria-hidden="true"></i></a>{{/if}}
+                                       {{if $profile.actions.follow}}<a class="btn btn-labeled btn-primary btn-sm" href="{{$profile.actions.follow.1}}" title="{{$profile.actions.follow.0}}"><i class="fa fa-user-plus" aria-hidden="true"></i></a>{{/if}}
+                               </div>
+                       </div>
+               </div>
+
+               <div class="clearfix"></div>
+
+       </div>
+</div>
+{{if $profile.tags}}<div class="hover-card-footer">{{$profile.tags}}</div>{{/if}}
index 69c55000b627dcc01c6f05205e612d524b1f7129..b6513e0fe8b6dad01d0b91af21e6055c523f54b0 100644 (file)
@@ -50,7 +50,7 @@
                                <span id="notify-update" class="nav-ajax-left"></span>
                                <ul id="nav-notifications-menu" class="menu-popup">
                                        <li id="nav-notifications-see-all"><a href="{{$nav.notifications.all.0}}">{{$nav.notifications.all.1}}</a></li>
-                                       <li id="nav-notifications-mark-all"><a href="#" onclick="notifyMarkAll(); return false;">{{$nav.notifications.mark.1}}</a></li>
+                                       <li id="nav-notifications-mark-all"><a href="#" onclick="notifyMarkAll(); return false;">{{$nav.notifications.mark.3}}</a></li>
                                        <li class="empty">{{$emptynotifications}}</li>
                                </ul>
                {{/if}}         
index 0a3a13f9dc633ece2959c9f64518bdd9acb22635..0f1cf070c4fcbb07999c8deaaa5cbe569ba6041a 100644 (file)
@@ -54,7 +54,7 @@
                                {{/if}}
                        {{/if}}
                        {{if $wallmessage}}
-                               <li><a id="wallmessage-link" href="wallmessage/{{$profile.nickname}}">{{$wallmessage}}</a></li>
+                               <li><a id="wallmessage-link" href="{{$wallmessage_link}}">{{$wallmessage}}</a></li>
                        {{/if}}
                        {{if $subscribe_feed}}
                                <li><a id="subscribe-feed-link" href="dfrn_poll/{{$profile.nickname}}">{{$subscribe_feed}}</a></li>
index 6f00f5c0604bc04318c67e9533b4f391347a74ca..1760c68f266aa950d4a8bf18895af61968ff4d12 100644 (file)
@@ -35,7 +35,7 @@
                                <span id="notify-update" class="nav-ajax-left"></span>
                                <ul id="nav-notifications-menu" class="menu-popup">
                                        <li id="nav-notifications-see-all"><a href="{{$nav.notifications.all.0}}">{{$nav.notifications.all.1}}</a></li>
-                                       <li id="nav-notifications-mark-all"><a href="#" onclick="notifyMarkAll(); return false;">{{$nav.notifications.mark.1}}</a></li>
+                                       <li id="nav-notifications-mark-all"><a href="#" onclick="notifyMarkAll(); return false;">{{$nav.notifications.mark.3}}</a></li>
                                        <li class="empty">{{$emptynotifications}}</li>
                                </ul>
                {{/if}} 
index 3ec6e0831e577b8c6bfa0c769e1f84d49fd9e28f..5e64880689aa09e309bade04e3f8db73ea9d1f51 100644 (file)
@@ -67,7 +67,7 @@
        {{*<!--<span id="notify-update" class="nav-ajax-left"></span>
        <ul id="nav-notifications-menu" class="notifications-menu-popup">
                <li id="nav-notifications-see-all"><a href="{{$nav.notifications.all.0}}">{{$nav.notifications.all.1}}</a></li>
-               <li id="nav-notifications-mark-all"><a href="#" onclick="notifyMarkAll(); return false;">{{$nav.notifications.mark.1}}</a></li>
+               <li id="nav-notifications-mark-all"><a href="#" onclick="notifyMarkAll(); return false;">{{$nav.notifications.mark.3}}</a></li>
                <li class="empty">{{$emptynotifications}}</li>
        </ul>-->*}}
        </div>
index 6e097c62bf07f8d978c091b86a2a0b87363c7499..0ce464dbf534d94c887c4af303498064e46fed3e 100644 (file)
@@ -41,7 +41,7 @@
                                <li><a id="dfrn-request-link" href="dfrn_request/{{$profile.nickname}}">{{$connect}}</a></li>
                        {{/if}}
                        {{if $wallmessage}}
-                               <li><a id="wallmessage-link" href="wallmessage/{{$profile.nickname}}">{{$wallmessage}}</a></li>
+                               <li><a id="wallmessage-link" href="{{$wallmessage_link}}">{{$wallmessage}}</a></li>
                        {{/if}}
                </ul>
        </div>
index 3f16a6e40c00527dbe1d3cafab8837e03185db60..8a8664d0a4537a9757a4069cbd8f802d72d3e3f1 100644 (file)
@@ -48,7 +48,7 @@
                        <span class="icon notify">{{$nav.notifications.1}}</span>
                                <span id="notify-update" class="nav-notify"></span></a>
                                <ul id="nav-notifications-menu" class="menu-popup">
-                                       <li id="nav-notifications-mark-all"><a href="#" onclick="notifyMarkAll(); return false;">{{$nav.notifications.mark.1}}</a></li>
+                                       <li id="nav-notifications-mark-all"><a href="#" onclick="notifyMarkAll(); return false;">{{$nav.notifications.mark.3}}</a></li>
                                        <li id="nav-notifications-see-all"><a href="{{$nav.notifications.all.0}}">{{$nav.notifications.all.1}}</a></li>
                                        <li class="empty">{{$emptynotifications}}</li>
                                </ul>
index d4c00297ba364eb2efd421343ae0a3371741fc9c..44690562bfb66120e7c18522bb8f311d92217b93 100644 (file)
@@ -25,7 +25,7 @@
             rel="#nav-notifications-menu" title="{{$nav.notifications.1}}">{{$nav.notifications.1}}</a></li>
         <ul id="nav-notifications-menu" class="menu-popup">
             <li id="nav-notifications-see-all"><a href="{{$nav.notifications.all.0}}">{{$nav.notifications.all.1}}</a></li>
-            <li id="nav-notifications-mark-all"><a href="#" onclick="notifyMarkAll(); return false;">{{$nav.notifications.mark.1}}</a></li>
+            <li id="nav-notifications-mark-all"><a href="#" onclick="notifyMarkAll(); return false;">{{$nav.notifications.mark.3}}</a></li>
             <li class="empty">{{$emptynotifications}}</li>
         </ul>
     {{/if}}
index 55e69b3155368fd0dc85f63e80111073bf2df1da..a47dca39023d2e29aa26686bd7067236b25d290c 100644 (file)
@@ -49,7 +49,7 @@
                                <span id="notify-update" class="nav-ajax-left"></span>
                                <ul id="nav-notifications-menu" class="menu-popup">
                                        <li id="nav-notifications-see-all"><a href="{{$nav.notifications.all.0}}">{{$nav.notifications.all.1}}</a></li>
-                                       <li id="nav-notifications-mark-all"><a href="#" onclick="notifyMarkAll(); return false;">{{$nav.notifications.mark.1}}</a></li>
+                                       <li id="nav-notifications-mark-all"><a href="#" onclick="notifyMarkAll(); return false;">{{$nav.notifications.mark.3}}</a></li>
                                        <li class="empty">{{$emptynotifications}}</li>
                                </ul>
                {{/if}}         
index bd2e92f9e45d0d713300b6f5a78cdb630f82e80d..1b084ba872fcea742dc2ec8a586a8ff121a36ef8 100644 (file)
@@ -47,7 +47,7 @@
                                {{/if}}
                        {{/if}}
                        {{if $wallmessage}}
-                               <li><a id="wallmessage-link" href="wallmessage/{{$profile.nickname}}">{{$wallmessage}}</a></li>
+                               <li><a id="wallmessage-link" href="{{$wallmessage_link}}">{{$wallmessage}}</a></li>
                        {{/if}}
                        {{if $subscribe_feed}}
                                <li><a id="subscribe-feed-link" href="dfrn_poll/{{$profile.nickname}}">{{$subscribe_feed}}</a></li>
index 3a54066ad15531c3027ffb8bd28907e7fc4243c5..5af2eecec4deb496dd6d92479cfeb4ea42b7ec6c 100644 (file)
@@ -50,7 +50,7 @@
                                <span id="notify-update" class="nav-ajax-left"></span>
                                <ul id="nav-notifications-menu" class="menu-popup">
                                        <li id="nav-notifications-see-all"><a href="{{$nav.notifications.all.0}}">{{$nav.notifications.all.1}}</a></li>
-                                       <li id="nav-notifications-mark-all"><a href="#" onclick="notifyMarkAll(); return false;">{{$nav.notifications.mark.1}}</a></li>
+                                       <li id="nav-notifications-mark-all"><a href="#" onclick="notifyMarkAll(); return false;">{{$nav.notifications.mark.3}}</a></li>
                                        <li class="empty">{{$emptynotifications}}</li>
                                </ul>
                {{/if}}         
index 47d8de9001dc0339fc15d5c8687efbb52892bdcd..3e60f03cb6afea7d83346a58895050cc90b817e0 100644 (file)
   display: flex;\r
 }\r
 .hover-card-actions-connection {\r
-  margin-left: 30px;\r
+  margin-left: 10px;\r
 }\r
 .hovercard .hovercard-content .hover-card-actions a.btn {\r
   display: inline-block;\r
index 35c490738a0603fba59d2c37c559a222e04f62ce..00d49b8a61705b8557629b7055c59939b96f90b4 100644 (file)
@@ -527,7 +527,8 @@ nav.navbar a {
 }
 /* The Top Nav Bar user menu */
 #topbar-first .account .user-title {
-    text-align: right
+    text-align: right;
+    margin-top: 7px;
 }
 #topbar-first .account .user-title span {
     color: $nav_icon_color;
@@ -928,6 +929,28 @@ aside .vcard #wallmessage-link {
     width: 100%;
 }
 
+aside #peoplefind-sidebar input,
+aside #follow-sidebar input {
+    height: 30px;
+    background-position: 10px 5px;
+}
+aside #peoplefind-sidebar .form-group-search .form-button-search,
+aside #follow-sidebar .form-group-search .form-button-search {
+    padding: 2px 8px;
+}
+
+aside #group-sidebar .group-edit-tool {
+    opacity: 0.1;
+    transition: all 0.25s ease-in-out;
+}
+aside #group-sidebar .sidebar-group-li:hover .group-edit-tool {
+    opacity: 0.8;
+    transition: all 0.25s ease-in-out;
+}
+aside #group-sidebar .sidebar-group-li .group-edit-tool:hover {
+    opacity: 1;
+}
+
 /* contact block widget */
 #contact-block .contact-block-content {
     clear: both;
@@ -1206,8 +1229,7 @@ section #jotOpen {
     font-weight: 500;
     color: #555;
 }
-.media .media-body .addional-info a,
-.media .media-body h5.media-heading a {
+.media .media-body .addional-info a, .media .media-body h5.media-heading > a {
     display: block;
 }
 .media .contact-info-comment {
@@ -1255,7 +1277,11 @@ section #jotOpen {
     max-height: 480px;
     object-fit: contain;
 }
-.shared-content-wrapper,
+.wall-item-body > img,
+.wall-item-body > a > img {
+    border-radius: 3px;
+}
+.shared-wrapper,
 .vevent {
     margin-left: 50px;
     margin-right: 50px;
@@ -1263,13 +1289,13 @@ section #jotOpen {
     box-shadow: 0 0 0 1.5px rgba(0, 0, 0, .1) inset, 0 1px 1px rgba(0, 0, 0, .05);
 }
 @media screen and (max-width: 767px) {
-    .shared-content-wrapper,
+    .shared-wrapper,
     .vevent {
        margin-left: 0px;
        margin-right: 0px;
     }
 }
-.shared-content-wrapper:hover,
+.shared-wrapper:hover,
 .vevent:hover {
     box-shadow: 0 0 0 1.5px rgba(0, 0, 0, .15) inset, 0 1px 1px rgba(0, 0, 0, .05);
 }
@@ -1328,7 +1354,7 @@ blockquote.shared_content {
 .wall-item-actions .button-votes,
 .wall-item-actions .button-likes {
     padding-left: 0px;
-    padding-right: 10px;
+    padding-right: 0px;
 }
 
 /* wall item hover effects */
@@ -1623,7 +1649,7 @@ ul.dropdown-menu li:hover {
 .allfriends-content-wrapper, .match-content-wrapper, .dirfind-content-wrapper,
 .directory-content-wrapper, .manage-content-wrapper, .notes-content-wrapper,
 .events-content-wrapper, .message-content-wrapper, .apps-content-wrapper, 
-.notifications-content-wrapper, .admin-content-wrapper {
+.notifications-content-wrapper, .admin-content-wrapper, .group-content-wrapper {
     min-height: calc(100vh - 150px);
     padding: 15px;
     padding-bottom: 20px;
@@ -1702,10 +1728,31 @@ ul.viewcontact_wrapper > li {
 .contact-entry-checkbox {
     margin-top: -20px;
 }
-.contact-wrapper .media-body .contact-entry-name h4.media-heading {
-    font-weight: bold;
-    color: #777;
-    font-size: 15px;
+.contact-wrapper .media-body .contact-entry-name h4.media-heading a {
+    font-weight: bold !important; 
+    color: $link_color;
+    font-size: 15px !important;
+}
+.contact-wrapper .contact-actions {
+    display: flex;
+}
+.contact-wrapper a.contact-action-link {
+    opacity: 0.1;
+    transition: all 0.25s ease-in-out;
+}
+.contact-wrapper a.contact-action-link,
+.contact-wrapper a.contact-action-link:hover,
+.textcomplete-item .contact-wrapper a.contact-action-link {
+    padding-right: 5px;
+    padding-left: 5px;
+    color: #555;
+}
+ul li:hover .contact-wrapper a.contact-action-link {
+    opacity: 0.8;
+    transition: all 0.25s ease-in-out;
+}
+ul li:hover .contact-wrapper a.contact-action-link:hover {
+    opacity: 1;
 }
 #contacts-search-wrapper,
 #directory-search-wrapper{
index a0def61eb537cd2fb4f40f436b8c19c892d4f206..6e2a827cd657a716e02ffde4f2b4b3e100ed615b 100644 (file)
@@ -11,7 +11,7 @@ $(document).ready(function(){
        // Elements with the class "userinfo" will get a hover-card.
        // Note that this elements does need a href attribute which links to
        // a valid profile url
-       $("body").on("mouseover", ".userinfo", function(e) {
+       $("body").on("mouseover", ".userinfo, .wall-item-responses a, .wall-item-bottom .mention a", function(e) {
                        var timeNow = new Date().getTime();
                        removeAllhoverCards(e,timeNow);
                        var hoverCardData = false;
@@ -40,7 +40,7 @@ $(document).ready(function(){
                        // Take link href attribute as link to the profile
                        var profileurl = hrefAttr;
                        // the url to get the contact and template data
-                       var url = baseurl + "/frio_hovercard";
+                       var url = baseurl + "/hovercard";
 
                        // store the title in an other data attribute beause bootstrap
                        // popover destroys the title.attribute. We can restore it later
@@ -86,7 +86,7 @@ $(document).ready(function(){
                                        }
                                }
                        }, 500);
-       }).on("mouseleave", ".userinfo", function(e) { // action when mouse leaves the hover-card
+       }).on("mouseleave", ".userinfo, .wall-item-responses a, .wall-item-bottom .mention a", function(e) { // action when mouse leaves the hover-card
                var timeNow = new Date().getTime();
                // copy the original title to the title atribute
                var title = $(this).attr("data-orig-title");
index e159b1fdef7aefbd0423d8d3bd96101203d65ea4..5138a4822d5ccc3fe4d3b76a1b9fbf9ec0a7bff0 100644 (file)
@@ -68,24 +68,8 @@ $(document).ready(function(){
                if( $("#jot-popup").is(":hidden")) $("#topbar-second > .container > #navbar-button #jotOpen").hide();
        }
 
-       // move shared content in it's own DIV (so we can style it better)
-       $('.wall-item-body .shared_content').each(function() {
-               // create a DIV after ".shared_content" where we will putt in the shared_header
-               // and the "shared_content"
-               $(this).after('<div class="shared-content-wrapper content-card"></div>');
-               // get the shared_header
-               var sheader = $(this).prev();
-               // get the shared-content-wrapper which we have created above
-               var swrapper = $(this).next();
-               // move the "shared_header into the new shared_content DIV
-               $(swrapper).append(sheader);
-               // move the "shared_content" into the new DIV
-               $(swrapper).append(this);
-       });
-
-
        // show bulk deletion button at network page if checkbox is checked
-       $('input.item-select').change(function(){
+       $("body").change("input.item-select", function(){
                var checked = false;
 
                // We need to get all checked items, so it would close the delete button
@@ -123,6 +107,7 @@ $(document).ready(function(){
                animation: true,
                html: true,
                placement: 'auto',
+               trigger: 'hover',
                delay: {
                        show: 500,
                        hide: 100
index bfffec0ce5a7c676cbf5f0e3d1bd55be0cb578d0..5e0e3ddef91de525451c13a9256e30c1af81a5e5 100644 (file)
                </div>
 
                <div class="media-body">
+                       {{* The contact actions like private mail, delete contact, edit contact and so on *}}
+                       <div class="contact-actions pull-right nav-pills preferences hidden-xs">
+                               {{if $contact.photo_menu.pm}}<a class="contact-action-link" onclick="addToModal('{{$contact.photo_menu.pm.1}}')" data-toggle="tooltip" title="{{$contact.photo_menu.pm.0}}"><i class="fa fa-envelope" aria-hidden="true"></i></a>{{/if}}
+                               {{if $contact.photo_menu.poke}}<a class="contact-action-link" onclick="addToModal('{{$contact.photo_menu.poke.1}}')" data-toggle="tooltip" title="{{$contact.photo_menu.poke.0}}"><i class="fa fa-heartbeat" aria-hidden="true"></i></a>{{/if}}
+                               {{if $contact.photo_menu.network}}<a class="contact-action-link" href="{{$contact.photo_menu.network.1}}" data-toggle="tooltip" title="{{$contact.photo_menu.network.0}}"><i class="fa fa-cloud" aria-hidden="true"></i></a>{{/if}}
+                               {{if $contact.photo_menu.edit}}<a class="contact-action-link" href="{{$contact.photo_menu.edit.1}}" data-toggle="tooltip" title="{{$contact.photo_menu.edit.0}}"><i class="fa fa-pencil" aria-hidden="true"></i></a>{{/if}}
+                               {{if $contact.photo_menu.drop}}<a class="contact-action-link" href="{{$contact.photo_menu.drop.1}}" data-toggle="tooltip" title="{{$contact.photo_menu.drop.0}}"><i class="fa fa-user-times" aria-hidden="true"></i></a>{{/if}}
+                               {{if $contact.photo_menu.follow}}<a class="contact-action-link" href="{{$contact.photo_menu.follow.1}}" data-toggle="tooltip" title="{{$contact.photo_menu.follow.0}}"><i class="fa fa-user-plus" aria-hidden="true"></i></a>{{/if}}
+                               {{if $contact.photo_menu.hide}}<a class="contact-action-link" href="{{$contact.photo_menu.hide.1}}" data-toggle="tooltip" title="{{$contact.photo_menu.hide.0}}"><i class="fa fa-times" aria-hidden="true"></i></a>{{/if}}
+                       </div>
+
                        {{* The contact description (e.g. Name, Network, kind of connection and so on *}}
                        <div class="contact-entry-desc">
                                <div class="contact-entry-name" id="contact-entry-name-{{$contact.id}}" >
-                                       <h4 class="media-heading">{{$contact.name}}
+                                       <h4 class="media-heading"><a href="{{$contact.url}}">{{$contact.name}}</a>
                                        {{if $contact.account_type}} <small class="contact-entry-details" id="contact-entry-accounttype-{{$contact.id}}">({{$contact.account_type}})</small>{{/if}}
                                        {{if $contact.account_type == 'Forum'}}<i class="fa fa-comments-o" aria-hidden="true"></i>{{/if}}
                                        {{* @todo this needs some changing in core because $contact.account_type contains a translated string which may notbe the same in every language *}}
@@ -124,11 +135,21 @@ We use this part to filter the contacts with jquery.textcomplete *}}
 
                        </div>
 
-                       <div class="media-body"> {{* @todo There is a bug with this class - the browser freezes if the screensize is to small - but only fith textcomplete*}}
+                       <div class="media-body">
+                               {{* The contact actions like private mail, delete contact, edit contact and so on *}}
+                               <div class="contact-actions pull-right nav-pills preferences hidden-xs">
+                                       {if $photo_menu.pm}<a class="contact-action-link" onclick="addToModal('{$photo_menu.pm.1}')" data-toggle="tooltip" title="{$photo_menu.pm.0}"><i class="fa fa-envelope" aria-hidden="true"></i></a>{/if}
+                                       {if $photo_menu.poke}<a class="contact-action-link" onclick="addToModal('{$photo_menu.poke.1}')" data-toggle="tooltip" title="{$photo_menu.poke.0}"><i class="fa fa-heartbeat" aria-hidden="true"></i></a>{/if}
+                                       {if $photo_menu.network}<a class="contact-action-link" href="{$photo_menu.network.1}" data-toggle="tooltip" title="{$photo_menu.network.0}"><i class="fa fa-cloud" aria-hidden="true"></i></a>{/if}
+                                       {if $photo_menu.edit}<a class="contact-action-link" href="{$photo_menu.edit.1}" data-toggle="tooltip" title="{$photo_menu.edit.0}"><i class="fa fa-pencil" aria-hidden="true"></i></a>{/if}
+                                       {if $photo_menu.drop}<a class="contact-action-link" href="{$photo_menu.drop.1}" data-toggle="tooltip" title="{$photo_menu.drop.0}"><i class="fa fa-user-times" aria-hidden="true"></i></a>{/if}
+                                       {if $photo_menu.follow}<a class="contact-action-link" href="{$photo_menu.follow.1}" data-toggle="tooltip" title="{$photo_menu.follow.0}"><i class="fa fa-user-plus" aria-hidden="true"></i></a>{/if}
+                               </div>
+
                                {{* The contact description (e.g. Name, Network, kind of connection and so on *}}
                                <div class="contact-entry-desc">
                                        <div class="contact-entry-name" id="contact-entry-name-{$id}" >
-                                               <h4 class="media-heading">{$name}
+                                               <h4 class="media-heading"><a href="{url}">{$name}</a>
                                                {if $account_type} <small class="contact-entry-details" id="contact-entry-accounttype-{$id}">({$account_type})</small>{/if}
                                                {if $account_type == 'Forum'}<i class="fa fa-comments-o" aria-hidden="true"></i>{/if}
                                                {{* @todo this needs some changing in core because $contact.account_type contains a translated string which may notbe the same in every language *}}
diff --git a/view/theme/frio/templates/fileas_widget.tpl b/view/theme/frio/templates/fileas_widget.tpl
new file mode 100644 (file)
index 0000000..a464584
--- /dev/null
@@ -0,0 +1,13 @@
+
+<div id="fileas-sidebar" class="widget">
+       <h3>{{$title}}</h3>
+       <div id="nets-desc">{{$desc}}</div>
+       
+       <ul class="fileas-ul">
+               <li class="tool{{if $sel_all}} selected{{/if}}"><a href="{{$base}}" class="fileas-link fileas-all{{if $sel_all}} fileas-selected{{/if}}">{{$all}}</a></li>
+               {{foreach $terms as $term}}
+                       <li class="tool{{if $term.selected}} selected{{/if}}"><a href="{{$base}}?f=&file={{$term.name}}" class="fileas-link{{if $term.selected}} fileas-selected{{/if}}">{{$term.name}}</a></li>
+               {{/foreach}}
+       </ul>
+       
+</div>
diff --git a/view/theme/frio/templates/follow.tpl b/view/theme/frio/templates/follow.tpl
new file mode 100644 (file)
index 0000000..a35bcb2
--- /dev/null
@@ -0,0 +1,14 @@
+
+<div id="follow-sidebar" class="widget">
+       <h3>{{$connect}}</h3>
+
+       <div id="connect-desc">{{$desc}}</div> {{* The description *}}
+       <form action="follow" method="get" >
+               {{* The input field - For visual consistence we are using a search input field*}}
+               <div class="form-group form-group-search">
+                       <input id="side-follow-url" class="search-input form-control form-search" type="text" name="url" value="{{$value|escape:'html'}}" placeholder="{{$hint|escape:'html'}}" data-toggle="tooltip" title="{{$hint|escape:'html'}}" />
+                       <button id="side-follow-submit" class="btn btn-default btn-sm form-button-search" type="submit" name="submit" value="{{$follow|escape:'html'}}">{{$follow}}</button>
+               </div>
+       </form>
+</div>
+
diff --git a/view/theme/frio/templates/group_side.tpl b/view/theme/frio/templates/group_side.tpl
new file mode 100644 (file)
index 0000000..682da5e
--- /dev/null
@@ -0,0 +1,49 @@
+<div class="widget" id="group-sidebar">
+       <h3>{{$title}}</h3>
+
+       <div id="sidebar-group-list">
+               {{* The list of available groups *}}
+               <ul role="menu" id="sidebar-group-ul">
+                       {{foreach $groups as $group}}
+                               <li role="menuitem" class="sidebar-group-li group-{{$group.id}} {{if $group.selected}}selected{{/if}}">
+                                       {{if ! $newgroup}}<span class="notify badge pull-right"></span>{{/if}}
+                                       {{if $group.cid}}
+                                               <div class="checkbox pull-right group-checkbox ">
+                                                       <input type="checkbox"
+                                                               class="{{if $group.selected}}ticked{{else}}unticked {{/if}} action"
+                                                               onclick="contactgroupChangeMember('{{$group.id}}','{{$group.cid}}');return true;"
+                                                               {{if $group.ismember}}checked="checked"{{/if}}
+                                                       />
+                                                       <label for="group-{{$group.id}}"></label>
+                                                       <div class="clearfix"></div>
+                                               </div>
+                                       {{/if}}
+                                       {{if $group.edit}}
+                                               {{* if the group is editable show a little pencil for editing *}}
+                                               <a id="edit-sidebar-group-element-{{$group.id}}" class="group-edit-tool pull-right" href="{{$group.edit.href}}" title="{{$edittext}}">
+                                                       <i class="faded-icon fa fa-pencil" aria-hidden="true"></i><span class="sr-only">{{$edittext}}</span>
+                                               </a>
+                                       {{/if}}
+                                       <a id="sidebar-group-element-{{$group.id}}" class="sidebar-group-element" href="{{$group.href}}">{{$group.text}}</a>
+                               </li>
+                       {{/foreach}}
+               </ul>
+       </div>
+
+       {{if $newgroup}}
+       <div id="sidebar-new-group">
+               {{* show the input field by clicking "new group" *}}
+               <a onclick="javascript:$('#group-new-form').fadeIn('fast');return false;">{{$createtext}}</a>
+               <form id="group-new-form" action="group/new" method="post" style="display:none;">
+                       <div class="form-group">
+                               <input type="hidden" name="form_security_token" value="{{$form_security_token}}">
+                               <input name="groupname" id="id_groupname" class="form-control input-sm" placeholder="{{$creategroup}}">
+                       </div>
+               </form>
+       </div>
+       {{else}}
+       <div id="sidebar-edit-groups"><a href="{{$grouppage}}">{{$editgroupstext}}</a></div>
+       {{/if}}
+
+       {{if $ungrouped}}<div id="sidebar-ungrouped"><a href="nogroup">{{$ungrouped}}</a></div>{{/if}}
+</div>
diff --git a/view/theme/frio/templates/mail_head.tpl b/view/theme/frio/templates/mail_head.tpl
new file mode 100644 (file)
index 0000000..d788845
--- /dev/null
@@ -0,0 +1,4 @@
+
+<h3 class="heading">{{$messages}}</h3>
+
+{{$tab_content}}
index 8eb13c1a42a2376aa117bf4c66e0d486c3a03a6a..b8d5b2307ee33ea0699dcf048ae827911eeafe4c 100644 (file)
@@ -84,7 +84,7 @@
                                                                        <div class="arrow"></div>
                                                                        {{$nav.notifications.1}}
                                                                        <div class="dropdown-header-link">
-                                                                               <a href="#" onclick="notifyMarkAll(); return false;" data-toggle="tooltip" title="{{$nav.notifications.mark.1}}" class="">Mark as read{{*** @todo Translation ***}}</a>
+                                                                               <a href="#" onclick="notifyMarkAll(); return false;" data-toggle="tooltip" title="{{$nav.notifications.mark.3}}" class="">{{$nav.notifications.mark.1}}</a>
                                                                        </div>
 
                                                                </li>
                                                        <form class="navbar-form" role="search" method="get" action="{{$nav.search.0}}">
                                                                <!-- <img class="hidden-xs" src="{{$nav.userinfo.icon}}" alt="{{$nav.userinfo.name}}" style="max-width:33px; max-height:33px; min-width:33px; min-height:33px; width:33px; height:33px;"> -->
                                                                <div class="form-group form-group-search">
-                                                                       <input id="nav-search-input-field" class="form-control form-search" type="text" name="search" placeholder="Search">
-                                                                       <button class="btn btn-default btn-sm form-button-search" type="submit">Search</button>
+                                                                       <input id="nav-search-input-field" class="form-control form-search" type="text" name="search" data-toggle="tooltip" title="{{$search_hint}}" placeholder="{{$nav.search.1}}">
+                                                                       <button class="btn btn-default btn-sm form-button-search" type="submit">{{$nav.search.1}}</button>
                                                                </div>
                                                        </form>
                                        </li>
                                                <ul id="nav-user-menu" class="dropdown-menu pull-right menu-popup" role="group" aria-labelledby="main-menu">
                                                        {{if $nav.remote}}{{if $nav.sitename}}
                                                        <li id="nav-sitename" role="menuitem">{{$nav.sitename}}</li>
-                                                       <li role="seperator" class="divider"></li>
+                                                       <li role="separator" class="divider"></li>
                                                        {{/if}}{{/if}}
                                                        {{foreach $nav.usermenu as $usermenu}}
                                                        <li role="menuitem"><a class="{{$usermenu.2}}" href="{{$usermenu.0}}" title="{{$usermenu.3}}">{{$usermenu.1}}</a></li>
                                                        {{/foreach}}
-                                                       <li role="seperator" class="divider"></li>
-                                                       <li role="menuitem"><a href="https://github.com/rabuzarus/frio" target="new" title="frio on GitHub"><i class="fa fa-github"></i> frio on GitHub</a></li>
-                                                       <li role="seperator" class="divider"></li>
+                                                       <li role="separator" class="divider"></li>
                                                        {{if $nav.notifications}}
                                                        <li role="menuitem"><a href="{{$nav.notifications.0}}" title="{{$nav.notifications.1}}"><i class="fa fa-exclamation-circle fa-fw"></i> {{$nav.notifications.1}}</a></li>
                                                        {{/if}}
                                                        {{if $nav.messages}}
                                                        <li role="menuitem"><a class="nav-commlink {{$nav.messages.2}} {{$sel.messages}}" href="{{$nav.messages.0}}" title="{{$nav.messages.3}}" ><i class="fa fa-envelope fa-fw"></i> {{$nav.messages.1}} <span id="mail-update-li" class="nav-mail-badge badge nav-notify"></span></a></li>
                                                        {{/if}}
-                                                       <li role="seperator" class="divider"></li>
+                                                       <li role="separator" class="divider"></li>
                                                        {{if $nav.contacts}}
                                                        <li role="menuitem"><a id="nav-contacts-link" class="nav-link {{$nav.contacts.2}}" href="{{$nav.contacts.0}}" title="{{$nav.contacts.3}}"><i class="fa fa-users fa-fw"></i> {{$nav.contacts.1}}</a><span id="intro-update-li" class="nav-intro-badge badge nav-notify"></span></li>
                                                        {{/if}}
                                                        <li role="menuitem"><a id="nav-manage-link" class="nav-commlink {{$nav.manage.2}} {{$sel.manage}}" href="{{$nav.manage.0}}" title="{{$nav.manage.3}}"><i class="fa fa-flag fa-fw"></i> {{$nav.manage.1}}</a></li>
                                                        {{/if}}
                                                        <li role="menuitem"><a id="nav-directory-link" class="nav-link {{$nav.directory.2}}" href="{{$nav.directory.0}}" title="{{$nav.directory.3}}"><i class="fa fa-sitemap fa-fw"></i>{{$nav.directory.1}}</a></li>
-                                                       <li role="seperator" class="divider"></li>
+                                                       <li role="separator" class="divider"></li>
                                                        {{if $nav.apps}}
                                                        <li role="menuitem"><a id="nav-apps-link" class="nav-link {{$nav.apps.2}} {{$sel.manage}}" href="{{$nav.apps.0}}" title="{{$nav.apps.3}}" ><i class="fa fa-puzzle-piece fa-fw"></i> {{$nav.apps.1}}</a>
-                                                       <li role="seperator" class="divider"></li>
+                                                       <li role="separator" class="divider"></li>
                                                        {{/if}}
                                                        {{if $nav.help}}
                                                        <li role="menuitem"><a id="nav-help-link" class="nav-link {{$nav.help.2}}" target="friendica-help" href="{{$nav.help.0}}" title="{{$nav.help.3}}" ><i class="fa fa-question-circle fa-fw"></i> {{$nav.help.3}}</a></li>
                                                        {{if $nav.admin}}
                                                        <li role="menuitem"><a id="nav-admin-link" class="nav-link {{$nav.admin.2}}" href="{{$nav.admin.0}}" title="{{$nav.admin.3}}" ><i class="fa fa-user-secret fa-fw"></i> {{$nav.admin.1}}</a></li>
                                                        {{/if}}
-                                                       <li role="seperator" class="divider"></li>
+                                                       <li role="separator" class="divider"></li>
                                                        {{if $nav.logout}}
                                                        <li role="menuitem"><a id="nav-logout-link" class="nav-link {{$nav.logout.2}}" href="{{$nav.logout.0}}" title="{{$nav.logout.3}}" ><i class="fa fa fa-sign-out fa-fw"></i> {{$nav.logout.1}}</a></li>
                                                        {{else}}
diff --git a/view/theme/frio/templates/nets.tpl b/view/theme/frio/templates/nets.tpl
new file mode 100644 (file)
index 0000000..da637e7
--- /dev/null
@@ -0,0 +1,11 @@
+
+<div id="nets-sidebar" class="widget">
+       <h3>{{$title}}</h3>
+       <div id="nets-desc">{{$desc}}</div>
+       <ul role="menu" class="nets-ul">
+               <li role="menuitem" {{if $sel_all}}class="selected"{{/if}}><a href="{{$base}}?nets=all" class="nets-link{{if $sel_all}} nets-selected{{/if}} nets-all">{{$all}}</a></li>
+               {{foreach $nets as $net}}
+               <li role="menuitem" {{if $net.selected}}class="selected"{{/if}}><a href="{{$base}}?nets={{$net.ref}}" class="nets-link{{if $net.selected}} nets-selected{{/if}}">{{$net.name}}</a></li>
+               {{/foreach}}
+       </ul>
+</div>
diff --git a/view/theme/frio/templates/peoplefind.tpl b/view/theme/frio/templates/peoplefind.tpl
new file mode 100644 (file)
index 0000000..6b31c92
--- /dev/null
@@ -0,0 +1,23 @@
+
+<div id="peoplefind-sidebar" class="widget">
+       <h3>{{$findpeople}}</h3>
+
+       <div id="peoplefind-desc">{{$desc}}</div> {{* The description *}}
+
+       <form action="dirfind" method="get" />
+               {{* The search field *}}
+               <div class="form-group form-group-search">
+                       <input id="side-peoplefind-url" class="search-input form-control form-search" type="text" name="search" data-toggle="tooltip" title="{{$hint|escape:'html'}}" />
+                       <button id="side-peoplefind-submit" class="btn btn-default btn-sm form-button-search" type="submit" name="submit" value="{{$findthem|escape:'html'}}">{{$findthem}}</button>
+               </div>
+       </form>
+
+       {{* Additional links *}}
+       <div class="side-link" id="side-match-link"><a href="match" >{{$similar}}</a></div>
+       <div class="side-link" id="side-suggest-link"><a href="suggest" >{{$suggest}}</a></div>
+
+       {{if $inv}} 
+       <div class="side-link" id="side-invite-link" ><a href="invite" >{{$inv}}</a></div>
+       {{/if}}
+</div>
+
index 50b03bad117bd8a33eae589d83025aa2b7ead3c2..e0babdc3a53de333f55a0d603bf5b1d1e98db0ac 100644 (file)
@@ -49,7 +49,7 @@
                                {{/if}}
                                {{if $wallmessage}}
                                <div id="wallmessage-link-botton">
-                                       <a id="wallmessage-link" class="btn btn-labeled btn-primary btn-sm" onclick="addToModal('wallmessage/{{$profile.nickname}}')">
+                                       <a id="wallmessage-link" class="btn btn-labeled btn-primary btn-sm" onclick="addToModal('{{$wallmessage_link}}')">
                                                <span class=""><i class="fa fa-envelope"></i></span>
                                                <span class="">{{$wallmessage}}</span>
                                        </a>
index 122a86ae860ddff8223c7a465207e1c8258348b7..9722a6e1d44e4aa5c5bc63298be91adf96a171e8 100644 (file)
 
                                        {{* Buttons for like and dislike *}}
                                        {{if $item.vote}}
-                                       <div class="vote-like pull-left">
+                                               {{if $item.vote.like}}
                                                <a role="button" href="#" class="button-likes" id="like-{{$item.id}}" title="{{$item.vote.like.0}}" onclick="dolike({{$item.id}},'like'); return false;">{{$item.vote.like.0}}</a>
+                                               {{/if}}
+
+                                               {{if $item.vote.like AND $item.vote.dislike}}
+                                               <span role="presentation" class="separator">&nbsp;•&nbsp;</span>
+                                               {{/if}}
 
                                                {{if $item.vote.dislike}}
-                                               <span role="presentation" class="seperator">&nbsp;•&nbsp;</span>
                                                <a role="button" href="#" class="button-likes" id="dislike-{{$item.id}}" title="{{$item.vote.dislike.0}}" onclick="dolike({{$item.id}},'dislike'); return false;">{{$item.vote.dislike.0}}</a>
                                                {{/if}}
 
-                                               {{if $item.comment}}<span role="presentation" class="seperator">&nbsp;•&nbsp;</span>{{/if}}
-                                       </div>
+                                               {{if ($item.vote.like OR $item.vote.dislike) AND $item.comment}}
+                                               <span role="presentation" class="separator">&nbsp;•&nbsp;</span>
+                                               {{/if}}
                                        {{/if}}
 
                                        {{* Butten to open the comment text field *}}
                                        {{if $item.comment}}
-                                       <div id="button-reply" class="pull-left">
-                                               <a role="button" class="" id="comment-{{$item.id}}" title="{{$item.switchcomment}}" onclick="openClose('item-comments-{{$item.id}}'); commentExpand({{$item.id}});">{{$item.switchcomment}} </a>
-                                       </div>
+                                       <a role="button" class="" id="comment-{{$item.id}}" title="{{$item.switchcomment}}" onclick="openClose('item-comments-{{$item.id}}'); commentExpand({{$item.id}});">{{$item.switchcomment}} </a>
                                        {{/if}}
 
                                        {{* Button for sharing the item *}}
                                        {{if $item.vote}}
+                                               {{if ($item.vote.like OR $item.vote.dislike OR $item.comment) AND $item.vote.share}}
+                                               <span role="presentation" class="separator">&nbsp;•&nbsp;</span>
+                                               {{/if}}
                                                {{if $item.vote.share}}
-                                               <span role="presentation" class="seperator">&nbsp;•&nbsp;</span>
                                                <a role="button" href="#" class="" id="share-{{$item.id}}" title="{{$item.vote.share.0}}" onclick="jotShare({{$item.id}}); return false;"><i class="fa fa-retweet"></i>&nbsp;{{$item.vote.share.0}}</a>
                                                {{/if}}
                                        {{/if}}
index f60ce345a812f28188819c67c35e3e85c3b278f3..b94155338d01c36dfa715b21891b5af1d6eeef4f 100644 (file)
@@ -24,7 +24,9 @@
 
 <script>
 // jquery color plugin from https://raw.github.com/gist/1891361/17747b50ad87f7a59a14b4e0f38d8f3fb6a18b27/gistfile1.js
-    (function(d){d.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(f,e){d.fx.step[e]=function(g){if(!g.colorInit){g.start=c(g.elem,e);g.end=b(g.end);g.colorInit=true}g.elem.style[e]="rgb("+[Math.max(Math.min(parseInt((g.pos*(g.end[0]-g.start[0]))+g.start[0]),255),0),Math.max(Math.min(parseInt((g.pos*(g.end[1]-g.start[1]))+g.start[1]),255),0),Math.max(Math.min(parseInt((g.pos*(g.end[2]-g.start[2]))+g.start[2]),255),0)].join(",")+")"}});function b(f){var e;if(f&&f.constructor==Array&&f.length==3){return f}if(e=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(f)){return[parseInt(e[1]),parseInt(e[2]),parseInt(e[3])]}if(e=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(f)){return[parseFloat(e[1])*2.55,parseFloat(e[2])*2.55,parseFloat(e[3])*2.55]}if(e=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(f)){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}if(e=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(f)){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}if(e=/rgba\(0, 0, 0, 0\)/.exec(f)){return a.transparent}return a[d.trim(f).toLowerCase()]}function c(g,e){var f;do{f=d.css(g,e);if(f!=""&&f!="transparent"||d.nodeName(g,"body")){break}e="backgroundColor"}while(g=g.parentNode);return b(f)}var a={transparent:[255,255,255]}})(jQuery);
+// next line was commented out because it causes a js bug in firefox
+// I leave it here so we can have a look into this later
+//    (function(d){d.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(f,e){d.fx.step[e]=function(g){if(!g.colorInit){g.start=c(g.elem,e);g.end=b(g.end);g.colorInit=true}g.elem.style[e]="rgb("+[Math.max(Math.min(parseInt((g.pos*(g.end[0]-g.start[0]))+g.start[0]),255),0),Math.max(Math.min(parseInt((g.pos*(g.end[1]-g.start[1]))+g.start[1]),255),0),Math.max(Math.min(parseInt((g.pos*(g.end[2]-g.start[2]))+g.start[2]),255),0)].join(",")+")"}});function b(f){var e;if(f&&f.constructor==Array&&f.length==3){return f}if(e=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(f)){return[parseInt(e[1]),parseInt(e[2]),parseInt(e[3])]}if(e=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(f)){return[parseFloat(e[1])*2.55,parseFloat(e[2])*2.55,parseFloat(e[3])*2.55]}if(e=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(f)){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}if(e=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(f)){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}if(e=/rgba\(0, 0, 0, 0\)/.exec(f)){return a.transparent}return a[d.trim(f).toLowerCase()]}function c(g,e){var f;do{f=d.css(g,e);if(f!=""&&f!="transparent"||d.nodeName(g,"body")){break}e="backgroundColor"}while(g=g.parentNode);return b(f)}var a={transparent:[255,255,255]}})(jQuery);
     var colWhite = {backgroundColor:'#EFF0F1'};
     var colShiny = {backgroundColor:'#FCE94F'};
 </script>
index 7ef178f838b375fe3466aac3e5ca851415c0c04e..b2e10a10a16ba01e514b326adedaffcd01cf9493 100644 (file)
@@ -284,31 +284,34 @@ as the value of $top_child_total (this is done at the end of this file)
 
                                {{* Buttons for like and dislike *}}
                                {{if $item.vote}}
-                               <div class="vote-like pull-left">
                                        {{if $item.vote.like}}
                                        <a role="button" class="button-likes" id="like-{{$item.id}}" title="{{$item.vote.like.1}}" onclick="dolike({{$item.id}},'like'); return false;"><i class="fa fa-thumbs-up"></i>&nbsp;{{$item.vote.like.1}}</a>
                                        {{/if}}
 
+                                       {{if $item.vote.like AND $item.vote.dislike}}
+                                       <span role="presentation" class="separator">&nbsp;•&nbsp;</span>
+                                       {{/if}}
+
                                        {{if $item.vote.dislike}}
-                                       <!-- <span role="presentation" class="seperator">&nbsp;•&nbsp;</span> -->
                                        <a role="button" class="button-likes" id="dislike-{{$item.id}}" title="{{$item.vote.dislike.1}}" onclick="dolike({{$item.id}},'dislike'); return false;"><i class="fa fa-thumbs-down"></i>&nbsp;{{$item.vote.dislike.1}}</a>
                                        {{/if}}
 
-                                       <!-- {{if $item.comment}}<span role="presentation" class="seperator">&nbsp;•&nbsp;</span>{{/if}} -->
-                               </div>
+                                       {{if ($item.vote.like OR $item.vote.dislike) AND $item.comment}}
+                                       <span role="presentation" class="separator">&nbsp;•&nbsp;</span>
+                                       {{/if}}
                                {{/if}}
 
                                {{* Butten to open the comment text field *}}
                                {{if $item.comment}}
-                               <div id="button-reply" class="pull-left">
-                                       <a role="button" class="button-comments" id="comment-{{$item.id}}" title="{{$item.switchcomment}}" {{if $item.thread_level != 1}}onclick="openClose('item-comments-{{$item.id}}'); commentExpand({{$item.id}});" {{else}} onclick="showHide('item-comments-{{$item.id}}'); commentExpand({{$item.id}});"{{/if}}><i class="fa fa-commenting"></i>&nbsp;{{$item.switchcomment}}</a>
-                               </div>
+                               <a role="button" class="button-comments" id="comment-{{$item.id}}" title="{{$item.switchcomment}}" {{if $item.thread_level != 1}}onclick="openClose('item-comments-{{$item.id}}'); commentExpand({{$item.id}});" {{else}} onclick="showHide('item-comments-{{$item.id}}'); commentExpand({{$item.id}});"{{/if}}><i class="fa fa-commenting"></i>&nbsp;{{$item.switchcomment}}</a>
                                {{/if}}
 
                                {{* Button for sharing the item *}}
                                {{if $item.vote}}
+                                       {{if ($item.vote.like OR $item.vote.dislike OR $item.comment) AND $item.vote.share}}
+                                       <span role="presentation" class="separator">&nbsp;•&nbsp;</span>
+                                       {{/if}}
                                        {{if $item.vote.share}}
-                                       <!-- <span role="presentation" class="seperator">&nbsp;•&nbsp;</span> -->
                                        <a role="button" class="button-votes" id="share-{{$item.id}}" title="{{$item.vote.share.0}}" onclick="jotShare({{$item.id}}); return false;"><i class="fa fa-retweet"></i>&nbsp;{{$item.vote.share.0}}</a>
                                        {{/if}}
                                {{/if}}
index e1c2295ad76a567cc83ee26a63d4a2a668c650d1..48cbfa0ee8df422243e3423e64bdf6e8d9be6e6d 100644 (file)
@@ -63,7 +63,7 @@
        <span id="notify-update" class="nav-ajax-left"></span>
        <ul id="nav-notifications-menu" class="notifications-menu-popup">
                <li id="nav-notifications-see-all"><a href="{{$nav.notifications.all.0}}">{{$nav.notifications.all.1}}</a></li>
-               <li id="nav-notifications-mark-all"><a href="#" onclick="notifyMarkAll(); return false;">{{$nav.notifications.mark.1}}</a></li>
+               <li id="nav-notifications-mark-all"><a href="#" onclick="notifyMarkAll(); return false;">{{$nav.notifications.mark.3}}</a></li>
                <li class="empty">{{$emptynotifications}}</li>
        </ul>
        </div>
index b3024074be1d2409fb6cf7312eae2f381f12e708..43c8f7e21ed7af86e4a1e37db8e618a553f6991e 100644 (file)
@@ -43,7 +43,7 @@
                                <li><a id="dfrn-request-link" href="dfrn_request/{{$profile.nickname}}">{{$connect}}</a></li>
                        {{/if}}
                        {{if $wallmessage}}
-                               <li><a id="wallmessage-link" href="wallmessage/{{$profile.nickname}}">{{$wallmessage}}</a></li>
+                               <li><a id="wallmessage-link" href="{{$wallmessage_link}}">{{$wallmessage}}</a></li>
                        {{/if}}
                </ul>
        </div>
index e6e4522c39aa01dcfc5a0ab98f325ff5cf166703..cc9110a27f0bce7ea174bdfe36aa9830c52de901 100644 (file)
@@ -63,7 +63,7 @@
        <span id="notify-update" class="nav-ajax-left" rel="#nav-network-notifications-popup"></span>
        <ul id="nav-notifications-menu" class="notifications-menu-popup">
                <li id="nav-notifications-see-all"><a href="{{$nav.notifications.all.0}}">{{$nav.notifications.all.1}}</a></li>
-               <li id="nav-notifications-mark-all"><a href="#" onclick="notifyMarkAll(); return false;">{{$nav.notifications.mark.1}}</a></li>
+               <li id="nav-notifications-mark-all"><a href="#" onclick="notifyMarkAll(); return false;">{{$nav.notifications.mark.3}}</a></li>
                <li class="empty">{{$emptynotifications}}</li>
        </ul>
        </div>
index 1a0c39a82690884a4ec707d6a90792f569142f84..26730f8253e830f9dadcbf8c9bfcc5d84a32e42f 100644 (file)
@@ -43,7 +43,7 @@
                                <li><a id="dfrn-request-link" href="dfrn_request/{{$profile.nickname}}">{{$connect}}</a></li>
                        {{/if}}
                        {{if $wallmessage}}
-                               <li><a id="wallmessage-link" href="wallmessage/{{$profile.nickname}}">{{$wallmessage}}</a></li>
+                               <li><a id="wallmessage-link" href="{{$wallmessage_link}}">{{$wallmessage}}</a></li>
                        {{/if}}
                        {{if $subscribe_feed}}
                                <li><a id="subscribe-feed-link" href="dfrn_poll/{{$profile.nickname}}">{{$subscribe_feed}}</a></li>
index deb0cdfa4620d533640737a699afabff346ab5b0..eb0cbbac65aca7fb568684d56288303d15307fa7 100644 (file)
@@ -64,7 +64,7 @@
                                <span id="notify-update" class="nav-notify"></span>
                                <ul id="nav-notifications-menu" class="menu-popup">
                                        <!-- TODO: better icons! -->
-                                       <li id="nav-notifications-mark-all" class="toolbar"><a href="#" onclick="notifyMarkAll(); return false;" title="{{$nav.notifications.mark.1}}"><span class="icon s10 edit"></span></a></a><a href="{{$nav.notifications.all.0}}" title="{{$nav.notifications.all.1}}"><span class="icon s10 plugin"></span></a></li>
+                                       <li id="nav-notifications-mark-all" class="toolbar"><a href="#" onclick="notifyMarkAll(); return false;" title="{{$nav.notifications.mark.3}}"><span class="icon s10 edit"></span></a></a><a href="{{$nav.notifications.all.0}}" title="{{$nav.notifications.all.1}}"><span class="icon s10 plugin"></span></a></li>
                                        <li class="empty">{{$emptynotifications}}</li>
                                </ul>
                        </li>           
index f4eae78d2b224af3045490983bd5773671b4712f..ca702380d2db60fb95bfffba2ed1b95bfc58f67f 100644 (file)
@@ -73,7 +73,7 @@
                                {{/if}}
                        {{/if}}
                        {{if $wallmessage}}
-                               <li><a id="wallmessage-link" href="wallmessage/{{$profile.nickname}}">{{$wallmessage}}</a></li>
+                               <li><a id="wallmessage-link" href="{{$wallmessage_link}}">{{$wallmessage}}</a></li>
                        {{/if}}
                        {{if $subscribe_feed}}
                                <li><a id="subscribe-feed-link" href="dfrn_poll/{{$profile.nickname}}">{{$subscribe_feed}}</a></li>
index f0fd11adc27787f0e2a7ee2dec3694a8b645f1f5..347f3403af31d8e72cc4436f7d180b65d37462fe 100644 (file)
@@ -11,7 +11,7 @@
                {{if $nav.notifications}}<a rel="#nav-notifications-menu" id="notify-update" class="nav-ajax-update" href="{{$nav.notifications.0}}"  title="{{$nav.notifications.1}}"></a>{{/if}}
 
                <ul id="nav-notifications-menu" class="menu-popup">
-                       <li id="nav-notifications-mark-all"><a href="#" onclick="notifyMarkAll(); return false;">{{$nav.notifications.mark.1}}</a></li>
+                       <li id="nav-notifications-mark-all"><a href="#" onclick="notifyMarkAll(); return false;">{{$nav.notifications.mark.3}}</a></li>
                        <li id="nav-notifications-see-all"><a href="{{$nav.notifications.all.0}}">{{$nav.notifications.all.1}}</a></li>
                        <li class="empty">{{$emptynotifications}}</li>
                </ul>
index 7de76682f694376260bfcf540a7079005fff7245..9531cef55ebe31e1005defa7201699ce275d2919 100644 (file)
@@ -13,7 +13,7 @@
                {{if $nav.notifications}}<a rel="#nav-notifications-menu" id="notify-update" class="nav-ajax-update" href="{{$nav.notifications.0}}"  title="{{$nav.notifications.1}}"></a>{{/if}}
 
                <ul id="nav-notifications-menu" class="menu-popup">
-                       <li id="nav-notifications-mark-all"><a href="#" onclick="notifyMarkAll(); return false;">{{$nav.notifications.mark.1}}</a></li>
+                       <li id="nav-notifications-mark-all"><a href="#" onclick="notifyMarkAll(); return false;">{{$nav.notifications.mark.3}}</a></li>
                        <li id="nav-notifications-see-all"><a href="{{$nav.notifications.all.0}}">{{$nav.notifications.all.1}}</a></li>
                        <li class="empty">{{$emptynotifications}}</li>
                </ul>
index a3b08947d0502382530f1277c185e727b2b88971..2d7c72f8c89db2596e8ea2db7a5533249652dada 100644 (file)
@@ -65,7 +65,7 @@
                                {{/if}}
                        {{/if}}
                        {{if $wallmessage}}
-                               <li><a id="wallmessage-link" href="wallmessage/{{$profile.nickname}}">{{$wallmessage}}</a></li>
+                               <li><a id="wallmessage-link" href="{{$wallmessage_link}}">{{$wallmessage}}</a></li>
                        {{/if}}
                        {{if $subscribe_feed}}
                                <li><a id="subscribe-feed-link" href="dfrn_poll/{{$profile.nickname}}">{{$subscribe_feed}}</a></li>