]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Make oohembed endpoint configurable.
authorRobin Millette <millette@controlyourself.ca>
Wed, 17 Jun 2009 20:44:33 +0000 (16:44 -0400)
committerRobin Millette <millette@controlyourself.ca>
Wed, 17 Jun 2009 20:44:33 +0000 (16:44 -0400)
README
classes/File_oembed.php
config.php.sample
lib/common.php

diff --git a/README b/README
index 3279f7bbaaf80405aae1319475b98396d4efbcdb..7b22e3c5e80369c6f6c45ebd72cf9e4b94115275 100644 (file)
--- a/README
+++ b/README
@@ -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
 ===============
 
index f1b2cb13c02d90a0b50f2c8bf7e2b0c4d522ebda..6bf972f8fe4678a5c6498b0da907148a2b6a4f71 100644 (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";
index 636f4cf8e22255322c0452e154727f1ff3cb0f41..ed70f85fbbdfa53b4a737ca34cd47873c835f31f 100644 (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/';
index 51204cedeaa70e001d5c4020ba973d2b06ebc466..9c015a15d2b6fa4d33f4a1b8ce45f09f70b12869 100644 (file)
@@ -203,6 +203,7 @@ $config =
         ),
         'group' =>
         array('maxaliases' => 3),
+        'oohembed' => array('endpoint' => 'http://oohembed.com/oohembed/')
         );
 
 $config['db'] = &PEAR::getStaticProperty('DB_DataObject','options');