additional_plugins/serendipity_event_oembed/oembed/ProviderList.php
Grischa Brockhaus d7336748d9 oEmbed: Switched off errorreporting while trying to fetch oembed code so
it won't disturb output when service is down. Removed pixplz provider as
service is down.
2012-08-28 11:49:49 +02:00

19 lines
743 B
PHP

<?php
class ProviderList {
static function ul_providernames($with_url=false) {
$provider_names = array();
$xml = simplexml_load_file(PLUGIN_OEMBED_PROVIDER_XML_FILE);// PROVIDER_XML comes from config.php
foreach($xml->provider as $provider){
if (isset($provider->name)) {
$pentry = $provider->name;
if ($with_url && isset($provider->url)) {
//$pentry = "<b>$pentry</b><br/>(" . $provider->url . ")";
$pentry = "$pentry";
}
$provider_names[] = $pentry;
}
}
natsort($provider_names);
return "<ol><li>" . implode("</li><li>", $provider_names) . "</li></ol>";
}
}