1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- <?php
- if (!defined('GNUSOCIAL')) { exit(1); }
- class LinkbacksettingsAction extends SettingsAction
- {
-
- function title()
- {
-
- return _m('TITLE','Linkback settings');
- }
-
- function getInstructions()
- {
-
- return _m('Linkbacks inform post authors when you link to them. ' .
- 'You can disable this feature here.');
- }
- function showContent()
- {
- $this->elementStart('form', array('method' => 'post',
- 'class' => 'form_settings',
- 'action' =>
- common_local_url('linkbacksettings')));
- $this->hidden('token', common_session_token());
- $this->elementStart('fieldset');
- $this->element('legend', null, _m('LEGEND','Preferences'));
- $this->checkbox('disable_linkbacks', "Opt out of sending linkbacks for URLs you post", $this->scoped->getPref("linkbackplugin", "disable_linkbacks"));
-
- $this->submit('settings_linkback_prefs_save', _m('BUTTON','Save'), 'submit', 'save_prefs');
- $this->elementEnd('fieldset');
- $this->elementEnd('form');
- }
-
- protected function doPost()
- {
- $x = $this->scoped->setPref("linkbackplugin", "disable_linkbacks", $this->boolean('disable_linkbacks'));
- return _m('Linkback preferences saved.');
- }
- }
|