예제 #1
0
</div>
<div >
<span class="yt_menu">Navigation</span>
</div>
<div id="yt_ent" style="display: block;">
 <div id="videos2"></div>
 <div id="yt_navbloc"> <span class="yt_soustitre">' . video_yt_translate('Vid&#xE9;os') . '</span> 1 <span class="yt_soustitre">' . video_yt_translate('&#xE0;') . '</span> ' . $incrementby . ' <span class="yt_soustitre">' . video_yt_translate('total') . ' :</span> ' . $ar_channel_info[4];
    if ($total_found > $incrementby) {
        $ent_affi .= '&nbsp;&nbsp;<a class="e" href=" javascript:yt.appendScriptTag(\'http://gdata.youtube.com/feeds/api/\',\'videos\',\'\',\'showMyVideos2\',\'jsonscript\',' . ($incrementby + 1) . ',' . $incrementby . ',\'&amp;author=' . $account . '\',\'flyingscript\')">[' . video_yt_translate('Suivantes') . ']</a><a class="e" href="javascript:yt.appendScriptTag(\'http://gdata.youtube.com/feeds/api/\',\'videos\',\'\',\'showMyVideos2\',\'jsonscript\',\'20\',\'7\',\'&amp;author=' . $account . '\',\'flyingscript\')">[' . video_yt_translate('Derni&#xE8;res') . ']</a>';
    }
    $ent_affi .= '</div></div><hr noshade="noshade" />';
    echo $ent_affi;
}
//<-- construit l'entete de la videotheque
//==> Affichage page
entvideo();
echo '
<div id="yt_bouton_visua">
<a href="javascript:show_visua();"><img src="modules/' . $ModPath . '/images/fl_d.gif"  alt="triangle pointe a droite" title="' . video_yt_translate('Voir le panneau de visualisation') . '" border="0" /></a>
</div> <span class="yt_menu">Visualisation</span>
<div id="yt_visua" style="display:none;" >
<table>
 <tbody>
  <tr>
   <td id="media_video">
    <div id="yt_playercontainer"></div>
   </td>
   <td id="detail_video"></td>
  </tr>
 </tbody>
