From 7a1dd5798f0fcf2c03d1257a18ddcb9008879de0 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Sat, 24 Apr 2010 14:05:46 -0400 Subject: [PATCH] add defaults for URL shortening --- README | 20 +++++++++++++++++--- lib/default.php | 4 ++++ 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/README b/README index 1e244c4482..dcf305ea6f 100644 --- a/README +++ b/README @@ -843,9 +843,7 @@ sslserver: use an alternate server name for SSL URLs, like parameters correctly so that both the SSL server and the "normal" server can access the session cookie and preferably other cookies as well. -shorturllength: Length of URL at which URLs in a message exceeding 140 - characters will be sent to the user's chosen - shortening service. +shorturllength: ignored. See 'url' section below. dupelimit: minimum time allowed for one person to say the same thing twice. Default 60s. Anything lower is considered a user or UI error. @@ -1468,6 +1466,22 @@ disallow: Array of (virtual) directories to disallow. Default is 'main', 'search', 'message', 'settings', 'admin'. Ignored when site is private, in which case the entire site ('/') is disallowed. +url +--- + +Everybody loves URL shorteners. These are some options for fine-tuning +how and when the server shortens URLs. + +shortener: URL shortening service to use by default. Users can override + individually. 'ur1.ca' by default. +maxlength: If an URL is strictly longer than this limit, it will be + shortened. Note that the URL shortener service may return an + URL longer than this limit. Defaults to 25. Users can + override. If set to 0, all URLs will be shortened. +maxnoticelength: If a notice is strictly longer than this limit, all + URLs in the notice will be shortened. Users can override. + -1 means the text limit for notices. + Plugins ======= diff --git a/lib/default.php b/lib/default.php index c98f179ae1..dec08fc066 100644 --- a/lib/default.php +++ b/lib/default.php @@ -304,4 +304,8 @@ $default = array('subscribers' => true, 'members' => true, 'peopletag' => true), + 'url' => + array('shortener' => 'ur1.ca', + 'maxlength' => 25, + 'maxnoticelength' => -1) ); -- 2.39.5