تم وبحمد الله من تطوير موديول الميديا ليجلب صورة من اليوتيوب عند اضافة مقطع يوتيوب
وتم ايضا حل مشكلة عدم ظهور مقاطع بصيغة .flv
ايضا تم تغيير مشغل اليوتيوب وملفات flv بمشغل جميل بحيث لاتظهر روابط اليوتيوب المزعجة والاعلانات
اثناء مشاهدة المقاطع
في الملف المرفق
ارفع الملفات التالية الى داخل مجلد الميديا modules/media
editpost.php
item.php
new.php
في نفس المرفق ايضا تجدون مجلد اسمه portal ارفع مابداخله فقط الى مجلد البوابة الرئيسي
ثم نقوم بالتعديل على قوالب الميديا
نذهب الى البرامج الاضافية +قوالب البرامج الاضافية+من امام مكتبة الميديا نختار عرض ثم سيظهر لنا الافتراضي من امامه نختار عرض
ثم نفتح القالب media_add_post
نستبدل مابداخل القالب بهذا الكود
function checkForm(){
if (!document.rafia.title.value) {
alert('عفوا ... انت لم تقم بكتابة عنوان المشاركة');
return false;
}
if (!document.rafia.cat_list.value) {
alert('عفوا ... انت لم تقم باختيار القسم');
return false;
}
document.rafia.spam.value ='newsnotspam_$cap';
}
</script>
<div align="center">
<center>
<table id="table7" dir="ltr" style="BORDER-COLLAPSE: collapse" borderColor="#111111" cellSpacing="0" cellPadding="0" width="95%" border="0">
<tr>
<td width="22"><font color="#000080">
<img height="35" alt src="modules/media/theme/apt2/menur_03.gif" width="22"></font></td>
<td width="100%" background="modules/media/theme/apt2/menuTr_04.gif">
<p align="right"><font color="#FFFFFF"><b>أضف مشاركة جديد</b></font></p>
</td>
<td width="15"><font color="#000080">
<img height="35" alt src="modules/media/theme/apt2/menur_05.gif" width="16"></font></td>
</tr>
</table>
</center>
</div>
<div align="center">
<center>
<table class="headertable" id="table8" style="BORDER-COLLAPSE: collapse" borderColor="#516A93" cellSpacing="0" cellPadding="2" width="95%" border="1">
<tr>
<td class="datacell" style="BACKGROUND-COLOR: #F5F8FD" align="center" width="155" height="6">
<b>عنوان المشاركة:</b></td>
<td class="datacell" style="BACKGROUND-COLOR: #F5F8FD" align="center" width="547" height="6" colspan="2">
<form onsubmit='return checkForm(this)' name=rafia method="POST" enctype="multipart/form-data" action="mod.php?mod=media&modfile=new&mode=post"><input name="title" size="54" style="float: right"></td>
</tr>
<tr>
<td class="datacell" style="BACKGROUND-COLOR: #F5F8FD" align="center" width="155" height="12" rowspan="2">
<b>بصوت:</b></td>
<td class="datacell" style="BACKGROUND-COLOR: #F5F8FD" align="center" width="547" height="6" colspan="2">
$moalif_list</td>
</tr>
<tr>
<td class="datacell" style="BACKGROUND-COLOR: #F5F8FD" align="center" width="547" height="6" colspan="2">
<input name="moalif" size="54" style="float: right"></td>
</tr>
<tr>
<td class="datacell" style="BACKGROUND-COLOR: #F5F8FD" align="center" width="155" height="5">
<b>مكان المشاركة:</b></td>
<td class="datacell" style="BACKGROUND-COLOR: #F5F8FD" align="center" width="547" height="5" colspan="2">$cat_list
</td>
</tr>
<tr>
<td class="datacell" style="BACKGROUND-COLOR: #F5F8FD" align="center" width="155" height="6" rowspan="2">
<b>رابط الملف :</b><br>الحجم : $file_size<br>
الامتدادات : flv,mp3,rm,wma,wmv,rm,ram,swf,avi
</td>
<td class="datacell" style="BACKGROUND-COLOR: #F5F8FD" align="center" width="165" height="2">
<b>رابط مباشر:</b></td>
<td class="datacell" style="BACKGROUND-COLOR: #F5F8FD" align="center" width="382" height="2">
<input dir=ltr value='http://' name="live_link" size="40" style="float: right"></td>
</tr>
<td class="datacell" style="BACKGROUND-COLOR: #F5F8FD" align="center" width="165" height="2">
<b>كود الصورة اذا كان يوتيوب فقط اللذي باللون الاحمر</b><b> فقط:
</b><a href="http://www.youtube.com/watch?v=vEnqBUdIGc4">
http://www.youtube.com/watch?v=<font color="#FF0000">vEnqBUdIGc4</font></a></td>
<td class="datacell" style="BACKGROUND-COLOR: #F5F8FD" align="center" width="382" height="2">
<input type=text value='' name="item_p" size="40" style="float: right"></td>
</tr>
<tr>
<td class="datacell" style="BACKGROUND-COLOR: #F5F8FD" align="center" width="165" height="2">
<b>ارفع ملف من الحاسوب:</b></td>
<td class="datacell" style="BACKGROUND-COLOR: #F5F8FD" align="center" width="382" height="2">
<input type="file" name="live_upload" size="24" style="float: right"></p>
</td>
</tr>
<tr>
<td class="datacell" style="BACKGROUND-COLOR: #F5F8FD" align="center" width="155" height="5">
<b>وصف المشاركة:</b></td>
<td class="datacell" style="BACKGROUND-COLOR: #F5F8FD" align="center" colspan="2">
<p>$form_code <br>
<textarea name="post" rows="5" cols="57"></textarea>
</td>
</tr>
<tr>
<td class="datacell" style="BACKGROUND-COLOR: #F5F8FD" align="center" width="155" height="5">
<b>السماح للزوار بالتعليق:</b></td>
<td class="datacell" style="BACKGROUND-COLOR: #F5F8FD" align="center" width="547" height="5" colspan="2">
<b><input type=radio value=1 checked name=item_comm>نعم
<input type=radio value=0 name=item_comm> لا</b>
</td>
</tr>
<tr>
<td class="datacell" style="BACKGROUND-COLOR: #F5F8FD" align="center" width="702" height="2" colspan="3">
<input type="submit" value="إرسال" name="save"><input type="hidden" name="spam" value="spam"></td>
</tr>
</table>
</center>
</div>
<div align="center">
<center>
<table id="table9" dir="ltr" style="BORDER-COLLAPSE: collapse" borderColor="#111111" cellSpacing="0" cellPadding="0" width="95%" border="0">
<tr>
<td><font color="#000080">
<img height="14" alt src="modules/media/theme/apt2/menuTr_09.gif" width="17"></font></td>
<td><font color="#000080">
<img height="14" alt src="modules/media/theme/apt2/menuTr_10.gif" width="33"></font></td>
<td width="100%" background="modules/media/theme/apt2/menuTr_11.gif">
<font color="#000080"><img height="14" src width="2"></font></td>
<td><font color="#000080">
<img height="14" alt src="modules/media/theme/apt2/menuTr_12.gif" width="11"></font></td>
</tr>
</table>
</center>
</div>
</form>
<br>
ثم نضغط على تحرير
------------------------
ثم نفتح قالب media_edit_post
نستبدل مابداخله بهذا الكود
<center>
<table id="table7" dir="ltr" style="BORDER-COLLAPSE: collapse" borderColor="#111111" cellSpacing="0" cellPadding="0" width="95%" border="0">
<tr>
<td width="22"><font color="#000080">
<img height="35" alt src="modules/media/theme/apt2/menur_03.gif" width="22"></font></td>
<td width="100%" background="modules/media/theme/apt2/menuTr_04.gif">
<p align="right"><font color="#FFFFFF"><b>تعديل المشاركة</b></font></p>
</td>
<td width="15"><font color="#000080">
<img height="35" alt src="modules/media/theme/apt2/menur_05.gif" width="16"></font></td>
</tr>
</table>
</center>
</div>
<div align="center">
<center>
<table class="headertable" id="table8" style="BORDER-COLLAPSE: collapse" borderColor="#516A93" cellSpacing="0" cellPadding="2" width="95%" border="1">
<tr>
<td class="datacell" style="BACKGROUND-COLOR: #F5F8FD" align="center" width="155" height="6">
<b>عنوان المشاركة:</b></td>
<td class="datacell" style="BACKGROUND-COLOR: #F5F8FD" align="center" width="547" height="6" colspan="2">
<form name=rafia method="POST" enctype="multipart/form-data" action="mod.php?mod=media&modfile=editpost&act=doedit&itemid=$itemid">
<input name="item_title" size="54" style="float: right" value="$item_title"></td>
</tr>
<tr>
<td class="datacell" style="BACKGROUND-COLOR: #F5F8FD" align="center" width="155" height="6">
<b>المشارك:</b></td>
<td class="datacell" style="BACKGROUND-COLOR: #F5F8FD" align="center" width="547" height="6" colspan="2">
<form name=rafia method="POST" enctype="multipart/form-data" action="mod.php?mod=media&modfile=editpost&act=doedit&itemid=$itemid">
<input name="item_moalif" size="54" style="float: right" value="$item_moalif"></td>
</tr>
<tr>
<td class="datacell" style="BACKGROUND-COLOR: #F5F8FD" align="center" width="155" height="5">
<b>مكان المشاركة:</b></td>
<td class="datacell" style="BACKGROUND-COLOR: #F5F8FD" align="center" width="547" height="5" colspan="2">$cat_list
</td>
</tr>
<tr>
<td class="datacell" style="BACKGROUND-COLOR: #F5F8FD" align="center" width="155" height="6">
<b>رابط الملف :</b></td>
<td class="datacell" style="BACKGROUND-COLOR: #F5F8FD" align="center" width="165" height="2">
</td>
<td class="datacell" style="BACKGROUND-COLOR: #F5F8FD" align="center" width="382" height="2">
<input dir=ltr value='$item_link' name="item_link" size="40" style="float: right">
<br>
<input type="file" name="live_upload" size="30" style="float: right">
</td>
</tr>
<td class="datacell" style="BACKGROUND-COLOR: #F5F8FD" align="center" width="155" height="6">
<b>كود الصورة اذا كان ملف يوتيوب مثال <font color="#FF0000">vEnqBUdIGc4</font></b></td>
<td class="datacell" style="BACKGROUND-COLOR: #F5F8FD" align="center" width="165" height="2">
</td>
<td class="datacell" style="BACKGROUND-COLOR: #F5F8FD" align="center" width="382" height="2">
<input name="item_p" size="54" style="float: right" value="$item_p">
<br>
</td>
</tr>
<tr>
<td class="datacell" style="BACKGROUND-COLOR: #F5F8FD" align="center" width="155" height="5">
<b>وصف المشاركة:</b></td>
<td class="datacell" style="BACKGROUND-COLOR: #F5F8FD" align="center" colspan="2">
<p>$form_code <br>
<textarea name="post" rows="5" cols="57">$item_desc</textarea>
</td>
</tr>
<tr>
<td class="datacell" style="BACKGROUND-COLOR: #F5F8FD" align="center" width="155" height="5">
<b>السماح للزوار بالتعليق:</b></td>
<td class="datacell" style="BACKGROUND-COLOR: #F5F8FD" align="center" width="547" height="5" colspan="2">
$item_comm
</td>
</tr>
<tr>
<td class="datacell" style="BACKGROUND-COLOR: #F5F8FD" align="center" width="702" height="2" colspan="3">
<input type="submit" value="تعديل المشاركة" name="save">
<input type="submit" value="حذف المشاركة" name="delete">
</td>
</tr>
</table>
</center>
</div>
<div align="center">
<center>
<table id="table9" dir="ltr" style="BORDER-COLLAPSE: collapse" borderColor="#111111" cellSpacing="0" cellPadding="0" width="95%" border="0">
<tr>
<td><font color="#000080">
<img height="14" alt src="modules/media/theme/apt2/menuTr_09.gif" width="17"></font></td>
<td><font color="#000080">
<img height="14" alt src="modules/media/theme/apt2/menuTr_10.gif" width="33"></font></td>
<td width="100%" background="modules/media/theme/apt2/menuTr_11.gif">
<font color="#000080"><img height="14" src width="2"></font></td>
<td><font color="#000080">
<img height="14" alt src="modules/media/theme/apt2/menuTr_12.gif" width="11"></font></td>
</tr>
</table>
</center>
</div>
</form>
<br>
ثم نضغط على تحرير
--------------------------------
بقيت خطوة اخيرة وهي الاهم
اذهب الى لوحة التحكم للبوابة
ثم الاعدادات
اختر النسخ الاحتياطي
ثم ضع في الصندوق محرر اوامر قاعدة البيانات
هذا الكود
ALTER TABLE `rafia_media_items` ADD `item_p` VARCHAR( 200 ) NOT NULL AFTER `item_title` ;
واضغط على تحرير
انتهى الشرح
اتمنى تاني وفقت في الشرح وان ينال اعجابكم
ولاتنسونا من الدعاء




Copyright©2012 All Rights Reserved