ببساطه عشان يظهر الخبر بهذه الطريقه



واثناء الاضافه






واثناء التحرير




اولا //بنضيف حقلين name2 و title2 لجدول rafia_news واعطاء كل حقل الطول 200 الي مايعرف يتابع الشرح طريقة (لوامكن اخوي عبقري او عبد القاهر يختصروها بامر واحد )

تذهب لصفحه phpMyAdmin وتختار قاعده بيانت المجله كما في الصوره

ونختار من يمين الشاشه الجدول rafia_news


وفي وسط الصفحه بتلاقي الصوره ادناه اكتب رقم 2 ثم تنفيذ


نعطي اسماء للحقلين وهيه name2 و title2 وطول لكل منهما 200 ثم اضغط تنفيذ


راح تلاحظ انه اضيفت في اخر الجدول الحقلين name2 و title2 كما بصوره



انتهت اضافة الجداول بنجاح

ثانيا// استبدل ملف news.php و index.php وملف form.php الموجود بداخل مجد func

ثالثا//التغير في القوالب
1-1 استبدل قالب template news_add ظمن قوالب الاخبار بهذا القالب template

رمز Code:
<script language=&quot;javascript&quot;> function checkForm(){ document.rafia.spam.value ='newsnotspam_$cap'; } </script> <form onsubmit=&quot;return checkForm(this)&quot; action=&quot;news.php?action=insert&quot; method=&quot;post&quot; name=&quot;rafia&quot; enctype=&quot;multipart/form-data&quot;> <table border=&quot;0&quot; width=&quot;90%&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;> <tr> <td align=&quot;right&quot; class=&quot;forum_header&quot;>إضافة خبر </td> </tr> <tr> <td> <table border=&quot;0&quot; width=&quot;100%&quot; id=&quot;table13&quot; cellpadding=&quot;2&quot; class=&quot;fontablt&quot;> $usernamef$useridf$selectform <tr> <td align=&quot;right&quot; nowrap=&quot;&quot; class=&quot;info_bar&quot;>الموضوع : <font color=&quot;#FF0000&quot;>*</font> </td> <td align=&quot;right&quot; width=&quot;100%&quot;> <input type=&quot;text&quot; name=&quot;title&quot; value=&quot;&quot; size=&quot;35&quot; class=&quot;text_box&quot;> </td> </tr> <tr> <td align=&quot;right&quot; nowrap=&quot;&quot; class=&quot;info_bar&quot;>عنوان اختياري : </td> <td align=&quot;right&quot; width=&quot;100%&quot;> <input type=&quot;text&quot; name=&quot;title2&quot; value=&quot;&quot; size=&quot;35&quot; class=&quot;text_box&quot;> </td> </tr> <tr> <td align=&quot;right&quot; nowrap=&quot;&quot; class=&quot;info_bar&quot;>المصدر : </td> <td align=&quot;right&quot; width=&quot;100%&quot;> <input type=&quot;text&quot; name=&quot;name2&quot; value=&quot;&quot; size=&quot;35&quot; class=&quot;text_box&quot;> </td> </tr> $txtcounth<tr> <td align=&quot;right&quot; nowrap=&quot;&quot; class=&quot;info_bar&quot; valign=&quot;top&quot;>رأس الخبر : <br>اختياري</td> <td align=&quot;right&quot; width=&quot;100%&quot;> <textarea name=&quot;post_head&quot; rows=&quot;8&quot; cols=&quot;60&quot; onkeypress=&quot;return countIt();&quot;></textarea></td> </tr> $editor$txtcount<tr> <td align=&quot;right&quot; nowrap=&quot;&quot; class=&quot;info_bar&quot; valign=&quot;top&quot;>نص الخبر : <font color=&quot;#FF0000&quot;>*</font> <br> طول النص يجب ان يكون <br> أقل من : $countpost حرف<br> <center><a href=&quot;#&quot; onmouseover=&quot;return proces()&quot;>إختبار الطول</a><br> تبقى لك : <input size=&quot;5&quot; name=&quot;remain&quot; type=&quot;text&quot; value=&quot;$countpost&quot;> <center></center></center></td> <td align=&quot;right&quot; width=&quot;100%&quot;>$form_code<br> <textarea onmouseover=&quot;return proces()&quot; onbeforeeditfocus=&quot;return proces()&quot; onmouseout=&quot;return proces()&quot; name=&quot;post&quot; rows=&quot;15&quot; cols=&quot;60&quot; id=&quot;post&quot; wrap=&quot;virtual&quot;></textarea><input type=&quot;hidden&quot; name=&quot;left&quot; value=&quot;$countpost&quot; size=&quot;7&quot; class=&quot;text_box&quot;></td> </tr> <tr> <td align=&quot;right&quot; nowrap=&quot;&quot; class=&quot;info_bar&quot;>التبليغ بالبريد الإلكتروني </td> <td align=&quot;right&quot; width=&quot;100%&quot;> <input type=&quot;radio&quot; name=&quot;H&quot; value=&quot;1&quot;> نعم <input type=&quot;radio&quot; name=&quot;H&quot; value=&quot;0&quot; checked> لا </td> </tr> <tr> <td align=&quot;right&quot; nowrap=&quot;&quot; class=&quot;info_bar&quot;>عرض الموضوع في صفحة البداية؟ </td> <td align=&quot;right&quot; width=&quot;100%&quot;> <input type=&quot;radio&quot; name=&quot;inindex&quot; value=&quot;1&quot; checked=&quot;&quot;> نعم&nbsp; <input type=&quot;radio&quot; name=&quot;inindex&quot; value=&quot;0&quot;> لا</td> </tr> <tr> <td align=&quot;right&quot; nowrap=&quot;&quot; class=&quot;info_bar&quot;>عرض الموضوع في قائمة أهم الاخبار؟ </td> <td align=&quot;right&quot; width=&quot;100%&quot;> <input type=&quot;radio&quot; name=&quot;inmenu&quot; value=&quot;1&quot;> نعم&nbsp; <input type=&quot;radio&quot; name=&quot;inmenu&quot; value=&quot;0&quot; checked=&quot;&quot;> لا</td> </tr> $main_n<tr> <td align=&quot;right&quot; nowrap=&quot;&quot; class=&quot;info_bar&quot;>استخدام الصورة الافتراضية للقسم؟ </td> <td align=&quot;right&quot; width=&quot;100%&quot;> <input type=&quot;radio&quot; name=&quot;catmig&quot; value=&quot;1&quot;> نعم&nbsp; <input type=&quot;radio&quot; name=&quot;catmig&quot; value=&quot;0&quot; checked=&quot;&quot;> لا</td> </tr> $fileupload $imgupload $chose_func <input type=&quot;hidden&quot; name=&quot;spam&quot; value=&quot;spam&quot;> <input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;insert&quot;> </table> </td> </tr> <tr> <td align=&quot;center&quot;> <input border=&quot;0&quot; src=&quot;themes/$apt->themepath/newnews.gif&quot; name=&quot;dosubmit&quot; type=&quot;image&quot;> </td> </tr> </table> </form>
1-2 وكلا من قالب template
1-index_main_table في القوالب العامه
2-index_table في القوالب العامه
3- news_topic_list في قوالب الاخبار

