aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHaakon Meland Eriksen <haakon.eriksen@far.no>2016-03-04 06:05:47 +0100
committerHaakon Meland Eriksen <haakon.eriksen@far.no>2016-03-04 06:05:47 +0100
commit059da4d01705ca1515e0ccf4b790c407c751685c (patch)
treea7f77e3734ba1e53bf7980ff1b6f0c73bc814602 /include
parent264abef81761a3ed0d27126dbc5a6e0a47fb8ec8 (diff)
parenta59d1b22f6ab1bf5b3cf5df555d71b893c05540a (diff)
downloadvolse-hubzilla-059da4d01705ca1515e0ccf4b790c407c751685c.tar.gz
volse-hubzilla-059da4d01705ca1515e0ccf4b790c407c751685c.tar.bz2
volse-hubzilla-059da4d01705ca1515e0ccf4b790c407c751685c.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'include')
-rw-r--r--include/features.php2
-rw-r--r--include/notifier.php1
-rw-r--r--include/ratenotif.php1
-rw-r--r--include/widgets.php28
4 files changed, 25 insertions, 7 deletions
diff --git a/include/features.php b/include/features.php
index 1ef070b00..ff6b71d4c 100644
--- a/include/features.php
+++ b/include/features.php
@@ -66,7 +66,7 @@ function get_features($filtered = true) {
'composition' => array(
t('Post Composition Features'),
// array('richtext', t('Richtext Editor'), t('Enable richtext editor'),falseget_config('feature_lock','richtext')),
- array('markdown', t('Use Markdown'), t('Allow use of "Markdown" to format posts'),false,get_config('feature_lock','markdown')),
+// array('markdown', t('Use Markdown'), t('Allow use of "Markdown" to format posts'),false,get_config('feature_lock','markdown')),
array('large_photos', t('Large Photos'), t('Include large (1024px) photo thumbnails in posts. If not enabled, use small (640px) photo thumbnails'),false,get_config('feature_lock','large_photos')),
array('channel_sources', t('Channel Sources'), t('Automatically import channel content from other channels or feeds'),false,get_config('feature_lock','channel_sources')),
array('content_encrypt', t('Even More Encryption'), t('Allow optional encryption of content end-to-end with a shared secret key'),false,get_config('feature_lock','content_encrypt')),
diff --git a/include/notifier.php b/include/notifier.php
index 93cc77a1c..628847d54 100644
--- a/include/notifier.php
+++ b/include/notifier.php
@@ -68,7 +68,6 @@ require_once('include/html2plain.php');
require_once('include/cli_startup.php');
require_once('include/zot.php');
require_once('include/queue_fn.php');
-require_once('include/session.php');
require_once('include/datetime.php');
require_once('include/items.php');
require_once('include/bbcode.php');
diff --git a/include/ratenotif.php b/include/ratenotif.php
index e94f30247..2c636c710 100644
--- a/include/ratenotif.php
+++ b/include/ratenotif.php
@@ -11,7 +11,6 @@ function ratenotif_run($argv, $argc){
$a = get_app();
- require_once("session.php");
require_once("datetime.php");
require_once('include/items.php');
require_once('include/Contact.php');
diff --git a/include/widgets.php b/include/widgets.php
index aa0be87d6..ad54cb59e 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -982,28 +982,48 @@ function widget_cover_photo($arr) {
require_once('include/identity.php');
$o = '';
+ $a = get_app();
+
$channel_id = 0;
if(array_key_exists('channel_id', $arr) && intval($arr['channel_id']))
$channel_id = intval($arr['channel_id']);
if(! $channel_id)
- $channel_id = get_app()->profile_uid;
+ $channel_id = $a->profile_uid;
if(! $channel_id)
return '';
+ $channel = channelx_by_n($channel_id);
+
if(array_key_exists('style', $arr) && isset($arr['style']))
$style = $arr['style'];
else
- $style = 'width:100%; padding-right: 10px; height: auto;';
+ $style = 'width:100%; height: auto;';
// ensure they can't sneak in an eval(js) function
if(strpbrk($style,'(\'"<>') !== false)
$style = '';
+ if(array_key_exists('title', $arr) && isset($arr['title']))
+ $title = $arr['title'];
+ else
+ $title = $channel['channel_name'];
+
+ if(array_key_exists('subtitle', $arr) && isset($arr['subtitle']))
+ $subtitle = $arr['subtitle'];
+ else
+ $subtitle = $channel['xchan_addr'];
+
$c = get_cover_photo($channel_id,'html');
if($c) {
- $o = '<div class="widget">' . (($style) ? str_replace('alt=',' style="' . $style . '" alt=',$c) : $c) . '</div>';
+ $photo_html = (($style) ? str_replace('alt=',' style="' . $style . '" alt=',$c) : $c);
+
+ $o = replace_macros(get_markup_template('cover_photo_widget.tpl'),array(
+ '$photo_html' => $photo_html,
+ '$title' => $title,
+ '$subtitle' => $subtitle,
+ ));
}
return $o;
}
@@ -1297,7 +1317,7 @@ function widget_admin($arr) {
'plugins' => array(z_root() . '/admin/plugins/', t('Plugins'), 'plugins'),
'themes' => array(z_root() . '/admin/themes/', t('Themes'), 'themes'),
'queue' => array(z_root() . '/admin/queue', t('Inspect queue'), 'queue'),
- 'profs' => array(z_root() . '/admin/profs', t('Profile Config'), 'profs'),
+ 'profs' => array(z_root() . '/admin/profs', t('Profile Fields'), 'profs'),
'dbsync' => array(z_root() . '/admin/dbsync/', t('DB updates'), 'dbsync')
);