3 * Settings for Linkback
7 * LICENCE: This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Affero General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Affero General Public License for more details.
17 * You should have received a copy of the GNU Affero General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
22 * @author Stephen Paul Weber <singpolyma@singpolyma.net>
23 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
26 if (!defined('GNUSOCIAL')) { exit(1); }
29 * Settings for Linkback
31 * Lets users opt out of sending linkbacks
34 * @author Stephen Paul Weber <singpolyma@singpolyma.net>
35 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
37 class LinkbacksettingsAction extends SettingsAction
42 * @return string Page title
46 // TRANS: Title of Linkback settings page for a user.
47 return _m('TITLE','Linkback settings');
51 * Instructions for use
53 * @return string Instructions for use
55 function getInstructions()
57 // TRANS: Form instructions for Linkback settings.
58 return _m('Linkbacks inform post authors when you link to them. ' .
59 'You can disable this feature here.');
62 function showContent()
64 $this->elementStart('form', array('method' => 'post',
65 'class' => 'form_settings',
67 common_local_url('linkbacksettings')));
68 $this->hidden('token', common_session_token());
70 $this->elementStart('fieldset');
71 $this->element('legend', null, _m('LEGEND','Preferences'));
72 $this->checkbox('disable_linkbacks', "Opt out of sending linkbacks for URLs you post", $this->scoped->getPref("linkbackplugin", "disable_linkbacks"));
73 // TRANS: Button text to save OpenID prefs
74 $this->submit('settings_linkback_prefs_save', _m('BUTTON','Save'), 'submit', 'save_prefs');
75 $this->elementEnd('fieldset');
77 $this->elementEnd('form');
81 * Handle a POST request
85 protected function doPost()
87 $x = $this->scoped->setPref("linkbackplugin", "disable_linkbacks", $this->boolean('disable_linkbacks'));
89 return _m('Linkback preferences saved.');