Ejemplo n.º 1
0
 public static function content($full = false)
 {
     global $post;
     global $theme;
     if ($post['type'] == 'quote') {
         $html = '<blockquote>' . $post['quote'] . '</blockquote>';
     } elseif ($post['type'] == 'video') {
         $video_width = !isset($theme['video_width']) ? 640 : $theme['video_width'];
         $video_height = !isset($theme['video_height']) ? 320 : $theme['video_height'];
         $video_info = Video::video_get_info($post['video'], $video_width, $video_height);
         $html = '<div class="video-embed">';
         $html .= $video_info['embed'];
         $html .= '</div>';
     } else {
         if ($full) {
             $html = $post['content'][0];
         } else {
             $html = $post['content'][1];
         }
     }
     return $html;
 }
Ejemplo n.º 2
0
<?php

header("Content-Type: text/xml");
require '../boot/ajax.bit';
require 'security.bit';
$error = Video::video_get_info($_POST['url']);
if ($error == false) {
    exit(Text::ajax_header('<error><![CDATA[1]]></error>'));
} else {
    exit(Text::ajax_header('<success><![CDATA[1]]></success><title><![CDATA[' . $error['title'] . ']]></title>'));
}