]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #2005 from tobiasd/20151101-dev
authorMichael Vogel <icarus@dabo.de>
Sat, 7 Nov 2015 15:01:46 +0000 (16:01 +0100)
committerMichael Vogel <icarus@dabo.de>
Sat, 7 Nov 2015 15:01:46 +0000 (16:01 +0100)
mark the development version

54 files changed:
Vagrantfile
boot.php
database.sql
doc/Plugins.md
doc/Settings.md
doc/Vagrant.md
include/Contact.php
include/Scrape.php
include/api.php
include/dbstructure.php
include/friendica_smarty.php
include/network.php
include/onepoll.php
include/socgraph.php
include/text.php
include/update_gcontact.php [new file with mode: 0644]
mod/admin.php
mod/allfriends.php
mod/common.php
mod/contacts.php
mod/directory.php
mod/dirfind.php
mod/follow.php
mod/install.php
mod/match.php
mod/nogroup.php
mod/suggest.php
mod/viewcontacts.php
update.php
util/htconfig.vagrant.php
util/vagrant_provision.sh
view/templates/admin_plugins.tpl
view/templates/admin_site.tpl
view/templates/auto_request.tpl
view/templates/common_friends.tpl [deleted file]
view/templates/contact_template.tpl
view/templates/dfrn_request.tpl
view/templates/field_checkbox.tpl
view/theme/frost-mobile/templates/contact_template.tpl
view/theme/frost/templates/contact_template.tpl
view/theme/quattro/dark/style.css
view/theme/quattro/green/style.css
view/theme/quattro/lilac/style.css
view/theme/quattro/quattro.less
view/theme/quattro/templates/contact_template.tpl
view/theme/vier/dark.css
view/theme/vier/flat.css
view/theme/vier/mobile.css [new file with mode: 0644]
view/theme/vier/netcolour.css
view/theme/vier/plus.css
view/theme/vier/style.css
view/theme/vier/templates/contact_template.tpl
view/theme/vier/theme.php
view/theme/vier/wide.css

index 48af4ae518dad0a8ae1f5d76ca8ee5c718d0cc7d..4f1181b8222fd1df6d448585a1af49e2c592e3e9 100644 (file)
@@ -1,16 +1,19 @@
 
-server_ip             = "192.168.22.10"
-server_memory         = "384" # MB
-server_timezone       = "UTC"
+server_ip = "192.168.22.10"
+server_memory = "384" # MB
+server_timezone = "UTC"
 
-public_folder         = "/vagrant" 
+public_folder = "/vagrant"
 
-Vagrant.configure("2") do |config|
+Vagrant.configure(2) do |config|
 
-  # Set server to Ubuntu 12.04
-  config.vm.box = "precise64"
+  # Set server to Ubuntu 14.04
+  config.vm.box = "ubuntu/trusty64"
 
-  config.vm.box_url = "http://files.vagrantup.com/precise64.box"
+  # Disable automatic box update checking. If you disable this, then
+  # boxes will only be checked for updates when the user runs
+  # `vagrant box outdated`. This is not recommended.
+  # config.vm.box_check_update = false
 
   # Create a hostname, don't forget to put it to the `hosts` file
   # This will point to the server's default virtual host
@@ -20,40 +23,21 @@ Vagrant.configure("2") do |config|
   # Create a static IP
   config.vm.network :private_network, ip: server_ip
 
-  # If using VirtualBox
-  config.vm.provider :virtualbox do |vb|
-
-    # Set server memory
-    vb.customize ["modifyvm", :id, "--memory", server_memory]
-
-    # Set the timesync threshold to 10 seconds, instead of the default 20 minutes.
-    # If the clock gets more than 15 minutes out of sync (due to your laptop going
-    # to sleep for instance, then some 3rd party services will reject requests.
-    vb.customize ["guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold", 10000]
-
-    # Prevent VMs running on Ubuntu to lose internet connection
-    vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
-    vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
-
+  # Share a folder between host and guest
+  config.vm.synced_folder "./", "/vagrant/", owner: "www-data", group: "vagrant"
+
+  # Provider-specific configuration so you can fine-tune various
+  # backing providers for Vagrant. These expose provider-specific options.
+  config.vm.provider "virtualbox" do |vb|
+  #   # Display the VirtualBox GUI when booting the machine
+  #   vb.gui = true
+  #
+  #   # Customize the amount of memory on the VM:
+      vb.memory = server_memory
   end
 
-  # If using VMWare Fusion
-  config.vm.provider "vmware_fusion" do |vb, override|
-    override.vm.box_url = "http://files.vagrantup.com/precise64_vmware.box"
-    
-    # Set server memory
-    vb.vmx["memsize"] = server_memory
-
-  end
-
-  
-  ####
-  # Local Scripts
-  # Any local scripts you may want to run post-provisioning.
-  # Add these to the same directory as the Vagrantfile.
-  ##########
-
-  config.vm.synced_folder "./", "/vagrant/", :owner=> 'www-data', :group=>'vagrant', :mount_options => ['dmode=775', 'fmode=775']
-  config.vm.provision "shell", path: "./util/vagrant_provision.sh" 
-
+  # Enable provisioning with a shell script. 
+  config.vm.provision "shell", path: "./util/vagrant_provision.sh"
+    # run: "always"
+    # run: "once"
 end
index 11da7cb4214477d61527180c196dc4b2b814f0b8..0c6683b0a1b517273475a8d0c014deb8076decd0 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -19,7 +19,7 @@ define ( 'FRIENDICA_PLATFORM',     'Friendica');
 define ( 'FRIENDICA_CODENAME',     'Lily of the valley');
 define ( 'FRIENDICA_VERSION',      '3.4.3-dev' );
 define ( 'DFRN_PROTOCOL_VERSION',  '2.23'    );
-define ( 'DB_UPDATE_VERSION',      1189      );
+define ( 'DB_UPDATE_VERSION',      1190      );
 define ( 'EOL',                    "<br />\r\n"     );
 define ( 'ATOM_TIME',              'Y-m-d\TH:i:s\Z' );
 
index a6eb71ef3bdb922b5967d0f4350d9a26004ed5a2..e3768c1efb67432fed9159ef1bfaee5a3b5176dc 100644 (file)
@@ -1,6 +1,6 @@
 -- ------------------------------------------
--- Friendica 3.4.1 (Lily of the valley)
--- DB_UPDATE_VERSION 1189
+-- Friendica 3.4.2 (Lily of the valley)
+-- DB_UPDATE_VERSION 1190
 -- ------------------------------------------
 
 
