aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeroen <jeroenpraat@xs4all.nl>2014-09-14 12:39:11 +0000
committerJeroen <jeroenpraat@xs4all.nl>2014-09-14 12:39:11 +0000
commit254dc0ec988d54972ca856f0bcdf5c5cd0d41ce1 (patch)
tree6e415ab09756984ce336a4ea72e350c27353e985
parent2728f5a104878ed3237f4d6a19bfbea67ffeecd0 (diff)
downloadvolse-hubzilla-254dc0ec988d54972ca856f0bcdf5c5cd0d41ce1.tar.gz
volse-hubzilla-254dc0ec988d54972ca856f0bcdf5c5cd0d41ce1.tar.bz2
volse-hubzilla-254dc0ec988d54972ca856f0bcdf5c5cd0d41ce1.zip
Made link post titles to source optional in display settings. Hopefully I did a right.
-rw-r--r--include/ItemObject.php1
-rw-r--r--mod/settings.php8
-rwxr-xr-xview/tpl/conv_item.tpl4
-rwxr-xr-xview/tpl/settings_display.tpl2
4 files changed, 12 insertions, 3 deletions
diff --git a/include/ItemObject.php b/include/ItemObject.php
index 451e369b0..79fd31c1c 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(local_user(),'system','title_tosource'),
'ago' => relative_date($item['created']),
'app' => $item['app'],
'str_app' => sprintf( t(' from %s'), $item['app']),
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/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}}" />