بهذا القالب template

رمز Code:
<table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;95%&quot;> <tr> <td height=&quot;14&quot;> <div class=&quot;news_title&quot;> <img border=&quot;0&quot; src=&quot;themes/$apt->themepath/news_icon.gif&quot; width=&quot;12&quot; height=&quot;12&quot;> <a href=&quot;$news_link&quot;>$title</a></div> </td> </tr> <tr> <td height=&quot;7&quot;> <b><font color=&quot;#CC0000&quot;>&nbsp;&nbsp;&nbsp; </font> <a href=&quot;$news_link&quot;><font color=&quot;#CC0000&quot; size=&quot;4&quot;>$title2</font></a></b></td> </tr> <tr> <td height=&quot;7&quot;> <b><font color=&quot;#CC0000&quot;>&nbsp;&nbsp;&nbsp; <span lang=&quot;ar-sa&quot;>المصدر</span><span lang=&quot;ar-sa&quot;>:</span></font><font color=&quot;#0066CC&quot;> $name2</font></b></td> </tr> <tr> <td width=&quot;100%&quot;> <table border=&quot;0&quot; cellpadding=&quot;2&quot; style=&quot;border-collapse: collapse&quot; width=&quot;100%&quot; id=&quot;AutoNumber1&quot; class=&quot;article_info&quot;> <tr> <td align=&quot;right&quot; width=&quot;100%&quot;> <div class=&quot;article_info&quot;> <img border=&quot;0&quot; src=&quot;themes/$apt->themepath/info.gif&quot; width=&quot;13&quot; height=&quot;18&quot;> الكاتب: <a href=&quot;members.php?action=info&userid=$userid& quot;>$name</a> بتاريخ: $date </div> </td> <td nowrap align=&quot;left&quot; colspan=&quot;3&quot;></td> </tr> </table> </td> </tr> <tr> <td width=&quot;100%&quot; style=&quot;padding-top: 5; padding-bottom: 5; text-align: justify&quot;> $newsimage <font class=&quot;home_text&quot;>$news_head </font></td> </tr> <tr> <td align=&quot;right&quot; width=&quot;100%&quot; class=&quot;info_bar2&quot; style=&quot;padding-top: 5; padding-bottom: 5&quot;> <p align=&quot;right&quot;><a href=&quot;$news_link&quot;> <img border=&quot;0&quot; src=&quot;themes/$apt->themepath/readmore.gif&quot; align=&quot;right&quot;></a> </p> <div class=&quot;article_info&quot;> &nbsp; الزوار: $reader&nbsp;&nbsp;&nbsp; التعليقات: $numrows </div> </td> </tr> <tr> <td width=&quot;100%&quot;>$pagenum </td> </tr> </table> <hr color=&quot;#C0C0C0&quot; width=&quot;95%&quot; size=&quot;1&quot; style=&quot;border-style: dotted; border-width: 1px&quot;>
1-3 واستبدل قالب template news_table ظمن قوالب الاخبار بهذا