@@ -317,6 +317,7 @@ CREATE TABLE IF NOT EXISTS `gcontact` (
        `gender` varchar(32) NOT NULL DEFAULT '',
        `community` tinyint(1) NOT NULL DEFAULT 0,
        `network` varchar(255) NOT NULL DEFAULT '',
+       `addr` varchar(255) NOT NULL DEFAULT '',
        `generation` tinyint(3) NOT NULL DEFAULT 0,
        `server_url` varchar(255) NOT NULL DEFAULT '',
         INDEX `nurl` (`nurl`),
index dcd6e3b052e76ae3e78c858f0188bf40c4c69444..24d403e1f6f57514070fbc528a0bc81fd4bfc4e7 100644 (file)
@@ -3,7 +3,7 @@ Friendica Addon/Plugin development
 
 Please see the sample addon 'randplace' for a working example of using some of these features.
 Addons work by intercepting event hooks - which must be registered.
-Modules work by intercepting specific page requests (by URL path). 
+Modules work by intercepting specific page requests (by URL path).
 
 Plugin names cannot contain spaces or other punctuation and are used as filenames and function names.
 You may supply a "friendly" name within the comment block.
@@ -12,12 +12,12 @@ For instance "plugin1name_install()".
 These two functions take no arguments and are usually responsible for registering (and unregistering) event hooks that your plugin will require.
 The install and uninstall functions will also be called (i.e. re-installed) if the plugin changes after installation.
 Therefore your uninstall should not destroy data and install should consider that data may already exist.
-Future extensions may provide for "setup" amd "remove". 
+Future extensions may provide for "setup" amd "remove".
 
-Plugins should contain a comment block with the four following parameters: 
+Plugins should contain a comment block with the four following parameters:
 
        /*
-       * Name: My Great Plugin 
+       * Name: My Great Plugin
        * Description: This is what my plugin does. It's really cool
        * Version: 1.0
        * Author: John Q. Public <john@myfriendicasite.com>
@@ -52,7 +52,7 @@ It contains a wealth of information about the current state of Friendica:
 * which module has been called,
 * configuration information,
 * the page contents at the point the hook was invoked,
-* profile and user information, etc. 
+* profile and user information, etc.
 
 It is recommeded you call this '$a' to match its usage elsewhere.
 
@@ -77,7 +77,7 @@ This will include:
 
 Your module functions will often contain the function plugin_name_content(&$a), which defines and returns the page body content.
 They may also contain plugin_name_post(&$a) which is called before the _content function and typically handles the results of POST forms.
-You may also have plugin_name_init(&$a) which is called very early on and often does module initialisation. 
+You may also have plugin_name_init(&$a) which is called very early on and often does module initialisation.
 
 Templates
 ----------
@@ -89,11 +89,11 @@ Put your tpl files in the *templates/* subfolder of your plugin.
 
 In your code, like in the function plugin_name_content(), load the template file and execute it passing needed values:
 
-    # load template file. first argument is the template name, 
+    # load template file. first argument is the template name,
     # second is the plugin path relative to friendica top folder
     $tpl = get_markup_template('mytemplate.tpl', 'addon/plugin_name/');
 
-    # apply template. first argument is the loaded template, 
+    # apply template. first argument is the loaded template,
     # second an array of 'name'=>'values' to pass to template
     $output = replace_macros($tpl,array(
         'title' => 'My beautiful plugin',
@@ -271,6 +271,16 @@ $b is an array, params to mail()
 is called after the navigational menu is build in include/nav.php.
 $b is an array containing $nav from nav.php.
 
+###'template_vars'
+is called before vars are passed to the template engine to render the page.
+The registered function can add,change or remove variables passed to template.
+$b is an array with:
+
+    'template' => filename of template
+    'vars' => array of vars passed to template
+
+
+
 Complete list of hook callbacks
 ---
 
@@ -298,7 +308,7 @@ include/text.php:   call_hooks('contact_block_end', $arr);
 
 include/text.php:      call_hooks('smilie', $s);
 
-include/text.php:      call_hooks('prepare_body_init', $item); 
+include/text.php:      call_hooks('prepare_body_init', $item);
 
 include/text.php:      call_hooks('prepare_body', $prep_arr);
 
@@ -310,7 +320,7 @@ include/auth.php:           call_hooks('authenticate', $addon_auth);
 
 include/bbcode.php:    call_hooks('bbcode',$Text);
 
-include/oauth.php:             call_hooks('logged_in', $a->user);              
+include/oauth.php:             call_hooks('logged_in', $a->user);
 
 include/acl_selectors.php:     call_hooks($a->module . '_pre_' . $selname, $arr);
 
@@ -396,7 +406,7 @@ mod/photos.php:     call_hooks('photo_post_end',intval($item_id));
 
 mod/photos.php:                call_hooks('photo_upload_form',$ret);
 
-mod/friendica.php:     call_hooks('about_hook', $o);   
+mod/friendica.php:     call_hooks('about_hook', $o);
 
 mod/editpost.php:      call_hooks('jot_tool', $jotplugins);
 
index 60fff847a0f69cf370b1005f5d74188bc0e2121b..ae7d916078c8017a2d7243ebbf1ab097a88e335d 100644 (file)
@@ -198,7 +198,7 @@ Config:
 
 This configures the URL to update the global directory, and is supplied in the default configuration.
 The undocumented part is that if this is not set, the global directory is completely unavailable to the application.
-This allows a private community to be completely isolated from the global mistpark network. 
+This allows a private community to be completely isolated from the global network. 
 
        $a->config['system']['directory'] = 'http://dir.friendi.ca';
 
index 1d23ace13458470cc9c849ee8bd3ddcbcefeea4d..4bc9e6c54d985ba3f57a0dd6711eed42afb8e64c 100644 (file)
@@ -8,10 +8,12 @@ Getting started
 
 [Vagrant](https://www.vagrantup.com/) is a virtualization solution for developers.
 No need to setup up a webserver, database etc. before actually starting.
-Vagrant creates a virtual machine (an Ubuntu 12.04) for you that you can just run inside VirtualBox and start to work directly on Friendica.
+Vagrant creates a virtual machine (an Ubuntu 14.04) for you that you can just run inside VirtualBox and start to work directly on Friendica.
+
 What you need to do:
 
 1. Install VirtualBox and vagrant.
+Please use an up-to-date vagrant version from https://www.vagrantup.com/downloads.html.
 2. Git clone your Friendica repository.
 Inside, you'll find a "Vagrantfile" and some scripts in the utils folder.
 3. Run "vagrant up" from inside the friendica clone.
@@ -20,8 +22,10 @@ Be patient: When it runs for the first time, it downloads an Ubuntu Server image
 5. Open 192.168.22.10 in a browser.
 The mysql database is called "friendica", the mysql user and password both are "root".
 6. Work on Friendica's code in your git clone on your machine (not in the VM).
+Your local working directory is set up as a shared directory with the VM (/vagrant).
 7. Check the changes in your browser in the VM.
 Debug via the "vagrant ssh" login.
+Find the Friendica log file /vagrant/logfile.out.
 8. Commit and push your changes directly back to Github.
 
 If you want to stop vagrant after finishing your work, run the following command
@@ -40,3 +44,10 @@ You will then have the following accounts to login:
   * friendica2 and friendica3 are conntected. friendica4 and friendica5 are connected. 
 
 For further documentation of vagrant, please see [the vagrant*docs*](https://docs.vagrantup.com/v2/).
+
+**Important notice:**
+If you already had an Ubuntu 12.04 Vagrant VM, please run 
+
+       $> vagrant destroy
+
+before starting the new 14.04 machine.
index 3f74a19d5f44e66f22a9b9dfcdeaed6b6ebdf46f..eeb38a5d7a519f031b3e1b3ae939519da55f3632 100644 (file)
@@ -198,12 +198,17 @@ function get_contact_details_by_url($url, $uid = -1) {
        if ($uid == -1)
                $uid = local_user();
 
-       $r = q("SELECT `url`, `name`, `nick`, `photo`, `location`, `about`, `keywords`, `gender`, `community`, `network` FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1",
+       $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)
+       if ($r) {
                $profile = $r[0];
-       else {
+
+               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"]);
+
+       } else {
                $r = q("SELECT `url`, `name`, `nick`, `avatar` AS `photo`, `location`, `about` FROM `unique_contacts` WHERE `url` = '%s'",
                        dbesc(normalise_link($url)));
 
@@ -213,19 +218,20 @@ function get_contact_details_by_url($url, $uid = -1) {
                        $profile["gender"] = "";
                        $profile["community"] = false;
                        $profile["network"] = "";
+                       $profile["addr"] = "";
                }
        }
 
        // Fetching further contact data from the contact table
-       $r = q("SELECT `id`, `uid`, `url`, `network`, `name`, `nick`, `location`, `about`, `keywords`, `gender`, `photo`, `addr`, `forum`, `prv`, `bd` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d AND `network` = '%s'",
+       $r = q("SELECT `id`, `uid`, `url`, `network`, `name`, `nick`, `addr`, `location`, `about`, `keywords`, `gender`, `photo`, `addr`, `forum`, `prv`, `bd` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d AND `network` = '%s'",
                dbesc(normalise_link($url)), intval($uid), dbesc($profile["network"]));
 
        if (!count($r))
-               $r = q("SELECT `id`, `uid`, `url`, `network`, `name`, `nick`, `location`, `about`, `keywords`, `gender`, `photo`, `addr`, `forum`, `prv`, `bd` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d",
+               $r = q("SELECT `id`, `uid`, `url`, `network`, `name`, `nick`, `addr`, `location`, `about`, `keywords`, `gender`, `photo`, `addr`, `forum`, `prv`, `bd` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d",
                        dbesc(normalise_link($url)), intval($uid));
 
        if (!count($r))
-               $r = q("SELECT `id`, `uid`, `url`, `network`, `name`, `nick`, `location`, `about`, `keywords`, `gender`, `photo`, `addr`, `forum`, `prv`, `bd` FROM `contact` WHERE `nurl` = '%s' AND `uid` = 0",
+               $r = q("SELECT `id`, `uid`, `url`, `network`, `name`, `nick`, `addr`, `location`, `about`, `keywords`, `gender`, `photo`, `addr`, `forum`, `prv`, `bd` FROM `contact` WHERE `nurl` = '%s' AND `uid` = 0",
                        dbesc(normalise_link($url)));
 
        if ($r) {
@@ -235,6 +241,8 @@ function get_contact_details_by_url($url, $uid = -1) {
                        $profile["name"] = $r[0]["name"];
                if (isset($r[0]["nick"]) AND $r[0]["nick"] AND ($profile["nick"] == ""))
                        $profile["nick"] = $r[0]["nick"];
+               if (isset($r[0]["addr"]) AND $r[0]["addr"] AND ($profile["addr"] == ""))
+                       $profile["addr"] = $r[0]["addr"];
                if (isset($r[0]["photo"]) AND $r[0]["photo"])
                        $profile["photo"] = $r[0]["photo"];
                if (isset($r[0]["location"]) AND $r[0]["location"])
@@ -245,7 +253,7 @@ function get_contact_details_by_url($url, $uid = -1) {
                        $profile["keywords"] = $r[0]["keywords"];
                if (isset($r[0]["gender"]) AND $r[0]["gender"])
                        $profile["gender"] = $r[0]["gender"];
-               if (isset($r[0]["forum"]) AND isset($r[0]["prv"]))
+               if (isset($r[0]["forum"]) OR isset($r[0]["prv"]))
                        $profile["community"] = ($r[0]["forum"] OR $r[0]["prv"]);
                if (isset($r[0]["network"]) AND $r[0]["network"])
                        $profile["network"] = $r[0]["network"];
index 0169f55fd5d93db839d0dfa77250a8fc81fac0be..ae9331ff7af8fc389ea67aa2e24837e84f8d2e58 100644 (file)
@@ -320,7 +320,7 @@ function scrape_feed($url) {
  * PROBE_DIASPORA has a bias towards returning Diaspora information
  * while PROBE_NORMAL has a bias towards dfrn/zot - in the case where
  * an address (such as a Friendica address) supports more than one type
- * of network. 
+ * of network.
  *
  */
 
@@ -407,7 +407,7 @@ function probe_url($url, $mode = PROBE_NORMAL, $level = 1) {
                                                $pubkey = $diaspora_key;
                                        $diaspora = true;
                                }
-                               if($link['@attributes']['rel'] === 'http://ostatus.org/schema/1.0/subscribe') {
+                               if(($link['@attributes']['rel'] === 'http://ostatus.org/schema/1.0/subscribe') AND ($mode == PROBE_NORMAL)) {
                                        $diaspora = false;
                                }
                        }
@@ -779,6 +779,9 @@ function probe_url($url, $mode = PROBE_NORMAL, $level = 1) {
 
        $baseurl = rtrim($baseurl, "/");
 
+       if(strpos($url,'@') AND ($addr == "") AND ($network == NETWORK_DFRN))
+               $addr = str_replace('acct:', '', $url);
+
        $vcard['fn'] = notags($vcard['fn']);
        $vcard['nick'] = str_replace(' ','',notags($vcard['nick']));
 
index 2fd7d6d45a0999a32b7aa8130a152c61653f4247..35ebaef0341994589d4c51a5437ecd05ca9c71af 100644 (file)
                        $author = q("SELECT id FROM unique_contacts WHERE url='%s' LIMIT 1",
                                dbesc(normalise_link($item['author-link'])));
                } else if ($item["author-link"].$item["author-name"] != $author[0]["url"].$author[0]["name"]) {
-                       q("UPDATE unique_contacts SET name = '%s', avatar = '%s' WHERE url = '%s'",
-                       dbesc($item["author-name"]), dbesc($item["author-avatar"]), dbesc(normalise_link($item["author-link"])));
+                       q("UPDATE unique_contacts SET name = '%s', avatar = '%s' WHERE (`name` != '%s' OR `avatar` != '%s') AND url = '%s'",
+                       dbesc($item["author-name"]), dbesc($item["author-avatar"]),
+                       dbesc($item["author-name"]), dbesc($item["author-avatar"]),
+                       dbesc(normalise_link($item["author-link"])));
                }
 
                $owner = q("SELECT id FROM unique_contacts WHERE url='%s' LIMIT 1",
                        $owner = q("SELECT id FROM unique_contacts WHERE url='%s' LIMIT 1",
                                dbesc(normalise_link($item['owner-link'])));
                } else if ($item["owner-link"].$item["owner-name"] != $owner[0]["url"].$owner[0]["name"]) {
-                       q("UPDATE unique_contacts SET name = '%s', avatar = '%s' WHERE url = '%s'",
-                       dbesc($item["owner-name"]), dbesc($item["owner-avatar"]), dbesc(normalise_link($item["owner-link"])));
+                       q("UPDATE unique_contacts SET name = '%s', avatar = '%s' WHERE (`name` != '%s' OR `avatar` != '%s') AND url = '%s'",
+                       dbesc($item["owner-name"]), dbesc($item["owner-avatar"]),
+                       dbesc($item["owner-name"]), dbesc($item["owner-avatar"]),
+                       dbesc(normalise_link($item["owner-link"])));
                }
 
                // Comments in threads may appear as wall-to-wall postings.
 
                logger('api_status_show: user_info: '.print_r($user_info, true), LOGGER_DEBUG);
 
+               if ($type == "raw")
+                       $privacy_sql = "AND `item`.`allow_cid`='' AND `item`.`allow_gid`='' AND `item`.`deny_cid`='' AND `item`.`deny_gid`=''";
+               else
+                       $privacy_sql = "";
+
                // get last public wall message
                $lastwall = q("SELECT `item`.*, `i`.`contact-id` as `reply_uid`, `i`.`author-link` AS `item-author`
                                FROM `item`, `item` as `i`
                                WHERE `item`.`contact-id` = %d AND `item`.`uid` = %d
                                        AND ((`item`.`author-link` IN ('%s', '%s')) OR (`item`.`owner-link` IN ('%s', '%s')))
                                        AND `i`.`id` = `item`.`parent`
-                                       AND `item`.`type`!='activity'
-                                       AND `item`.`allow_cid`='' AND `item`.`allow_gid`='' AND `item`.`deny_cid`='' AND `item`.`deny_gid`=''
+                                       AND `item`.`type`!='activity' $privacy_sql
                                ORDER BY `item`.`created` DESC
                                LIMIT 1",
                                intval($user_info['cid']),
                                $in_reply_to_screen_name = NULL;
                        }
 
-                       $converted = api_convert_item($item);
+                       $converted = api_convert_item($lastwall);
 
                        $status_info = array(
                                'created_at' => api_date($lastwall['created']),
                        unset($status_info["user"]["self"]);
                }
 
+               logger('status_info: '.print_r($status_info, true), LOGGER_DEBUG);
+
                if ($type == "raw")
                        return($status_info);
 
                                }
                        }
 