</table>
예제 #2
0
function listvideo()
{
    global $author, $account, $rep_account, $class_sty_1, $class_sty_2, $ar_author, $ar_title, $ar_description, $ar_tags, $ar_length_seconds, $ar_view_count, $ar_category, $ar_thumbnail_media, $ar_rating_count, $ar_rating_min, $ar_rating_max, $ar_rating_avg, $ar_description, $ar_view_count, $ar_update_time, $ar_upload_time, $ar_comment_count, $pat, $video_width, $video_height, $ar_id, $op, $nb_comment, $ar_comment_time, $ar_comment_date, $ar_comment_author, $ar_comment_text, $incrementby, $ar_meta_inf, $ar_localisation, $nav_block, $language, $bg_yt_search;
    entvideo();
    //affiche l'entete de la page videotheque
    $affichage = '<table border="1">';
    for ($u = 0; $u < 1; $u++) {
        $lat_vi = preg_replace('#(\\d+\\.\\d+)( )(\\d+\\.\\d+)#', '\\1', $ar_localisation[$u]);
        $long_vi = preg_replace('#(\\d+\\.\\d+)( )(\\d+\\.\\d+)#', '\\3', $ar_localisation[$u]);
        $affichage .= '<tr><td><a href="javascript:videoOverlay(\'' . $ar_id[$u] . '\',' . $video_width . ',' . $video_height . ');"><img src ="' . reset($ar_thumbnail_media[$u]) . '" title="' . $ar_title[$u] . '" alt="' . $ar_title[$u] . ' : ' . $ar_description[$u] . '" onmouseout="mouseOutImage(this)" onmouseover="mousOverImage(this,' . $ar_id[$u] . ',2)"></a><br /><br />
    <span class="' . $class_sty_2 . '">' . video_yt_translate('Titre :') . ' </span>' . $ar_title[$u] . '<br />
    <span class="' . $class_sty_2 . '">' . video_yt_translate('Auteur :') . ' </span>' . $author . '<br/>
    <span class="' . $class_sty_2 . '">' . video_yt_translate('Description :') . ' </span>' . $ar_description[$u] . '<br />
    <span class="' . $class_sty_2 . '">' . video_yt_translate('Dur&#xE9;e :') . ' </span>' . $ar_length_seconds[$u] . '<br />
    <span class="' . $class_sty_2 . '">' . video_yt_translate('Cat&#xE9;gorie :') . ' </span>' . $ar_category[$u] . '<br />
    <span class="' . $class_sty_2 . '">' . video_yt_translate('Votes :') . ' </span>' . $ar_rating_count[$u] . '<br />
    <span class="' . $class_sty_2 . '">' . video_yt_translate('Moyenne des votes :') . ' </span><span title="' . $ar_rating_min[$u] . '|' . $ar_rating_max[$u] . '">' . $ar_rating_avg[$u] . '</span><br />
    <span class="' . $class_sty_2 . '">' . video_yt_translate('Vu :') . ' </span>' . $ar_view_count[$u] . '<br />
    <span class="' . $class_sty_2 . '">' . video_yt_translate('Ajout&#xE9;e le :') . ' </span><span class="help" title ="' . video_yt_translate('Modifi&#xE9; le') . ' ' . preg_replace('#(\\d+)(-)(\\d+)(-)(\\d+)#', '\\5/\\3/\\1', $ar_update_time[$u]) . '">' . preg_replace('#(\\d+)(-)(\\d+)(-)(\\d+)#', '\\5/\\3/\\1', $ar_upload_time[$u]) . '</span><br />
    <span class="' . $class_sty_2 . '">' . video_yt_translate('Commentaire(s) :') . ' </span>' . $ar_comment_count[$u] . '<br />
    <span class="' . $class_sty_2 . '">' . video_yt_translate('Mots-clefs :') . ' </span>' . preg_replace('#\\b([\\w]*)\\b(\\s|,|)#', '<a href= "javascript:  insertVideos(\'yt_search\',\'search\',\'\\1\',\'20\',1,\'' . $language . '\');"   title="' . video_yt_translate('Cherche le mot-clef @ YouTube.com') . '">\\1</a>\\2', $ar_tags[$u]) . '<br /><br />';
        if (!empty($ar_localisation[$u])) {
            //affichage coordonnées si existent
            $affichage .= '<span class="' . $class_sty_2 . '">' . video_yt_translate('Localisation :') . ' </span><br />' . video_yt_translate('Latitude :') . ' ' . preg_replace('#(\\d+\\.\\d+)( )(\\d+\\.\\d+)#', '\\1', $ar_localisation[$u]) . '<br />' . video_yt_translate("Longitude :") . ' ' . preg_replace('#(\\d+\\.\\d+)( )(\\d+\\.\\d+)#', '\\3', $ar_localisation[$u]) . '<br /><br />';
        }
        if ($op != 'detailvideo') {
            $affichage .= '<br /><hr/><a href="javascript:show_tool();"><img src="modules/video_yt/images/fl_d.gif" border="0" height="10px" width="10px" /></a><a href="modules.php?ModPath=video_yt&amp;ModStart=video_yt01&amp;op=detailvideo&amp;video_id=' . $ar_id[$u] . '" title="' . video_yt_translate('Plus de d&#xE9;tail sur cette vid&#xE9;o') . '">' . video_yt_translate('D&#xE9;tail') . '</a><br /><br />';
        }
        if ($op == 'detailvideo' and $nb_comment > 0) {
            $affichage .= '<br /><span class="' . $class_sty_2 . '">' . video_yt_translate('Commentaire(s) :') . ' </span><br />';
            for ($ii = 0; $ii < $nb_comment; $ii++) {
                $affichage .= '<span title="' . $ar_comment_time[$ii] . '">' . preg_replace('#(\\d+)(-)(\\d+)(-)(\\d+)#', '\\5/\\3/\\1', $ar_comment_date[$ii]) . '</span><br /><span><a href=" http://youtube.com/profile?user='******'" title="' . video_yt_translate('Voir le profil @ YouTube.com') . '">' . $ar_comment_author[$ii] . '</a> : </span><span class="' . $class_sty_3 . '"> ' . $ar_comment_text[$ii] . '</span><br />';
            }
        }
        if ($op == 'detailvideo' and !empty($ar_localisation[$u])) {
            $affichage .= '<br /><div id="map_vid">Map loading...Or Google servers are down...</div>';
            //affichage localisation google
            $affichage .= '
<script type="text/javascript">
//<![CDATA[
      var sidebar_html = "";
      var gmarkers = [];
      var htmls = [];
      var i = 0;

     //création du marker et construction de la fenetre info
      function createMarker(point,name,html) {
        var marker = new GMarker(point,icon);
        GEvent.addListener(marker, "click", function() {
          marker.openInfoWindowHtml(html);
        });
        // save the info we need to use later for the sidebar
        gmarkers[i] = marker;
        htmls[i] = html;
        // add a line to the sidebar html
        sidebar_html += \'<a href="javascript:myclick(\' + i + \')" onmouseover="myclick(\'+i+\')">\' + name + \'</a>&nbsp;\';
        i++;
        return marker;
      }

// Création de icone vidéo
var icon = new GIcon();
icon.image = "modules/video_yt/images/webcam.png";
// icon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
icon.iconSize = new GSize(32, 32);
icon.shadowSize = new GSize(22, 20);
icon.iconAnchor = new GPoint(6, 20);
icon.infoWindowAnchor = new GPoint(5, 1);

      // This function picks up the click and opens the corresponding info window
      function myclick(i) {
        gmarkers[i].openInfoWindowHtml(htmls[i]);
      }
var map_vid = new GMap2(document.getElementById("map_vid"));
map_vid.setCenter(new GLatLng(' . $lat_vi . ',' . $long_vi . '), 4,G_NORMAL_MAP);
map_vid.addControl(new GScaleControl());
var point = new GLatLng(' . $lat_vi . ',' . $long_vi . ');' . "\n" . '
var marker = createMarker(point,"", \'\');' . "\n" . '
map_vid.addOverlay(marker);' . "\n" . '
      //]]>
</script>
   ';
        }
        $affichage .= '
    </td>
    <td>
    <div id="youtubeoverlay">
    <script>videoOverlay(\'' . $ar_id[$u] . '\',' . $video_width . ',' . $video_height . ');</script>
    </div>
    </td>
</tr>
</table>';
    }
    //<div id=\"yt_search\" style=\"display: block; clear: both\"></div><object width=\"600\" height=\"400\"></div> <param name=\"movie\" value=\"http://www.youtube.com/v/$ar_id[$u]\"></param><param name=\"wmode\" value=\"transparent\"></param><embed src=\"http://www.youtube.com/v/$ar_id[$u]\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"$video_width\" height=\"$video_height\"></embed></object><br />
    // if(!isset($_GET['video_id']))
    // {$affichage .='<br />'.$nav_block;}
    // else
    // {$affichage .='<br /><a href="modules.php?ModPath=video_yt&amp;ModStart=video_yt01">'.video_yt_translate("Vid&#xE9;oth&#xE8;que").'</a><hr />';}
    echo $affichage;
}