Make oohembed endpoint configurable.

This commit is contained in:
Robin Millette 2009-06-17 16:44:33 -04:00
parent fd6de17a4a
commit 28d02ec8cd
4 changed files with 11 additions and 1 deletions

8
README
View File

@ -1246,6 +1246,14 @@ Options for group functionality.
maxaliases: maximum number of aliases a group can have. Default 3. Set
to 0 or less to prevent aliases in a group.
oohembed
--------
oEmbed endpoint for multimedia attachments (links in posts).
endpoint: oohembed endpoint using http://oohembed.com/ software.
Troubleshooting
===============

View File

@ -53,7 +53,7 @@ class File_oembed extends Memcached_DataObject
function _getOembed($url, $maxwidth = 500, $maxheight = 400, $format = 'json') {
$cmd = 'http://oohembed.com/oohembed/?url=' . urlencode($url);
$cmd = common_config('oohembed', 'endpoint') . '?url=' . urlencode($url);
if (is_int($maxwidth)) $cmd .= "&maxwidth=$maxwidth";
if (is_int($maxheight)) $cmd .= "&maxheight=$maxheight";
if (is_string($format)) $cmd .= "&format=$format";

View File

@ -223,3 +223,4 @@ $config['sphinx']['port'] = 3312;
// $config['attachments']['user_quota'] = 50000000;
// $config['attachments']['monthly_quota'] = 15000000;
// $config['oohembed']['endpoint'] = 'http://oohembed.com/oohembed/';

View File

@ -203,6 +203,7 @@ $config =
),
'group' =>
array('maxaliases' => 3),
'oohembed' => array('endpoint' => 'http://oohembed.com/oohembed/')
);
$config['db'] = &PEAR::getStaticProperty('DB_DataObject','options');