diff --git a/boot.php b/boot.php
index 875e5369e..20c243c24 100644
--- a/boot.php
+++ b/boot.php
@@ -412,6 +412,7 @@ if(! class_exists('App')) {
public $videoheight = 350;
public $force_max_items = 0;
public $theme_thread_allow = true;
+ public $theme_events_in_profile = true;
// An array for all theme-controllable parameters
// Mostly unimplemented yet. Only options 'stylesheet' and
@@ -1661,7 +1662,7 @@ if(! function_exists('load_contact_links')) {
if(! $uid || x($a->contacts,'empty'))
return;
- $r = q("SELECT `id`,`network`,`url`,`thumb` FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 AND `thumb` != ''",
+ $r = q("SELECT `id`,`network`,`url`,`thumb`, `rel` FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 AND `thumb` != ''",
intval($uid)
);
if(count($r)) {
diff --git a/doc/Home.md b/doc/Home.md
index ff991e3d2..11b1f9e15 100644
--- a/doc/Home.md
+++ b/doc/Home.md
@@ -33,6 +33,7 @@ Friendica Documentation and Resources
* [Message Flow](help/Message-Flow)
* [Using SSL with Friendica](help/SSL)
* [Twitter/GNU Social API Functions](help/api)
+* [Config values that can only be set in .htconfig.php](help/htconfig)
**Developer Manual**
diff --git a/doc/de/Home.md b/doc/de/Home.md
index 561809d6c..a101b5f73 100644
--- a/doc/de/Home.md
+++ b/doc/de/Home.md
@@ -37,6 +37,7 @@ Friendica - Dokumentation und Ressourcen
* [Entwickler](help/Developers)
* [Twitter/GNU Social API Functions](help/api) (EN)
* [Translation of Friendica](help/translations) (EN)
+* [Konfigurationswerte, die nur in der .htconfig.php gesetzt werden können](help/htconfig) (EN)
**Entwickler Dokumentation**
diff --git a/doc/htconfig.md b/doc/htconfig.md
new file mode 100644
index 000000000..5d98f55a7
--- /dev/null
+++ b/doc/htconfig.md
@@ -0,0 +1,79 @@
+Config values that can only be set in .htconfig.php
+===================================================
+
+There are some config values that haven't found their way into the administration page. This has several reasons. Maybe they are part of a
+current development that isn't considered stable and will be added later in the administration page when it is considered safe. Or it triggers
+something that isn't expected to be of public interest. Or it is for testing purposes only.
+
+**Attention:** Please be warned that you shouldn't use one of these values without the knowledge what it could trigger. Especially don't do that with
+undocumented values.
+
+The header of the section describes the category, the value is the parameter. Example: To set the directory value please add this
+line to your .htconfig.php:
+
+ $a->config['system']['directory'] = 'http://dir.friendi.ca';
+
+
+
+## Jabber ##
+* debug (Boolean) - Enable debug level for the jabber account synchronisation.
+* logfile - Logfile for the jabber account synchronisation.
+
+## System ##
+
+* birthday_input_format - Default value is "ymd".
+* block_local_dir (Boolean) - Blocks the access to the directory of the local users.
+* default_service_class -
+* delivery_batch_count - Number of deliveries per process. Default value is 1. (Disabled when using the worker)
+* diaspora_test (Boolean) - For development only. Disables the message transfer.
+* directory - The path to global directory. If not set then "http://dir.friendi.ca" is used.
+* disable_email_validation (Boolean) - Disables the check if a mail address is in a valid format and can be resolved via DNS.
+* disable_url_validation (Boolean) - Disables the DNS lookup of an URL.
+* event_input_format - Default value is "ymd".
+* ignore_cache (Boolean) - For development only. Disables the item cache.
+* like_no_comment (Boolean) - Don't update the "commented" value of an item when it is liked.
+* local_block (Boolean) - Used in conjunction with "block_public".
+* local_search (Boolean) - Blocks the search for not logged in users to prevent crawlers from blocking your system.
+* max_contact_queue - Default value is 500.
+* max_batch_queue - Default value is 1000.
+* no_oembed (Boolean) - Don't use OEmbed to fetch more information about a link.
+* no_oembed_rich_content (Boolean) - Don't show the rich content (e.g. embedded PDF).
+* no_smilies (Boolean) - Don't show smilies.
+* no_view_full_size (Boolean) - Don't add the link "View full size" under a resized image.
+* optimize_items (Boolean) - Triggers an SQL command to optimize the item table before expiring items.
+* ostatus_poll_timeframe - Defines how old an item can be to try to complete the conversation with it.
+* paranoia (Boolean) - Log out users if their IP address changed.
+* permit_crawling (Boolean) - Restricts the search for not logged in users to one search per minute.
+* png_quality - Default value is 8.
+* proc_windows (Boolean) - Should be enabled if Friendica is running under Windows.
+* proxy_cache_time - Time after which the cache is cleared. Default value is one day.
+* pushpoll_frequency -
+* qsearch_limit - Default value is 100.
+* relay_server - Experimental Diaspora feature. Address of the relay server where public posts should be send to. For example https://podrelay.net
+* relay_subscribe (Boolean) - Enables the receiving of public posts from the relay. They will be included in the search and on the community page when it is set up to show all public items.
+* relay_scope - Can be "all" or "tags". "all" means that every public post should be received. "tags" means that only posts witt selected tags should be received.
+* relay_server_tags - Comma separated list of tags for the "tags" subscription (see "relay_scrope")
+* relay_user_tags (Boolean) - If enabled, the tags from the saved searches will used for the "tags" subscription in addition to the "relay_server_tags".
+* remove_multiplicated_lines (Boolean) - If enabled, multiple linefeeds in items are stripped to a single one.
+* show_unsupported_addons (Boolean) - Show all addons including the unsupported ones.
+* show_unsupported_themes (Boolean) - Show all themes including the unsupported ones.
+* throttle_limit_day - Maximum number of posts that a user can send per day with the API.
+* throttle_limit_week - Maximum number of posts that a user can send per week with the API.
+* throttle_limit_month - Maximum number of posts that a user can send per month with the API.
+* wall-to-wall_share (Boolean) - Displays forwarded posts like "wall-to-wall" posts.
+* worker (Boolean) - (Experimental) Use the worker system instead of calling several background processes. Reduces the overall load and speeds up item delivery.
+* worker_dont_fork (Boolean) - if enabled, the workers are only called from the poller process. Useful on systems that permit the use of "proc_open".
+* worker_queues - Number of parallel workers. Default value is 10 queues.
+* xrd_timeout - Timeout for fetching the XRD links. Default value is 20 seconds.
+
+## service_class ##
+
+* upgrade_link -
+
+## experimentals ##
+
+* exp_themes (Boolean) - Show experimental themes as well.
+
+## theme ##
+
+* hide_eventlist (Boolean) - Don't show the birthdays and events on the profile and network page
diff --git a/include/Contact.php b/include/Contact.php
index 920ec3c2b..e6ec8daad 100644
--- a/include/Contact.php
+++ b/include/Contact.php
@@ -219,17 +219,20 @@ function contact_photo_menu($contact) {
$status_link = $profile_link . "?url=status";
$photos_link = $profile_link . "?url=photos";
$profile_link = $profile_link . "?url=profile";
- $pm_url = $a->get_baseurl() . '/message/new/' . $contact['id'];
}
- $poke_link = $a->get_baseurl() . '/poke/?f=&c=' . $contact['id'];
+ if (in_array($contact["network"], array(NETWORK_DFRN, NETWORK_DIASPORA)))
+ $pm_url = $a->get_baseurl() . '/message/new/' . $contact['id'];
+
+ if ($contact["network"] == NETWORK_DFRN)
+ $poke_link = $a->get_baseurl() . '/poke/?f=&c=' . $contact['id'];
+
$contact_url = $a->get_baseurl() . '/contacts/' . $contact['id'];
$posts_link = $a->get_baseurl() . '/network/0?nets=all&cid=' . $contact['id'];
$contact_drop_link = $a->get_baseurl() . "/contacts/" . $contact['id'] . '/drop?confirm=1';
$menu = Array(
- 'poke' => array(t("Poke"), $poke_link),
'status' => array(t("View Status"), $status_link),
'profile' => array(t("View Profile"), $profile_link),
'photos' => array(t("View Photos"), $photos_link),
@@ -237,6 +240,7 @@ function contact_photo_menu($contact) {
'edit' => array(t("Edit Contact"), $contact_url),
'drop' => array(t("Drop Contact"), $contact_drop_link),
'pm' => array(t("Send PM"), $pm_url),
+ 'poke' => array(t("Poke"), $poke_link),
);
@@ -254,6 +258,7 @@ function contact_photo_menu($contact) {
}
}
return $o;*/
+
foreach($menu as $k=>$v){
if ($v[1]!="") {
if(($v[0] !== t("Network Posts")) && ($v[0] !== t("Send PM")) && ($v[0] !== t('Edit Contact')))
@@ -262,7 +267,14 @@ function contact_photo_menu($contact) {
$menu[$k][2] = 0;
}
}
- return $menu;
+
+ $menucondensed = array();
+
+ foreach ($menu AS $menuitem)
+ if ($menuitem[1] != "")
+ $menucondensed[] = $menuitem;
+
+ return $menucondensed;
}}
diff --git a/include/Photo.php b/include/Photo.php
index 785601c7e..9732801c9 100644
--- a/include/Photo.php
+++ b/include/Photo.php
@@ -345,38 +345,37 @@ class Photo {
}
public function orient($filename) {
- if ($this->is_imagick()) {
- // based off comment on http://php.net/manual/en/imagick.getimageorientation.php
- $orientation = $this->image->getImageOrientation();
- switch ($orientation) {
- case imagick::ORIENTATION_BOTTOMRIGHT:
- $this->image->rotateimage("#000", 180);
- break;
- case imagick::ORIENTATION_RIGHTTOP:
- $this->image->rotateimage("#000", 90);
- break;
- case imagick::ORIENTATION_LEFTBOTTOM:
- $this->image->rotateimage("#000", -90);
- break;
- }
+ if ($this->is_imagick()) {
+ // based off comment on http://php.net/manual/en/imagick.getimageorientation.php
+ $orientation = $this->image->getImageOrientation();
+ switch ($orientation) {
+ case imagick::ORIENTATION_BOTTOMRIGHT:
+ $this->image->rotateimage("#000", 180);
+ break;
+ case imagick::ORIENTATION_RIGHTTOP:
+ $this->image->rotateimage("#000", 90);
+ break;
+ case imagick::ORIENTATION_LEFTBOTTOM:
+ $this->image->rotateimage("#000", -90);
+ break;
+ }
- $this->image->setImageOrientation(imagick::ORIENTATION_TOPLEFT);
- return TRUE;
- }
+ $this->image->setImageOrientation(imagick::ORIENTATION_TOPLEFT);
+ return TRUE;
+ }
// based off comment on http://php.net/manual/en/function.imagerotate.php
if(!$this->is_valid())
- return FALSE;
+ return FALSE;
if( (! function_exists('exif_read_data')) || ($this->getType() !== 'image/jpeg') )
- return;
+ return;
- $exif = @exif_read_data($filename);
+ $exif = @exif_read_data($filename,null,true);
+ if(! $exif)
+ return;
- if(! $exif)
- return;
-
- $ort = $exif['Orientation'];
+ $ort = $exif['IFD0']['Orientation'];
switch($ort)
{
@@ -413,6 +412,10 @@ class Photo {
$this->rotate(90);
break;
}
+
+ // logger('exif: ' . print_r($exif,true));
+ return $exif;
+
}
diff --git a/include/Scrape.php b/include/Scrape.php
index 93d68be22..0169f55fd 100644
--- a/include/Scrape.php
+++ b/include/Scrape.php
@@ -552,7 +552,7 @@ function probe_url($url, $mode = PROBE_NORMAL, $level = 1) {
if($network !== NETWORK_ZOT && $network !== NETWORK_DFRN && $network !== NETWORK_MAIL) {
if($diaspora)
$network = NETWORK_DIASPORA;
- elseif($has_lrdd)
+ elseif($has_lrdd AND ($notify))
$network = NETWORK_OSTATUS;
if(strpos($url,'@'))
@@ -652,9 +652,10 @@ function probe_url($url, $mode = PROBE_NORMAL, $level = 1) {
$feed->set_raw_data(($xml) ? $xml : '
', $url, $image, $title);
+ $text .= sprintf('
', $url, proxy_url($image), $title);
elseif (($preview != "") AND !strstr(strtolower($oembed), "
', $url, $preview, $title);
+ $text .= sprintf('
', $url, proxy_url($preview), $title);
$text .= $oembed;
@@ -455,7 +471,7 @@ function bb_replace_images($body, $images) {
// We're depending on the property of 'foreach' (specified on the PHP website) that
// it loops over the array starting from the first element and going sequentially
// to the last element
- $newbody = str_replace('[$#saved_image' . $cnt . '#$]', '', $newbody);
+ $newbody = str_replace('[$#saved_image' . $cnt . '#$]', '
', $newbody);
$cnt++;
}
@@ -585,7 +601,7 @@ function bb_ShareAttributes($share, $simplehtml) {
default:
$headline = trim($share[1]).'
$2", $Text); + // [img=widthxheight]image source[/img] - //$Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '
{{$description}}
+ + diff --git a/view/templates/intros.tpl b/view/templates/intros.tpl index aa10cde48..b9f7f1541 100644 --- a/view/templates/intros.tpl +++ b/view/templates/intros.tpl @@ -1,10 +1,10 @@ - +{{$str_notifytype}} {{$notify_type}}
-