aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-09-14 17:11:50 -0700
committerfriendica <info@friendica.com>2014-09-14 17:11:50 -0700
commit0a5f0fe10bf7310666b96102e8e0da754d6ca439 (patch)
tree150bd622891d4e373325e79d77167612d40e4ad2
parent6be6b41a421f86579164288ea2fa7cebb6edd9d4 (diff)
parentb5241c610fe3eeaebedebc94e43edb802565123a (diff)
downloadvolse-hubzilla-0a5f0fe10bf7310666b96102e8e0da754d6ca439.tar.gz
volse-hubzilla-0a5f0fe10bf7310666b96102e8e0da754d6ca439.tar.bz2
volse-hubzilla-0a5f0fe10bf7310666b96102e8e0da754d6ca439.zip
Merge https://github.com/friendica/red into pending_merge
-rw-r--r--include/ItemObject.php1
-rw-r--r--mod/admin.php6
-rw-r--r--mod/settings.php8
-rw-r--r--view/js/main.js14
-rwxr-xr-xview/tpl/admin_site.tpl1
-rwxr-xr-xview/tpl/conv_item.tpl4
-rwxr-xr-xview/tpl/settings_display.tpl2
7 files changed, 21 insertions, 15 deletions
diff --git a/include/ItemObject.php b/include/ItemObject.php
index 451e369b0..96abe4df6 100644
--- a/include/ItemObject.php
+++ b/include/ItemObject.php
@@ -250,6 +250,7 @@ class Item extends BaseObject {
'osparkle' => $osparkle,
'sparkle' => $sparkle,
'title' => $item['title'],
+ 'title_tosource' => get_pconfig($conv->get_profile_owner(),'system','title_tosource'),
'ago' => relative_date($item['created']),
'app' => $item['app'],
'str_app' => sprintf( t(' from %s'), $item['app']),
diff --git a/mod/admin.php b/mod/admin.php
index 5bb97d158..836b12281 100644
--- a/mod/admin.php
+++ b/mod/admin.php
@@ -239,7 +239,7 @@ function admin_page_site_post(&$a){
$theme = ((x($_POST,'theme')) ? notags(trim($_POST['theme'])) : '');
$theme_mobile = ((x($_POST,'theme_mobile')) ? notags(trim($_POST['theme_mobile'])) : '');
$theme_accessibility = ((x($_POST,'theme_accessibility')) ? notags(trim($_POST['theme_accessibility'])) : '');
- $site_channel = ((x($_POST,'site_channel')) ? notags(trim($_POST['site_channel'])) : '');
+// $site_channel = ((x($_POST,'site_channel')) ? notags(trim($_POST['site_channel'])) : '');
$maximagesize = ((x($_POST,'maximagesize')) ? intval(trim($_POST['maximagesize'])) : 0);
@@ -304,7 +304,7 @@ function admin_page_site_post(&$a){
set_config('system','accessibility_theme', $theme_accessibility);
}
- set_config('system','site_channel', $site_channel);
+// set_config('system','site_channel', $site_channel);
set_config('system','maximagesize', $maximagesize);
set_config('system','register_policy', $register_policy);
@@ -426,7 +426,7 @@ function admin_page_site(&$a) {
'$theme' => array('theme', t("System theme"), get_config('system','theme'), t("Default system theme - may be over-ridden by user profiles - <a href='#' id='cnftheme'>change theme settings</a>"), $theme_choices),
'$theme_mobile' => array('theme_mobile', t("Mobile system theme"), get_config('system','mobile_theme'), t("Theme for mobile devices"), $theme_choices_mobile),
'$theme_accessibility' => array('theme_accessibility', t("Accessibility system theme"), get_config('system','accessibility_theme'), t("Accessibility theme"), $theme_choices_accessibility),
- '$site_channel' => array('site_channel', t("Channel to use for this website's static pages"), get_config('system','site_channel'), t("Site Channel")),
+// '$site_channel' => array('site_channel', t("Channel to use for this website's static pages"), get_config('system','site_channel'), t("Site Channel")),
'$diaspora_enabled' => array('diaspora_enabled',t('Enable Diaspora Protocol'), get_config('system','diaspora_enabled'), t('Communicate with Diaspora and Friendica - experimental')),
'$feed_contacts' => array('feed_contacts', t('Allow Feeds as Connections'),get_config('system','feed_contacts'),t('(Heavy system resource usage)')),
'$maximagesize' => array('maximagesize', t("Maximum image size"), intval(get_config('system','maximagesize')), t("Maximum size in bytes of uploaded images. Default is 0, which means no limits.")),
diff --git a/mod/settings.php b/mod/settings.php
index a31814bf0..f9568feb3 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -136,7 +136,8 @@ function settings_post(&$a) {
$theme = ((x($_POST,'theme')) ? notags(trim($_POST['theme'])) : $a->channel['channel_theme']);
$mobile_theme = ((x($_POST,'mobile_theme')) ? notags(trim($_POST['mobile_theme'])) : '');
$user_scalable = ((x($_POST,'user_scalable')) ? intval($_POST['user_scalable']) : 0);
- $nosmile = ((x($_POST,'nosmile')) ? intval($_POST['nosmile']) : 0);
+ $nosmile = ((x($_POST,'nosmile')) ? intval($_POST['nosmile']) : 0);
+ $title_tosource = ((x($_POST,'title_tosource')) ? intval($_POST['title_tosource']) : 0);
$browser_update = ((x($_POST,'browser_update')) ? intval($_POST['browser_update']) : 0);
$browser_update = $browser_update * 1000;
if($browser_update < 10000)
@@ -156,6 +157,7 @@ function settings_post(&$a) {
set_pconfig(local_user(),'system','update_interval', $browser_update);
set_pconfig(local_user(),'system','itemspage', $itemspage);
set_pconfig(local_user(),'system','no_smilies',$nosmile);
+ set_pconfig(local_user(),'system','title_tosource',$title_tosource);
// set_pconfig(local_user(),'system','chanview_full',$chanview_full);
@@ -742,6 +744,9 @@ function settings_content(&$a) {
$nosmile = get_pconfig(local_user(),'system','no_smilies');
$nosmile = (($nosmile===false)? '0': $nosmile); // default if not set: 0
+ $title_tosource = get_pconfig(local_user(),'system','title_tosource');
+ $title_tosource = (($title_tosource===false)? '0': $title_tosource); // default if not set: 0
+
$theme_config = "";
if( ($themeconfigfile = get_theme_config_file($theme_selected)) != null){
require_once($themeconfigfile);
@@ -762,6 +767,7 @@ function settings_content(&$a) {
'$ajaxint' => array('browser_update', t("Update browser every xx seconds"), $browser_update, t('Minimum of 10 seconds, no maximum')),
'$itemspage' => array('itemspage', t("Maximum number of conversations to load at any time:"), $itemspage, t('Maximum of 100 items')),
'$nosmile' => array('nosmile', t("Don't show emoticons"), $nosmile, ''),
+ '$title_tosource' => array('title_tosource', t("Link post titles to source"), $title_tosource, ''),
'$layout_editor' => t('System Page Layout Editor - (advanced)'),
'$theme_config' => $theme_config,
'$expert' => feature_enabled(local_user(),'expert'),
diff --git a/view/js/main.js b/view/js/main.js
index 13f1fea8f..d0fcf0077 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -708,16 +708,14 @@ function updateConvItems(mode,data) {
justifiedGalleryActive = true;
$('#photo-album-contents-' + bParam_page).justifiedGallery({
lastRow : 'nojustify',
- captions: true,
margins: 3,
- rowHeight : 150,
sizeRangeSuffixes : {
- 'lt100': '',
- 'lt240': '',
- 'lt320': '',
- 'lt500': '',
- 'lt640': '',
- 'lt1024': ''
+ 'lt100': '-2',
+ 'lt240': '-2',
+ 'lt320': '-2',
+ 'lt500': '-0',
+ 'lt640': '-1',
+ 'lt1024': '-0'
}
}).on('jg.complete', function(e){ justifiedGalleryActive = false; });
}
diff --git a/view/tpl/admin_site.tpl b/view/tpl/admin_site.tpl
index 788fef457..56485dff6 100755
--- a/view/tpl/admin_site.tpl
+++ b/view/tpl/admin_site.tpl
@@ -47,7 +47,6 @@
{{include file="field_select.tpl" field=$theme}}
{{include file="field_select.tpl" field=$theme_mobile}}
{{include file="field_select.tpl" field=$theme_accessibility}}
- {{include file="field_input.tpl" field=$site_channel}}
{{include file="field_checkbox.tpl" field=$no_login_on_homepage}}
diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl
index 8607b8ee8..ff69fd379 100755
--- a/view/tpl/conv_item.tpl
+++ b/view/tpl/conv_item.tpl
@@ -15,7 +15,9 @@
<div class="wall-item-photo-end" style="clear:both"></div>
</div>
{{if $item.title}}
- <div class="wall-item-title" id="wall-item-title-{{$item.id}}"><h3>{{if $item.plink}}<a href="{{$item.plink.href}}" title="{{$item.title}} ({{$item.plink.title}})">{{/if}}{{$item.title}}{{if $item.plink}}</a>{{/if}}</h3></div>
+ <div class="wall-item-title" id="wall-item-title-{{$item.id}}">
+ <h3>{{if $item.title_tosource}}{{if $item.plink}}<a href="{{$item.plink.href}}" title="{{$item.title}} ({{$item.plink.title}})">{{/if}}{{/if}}{{$item.title}}{{if $item.title_tosource}}{{if $item.plink}}</a>{{/if}}{{/if}}</h3>
+ </div>
{{/if}}
{{if $item.lock}}
<div class="wall-item-lock dropdown">
diff --git a/view/tpl/settings_display.tpl b/view/tpl/settings_display.tpl
index 6eda6a6ec..f10f2e1c2 100755
--- a/view/tpl/settings_display.tpl
+++ b/view/tpl/settings_display.tpl
@@ -12,7 +12,7 @@
{{include file="field_input.tpl" field=$ajaxint}}
{{include file="field_input.tpl" field=$itemspage}}
{{include file="field_checkbox.tpl" field=$nosmile}}
-
+{{include file="field_checkbox.tpl" field=$title_tosource}}
<div class="settings-submit-wrapper" >
<input type="submit" name="submit" class="settings-submit" value="{{$submit}}" />