-                       $converted = api_convert_item($item);
+                       $converted = api_convert_item($lastwall);
 
                        $user_info['status'] = array(
                                'text' => $converted["text"],
@@ -2877,8 +2887,8 @@ function api_get_nick($profile) {
        //}
 
        if ($nick != "") {
-               q("UPDATE unique_contacts SET nick = '%s' WHERE url = '%s'",
-                       dbesc($nick), dbesc(normalise_link($profile)));
+               q("UPDATE unique_contacts SET nick = '%s' WHERE `nick` != '%s' AND url = '%s'",
+                       dbesc($nick), dbesc($nick), dbesc(normalise_link($profile)));
                return($nick);
        }
 
index deb6ddf5330639acab34f8fe11f1eb6ebb0a4d4c..0dd74ab15f4cfb9eb0b33355ad87773a6f7862d2 100644 (file)
@@ -642,6 +642,7 @@ function db_definition() {
                                        "gender" => array("type" => "varchar(32)", "not null" => "1", "default" => ""),
                                        "community" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
                                        "network" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
+                                       "addr" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
                                        "generation" => array("type" => "tinyint(3)", "not null" => "1", "default" => "0"),
                                        "server_url" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
                                        ),
index b5169267545b9f53ca3dc300e5ad850e4c57bea9..99dc12bf8d9a27c96d6a2b79bed01e9939ad2aa0 100644 (file)
@@ -2,6 +2,7 @@
 
 require_once "object/TemplateEngine.php";
 require_once("library/Smarty/libs/Smarty.class.php");
+require_once "include/plugin.php";
 
 define('SMARTY3_TEMPLATE_FOLDER','templates');
 
@@ -39,19 +40,19 @@ class FriendicaSmarty extends Smarty {
                }
                return $this->fetch('file:' . $this->filename);
        }
-       
+
 
 }
 
 class FriendicaSmartyEngine implements ITemplateEngine {
        static $name ="smarty3";
-       
+
     public function __construct(){
                if(!is_writable('view/smarty3/')){
                        echo "<b>ERROR:</b> folder <tt>view/smarty3/</tt> must be writable by webserver."; killme();
                }
-       } 
-    
+       }
+
        // ITemplateEngine interface
        public function replace_macros($s, $r) {
                $template = '';
@@ -59,15 +60,24 @@ class FriendicaSmartyEngine implements ITemplateEngine {
                        $template = $s;
                        $s = new FriendicaSmarty();
                }
+
+               // "middleware": inject variables into templates
+               $arr = array(
+                       "template"=> basename($s->filename),
+                       "vars" => $r
+               );
+               call_hooks("template_vars", $arr);
+               $r = $arr['vars'];
+
                foreach($r as $key=>$value) {
                        if($key[0] === '$') {
                                $key = substr($key, 1);
                        }
                        $s->assign($key, $value);
                }
-               return $s->parsed($template);           
+               return $s->parsed($template);
        }
