add the tag hijacking preference to Diaspora settings
This commit is contained in:
@@ -117,6 +117,7 @@ function settings_post(&$a) {
|
|||||||
|
|
||||||
if($_POST['dspr-submit']) {
|
if($_POST['dspr-submit']) {
|
||||||
set_pconfig(local_channel(),'system','diaspora_public_comments',intval($_POST['dspr_pubcomment']));
|
set_pconfig(local_channel(),'system','diaspora_public_comments',intval($_POST['dspr_pubcomment']));
|
||||||
|
set_pconfig(local_channel(),'system','prevent_tag_hijacking',intval($_POST['dspr_hijack']));
|
||||||
info( t('Diaspora Policy Settings updated.') . EOL);
|
info( t('Diaspora Policy Settings updated.') . EOL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -666,6 +667,9 @@ function settings_content(&$a) {
|
|||||||
$pubcomments = get_pconfig(local_channel(),'system','diaspora_public_comments');
|
$pubcomments = get_pconfig(local_channel(),'system','diaspora_public_comments');
|
||||||
if($pubcomments === false)
|
if($pubcomments === false)
|
||||||
$pubcomments = 1;
|
$pubcomments = 1;
|
||||||
|
$hijacking = get_pconfig(local_channel(),'system','prevent_tag_hijacking');
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
call_hooks('feature_settings', $settings_addons);
|
call_hooks('feature_settings', $settings_addons);
|
||||||
@@ -673,11 +677,13 @@ function settings_content(&$a) {
|
|||||||
$tpl = get_markup_template("settings_addons.tpl");
|
$tpl = get_markup_template("settings_addons.tpl");
|
||||||
$o .= replace_macros($tpl, array(
|
$o .= replace_macros($tpl, array(
|
||||||
'$form_security_token' => get_form_security_token("settings_featured"),
|
'$form_security_token' => get_form_security_token("settings_featured"),
|
||||||
'$title' => t('Feature Settings'),
|
'$title' => t('Feature/Addon Settings'),
|
||||||
'$diaspora_enabled' => $diaspora_enabled,
|
'$diaspora_enabled' => $diaspora_enabled,
|
||||||
'$pubcomments' => $pubcomments,
|
'$pubcomments' => $pubcomments,
|
||||||
'$dsprtitle' => t('Diaspora Policy Settings'),
|
'$dsprtitle' => t('Diaspora Policy Settings'),
|
||||||
'$dsprhelp' => t('Allow any Diaspora member to comment on your public posts.'),
|
'$dsprhelp' => t('Allow any Diaspora member to comment on your public posts.'),
|
||||||
|
'$dsprhijack' => t('Prevent hashtags from being redirected to other sites'),
|
||||||
|
'$hijacking' => $hijacking,
|
||||||
'$dsprsubmit' => t('Submit Diaspora Policy Settings'),
|
'$dsprsubmit' => t('Submit Diaspora Policy Settings'),
|
||||||
'$settings_addons' => $settings_addons
|
'$settings_addons' => $settings_addons
|
||||||
));
|
));
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
#dspr-pubcomment-label {
|
#dspr-pubcomment-label, #dspr-hijack-label {
|
||||||
float: left;
|
float: left;
|
||||||
width: 350px;
|
width: 350px;
|
||||||
margin-bottom: 25px;
|
margin-bottom: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#dspr-pubcomment-checkbox {
|
#dspr-pubcomment-checkbox, #dspr-hijack-checkbox {
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,14 @@
|
|||||||
<div id="dspr-settings-wrapper">
|
<div id="dspr-settings-wrapper">
|
||||||
<label id="dspr-pubcomment-label" for="dspr-pubcomment-checkbox">{{$dsprhelp}}</label>
|
<label id="dspr-pubcomment-label" for="dspr-pubcomment-checkbox">{{$dsprhelp}}</label>
|
||||||
<input id="dspr-pubcomment-checkbox" type="checkbox" name="dspr_pubcomment" value="1" ' . {{if $pubcomments}} checked="checked" {{/if}} />
|
<input id="dspr-pubcomment-checkbox" type="checkbox" name="dspr_pubcomment" value="1" ' . {{if $pubcomments}} checked="checked" {{/if}} />
|
||||||
</div><div class="clear"></div>
|
<div class="clear"></div>
|
||||||
|
<label id="dspr-hijack-label" for="dspr-hijack-checkbox">{{$dsprhijack}}</label>
|
||||||
|
<input id="dspr-hijack-checkbox" type="checkbox" name="dspr_hijack" value="1" ' . {{if $hijacking}} checked="checked" {{/if}} />
|
||||||
|
<div class="clear"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="settings-submit-wrapper" ><input type="submit" name="dspr-submit" class="settings-submit" value="{{$dsprsubmit}}" /></div></div></div>
|
<div class="settings-submit-wrapper" ><input type="submit" name="dspr-submit" class="settings-submit" value="{{$dsprsubmit}}" /></div></div></div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{$settings_addons}}
|
{{$settings_addons}}
|
||||||
|
|||||||
Reference in New Issue
Block a user