X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fothersettings.php;h=0de7cd90860b1a7cc26198a4e033c5820bb4ef5a;hb=3e9cc76da5b3c2fbf1898a357d1cfb58c7f66d85;hp=f898e220794e3c2c7bad536df3831f0fe6916681;hpb=b5b3690eef0b9223bc5dbfd2a72de165ca8112ad;p=quix0rs-gnu-social.git diff --git a/actions/othersettings.php b/actions/othersettings.php index f898e22079..0de7cd9086 100644 --- a/actions/othersettings.php +++ b/actions/othersettings.php @@ -96,27 +96,28 @@ class OthersettingsAction extends AccountSettingsAction common_local_url('othersettings'))); $this->elementStart('fieldset'); $this->hidden('token', common_session_token()); - - // I18N - - $services = array( - '' => 'None', - 'ur1.ca' => 'ur1.ca (free service)', - '2tu.us' => '2tu.us (free service)', - 'ptiturl.com' => 'ptiturl.com', - 'bit.ly' => 'bit.ly', - 'tinyurl.com' => 'tinyurl.com', - 'is.gd' => 'is.gd', - 'snipr.com' => 'snipr.com', - 'metamark.net' => 'metamark.net' - ); - $this->elementStart('ul', 'form_data'); - $this->elementStart('li'); - $this->dropdown('urlshorteningservice', _('Shorten URLs with'), - $services, _('Automatic shortening service to use.'), - false, $user->urlshorteningservice); - $this->elementEnd('li'); + + $shorteners = array(); + Event::handle('GetUrlShorteners', array(&$shorteners)); + $services = array(); + foreach($shorteners as $name=>$value) + { + $services[$name]=$name; + if($value['freeService']){ + $services[$name].=_(' (free service)'); + } + } + if($services) + { + asort($services); + + $this->elementStart('li'); + $this->dropdown('urlshorteningservice', _('Shorten URLs with'), + $services, _('Automatic shortening service to use.'), + false, $user->urlshorteningservice); + $this->elementEnd('li'); + } $this->elementStart('li'); $this->checkbox('viewdesigns', _('View profile designs'), $user->viewdesigns, _('Show or hide profile designs.'));