لكل شخص في حياته شيء مركزي، يجذبه أي شيء له علاقة به، يشاهد أي برنامج على الشاشة يتحدث عنه، لعل أول الصفحات التي يطالعها تكون في موضوعه ينقب ويبحث عنه، لديه المزيد ..

كيف تضيف فيديو ذات صلة بمواضيعك فى ووردبريس تلقائيا؟

15 نوفمبر 2009 | بواسطة: قبطان | 220 مشاهدة

يمكنك اضافة شريط الفيديو المرتبط دلاليا بمواضيعك فى المدونة مثل هذا الشريط الموجود اسفل كل تدوينة من تدويناتى

لاصحاب المواقع يمكنك التحكم فى الشريط من هنا

شريط الفيديو

افتح ملف: عرض تدوينة مفردة (single.php)

اضف الكود تحت التدوينة مباشرة


<!-- ++بداية شريط الفيديو من قبطان++ -->
  <!--
  // Created with a Google AJAX Search Wizard
  // http://code.google.com/apis/ajaxsearch/wizards.html
  -->
 
  <!--
  // The Following div element will end up holding the actual videobar.
  // You can place this anywhere on your page.
  -->
  <div id="videoBar-bar">
    <span style="color:#676767;font-size:11px;margin:10px;padding:4px;">جارى تحميل الفيديو...</span>
  </div>
 
  <!-- Ajax Search Api and Stylesheet
  // Note: If you are already using the AJAX Search API, then do not include it
  //       or its stylesheet again
  -->
  <script src="http://www.google.com/uds/api?file=uds.js&v=1.0&source=uds-vbw"
    type="text/javascript"></script>
  <style type="text/css">
    @import url("http://www.google.com/uds/css/gsearch.css");
  </style>
 
  <!-- Video Bar Code and Stylesheet -->
  <script type="text/javascript">
    window._uds_vbw_donotrepair = true;
  </script>
  <script src="http://www.google.com/uds/solutions/videobar/gsvideobar.js?mode=new"
    type="text/javascript"></script>
  <style type="text/css">
    @import url("http://www.google.com/uds/solutions/videobar/gsvideobar.css");
  </style>
 
  <style type="text/css">
    .playerInnerBox_gsvb .player_gsvb {
      width : 320px;
      height : 260px;
    }
  </style>
  <script type="text/javascript">
    function LoadVideoBar() {
 
    var videoBar;
    var options = {
        largeResultSet : !true,
        horizontal : true,
        autoExecuteList : {
          cycleTime : GSvideoBar.CYCLE_TIME_MEDIUM,
          cycleMode : GSvideoBar.CYCLE_MODE_LINEAR,
          executeList : ["< ?php
$posttags = get_the_tags();
$count=0;
if ($posttags) {
foreach($posttags as $tag) {
$count++;
if (1 == $count) {
echo $tag->name . ' ';
}
}
}
?>","< ?php
$posttags = get_the_tags();
$count=0;
if ($posttags) {
foreach($posttags as $tag) {
$count++;
if (2 == $count) {
echo $tag->name . ' ';
}
}
}
?>","< ?php
$posttags = get_the_tags();
$count=0;
if ($posttags) {
foreach($posttags as $tag) {
$count++;
if (3 == $count) {
echo $tag->name . ' ';
}
}
}
?>","< ?php
$posttags = get_the_tags();
$count=0;
if ($posttags) {
foreach($posttags as $tag) {
$count++;
if (4 == $count) {
echo $tag->name . ' ';
}
}
}
?>"]
        }
      }
 
    videoBar = new GSvideoBar(document.getElementById("videoBar-bar"),
                              GSvideoBar.PLAYER_ROOT_FLOATING,
                              options);
    }
    // arrange for this function to be called during body.onload
    // event processing
    GSearch.setOnLoadCallback(LoadVideoBar);
  </script>
<!-- ++نهاية شريط الفيديو من قبطان++ -->
شارك مع قبطان:
  • Digg
  • del.icio.us
  • Facebook
  • StumbleUpon
  • Google Bookmarks
  • Live
  • LinkedIn
  • MySpace
  • PDF
  • RSS
  • Yahoo! Bookmarks
  • Twitter

مواضيع ذات صلة:

جارى تحميل الفيديو...

2 تعليقات » مصنف في: تطوير

2 من التعليقات لـ “كيف تضيف فيديو ذات صلة بمواضيعك فى ووردبريس تلقائيا؟”

  1. فرح قال:

    شكرا لك ..
    وسيتم قريبا اضافتها بمدونتي..

أضف تعليقك