-       
+
        public function get_template_file($file, $root=''){
                $a = get_app();
                $template_file = get_template_file($a, SMARTY3_TEMPLATE_FOLDER.'/'.$file, $root);
index 2815e1ab851e7a4f094e966b13332cfe0f8241ad..d0217e2a084fb45019788a7f49f6c89d991bc11d 100644 (file)
@@ -86,10 +86,9 @@ function z_fetch_url($url,$binary = false, &$redirects = 0, $opts=array()) {
        if(x($opts,'nobody')){
                @curl_setopt($ch, CURLOPT_NOBODY, $opts['nobody']);
        }
-       if(intval($timeout)) {
-               @curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
-       }
-       else {
+       if(x($opts,'timeout')){
+               @curl_setopt($ch, CURLOPT_TIMEOUT, $opts['timeout']);
+       } else {
                $curl_time = intval(get_config('system','curl_timeout'));
                @curl_setopt($ch, CURLOPT_TIMEOUT, (($curl_time !== false) ? $curl_time : 60));
        }
index 0e58a776ca2d1c47a801561cfc18c9d71dea5135..6ff7eae422e35063b1746d334cccc836a8fbeb76 100644 (file)
@@ -18,10 +18,10 @@ function onepoll_run(&$argv, &$argc){
        }
 
        if(is_null($db)) {
-           @include(".htconfig.php");
-       require_once("include/dba.php");
-           $db = new dba($db_host, $db_user, $db_pass, $db_data);
-       unset($db_host, $db_user, $db_pass, $db_data);
+               @include(".htconfig.php");
+               require_once("include/dba.php");
+               $db = new dba($db_host, $db_user, $db_pass, $db_data);
+               unset($db_host, $db_user, $db_pass, $db_data);
        };
 
 
@@ -679,6 +679,6 @@ function onepoll_run(&$argv, &$argc){
 }
 
 if (array_search(__file__,get_included_files())===0){
-  onepoll_run($_SERVER["argv"],$_SERVER["argc"]);
-  killme();
+       onepoll_run($_SERVER["argv"],$_SERVER["argc"]);
+       killme();
 }
index 225acda4a2d17fe5c36aeafc2d7ca2d33697d60c..69d33089869dbc7b8acd574904d81b39fd1651e0 100644 (file)
@@ -225,15 +225,17 @@ function poco_check($profile_url, $name, $network, $profile_photo, $about, $loca
                $created = $x[0]["created"];
                $server_url = $x[0]["server_url"];
                $nick = $x[0]["nick"];
+               $addr = $x[0]["addr"];
        } else {
                $created = "0000-00-00 00:00:00";
                $server_url = "";
 
                $urlparts = parse_url($profile_url);
                $nick = end(explode("/", $urlparts["path"]));
+               $addr = "";
        }
 
-       if ((($network == "") OR ($name == "") OR ($profile_photo == "") OR ($server_url == "") OR $alternate)
+       if ((($network == "") OR ($name == "") OR ($addr == "") OR ($profile_photo == "") OR ($server_url == "") OR $alternate)
                AND poco_reachable($profile_url, $server_url, $network, false)) {
                $data = probe_url($profile_url);
 
@@ -242,6 +244,7 @@ function poco_check($profile_url, $name, $network, $profile_photo, $about, $loca
                $network = $data["network"];
                $name = $data["name"];
                $nick = $data["nick"];
+               $addr = $data["addr"];
                $profile_url = $data["url"];
                $profile_photo = $data["photo"];
                $server_url = $data["baseurl"];
@@ -294,14 +297,18 @@ function poco_check($profile_url, $name, $network, $profile_photo, $about, $loca
                if (($keywords == "") AND ($x[0]['keywords'] != ""))
                        $keywords = $x[0]['keywords'];
 
+               if (($addr == "") AND ($x[0]['addr'] != ""))
+                       $addr = $x[0]['addr'];
+
                if (($generation == 0) AND ($x[0]['generation'] > 0))
                        $generation = $x[0]['generation'];
 
                if($x[0]['name'] != $name || $x[0]['photo'] != $profile_photo || $x[0]['updated'] < $updated) {
-                       q("UPDATE `gcontact` SET `name` = '%s', `network` = '%s', `photo` = '%s', `connect` = '%s', `url` = '%s', `server_url` = '%s',
+                       q("UPDATE `gcontact` SET `name` = '%s', `addr` = '%s', `network` = '%s', `photo` = '%s', `connect` = '%s', `url` = '%s', `server_url` = '%s',
                                `updated` = '%s', `location` = '%s', `about` = '%s', `keywords` = '%s', `gender` = '%s', `generation` = %d
                                WHERE (`generation` >= %d OR `generation` = 0) AND `nurl` = '%s'",
                                dbesc($name),
+                               dbesc($addr),
                                dbesc($network),
                                dbesc($profile_photo),
                                dbesc($connect_url),
@@ -318,10 +325,11 @@ function poco_check($profile_url, $name, $network, $profile_photo, $about, $loca
                        );
                }
        } else {
-               q("INSERT INTO `gcontact` (`name`, `nick`, `network`, `url`, `nurl`, `photo`, `connect`, `server_url`, `created`, `updated`, `location`, `about`, `keywords`, `gender`, `generation`)
-                       VALUES ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d)",
+               q("INSERT INTO `gcontact` (`name`, `nick`, `addr`, `network`, `url`, `nurl`, `photo`, `connect`, `server_url`, `created`, `updated`, `location`, `about`, `keywords`, `gender`, `generation`)
+                       VALUES ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d)",
                        dbesc($name),
                        dbesc($nick),
+                       dbesc($addr),
                        dbesc($network),
                        dbesc($profile_url),
                        dbesc(normalise_link($profile_url)),
@@ -1039,15 +1047,16 @@ function count_common_friends($uid,$cid) {
 
        $r = q("SELECT count(*) as `total`
                FROM `glink` INNER JOIN `gcontact` on `glink`.`gcid` = `gcontact`.`id`
-               where `glink`.`cid` = %d and `glink`.`uid` = %d
-               and `gcontact`.`nurl` in (select nurl from contact where uid = %d and self = 0 and blocked = 0 and hidden = 0 and id != %d ) ",
+               WHERE `glink`.`cid` = %d AND `glink`.`uid` = %d AND
+               ((`gcontact`.`last_contact` >= `gcontact`.`last_failure`) OR (`gcontact`.`updated` >= `gcontact`.`last_failure`))
+               AND `gcontact`.`nurl` IN (select nurl from contact where uid = %d and self = 0 and blocked = 0 and hidden = 0 and id != %d ) ",
                intval($cid),
                intval($uid),
                intval($uid),
                intval($cid)
        );
 
-//     logger("count_common_friends: $uid $cid {$r[0]['total']}"); 
+//     logger("count_common_friends: $uid $cid {$r[0]['total']}");
        if(count($r))
                return $r[0]['total'];
        return 0;
@@ -1062,11 +1071,15 @@ function common_friends($uid,$cid,$start = 0,$limit=9999,$shuffle = false) {
        else
                $sql_extra = " order by `gcontact`.`name` asc ";
 
-       $r = q("SELECT `gcontact`.*
-               FROM `glink` INNER JOIN `gcontact` on `glink`.`gcid` = `gcontact`.`id`
-               where `glink`.`cid` = %d and `glink`.`uid` = %d
-               and `gcontact`.`nurl` in (select nurl from contact where uid = %d and self = 0 and blocked = 0 and hidden = 0 and id != %d ) 
-               $sql_extra limit %d, %d",
+       $r = q("SELECT `gcontact`.*, `contact`.`id` AS `cid`
+               FROM `glink`
+               INNER JOIN `gcontact` ON `glink`.`gcid` = `gcontact`.`id`
+               INNER JOIN `contact` ON `gcontact`.`nurl` = `contact`.`nurl`
+               WHERE `glink`.`cid` = %d and `glink`.`uid` = %d
+                       AND `contact`.`uid` = %d AND `contact`.`self` = 0 AND `contact`.`blocked` = 0
+                       AND `contact`.`hidden` = 0 AND `contact`.`id` != %d
+                       AND ((`gcontact`.`last_contact` >= `gcontact`.`last_failure`) OR (`gcontact`.`updated` >= `gcontact`.`last_failure`))
+                       $sql_extra LIMIT %d, %d",
                intval($cid),
                intval($uid),
                intval($uid),
@@ -1123,7 +1136,8 @@ function count_all_friends($uid,$cid) {
 
        $r = q("SELECT count(*) as `total`
                FROM `glink` INNER JOIN `gcontact` on `glink`.`gcid` = `gcontact`.`id`
-               where `glink`.`cid` = %d and `glink`.`uid` = %d ",
+               where `glink`.`cid` = %d and `glink`.`uid` = %d AND
+               ((`gcontact`.`last_contact` >= `gcontact`.`last_failure`) OR (`gcontact`.`updated` >= `gcontact`.`last_failure`))",
                intval($cid),
                intval($uid)
        );
@@ -1137,10 +1151,14 @@ function count_all_friends($uid,$cid) {
 
 function all_friends($uid,$cid,$start = 0, $limit = 80) {
 
-       $r = q("SELECT `gcontact`.*
-               FROM `glink` INNER JOIN `gcontact` on `glink`.`gcid` = `gcontact`.`id`
-               where `glink`.`cid` = %d and `glink`.`uid` = %d
-               order by `gcontact`.`name` asc LIMIT %d, %d ",
+       $r = q("SELECT `gcontact`.*, `contact`.`id` AS `cid`
+               FROM `glink`
+               INNER JOIN `gcontact` on `glink`.`gcid` = `gcontact`.`id`
+               LEFT JOIN `contact` ON `contact`.`nurl` = `gcontact`.`nurl` AND `contact`.`uid` = %d
+               WHERE `glink`.`cid` = %d AND `glink`.`uid` = %d AND
+               ((`gcontact`.`last_contact` >= `gcontact`.`last_failure`) OR (`gcontact`.`updated` >= `gcontact`.`last_failure`))
+               ORDER BY `gcontact`.`name` ASC LIMIT %d, %d ",
+               intval($uid),
                intval($cid),
                intval($uid),
                intval($start),
index 4ce634b603438bab43c76dfdb0c284c7e5f71861..f89a64a5706b3e96c73d00874180eab4fdca619f 100644 (file)
@@ -1502,7 +1502,7 @@ function prepare_body(&$item,$attach = false, $preview = false) {
                if($x) {
                        $s = preg_replace('/\<div class\=\"map\"\>/','$0' . $x,$s);
                }
-       }               
+       }
 
 
        // Look for spoiler
@@ -2314,14 +2314,14 @@ function deindent($text, $chr="[\t ]", $count=NULL) {
        return implode("\n", $lines);
 }
 
-function formatBytes($bytes, $precision = 2) { 
-        $units = array('B', 'KB', 'MB', 'GB', 'TB'); 
+function formatBytes($bytes, $precision = 2) {
+        $units = array('B', 'KB', 'MB', 'GB', 'TB');
 
-       $bytes = max($bytes, 0); 
-       $pow = floor(($bytes ? log($bytes) : 0) / log(1024)); 
-       $pow = min($pow, count($units) - 1); 
+       $bytes = max($bytes, 0);
+       $pow = floor(($bytes ? log($bytes) : 0) / log(1024));
+       $pow = min($pow, count($units) - 1);
 
        $bytes /= pow(1024, $pow);
 
-       return round($bytes, $precision) . ' ' . $units[$pow]; 
-} 
+       return round($bytes, $precision) . ' ' . $units[$pow];
+}
diff --git a/include/update_gcontact.php b/include/update_gcontact.php
new file mode 100644 (file)
index 0000000..b5ea30a
--- /dev/null
@@ -0,0 +1,113 @@
+<?php
+
+require_once("boot.php");
+
+function update_gcontact_run(&$argv, &$argc){
+       global $a, $db;
+
+       if(is_null($a)) {
+               $a = new App;
+       }
+
+       if(is_null($db)) {
+               @include(".htconfig.php");
+               require_once("include/dba.php");
+               $db = new dba($db_host, $db_user, $db_pass, $db_data);
+               unset($db_host, $db_user, $db_pass, $db_data);
+       };
+
+       require_once('include/pidfile.php');
+       require_once('include/Scrape.php');
+       require_once("include/socgraph.php");
+
+       load_config('config');
+       load_config('system');
+
+       $a->set_baseurl(get_config('system','url'));
+
+       load_hooks();
+
+       logger('update_gcontact: start');
+
+       if(($argc > 1) && (intval($argv[1])))
+               $contact_id = intval($argv[1]);
+
+       if(!$contact_id) {
+               logger('update_gcontact: no contact');
+               return;
+       }
+
+       $lockpath = get_lockpath();
+       if ($lockpath != '') {
+               $pidfile = new pidfile($lockpath, 'update_gcontact'.$contact_id);
+               if ($pidfile->is_already_running()) {
+                       logger("update_gcontact: Already running for contact ".$contact_id);
+                       if ($pidfile->running_time() > 9*60) {
+                               $pidfile->kill();
+                               logger("killed stale process");
+                       }
+                       exit;
+               }
+       }
+
+       $r = q("SELECT * FROM `gcontact` WHERE `id` = %d", intval($contact_id));
+
+       if (!$r)
+               return;
+
+       if (!in_array($r[0]["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS)))
+               return;
+
+       $data = probe_url($r[0]["url"]);
+
+       if (!in_array($data["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS))) {
+               if ($r[0]["server_url"] != "")
+                       poco_check_server($r[0]["server_url"], $r[0]["network"]);
+
+               q("UPDATE `gcontact` SET `last_failure` = '%s' WHERE `id` = %d",
+                       dbesc(datetime_convert()), intval($contact_id));
+               return;
+       }
+
+       if (($data["name"] == "") AND ($r[0]['name'] != ""))
+               $data["name"] = $r[0]['name'];
+
+       if (($data["nick"] == "") AND ($r[0]['nick'] != ""))
+               $data["nick"] = $r[0]['nick'];
+
+       if (($data["addr"] == "") AND ($r[0]['addr'] != ""))
+               $data["addr"] = $r[0]['addr'];
+
+       if (($data["photo"] == "") AND ($r[0]['photo'] != ""))
+               $data["photo"] = $r[0]['photo'];
+
+
+       q("UPDATE `gcontact` SET `name` = '%s', `nick` = '%s', `addr` = '%s', `photo` = '%s'
+                               WHERE `id` = %d",
+                               dbesc($data["name"]),
+                               dbesc($data["nick"]),
+                               dbesc($data["addr"]),
+                               dbesc($data["photo"]),
+                               intval($contact_id)
+                       );
+
+       q("UPDATE `contact` SET `name` = '%s', `nick` = '%s', `addr` = '%s', `photo` = '%s'
+                               WHERE `uid` = 0 AND `addr` = '' AND `nurl` = '%s'",
+                               dbesc($data["name"]),
+                               dbesc($data["nick"]),
+                               dbesc($data["addr"]),
+                               dbesc($data["photo"]),
+                               dbesc(normalise_link($data["url"]))
+                       );
+
+       q("UPDATE `contact` SET `addr` = '%s'
+                               WHERE `uid` != 0 AND `addr` = '' AND `nurl` = '%s'",
+                               dbesc($data["addr"]),
+                               dbesc(normalise_link($data["url"]))
+                       );
+}
+
+if (array_search(__file__,get_included_files())===0){
+       update_gcontact_run($_SERVER["argv"],$_SERVER["argc"]);
+       killme();
+}
index 878508a23fe7be1c8b5480bdaeb7e3a65e7c1338..f79e837b770c0ec003ec9e039d11a90b3179cb6d 100644 (file)
@@ -416,6 +416,11 @@ function admin_page_site_post(&$a){
        $rino                   =       ((x($_POST,'rino'))                             ? intval($_POST['rino'])                                : 0);
        $embedly                =       ((x($_POST,'embedly'))                  ? notags(trim($_POST['embedly']))               : '');
 
+       if ($a->get_path() != "")
+               $diaspora_enabled = false;
+
+       if (!$thread_allow)
+               $ostatus_disabled = true;
 
        if($ssl_policy != intval(get_config('system','ssl_policy'))) {
                if($ssl_policy == SSL_POLICY_FULL) {
@@ -535,6 +540,7 @@ function admin_page_site_post(&$a){
        set_config('system','ostatus_disabled', $ostatus_disabled);
        set_config('system','ostatus_poll_interval', $ostatus_poll_interval);
        set_config('system','diaspora_enabled', $diaspora_enabled);
+
        set_config('config','private_addons', $private_addons);
 
        set_config('system','force_ssl', $force_ssl);
@@ -551,10 +557,10 @@ function admin_page_site_post(&$a){
        set_config('system','old_pager', $old_pager);
        set_config('system','only_tag_search', $only_tag_search);
 
-       
+
        if ($rino==2 and !function_exists('mcrypt_create_iv')){
-               notice(t("RINO2 needs mcrypt php extension to work."));         
-       } else {        
+               notice(t("RINO2 needs mcrypt php extension to work."));
+       } else {
                set_config('system','rino_encrypt', $rino);
        }
 
@@ -681,6 +687,8 @@ function admin_page_site(&$a) {
        if ($a->config['hostname'] == "")
                $a->config['hostname'] = $a->get_hostname();
 
+       $diaspora_able = ($a->get_path() == "");
+
        $t = get_markup_template("admin_site.tpl");
        return replace_macros($t, array(
                '$title' => t('Administration'),
@@ -737,6 +745,9 @@ function admin_page_site(&$a) {
                '$max_author_posts_community_page' => array('max_author_posts_community_page', t("Posts per user on community page"), get_config('system','max_author_posts_community_page'), t("The maximum number of posts per user on the community page. (Not valid for 'Global Community')")),
                '$ostatus_disabled'     => array('ostatus_disabled', t("Enable OStatus support"), !get_config('system','ostatus_disabled'), t("Provide built-in OStatus \x28StatusNet, GNU Social etc.\x29 compatibility. All communications in OStatus are public, so privacy warnings will be occasionally displayed.")),
                '$ostatus_poll_interval'        => array('ostatus_poll_interval', t("OStatus conversation completion interval"), (string) intval(get_config('system','ostatus_poll_interval')), t("How often shall the poller check for new entries in OStatus conversations? This can be a very ressource task."), $ostatus_poll_choices),
+               '$ostatus_not_able'     => t("OStatus support can only be enabled if threading is enabled."),
+               '$diaspora_able'        => $diaspora_able,
+               '$diaspora_not_able'    => t("Diaspora support can't be enabled because Friendica was installed into a sub directory."),
                '$diaspora_enabled'     => array('diaspora_enabled', t("Enable Diaspora support"), get_config('system','diaspora_enabled'), t("Provide built-in Diaspora network compatibility.")),
                '$dfrn_only'            => array('dfrn_only', t('Only allow Friendica contacts'), get_config('system','dfrn_only'), t("All contacts must use Friendica protocols. All other built-in communication protocols disabled.")),
                '$verifyssl'            => array('verifyssl', t("Verify SSL"), get_config('system','verifyssl'), t("If you wish, you can turn on strict certificate checking. This will mean you cannot connect (at all) to self-signed SSL sites.")),
@@ -1206,7 +1217,7 @@ function admin_page_plugins(&$a){
         * List plugins
         */
 
-    if (x($_GET,"a") && $_GET['a']=="r"){
+       if (x($_GET,"a") && $_GET['a']=="r"){
                check_form_security_token_redirectOnErr($a->get_baseurl().'/admin/plugins', 'admin_themes', 't');
                reload_plugins();
                info("Plugins reloaded");
@@ -1241,6 +1252,7 @@ function admin_page_plugins(&$a){
                '$title' => t('Administration'),
                '$page' => t('Plugins'),
                '$submit' => t('Save Settings'),
+               '$reload' => t('Reload active plugins'),
                '$baseurl' => $a->get_baseurl(true),
                '$function' => 'plugins',
                '$plugins' => $plugins,
@@ -1427,6 +1439,22 @@ function admin_page_themes(&$a){
                ));
        }
 
+
+       // reload active themes
+       if (x($_GET,"a") && $_GET['a']=="r"){
+               check_form_security_token_redirectOnErr($a->get_baseurl().'/admin/themes', 'admin_themes', 't');
+               if ($themes) {
+                       foreach($themes as $th) {
+                               if ($th['allowed']) {
+                                       uninstall_theme($th['name']);
+                                       install_theme($th['name']);
+                               }
+                       }
+               }
+               info("Themes reloaded");
+               goaway($a->get_baseurl().'/admin/themes');
+       }
+
        /**
         * List themes
         */
@@ -1438,11 +1466,13 @@ function admin_page_themes(&$a){
                }
        }
 
+
        $t = get_markup_template("admin_plugins.tpl");
        return replace_macros($t, array(
                '$title' => t('Administration'),
                '$page' => t('Themes'),
                '$submit' => t('Save Settings'),
+               '$reload' => t('Reload active themes'),
                '$baseurl' => $a->get_baseurl(true),
                '$function' => 'themes',
                '$plugins' => $xthemes,
index 784dfb87711d6053386034d3482e2388dbc06e3e..1be9550b10be2f16944a1884edf68b19ec71faf9 100644 (file)
@@ -1,6 +1,8 @@
 <?php
 
 require_once('include/socgraph.php');
+require_once('include/Contact.php');
+require_once('include/contact_selectors.php');
 
 function allfriends_content(&$a) {
 
@@ -12,10 +14,13 @@ function allfriends_content(&$a) {
 
        if($a->argc > 1)
                $cid = intval($a->argv[1]);
+
        if(! $cid)
                return;
 
-       $c = q("select name, url, photo from contact where id = %d and uid = %d limit 1",
+       $uid = $a->user[uid];
+
+       $c = q("SELECT `name`, `url`, `photo` FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1",
                intval($cid),
                intval(local_user())
        );
@@ -33,10 +38,6 @@ function allfriends_content(&$a) {
        if(! count($c))
                return;
 
-       $o .= replace_macros(get_markup_template("section_title.tpl"),array(
-               '$title' => sprintf( t('Friends of %s'), htmlentities($c[0]['name']))
-       ));
-
 
        $r = all_friends(local_user(),$cid);
 
@@ -45,19 +46,53 @@ function allfriends_content(&$a) {
                return $o;
        }
 
-       $tpl = get_markup_template('common_friends.tpl');
+       $id = 0;
 
        foreach($r as $rr) {
 
-               $o .= replace_macros($tpl,array(
-                       '$url' => $rr['url'],
-                       '$name' => htmlentities($rr['name']),
-                       '$photo' => $rr['photo'],
-                       '$tags' => ''
-               ));
+               //get further details of the contact
+               $contact_details = get_contact_details_by_url($rr['url'], $uid);
+
+               $photo_menu = '';
+
+               // $rr[cid] is only available for common contacts. So if the contact is a common one, use contact_photo_menu to generate the photo_menu
+               // If the contact is not common to the user, Connect/Follow' will be added to the photo menu
+               if ($rr[cid]) {
+                       $rr[id] = $rr[cid];
+                       $photo_menu = contact_photo_menu ($rr);
+               }
+               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);
+               }
+
+               $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']),
+                       'details'       => $contact_details['location'],
+                       'tags'          => $contact_details['keywords'],
+                       'about'         => $contact_details['about'],
+                       'account_type'  => (($contact_details['community']) ? t('Forum') : ''),
+                       'network'       => network_to_name($contact_details['network'], $contact_details['url']),
+                       'photo_menu'    => $photo_menu,
+                       'conntxt'       => t('Connect'),
+                       'connlnk'       => $connlnk,
+                       'id'            => ++$id,
+               );
+               $entries[] = $entry;
        }
 
-       $o .= cleardiv();
+       $tpl = get_markup_template('viewcontact_template.tpl');
+
+       $o .= replace_macros($tpl,array(
+               '$title' => sprintf( t('Friends of %s'), htmlentities($c[0]['name'])),
+               '$contacts' => $entries,
+       ));
+
 //     $o .= paginate($a);
        return $o;
 }
index 1e65137ac693c74dcc125b1e9af213a70bcb2ac3..08609222972e68dfcd832647f2709d2fbe619967 100644 (file)
@@ -1,6 +1,8 @@
 <?php
 
 require_once('include/socgraph.php');
+require_once('include/Contact.php');
+require_once('include/contact_selectors.php');
 
 function common_content(&$a) {
 
@@ -11,19 +13,25 @@ function common_content(&$a) {
        $cid = intval($a->argv[3]);
        $zcid = 0;
 
+       if (! local_user()) {
+               notice( t('Permission denied.') . EOL);
+               return;
+       }
+
        if($cmd !== 'loc' && $cmd != 'rem')
                return;
+
        if(! $uid)
                return;
 
        if($cmd === 'loc' && $cid) {
-               $c = q("select name, url, photo from contact where id = %d and uid = %d limit 1",
+               $c = q("SELECT `name`, `url`, `photo` FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1",
                        intval($cid),
                        intval($uid)
                );
        }
        else {
-               $c = q("select name, url, photo from contact where self = 1 and uid = %d limit 1",
+               $c = q("SELECT `name`, `url`, `photo` FROM `contact` WHERE `self` = 1 AND `uid` = %d LIMIT 1",
                        intval($uid)
                );
        }
@@ -41,21 +49,16 @@ function common_content(&$a) {
        if(! count($c))
                return;
 
-       $o .= replace_macros(get_markup_template("section_title.tpl"),array(
-               '$title' => t('Common Friends')
-       ));
-
-
        if(! $cid) {
                if(get_my_url()) {
-                       $r = q("select id from contact where nurl = '%s' and uid = %d limit 1",
+                       $r = q("SELECT `id` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d LIMIT 1",
                                dbesc(normalise_link(get_my_url())),
                                intval($profile_uid)
                        );
                        if(count($r))
                                $cid = $r[0]['id'];
                        else {
-                               $r = q("select id from gcontact where nurl = '%s' limit 1",
+                               $r = q("SELECT `id` FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1",
                                        dbesc(normalise_link(get_my_url()))
                                );
                                if(count($r))
@@ -67,7 +70,7 @@ function common_content(&$a) {
 
 
        if($cid == 0 && $zcid == 0)
-               return; 
+               return;
 
 
        if($cid)
@@ -94,19 +97,43 @@ function common_content(&$a) {
                return $o;
        }
 
-       $tpl = get_markup_template('common_friends.tpl');
+       $id = 0;
 
        foreach($r as $rr) {
 
-               $o .= replace_macros($tpl,array(
-                       '$url' => $rr['url'],
-                       '$name' => htmlentities($rr['name']),
-                       '$photo' => $rr['photo'],
-                       '$tags' => ''
-               ));
+               //get further details of the contact
+               $contact_details = get_contact_details_by_url($rr['url'], $uid);
+
+               // $rr[id] is needed to use contact_photo_menu()
+               $rr[id] = $rr[cid];
+
+               $photo_menu = '';
+               $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']),
+                       'details'       => $contact_details['location'],
+                       'tags'          => $contact_details['keywords'],
+                       'about'         => $contact_details['about'],
+                       'account_type'  => (($contact_details['community']) ? t('Forum') : ''),
+                       'network'       => network_to_name($contact_details['network'], $contact_details['url']),
+                       'photo_menu'    => $photo_menu,
+                       'id'            => ++$id,
+               );
+               $entries[] = $entry;
        }
 
-       $o .= cleardiv();
+       $tpl = get_markup_template('viewcontact_template.tpl');
+
+       $o .= replace_macros($tpl,array(
+               '$title' => t('Common Friends'),
+               '$contacts' => $entries,
+       ));
+
 //     $o .= paginate($a);
        return $o;
 }
index 934472b39ff9c4172db531056b1d8ce551efdbef..017b1d6435fd8456953d3fadcc312312fdc0b6e7 100644 (file)
@@ -867,7 +867,7 @@ function _contact_detail_for_template($rr){
                'name' => htmlentities($rr['name']),
                'username' => htmlentities($rr['name']),
                'sparkle' => $sparkle,
-               'itemurl' => $rr['url'],
+               'itemurl' => (($rr['addr'] != "") ? $rr['addr'] : $rr['url']),
                'url' => $url,
                'network' => network_to_name($rr['network'], $rr['url']),
        );
index ef80b082a42bb989dc73365cc10a48478a1926ec..ad1d403f4d7d31ce9bf89dff014f48293265e702 100644 (file)
@@ -152,6 +152,8 @@ function directory_content(&$a) {
                        else {
                                $location_e = $location;
                        }
+                       
+                       $photo_menu = array(array(t("View Profile"), zrl($profile_link)));
 
                        $entry = array(
                                'id' => $rr['id'],
@@ -168,6 +170,7 @@ function directory_content(&$a) {
                                'marital'  => $marital,
                                'homepage' => $homepage,
                                'about' => $about,
+                               'photo_menu' => $photo_menu,
 
                        );
 
index c2b18e3e24143d036d21545c3e3b9664d7f1b7cb..3df27e5fb7840da113614a6cabf8715f24f6e271 100644 (file)
@@ -52,14 +52,24 @@ function dirfind_content(&$a, $prefix = "") {
                        $perpage = 80;
                        $startrec = (($a->pager['page']) * $perpage) - $perpage;
 
+                       if (get_config('system','diaspora_enabled'))
+                               $diaspora = NETWORK_DIASPORA;
+                       else
+                               $diaspora = NETWORK_DFRN;
+
+                       if (!get_config('system','ostatus_disabled'))
+                               $ostatus = NETWORK_OSTATUS;
+                       else
+                               $ostatus = NETWORK_DFRN;
+
                        $count = q("SELECT count(*) AS `total` FROM `gcontact` WHERE `network` IN ('%s', '%s', '%s') AND
                                        (`url` REGEXP '%s' OR `name` REGEXP '%s' OR `location` REGEXP '%s' OR
                                                `about` REGEXP '%s' OR `keywords` REGEXP '%s')".$extra_sql,
-                                       dbesc(NETWORK_DFRN), dbesc(NETWORK_OSTATUS), dbesc(NETWORK_DIASPORA),
+                                       dbesc(NETWORK_DFRN), dbesc($ostatus), dbesc($diaspora),
                                        dbesc(escape_tags($search)), dbesc(escape_tags($search)), dbesc(escape_tags($search)),
                                        dbesc(escape_tags($search)), dbesc(escape_tags($search)));
 
-                       $results = q("SELECT `contact`.`id` AS `cid`, `gcontact`.`url`, `gcontact`.`name`, `gcontact`.`photo`, `gcontact`.`network` , `gcontact`.`keywords`
+                       $results = q("SELECT `contact`.`id` AS `cid`, `gcontact`.`url`, `gcontact`.`name`, `gcontact`.`photo`, `gcontact`.`network`, `gcontact`.`keywords`, `gcontact`.`addr`
                                        FROM `gcontact`
                                        LEFT JOIN `contact` ON `contact`.`nurl` = `gcontact`.`nurl`
                                                AND `contact`.`uid` = %d AND NOT `contact`.`blocked`
@@ -71,7 +81,7 @@ function dirfind_content(&$a, $prefix = "") {
                                                GROUP BY `gcontact`.`nurl`
                                                ORDER BY `gcontact`.`updated` DESC LIMIT %d, %d",
                                        intval(local_user()), dbesc(CONTACT_IS_SHARING), dbesc(CONTACT_IS_FRIEND),
-                                       dbesc(NETWORK_DFRN), dbesc(NETWORK_OSTATUS), dbesc(NETWORK_DIASPORA),
+                                       dbesc(NETWORK_DFRN), dbesc($ostatus), dbesc($diaspora),
                                        dbesc(escape_tags($search)), dbesc(escape_tags($search)), dbesc(escape_tags($search)),
                                        dbesc(escape_tags($search)), dbesc(escape_tags($search)),
                                        intval($startrec), intval($perpage));
@@ -91,6 +101,7 @@ function dirfind_content(&$a, $prefix = "") {
                                $objresult = new stdClass();
                                $objresult->cid = $result["cid"];
                                $objresult->name = $result["name"];
+                               $objresult->addr = $result["addr"];
                                $objresult->url = $result["url"];
                                $objresult->photo = $result["photo"];
                                $objresult->tags = $result["keywords"];
@@ -124,7 +135,9 @@ function dirfind_content(&$a, $prefix = "") {
 
                                $alt_text = "";
 
-                               $itemurl = $jj->url;
+                               $contact_details = get_contact_details_by_url($jj->url, local_user());
+
+                               $itemurl = (($contact_details["addr"] != "") ? $contact_details["addr"] : $jj->url);
 
                                // If We already know this contact then don't show the "connect" button
                                if ($jj->cid > 0) {
@@ -157,6 +170,9 @@ function dirfind_content(&$a, $prefix = "") {
                                        'conntxt' => $conntxt,
                                        'connlnk' => $connlnk,
                                        'photo_menu' => $photo_menu,
+                                       'details'       => $contact_details['location'],
+                                       'tags'          => $contact_details['keywords'],
+                                       'about'         => $contact_details['about'],
                                        'network' => network_to_name($jj->network, $jj->url),
                                        'id' => ++$id,
                                );
index 54c20e5093ac4924f7891b4dd37a54785c14cc3f..cc08831285e74fb69ed6aef54deafce7c5f67543 100644 (file)
@@ -15,6 +15,8 @@ function follow_content(&$a) {
        $uid = local_user();
        $url = notags(trim($_REQUEST['url']));
 
+       $submit = t('Submit Request');
+
        // There is a current issue. It seems as if you can't start following a Friendica that is following you
        // With Diaspora this works - but Friendica is special, it seems ...
        $r = q("SELECT `url` FROM `contact` WHERE `uid` = %d AND ((`rel` != %d) OR (`network` = '%s')) AND
@@ -25,15 +27,31 @@ function follow_content(&$a) {
 
        if ($r) {
                notice(t('You already added this contact.').EOL);
-               goaway($_SESSION['return_url']);
+               $submit = "";
+               //goaway($_SESSION['return_url']);
                // NOTREACHED
        }
 
        $ret = probe_url($url);
 
+       if (($ret["network"] == NETWORK_DIASPORA) AND !get_config('system','diaspora_enabled')) {
+               notice( t("Diaspora support isn't enabled. Contact can't be added.") . EOL);
+               $submit = "";
+               //goaway($_SESSION['return_url']);
+               // NOTREACHED
+       }
+
+       if (($ret["network"] == NETWORK_OSTATUS) AND get_config('system','ostatus_disabled')) {
+               notice( t("OStatus support is disabled. Contact can't be added.") . EOL);
+               $submit = "";
+               //goaway($_SESSION['return_url']);
+               // NOTREACHED
+       }
+
        if ($ret["network"] == NETWORK_PHANTOM) {
                notice( t("The network type couldn't be detected. Contact can't be added.") . EOL);
-               goaway($_SESSION['return_url']);
+               $submit = "";
+               //goaway($_SESSION['return_url']);
                // NOTREACHED
        }
 
@@ -94,7 +112,7 @@ function follow_content(&$a) {
                        '$your_address' => t('Your Identity Address:'),
                        '$invite_desc' => "",
                        '$emailnet' => "",
-                       '$submit' => t('Submit Request'),
+                       '$submit' => $submit,
                        '$cancel' => t('Cancel'),
                        '$nickname' => "",
                        '$name' => $ret["name"],
index 182495d258cb7c74b53c517c6eee2e31b65fc47b..e30c30689308ae4e9c41c39154b24376c621e481 100755 (executable)
@@ -1,4 +1,5 @@
 <?php
+require_once "include/Photo.php";
 
 $install_wizard_pass=1;
 
@@ -84,15 +85,15 @@ function install_post(&$a) {
                                '$phpath' => $phpath,
                                '$adminmail' => $adminmail
                        ));
-                       
+
 
                        $result = file_put_contents('.htconfig.php', $txt);
                        if(! $result) {
                                $a->data['txt'] = $txt;
                        }
-                       
+
                        $errors = load_database($db);
-                       
+
 
                        if($errors)
                                $a->data['db_failed'] = $errors;
@@ -177,6 +178,8 @@ function install_content(&$a) {
 
                        check_funcs($checks);
 
+                       check_imagik($checks);
+
                        check_htconfig($checks);
 
                        check_smarty3($checks);
@@ -321,7 +324,7 @@ function check_php(&$phpath, &$checks) {
        $help = "";
        if(!$passed) {
                $help .= t('Could not find a command line version of PHP in the web server PATH.'). EOL;
-               $help .= t("If you don't have a command line version of PHP installed on server, you will not be able to run background polling via cron. See <a href='http://friendica.com/node/27'>'Activating scheduled tasks'</a>") . EOL ;
+               $help .= t("If you don't have a command line version of PHP installed on server, you will not be able to run background polling via cron. See <a href='https://github.com/friendica/friendica/blob/master/doc/Install.md#set-up-the-poller'>'Setup the poller'</a>") . EOL ;
                $help .= EOL . EOL ;
                $tpl = get_markup_template('field_input.tpl');
                $help .= replace_macros($tpl, array(
@@ -428,10 +431,21 @@ function check_funcs(&$checks) {
                $ck_funcs[5]['help']= t('Error: mcrypt PHP module required but not installed.');
        }
 
-       
-       
        $checks = array_merge($checks, $ck_funcs);
 
+       // check for 'mcrypt_create_iv()', needed for RINO2
+       if ($ck_funcs[5]['status']) {
+               if (function_exists('mcrypt_create_iv')) {
+                       $__status = true;
+                       $__help = "If you are using php_cli, please make sure that mcrypt module is enabled in its config file";
+               } else {
+                       $__status = false;
+                       $__help = t('Function mcrypt_create_iv() is not defined. This is needed to enable RINO2 encryption layer.');
+               }
+               check_add($checks, t('mcrypt_create_iv() function'), $__status, false, $__help);
+       }
+
+
        /*if((x($_SESSION,'sysmsg')) && is_array($_SESSION['sysmsg']) && count($_SESSION['sysmsg']))
                notice( t('Please see the file "INSTALL.txt".') . EOL);*/
 }
@@ -490,6 +504,24 @@ function check_htaccess(&$checks) {
        }
 }
 
+function check_imagik(&$checks) {
+       $imagick = false;
+       $gif = false;
+
+       if (class_exists('Imagick')) {
+               $imagick = true;
+               $supported = Photo::supportedTypes();
+               if (array_key_exists('image/gif', $supported)) {
+                       $gif = true;
+               }
+       }
+       check_add($checks, t('ImageMagick PHP extension is installed'), $imagick, false, "");
+       if ($imagick) {
+               check_add($checks, t('ImageMagick supports GIF'), $gif, false, "");
+       }
+}
+
+
 
 function manual_config(&$a) {
        $data = htmlentities($a->data['txt'],ENT_COMPAT,'UTF-8');
index bbf1a6c6342fe42bf9e99b8df877146d382b292f..db1cac0f7876d8b7106c87b8559c9d0f5e492974 100644 (file)
@@ -70,10 +70,15 @@ function match_content(&$a) {
                                        $photo_menu = array(array(t("View Profile"), zrl($jj->url)));
                                        $photo_menu[] = array(t("Connect/Follow"), $connlnk);
 
+                                       $contact_details = get_contact_details_by_url($jj->url, local_user());
+
                                        $entry = array(
                                                'url' => zrl($jj->url),
-                                               'itemurl' => $jj->url,
+                                               'itemurl' => (($contact_details['addr'] != "") ? $contact_details['addr'] : $jj->url),
                                                'name' => $jj->name,
+                                               'details'       => $contact_details['location'],
+                                               'tags'          => $contact_details['keywords'],
+                                               'about'         => $contact_details['about'],
                                                'thumb' => proxy_url($jj->photo, false, PROXY_SIZE_THUMB),
                                                'inttxt' => ' ' . t('is interested in:'),
                                                'conntxt' => t('Connect'),
index adbcfcb5154d37cbcadd23e1e1c48ede9a0b022b..06fa730e0d1a581ef7f3c1a8df8d678da6a2e029 100644 (file)
@@ -35,6 +35,7 @@ function nogroup_content(&$a) {
        if(count($r)) {
                foreach($r as $rr) {
 
+                       $contact_details = get_contact_details_by_url($rr['url'], local_user());
 
                        $contacts[] = array(
                                'img_hover' => sprintf( t('Visit %s\'s profile [%s]'),$rr['name'],$rr['url']),
@@ -46,8 +47,11 @@ function nogroup_content(&$a) {
                                'thumb' => $rr['thumb'],
                                'name' => $rr['name'],
                                'username' => $rr['name'],
+                               'details'       => $contact_details['location'],
+                               'tags'          => $contact_details['keywords'],
+                               'about'         => $contact_details['about'],
                                'sparkle' => $sparkle,
-                               'itemurl' => $rr['url'],
+                               'itemurl' => (($contact_details['addr'] != "") ? $contact_details['addr'] : $rr['url']),
                                'url' => $url,
                                'network' => network_to_name($rr['network'], $url),
                        );
index 8870c65df8708152eab3681879ad441c8bec2245..578338b5058055ff85d57dbb22d7c6abff4aab9f 100644 (file)
@@ -78,16 +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($jj->url)));
+               $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());
 
                $entry = array(
                        'url' => zrl($rr['url']),
-                       'itemurl' => $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),
+                       'details'       => $contact_details['location'],
+                        'tags'          => $contact_details['keywords'],
+                        'about'         => $contact_details['about'],
                        'ignlnk' => $ignlnk,
                        'ignid' => $rr['id'],
                        'conntxt' => t('Connect'),
index 927a597524adaa7b17565aea86e629e75b4a1128..f199574c69483945f63f4e632c155aa49ba500d2 100644 (file)
@@ -1,4 +1,5 @@
 <?php
+require_once('include/Contact.php');
 require_once('include/contact_selectors.php');
 
 function viewcontacts_init(&$a) {
@@ -12,7 +13,6 @@ function viewcontacts_init(&$a) {
 
 
 function viewcontacts_content(&$a) {
-
        require_once("mod/proxy.php");
 
        if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
@@ -59,15 +59,20 @@ function viewcontacts_content(&$a) {
                else
                        $url = zrl($url);
 
+               $contact_details = get_contact_details_by_url($rr['url'], $a->profile['uid']);
+
                $contacts[] = array(
                        'id' => $rr['id'],
                        'img_hover' => sprintf( t('Visit %s\'s profile [%s]'), $rr['name'], $rr['url']),
                        'thumb' => proxy_url($rr['thumb'], false, PROXY_SIZE_THUMB),
                        'name' => htmlentities(substr($rr['name'],0,20)),
                        'username' => htmlentities($rr['name']),
+                       'details'       => $contact_details['location'],
+                        'tags'          => $contact_details['keywords'],
+                        'about'         => $contact_details['about'],
                        'url' => $url,
                        'sparkle' => '',
-                       'itemurl' => $rr['url'],
+                       'itemurl' => (($contact_details['addr'] != "") ? $contact_details['addr'] : $rr['url']),
                        'network' => network_to_name($rr['network'], $rr['url']),
                );
        }
index 7c32f5819c35ba7aa905a23f1640932fc0a8d268..33b4560c09a4981f3ea17e174f7ce2bd2fd8dde6 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-define( 'UPDATE_VERSION' , 1189 );
+define( 'UPDATE_VERSION' , 1190 );
 
 /**
  *
index 4665e68c0a0bc17a16590da7ca406992b548a241..71e9d673fbb34cdffc9ac1106a74cffadf126566 100644 (file)
@@ -70,3 +70,9 @@ $a->config['system']['no_regfullname'] = true;
 
 // Location of the global directory
 $a->config['system']['directory'] = 'http://dir.friendi.ca';
+
+// turn on friendica's log
+$a->config['system']['debugging'] = true;
+$a->config['system']['logfile'] = 'logfile.out';
+$a->config['system']['loglevel'] = LOGGER_DEBUG;
+
index ac24659662496b1fffbda3c6360bce52fe04e2cd..3dbe80404ccb777327c608fba11da9c900ceecf6 100644 (file)
@@ -21,18 +21,13 @@ organizationalUnitName=
 emailAddress=
 "
 sudo mkdir -p "$SSL_DIR"
-sudo openssl genrsa -out "$SSL_DIR/xip.io.key" 1024
+sudo openssl genrsa -out "$SSL_DIR/xip.io.key" 4096
 sudo openssl req -new -subj "$(echo -n "$SUBJ" | tr "\n" "/")" -key "$SSL_DIR/xip.io.key" -out "$SSL_DIR/xip.io.csr" -passin pass:$PASSPHRASE
 sudo openssl x509 -req -days 365 -in "$SSL_DIR/xip.io.csr" -signkey "$SSL_DIR/xip.io.key" -out "$SSL_DIR/xip.io.crt"
 
 
 #Install apache2
 echo ">>> Installing Apache2 webserver"
-# The package python-software-properties provides add-apt-repository on Ubuntu Precise Server
-sudo apt-get install python-software-properties
-sudo add-apt-repository -y ppa:ondrej/apache2
-sudo apt-key update
-sudo apt-get update
 sudo apt-get install -y apache2
 sudo a2enmod rewrite actions ssl
 sudo cp /vagrant/util/vagrant_vhost.sh /usr/local/bin/vhost
index 6577ab8eb0c6413aaa919eb9d8cf912c072c8b3c..6caa04a3a42dfc2228b2980294aac56459daec1c 100644 (file)
@@ -1,7 +1,7 @@
 
 <div id='adminpage'>
        <h1>{{$title}} - {{$page}}</h1>
-               <a class="btn" href="{{$baseurl}}/admin/{{$function}}?a=r&amp;t={{$form_security_token}}">{{"Reload active plugins"|t}}</a>
+               <a class="btn" href="{{$baseurl}}/admin/{{$function}}?a=r&amp;t={{$form_security_token}}">{{$reload}}</a>
                <ul id='pluginslist'>
                {{foreach $plugins as $p}}
                        <li class='plugin {{$p.1}}'>
index b60c4f0558fb14e7453dffcbe407a90d150ba47a..13270e2ebae29607246f055f354cc939876b2e83 100644 (file)
        {{include file="field_checkbox.tpl" field=$force_publish}}
        {{include file="field_select.tpl" field=$community_page_style}}
        {{include file="field_input.tpl" field=$max_author_posts_community_page}}
-       {{include file="field_checkbox.tpl" field=$ostatus_disabled}}
-       {{include file="field_select.tpl" field=$ostatus_poll_interval}}
-       {{include file="field_checkbox.tpl" field=$diaspora_enabled}}
+
+       {{if $thread_allow.2}}
+               {{include file="field_checkbox.tpl" field=$ostatus_disabled}}
+               {{include file="field_select.tpl" field=$ostatus_poll_interval}}
+       {{else}}
+               <div class='field checkbox' id='div_id_{{$ostatus_disabled.0}}'>
+                       <label for='id_{{$ostatus_disabled.0}}'>{{$ostatus_disabled.1}}</label>
+                       <span id='id_{{$ostatus_disabled.0}}'>{{$ostatus_not_able}}</span>
+               </div>
+       {{/if}}
+
+       {{if $diaspora_able}}
+               {{include file="field_checkbox.tpl" field=$diaspora_enabled}}
+       {{else}}
+               <div class='field checkbox' id='div_id_{{$diaspora_enabled.0}}'>
+                       <label for='id_{{$diaspora_enabled.0}}'>{{$diaspora_enabled.1}}</label>
+                       <span id='id_{{$diaspora_enabled.0}}'>{{$diaspora_not_able}}</span>
+               </div>
+       {{/if}}
        {{include file="field_checkbox.tpl" field=$dfrn_only}}
        {{include file="field_input.tpl" field=$global_directory}}
        {{include file="field_checkbox.tpl" field=$thread_allow}}
index f938d6371927494150f9a65994c87d180b51d0b0..d6abde0306627874e9a75151c711b2dda87d517c 100644 (file)
@@ -53,7 +53,9 @@
 </div>
 
        <div id="dfrn-request-submit-wrapper">
-               <input type="submit" name="submit" id="dfrn-request-submit-button" value="{{$submit|escape:'html'}}" />
+               {{if $submit}}
+                       <input type="submit" name="submit" id="dfrn-request-submit-button" value="{{$submit|escape:'html'}}" />
+               {{/if}}
                <input type="submit" name="cancel" id="dfrn-request-cancel-button" value="{{$cancel|escape:'html'}}" />
        </div>
 </form>
diff --git a/view/templates/common_friends.tpl b/view/templates/common_friends.tpl
deleted file mode 100644 (file)
index 6502dd6..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-
-<div class="profile-match-wrapper">
-       <div class="profile-match-photo">
-               <a href="{{$url}}">
-                       <img src="{{$photo}}" alt="{{$name}}" width="80" height="80" title="{{$name}} [{{$url}}]" />
-               </a>
-       </div>
-       <div class="profile-match-break"></div>
-       <div class="profile-match-name">
-               <a href="{{$url}}" title="{{$name}}[{{$tags}}]">{{$name}}</a>
-       </div>
-       <div class="profile-match-end"></div>
-</div>
\ No newline at end of file
index 75f49653b0893cc1e055b8a33c66c2e09e2e405a..06918533ca0ee4bcfcbbb33b194142b6d7683cc0 100644 (file)
        </div>
 
        <div class="contact-entry-desc">
-               <div class="contact-entry-name" id="contact-entry-name-{{$contact.id}}" >{{$contact.name}}</div>
+               <div class="contact-entry-name" id="contact-entry-name-{{$contact.id}}" >
+                       {{$contact.name}}
+                       {{if $contact.account_type}} <span class="contact-entry-details" id="contact-entry-accounttype-{{$contact.id}}">({{$contact.account_type}})</span>{{/if}}
+               </div>
                {{if $contact.alt_text}}<div class="contact-entry-details" id="contact-entry-rel-{{$contact.id}}" >{{$contact.alt_text}}</div>{{/if}}
                {{if $contact.itemurl}}<div class="contact-entry-details" id="contact-entry-url-{{$contact.id}}" >{{$contact.itemurl}}</div>{{/if}}
-               {{if $contact.network}}<div class="contact-entry-details" id="contact-entry-network-{{$contact.id}}" >{{$contact.network}}</div>{{/if}}
+               {{if $contact.tags}}<div class="contact-entry-details" id="contact-entry-tags-{{$contact.id}}" >{{$contact.tags}}</div>{{/if}}
                {{if $contact.details}}<div class="contact-entry-details" id="contact-entry-details-{{$contact.id}}" >{{$contact.details}}</div>{{/if}}
+               {{if $contact.network}}<div class="contact-entry-details" id="contact-entry-network-{{$contact.id}}" >{{$contact.network}}</div>{{/if}}
+               
        </div>
 
        <div class="contact-entry-end" ></div>
index 178586a7b7a3ae2597393c6d994fc5f0b536e848..3b96d3eefd6afb536a1e9095e9489b271dafa658 100644 (file)
@@ -83,7 +83,9 @@
 </div>
 
        <div id="dfrn-request-submit-wrapper">
-               <input type="submit" name="submit" id="dfrn-request-submit-button" value="{{$submit|escape:'html'}}" />
+               {{if $submit}}
+                       <input type="submit" name="submit" id="dfrn-request-submit-button" value="{{$submit|escape:'html'}}" />
+               {{/if}}
                <input type="submit" name="cancel" id="dfrn-request-cancel-button" value="{{$cancel|escape:'html'}}" />
        </div>
 </form>
index f90b012f1c471cf3d756c87761bc33dc9724863a..e476c07d722978696c5d7efafc5f1872abdfd5b8 100644 (file)
@@ -1,5 +1,3 @@
-
-       
        <div class='field checkbox' id='div_id_{{$field.0}}'>
                <label for='id_{{$field.0}}'>{{$field.1}}</label>
                <input type="checkbox" name='{{$field.0}}' id='id_{{$field.0}}' value="1" {{if $field.2}}checked="checked"{{/if}}>
index 198b24746f6173d91dce3921803112444ea082d9..3395c9dadfecde45c9838f2d098e81479741c608 100644 (file)
 
                        {{if $contact.photo_menu}}
 {{*<!--                        <span onclick="openClose('contact-photo-menu-{{$contact.id}}');" class="fakelink contact-photo-menu-button" id="contact-photo-menu-button-{{$contact.id}}">menu</span>-->*}}
-                <div class="contact-photo-menu" id="contact-photo-menu-{{$contact.id}}">
-                    <ul>
-                                               {{foreach $contact.photo_menu as $c}}
-                                               {{if $c.2}}
-                                               <li><a target="redir" href="{{$c.1}}">{{$c.0}}</a></li>
-                                               {{else}}
-                                               <li><a href="{{$c.1}}">{{$c.0}}</a></li>
-                                               {{/if}}
-                                               {{/foreach}}
-                    </ul>
-                </div>
+               <div class="contact-photo-menu" id="contact-photo-menu-{{$contact.id}}">
+                       <ul>
+                                                   {{foreach $contact.photo_menu as $c}}
+                                                   {{if $c.2}}
+                                                   <li><a target="redir" href="{{$c.1}}">{{$c.0}}</a></li>
+                                                   {{else}}
+                                                   <li><a href="{{$c.1}}">{{$c.0}}</a></li>
+                                                   {{/if}}
+                                                   {{/foreach}}
+                       </ul>
+               </div>
                        {{/if}}
                </div>
                        
        </div>
 
        <div class="contact-entry-desc">
-               <div class="contact-entry-name" id="contact-entry-name-{{$contact.id}}" >{{$contact.name}}</div>
+               <div class="contact-entry-name" id="contact-entry-name-{{$contact.id}}" >
+                       {{$contact.name}}
+                       {{if $contact.account_type}} <span class="contact-entry-details" id="contact-entry-accounttype-{{$contact.id}}">({{$contact.account_type}})</span>{{/if}}
+               </div>
                {{if $contact.alt_text}}<div class="contact-entry-details" id="contact-entry-rel-{{$contact.id}}" >{{$contact.alt_text}}</div>{{/if}}
                {{if $contact.itemurl}}<div class="contact-entry-details" id="contact-entry-url-{{$contact.id}}" >{{$contact.itemurl}}</div>{{/if}}
-               {{if $contact.network}}<div class="contact-entry-network" id="contact-entry-network-{{$contact.id}}" >{{$contact.network}}</div>{{/if}}
+               {{if $contact.tags}}<div class="contact-entry-details" id="contact-entry-tags-{{$contact.id}}" >{{$contact.tags}}</div>{{/if}}
                {{if $contact.details}}<div class="contact-entry-details" id="contact-entry-details-{{$contact.id}}" >{{$contact.details}}</div>{{/if}}
+               {{if $contact.network}}<div class="contact-entry-network" id="contact-entry-network-{{$contact.id}}" >{{$contact.network}}</div>{{/if}}
        </div>
 
        <div class="contact-entry-end" ></div>
index 777ed501790bec2d01b57f9edeb428ab404e3acc..fe491fd83a264cc3a3b5b3f232f34c8af52ad537 100644 (file)
        </div>
 
        <div class="contact-entry-desc">
-               <div class="contact-entry-name" id="contact-entry-name-{{$contact.id}}" >{{$contact.name}}</div>
+               <div class="contact-entry-name" id="contact-entry-name-{{$contact.id}}" >
+                       {{$contact.name}}
+                       {{if $contact.account_type}} <span class="contact-entry-details" id="contact-entry-accounttype-{{$contact.id}}">({{$contact.account_type}})</span>{{/if}}
+               </div>
                {{if $contact.alt_text}}<div class="contact-entry-details" id="contact-entry-rel-{{$contact.id}}" >{{$contact.alt_text}}</div>{{/if}}
                {{if $contact.itemurl}}<div class="contact-entry-details" id="contact-entry-url-{{$contact.id}}" >{{$contact.itemurl}}</div>{{/if}}
-               {{if $contact.network}}<div class="contact-entry-network" id="contact-entry-network-{{$contact.id}}" >{{$contact.network}}</div>{{/if}}
+               {{if $contact.tags}}<div class="contact-entry-details" id="contact-entry-tags-{{$contact.id}}" >{{$contact.tags}}</div>{{/if}}
                {{if $contact.details}}<div class="contact-entry-details" id="contact-entry-details-{{$contact.id}}" >{{$contact.details}}</div>{{/if}}
+               {{if $contact.network}}<div class="contact-entry-network" id="contact-entry-network-{{$contact.id}}" >{{$contact.network}}</div>{{/if}}
        </div>
 
        <div class="contact-entry-end" ></div>
index b0489af80838a3222d666f88db12324fb9d3e5b7..485ac393870f71ecc7ecf5f258f3e2589e8f3d0f 100644 (file)
@@ -1583,7 +1583,7 @@ span[id^="showmore-wrap"] {
 }
 .contact-name {
   font-weight: bold;
-  padding-top: 15px;
+  /* padding-top: 15px; */
 }
 .contact-details {
   color: #999999;
index 0c7050045d0d1d254b6c6726b6daf0eecfddbc1c..345043ffb46cf1370af8f8cae54cded162ecfb57 100644 (file)
@@ -1583,7 +1583,7 @@ span[id^="showmore-wrap"] {
 }
 .contact-name {
   font-weight: bold;
-  padding-top: 15px;
+  /* padding-top: 15px; */
 }
 .contact-details {
   color: #999999;
index c5f655427ad9e010382f137cf4a695f5750309aa..b2dec86c843c5eddd7f7177772b84a0a20212716 100644 (file)
@@ -1583,7 +1583,7 @@ span[id^="showmore-wrap"] {
 }
 .contact-name {
   font-weight: bold;
-  padding-top: 15px;
+  /* padding-top: 15px; */
 }
 .contact-details {
   color: #999999;
index cd604b656a42bbdc4772cf16c966b378e3c214ae..7aede8df08274b92f627d5117b047faf3e30b5bb 100644 (file)
@@ -908,7 +908,7 @@ span[id^="showmore-wrap"] {
                img { width: 175px; height: 175px; }
        }
 }
-.contact-name { font-weight: bold; padding-top: 15px; }
+.contact-name { font-weight: bold; /* padding-top: 15px; */}
 .contact-details {
        color: @Grey3; white-space: nowrap;
        overflow: hidden;
index 7060505e9fcce4edbbecaa30c0878f13c6f9d634..2d59a8a256a4008e7e658aede46b8cf9f192c65c 100644 (file)
                </div>
                        
        </div>
-       <div class="contact-name" id="contact-entry-name-{{$contact.id}}" >{{$contact.name}}</div>
+       <div class="contact-name" id="contact-entry-name-{{$contact.id}}" >
+               {{$contact.name}}
+               {{if $contact.account_type}} <span class="contact-entry-details" id="contact-entry-accounttype-{{$contact.id}}">({{$contact.account_type}})</span>{{/if}}
+       </div>
        {{if $contact.alt_text}}<div class="contact-details" id="contact-entry-rel-{{$contact.id}}" >{{$contact.alt_text}}</div>{{/if}}
        {{if $contact.itemurl}}<div class="contact-details" id="contact-entry-url-{{$contact.id}}" >{{$contact.itemurl}}</div>{{/if}}
-       {{if $contact.network}}<div class="contact-details" id="contact-entry-network-{{$contact.id}}" >{{$contact.network}}</div>{{/if}}
+       {{if $contact.tags}}<div class="contact-details" id="contact-entry-tags-{{$contact.id}}" >{{$contact.tags}}</div>{{/if}}
        {{if $contact.details}}<div class="contact-details" id="contact-entry-details-{{$contact.id}}" >{{$contact.details}}</div>{{/if}}
+       {{if $contact.network}}<div class="contact-details" id="contact-entry-network-{{$contact.id}}" >{{$contact.network}}</div>{{/if}}
 
        {{if $contact.connlnk}}
        <div class="contact-entry-connect"><a href="{{$contact.connlnk}}" title="{{$contact.conntxt}}">{{$contact.conntxt}}</a></div>
index 9501ecfe0d9307cb30c9159793603b7ccc3c2157..01045b6ff4a3cb519a8091c688b14babda91b7d3 100644 (file)
@@ -23,7 +23,7 @@ a.on {
        background-color: #2C77AE !important
 }
 
-aside, .menu-popup, .fc-state-highlight, a.off, .autocomplete { 
+aside, right_aside, .menu-popup, .fc-state-highlight, a.off, .autocomplete {
        color: #989898 !important;
        background-color: #252C33 !important;
        border-right: 1px solid #D2D2D2;
index d71ab2177bbaf4889bf818b85bbb81086c043dc4..a00d19c39c767eb6ab6869885e5793206576b78b 100644 (file)
@@ -12,3 +12,7 @@ div.pager, ul.tabs {
 aside {
   border-right: 1px solid #D2D2D2;
 }
+
+right_aside {
+  border-left: 1px solid #D2D2D2;
+}
diff --git a/view/theme/vier/mobile.css b/view/theme/vier/mobile.css
new file mode 100644 (file)
index 0000000..90e8e64
--- /dev/null
@@ -0,0 +1,90 @@
+aside, header, #nav-events-link, #search-box, #nav-admin-link, #activitiy-by-date-tab, #shared-links-tab,
+.wall-item-location {
+  display: none;
+}
+
+.hide-comments-outer {
+  width: calc(100% - 105px);
+}
+
+section {
+  /* left: calc((100% - (784px)) / 2); */
+  left: 0px;
+  width: calc(100% - 20px);
+  max-width: 100%;
+  padding: 10px;
+}
+
+body, section, nav .nav-menu, div.pager, ul.tabs {
+  font-size: 16px;
+}
+
+.wall-item-container .wall-item-ago, .wall-item-network,.type-link blockquote, .type-video blockquote {
+  font-size: 13px;
+}
+
+nav {
+  min-width: 480px;
+}
+
+.wall-item-container .wall-item-content {
+  max-width: 100%;
+  overflow: hidden;
+  text-overflow: ellipsis;
+/*  margin-left: -70px;
+  padding-top: 25px; */
+}
+
+nav ul {
+    margin-left: 0px;
+}
+
+
+.wall-item-container .wall-item-content img,
+.children .wall-item-container .wall-item-item .wall-item-content img,
+.wall-item-container .wall-item-content .type-link img.attachment-image, .type-link img.attachment-image, .type-video img.attachment-image {
+  max-width: 650px;
+}
+
+@media screen and (max-width: 800px) {
+  .wall-item-container .wall-item-content img,
+  .children .wall-item-container .wall-item-item .wall-item-content img,
+  .wall-item-container .wall-item-content .type-link img.attachment-image, .type-link img.attachment-image, .type-video img.attachment-image {
+    max-width: 450px;
+  }
+}
+
+@media screen and (max-width: 600px) {
+  .wall-item-container .wall-item-content img,
+  .children .wall-item-container .wall-item-item .wall-item-content img,
+  .wall-item-container .wall-item-content .type-link img.attachment-image, .type-link img.attachment-image, .type-video img.attachment-image {
+    max-width: 350px;
+  }
+}
+
+@media screen and (max-width: 480px) {
+  .wall-item-container .wall-item-content img,
+  .children .wall-item-container .wall-item-item .wall-item-content img,
+  .wall-item-container .wall-item-content .type-link img.attachment-image, .type-link img.attachment-image, .type-video img.attachment-image {
+    max-width: 200px;
+  }
+}
+
+.wall-item-container.thread_level_2,
+.wall-item-container.thread_level_3,
+.wall-item-container.thread_level_4,
+.wall-item-container.thread_level_5,
+.wall-item-container.thread_level_6,
+.wall-item-container.thread_level_7 {
+  margin-left: 60px;
+  width: calc(100% - 70px);
+}
+
+.wall-item-container.thread_level_2 .wall-item-content,
+.wall-item-container.thread_level_3 .wall-item-content,
+.wall-item-container.thread_level_4 .wall-item-content,
+.wall-item-container.thread_level_5 .wall-item-content,
+.wall-item-container.thread_level_6 .wall-item-content,
+.wall-item-container.thread_level_7 .wall-item-content {
+  max-width: 100%;
+}
index c76e5b0af4fe0b85cc64d6776980cddfac6efead..77fea09f5aab9e2e4c95bbd5f29fbbfd7fc7696c 100644 (file)
@@ -31,4 +31,3 @@
   /* background-color: #FFFFF9; */
   background-color: #fffafa;
 }
-
index 2ae6e5000523c849e0d098067802612b34f106d1..5faf069c22ad94e1e2cbb3d19b3982c664838cac 100644 (file)
@@ -145,6 +145,10 @@ aside {
   height: calc(100% - 54px);
 }
 
+right_aside {
+  top: 44px;
+}
+
 section {
   top: 44px;
 }
index a041eb3f1a3720f7f0b8f233f54331c47a9805d9..3f48d2ec3f511f029801e282e77c452048304046 100644 (file)
@@ -872,9 +872,23 @@ ul.menu-popup .empty {
 }
 
 right_aside {
-  width: 0px;
-  top: 32px;
   display: none;
+  vertical-align: top;
+  width: 185px;
+  padding-top: 10px;
+  padding-right: 20px;
+  padding-bottom: 0px;
+  padding-left: 10px;
+  background-color: #FFFFFF;
+  font-size: 13px;
+  overflow-y: auto;
+  z-index: 2;
+  line-height: 17px;
+  color: #737373;
+  box-shadow: 1px 2px 0px 0px #D8D8D8;
+  top: 32px;
+  position: absolute;
+  margin-left: calc(100% - 215px);
 }
 
 /* aside */
@@ -2280,13 +2294,15 @@ aside #id_password {
 .contact-entry-wrapper {
   float: left;
   width: 363px;
-  height: 90px;
+  height: 100px;
   padding-right: 10px;
   margin: 0 10px 10px 0px;
 }
 .contact-entry-wrapper .contact-entry-photo-wrapper {
   float: left;
   margin-right: 10px;
+  width: 80px;
+  height: 80px;
 }
 .contact-entry-photo-wrapper {
   position: relative;
index 2993bb92cb038ba4005495adb00d56f0dce9e134..c4ed99caa479293649e86358167e996f69f98252 100644 (file)
        <div class="contact-entry-photo-end" ></div>
        
        <div class="contact-entry-desc">
-               <div class="contact-entry-name" id="contact-entry-name-{{$contact.id}}" >{{$contact.name}}</div>
+               <div class="contact-entry-name" id="contact-entry-name-{{$contact.id}}" >
+                       {{$contact.name}}
+                       {{if $contact.account_type}} <span class="contact-entry-details" id="contact-entry-accounttype-{{$contact.id}}">({{$contact.account_type}})</span>{{/if}}
+               </div>
                {{if $contact.alt_text}}<div class="contact-entry-details" id="contact-entry-rel-{{$contact.id}}" >{{$contact.alt_text}}</div>{{/if}}
-               {{if $contact.itemurl}}<div class="contact-entry-details" id="contact-entry-url-{{$contact.id}}" >{{$contact.itemurl}}</div>{{/if}}
-               {{if $contact.network}}<div class="contact-entry-details" id="contact-entry-network-{{$contact.id}}" >{{$contact.network}}</div>{{/if}}
+               <div class="contact-entry-details">
+               {{if $contact.itemurl}}<span class="contact-entry-details" id="contact-entry-url-{{$contact.id}}" >{{$contact.itemurl}}</span>{{/if}}
+               {{if $contact.network}}<span class="contact-entry-details" id="contact-entry-network-{{$contact.id}}" > ({{$contact.network}})</span>{{/if}}
+               </div>
+               {{if $contact.tags}}<div class="contact-entry-details" id="contact-entry-tags-{{$contact.id}}" >{{$contact.tags}}</div>{{/if}}
                {{if $contact.details}}<div class="contact-entry-details" id="contact-entry-details-{{$contact.id}}" >{{$contact.details}}</div>{{/if}}
        </div>
 
index 51e1e36f62d5ab93b1b57e5fe4963249e548c40b..1a4eb3e5acd92b198183795dfe0f73b468584f2b 100644 (file)
@@ -26,11 +26,17 @@ function vier_init(&$a) {
        if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname'] or $a->argv[0] === "network" && local_user()) {
                vier_community_info();
 
-               $a->page['htmlhead'] .= "<link rel='stylesheet' media='screen and (min-width: 1300px)' href='view/theme/vier/wide.css' />";
+               $a->page['htmlhead'] .= "<link rel='stylesheet' type='text/css' href='view/theme/vier/wide.css' media='screen and (min-width: 1300px)'/>\n";
        }
 
+       if ($a->is_mobile || $a->is_tablet) {
+               $a->page['htmlhead'] .= '<meta name=viewport content="width=device-width, initial-scale=1">'."\n";
+               $a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="view/theme/vier/mobile.css" media="screen"/>'."\n";
+       }
+               $a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="view/theme/vier/mobile.css" media="screen and (max-width: 1000px)"/>'."\n";
+
 $a->page['htmlhead'] .= <<< EOT
-<link rel='stylesheet' media='screen and (max-width: 1100px)' href='view/theme/vier/narrow.css' />
+<link rel='stylesheet' type='text/css' href='view/theme/vier/narrow.css' media='screen and (max-width: 1100px)' />
 <script type="text/javascript">
 
 function insertFormatting(comment,BBcode,id) {
@@ -85,7 +91,7 @@ EOT;
 
        // Hide the left menu bar
        if (($a->page['aside'] == "") AND in_array($a->argv[0], array("community", "events", "help", "manage", "notifications",
-                                                                       "probe", "webfinger", "login", "invite")))
+                                                                       "probe", "webfinger", "login", "invite", "credits")))
                $a->page['htmlhead'] .= "<link rel='stylesheet' href='view/theme/vier/hide.css' />";
 }
 
index 6f8d5427cc53b5f2240b93e337445d9f36695732..72c2673261aef9400b15e3ec51328cc15dc91071 100644 (file)
@@ -1,23 +1,5 @@
 right_aside {
-  vertical-align: top;
-  width: 185px;
-  padding-top: 10px;
-  padding-right: 20px;
-  padding-bottom: 0px;
-  padding-left: 10px;
-  background-color: #FFFFFF;
-  font-size: 13px;
-  overflow-y: auto;
-  z-index: 2;
-  line-height: 17px;
-  color: #737373;
-  top: 44px;
-  position: absolute;
-/*  position: fixed;
-  height: calc(100% - 54px); */
   display: block;
-  margin-left: calc(100% - 215px);
-  box-shadow: 1px 2px 0px 0px #D8D8D8;
 }
 
 #forumlist-sidebar {