رمز Code:
<table border=&quot;0&quot; cellpadding=&quot;3&quot; cellspacing=&quot;3&quot; width=&quot;100%&quot;> <tr> <td valign=&quot;top&quot; colspan=&quot;2&quot;> <div class=&quot;news_title&quot;> <img border=&quot;0&quot; src=&quot;themes/$apt->themepath/news_icon.gif&quot; width=&quot;12&quot; height=&quot;12&quot;> $title</div> </td> </tr> <tr> <td height=&quot;7&quot;> <b><font color=&quot;#CC0000&quot;>&nbsp;&nbsp;&nbsp; </font> <a href=&quot;$news_link&quot;><font color=&quot;#CC0000&quot; size=&quot;4&quot;>$title2</font></a></b></td> </tr> <tr> <td height=&quot;7&quot;> <b><font color=&quot;#CC0000&quot;>&nbsp;&nbsp;&nbsp; <span lang=&quot;ar-sa&quot;>المصدر</span><span lang=&quot;ar-sa&quot;>:</span></font><font color=&quot;#0066CC&quot;> $name2</font></b></td> </tr> <tr> <td align=&quot;right&quot; valign=&quot;top&quot;> <div class=&quot;article_info&quot;> <img border=&quot;0&quot; src=&quot;themes/$apt->themepath/info.gif&quot; width=&quot;13&quot; height=&quot;18&quot;> بواسطة: <a href=&quot;members.php?action=info&amp;amp;userid= $userid&quot;>$username</a><br> بتاريخ : $date </div> </td> <td valign=&quot;top&quot;> <p align=&quot;left&quot;> <a href=&quot;javascript:rafiawin('popup.php?action=p rintnews&id=$id',500,600)&quot;> <img border=&quot;0&quot; src=&quot;themes/$apt->themepath/print_page.gif&quot; width=&quot;70&quot; height=&quot;24&quot;></a><a href=&quot;mail.php?action=sendpage&quot;><img border=&quot;0&quot; src=&quot;themes/$apt->themepath/send_f.gif&quot; width=&quot;70&quot; height=&quot;24&quot;></a><a href=&quot;pdf.php?id=$id&quot;><img border=&quot;0&quot; src=&quot;themes/$apt->themepath/pdf.gif&quot; width=&quot;70&quot; height=&quot;24&quot;></a><br> <a href=&quot;translate.php&quot;> <img border=&quot;0&quot; src=&quot;themes/$apt->themepath/t.gif&quot; width=&quot;70&quot; height=&quot;24&quot;></a><a href=&quot;filemanager.php?action=save&id=$id&quot ;><img border=&quot;0&quot; src=&quot;themes/$apt->themepath/save.gif&quot; width=&quot;70&quot; height=&quot;24&quot;></a><a href=&quot;$PHP_SELF?action=addcomment&amp;amp;id= $postid&quot;><img border=&quot;0&quot; src=&quot;themes/$apt->themepath/add_comment.gif&quot; width=&quot;70&quot; height=&quot;24&quot;></a></p> </td> </td> </tr> </table> <table border=&quot;0&quot; cellpadding=&quot;3&quot; cellspacing=&quot;3&quot; width=&quot;100%&quot;> <tr> <td align=&quot;right&quot; width=&quot;100%&quot; class=&quot;normal&quot;> <div class=&quot;article_pic&quot;> $newsimage</div> $news_head<br> $post </td> </tr> <tr> <td width=&quot;100%&quot;> <div class=&quot;article_info&quot;> <img border=&quot;0&quot; src=&quot;themes/$apt->themepath/info.gif&quot; width=&quot;13&quot; height=&quot;18&quot;> مرات القراءة: $reader - التعليقات: $c_comment</div> </td> </tr> </table> <hr color=&quot;#C0C0C0&quot; width=&quot;95%&quot; size=&quot;1&quot; style=&quot;border-style: dotted; border-width: 1px&quot;> <br> <b><center>$topic_nav</center></b>
بالنسبه للقوالب حررها وراح تلاحظوجود متغيرين $title2 و $name كلهم مثل ماتحب غير لون خطهم او نوعه او حجمه

ملاحظه // رح تلاحظ اثناء اضافه خبر مابتظهر رساله الخطاء الي كان يشتكي منها مستخدمي محرر html هو تحقق من كتابت عنوان الخبر
ملاحظه اخرى//انا معدل على ملفاتي بحيث انه محرر html يظهر في كامل المنتدى forum بطلب من الاخوان في هذا الموضوع
http://dzbatna.net/vb/showthread.php?t=1235147
http://www.arab-portal.info/forum.ph...n=view&id=6877

يعني الي يحب ازيل المحرر وارجع العادي للمنتدى فقط يطلب
مرفق صور الشرح طريقة متسلسله + الملفات


الملفات المرفقة [TR]
اضافه_للاخبار.zip (256.6 كيلوبايت, عدد مرات المشاهدة 33 مرة) [/TR]



©المشاركات المنشورة تعبر عن وجهة نظر صاحبها فقط، ولا تُعبّر بأي شكل من الأشكال عن وجهة نظر إدارة المنتدى©