عرض مشاركة مفردة
 
  #6  
قديم 25-10-2006, 12:20 PM
الأمير الصغير الأمير الصغير غير متصل
عضو
 
تاريخ التسجيل: Oct 2006
مشاركة: 35
مستوى تقييم العضوية: 0
الأمير الصغير is on a distinguished road
الافتراضي

ريونة ..

الأن يمكن هيدى الدرس يفيدك
وهو

إقتباس:

اقتباس من مشاركة sh2soft.net   مشاهدة المشاركة

   بسم الله الرحمن الرحيم
اول موضوع سيكون جامد حبتين ونص لعيون الترايدنت العربية

مثال على ذلك :
http://www.sh2soft.net/nuke/index.html
http://www.sh2soft.net/nuke/Sh2soft_News.html
http://www.sh2soft.net/nuke/Messenger.html
http://www.sh2soft.net/nuke/Sections.html
الطريقة :
1. افتح ملف جديد بالمفكرة واضف اليه :

كود PHP:
RewriteEngine On
RewriteBase 
/
#Sections
RewriteRule ^Sections.html modules.php?name=Sections
RewriteRule 
^Sections_article([0-9]+).htmlmodules.php?name=Sections&op=viewarticle&artid=$1
RewriteRule 
^Sections_category([0-9]+).htmlmodules.php?name=Sections&op=listarticles&secid=$1
#Articles
RewriteRule ^article-([0-9]*)-([a-z]*)-([0-9]*)-([0-9]*).html modules.php?name=News&file=article&sid=$1&mode=$2&order=$3&thold=$4
RewriteRule 
^article([1-9][0-9]*).* modules.php?name=News&file=article&sid=$1
RewriteRule 
^article-topic-([0-9]*).html modules.php?name=News&new_topic=$1
RewriteRule 
^allnews.html modules.php?name=News&file=allindex
#Your Account
RewriteRule ^userinfo-([a-zA-Z0-9_-]*).html modules.php?name=Your_Account&op=userinfo&username=$1
#Topics
RewriteRule ^topics.html modules.php?name=Topics
#Downloads
RewriteRule ^downloads-cat-([0-9]*).html modules.php?name=Downloads&cid=$1
RewriteRule 
^downloads-getit-([0-9]*).html modules.php?name=Downloads&op=getit&lid=$1
RewriteRule 
^downloads-modify-([0-9]*).html modules.php?name=Downloads&op=modifydownloadrequest&lid=$1
RewriteRule 
^downloads-order-([0-9]*)-(titleA|titleD).html modules.php?name=Downloads&cid=$1&orderby=$2
RewriteRule 
^downloads-new.html modules.php?name=Downloads&op=NewDownloads
RewriteRule 
^downloads-pop.html modules.php?name=Downloads&op=MostPopular
RewriteRule 
^downloads-new-days-(7|14|30).html modules.php?name=Downloads&op=NewDownloads&newdownloadshowdays=$1
RewriteRule 
^downloads-new-date-([0-9]*).html modules.php?name=Downloads&op=NewDownloadsDate&selectdate=$1
RewriteRule 
^downloads-pop-(1|5|10|25|50)-(num|percent).html modules.php?name=Downloads&op=MostPopular&ratenum=$1&ratetype=$2
RewriteRule 
^downloads.html modules.php?name=Downloads
RewriteRule 
^downloads-gfx-([0-9]*).html modules.php?name=Downloads&op=gfx&random_num=$
وسمية .htaccess وارفعه للمجلد الرئيسيه للمجلة
2. افتح ملف header.php
وابحث عن

كود PHP:
if (stristr($_SERVER['SCRIPT_NAME'], "header.php")) {
     
Header("Location: index.php");
     die();

واضف تحته مباشرتا ً

كود PHP:
//php2html MemHT.com Mod Rewrite - START
ob_start();
function 
replace_for_mod_rewrite(&$s) {
$urlin = array(
"'(?<!/)modules.php\?name=News&amp;file=article&amp;sid=([0-9]*)&amp;mode=([a-z]*)&amp;order=([0-9]*)&amp;thold=([0-9]*)'",
"'(?<!/)modules.php\?name=News&amp;file=article&amp;sid=([0-9]*)'",
"'(?<!/)modules.php\?name=News&file=article&sid=([0-9]*)'",
"'(?<!/)modules.php\?name=News&new_topic=([0-9]*)'",
"'(?<!/)modules.php\?name=Forums&file=viewforum&f=([0-9]+)&amp;topicdays=([0-9]+)&amp;start=([0-9]+)'",
"'(?<!/)modules.php\?name=Forums&file=viewforum&f=([0-9]*)&amp;(mark|start)=([a-zA-Z0-9_]*)'",
"'(?<!/)modules.php\?name=Forums&file=viewforum&f=([0-9]*)'",
"'(?<!/)modules.php\?name=Forums&file=viewtopic&t=([0-9]+)&amp;start=([0-9]+)&amp;postdays=([0-9]+)&amp;postorder=asc&amp;highlight='",
"'(?<!/)modules.php\?name=Forums&file=viewtopic&t=([0-9]+)&amp;postdays=([0-9]+)&amp;postorder=asc&amp;start=([0-9]+)'",
"'(?<!/)modules.php\?name=Forums&file=viewtopic&t=([0-9]*)&amp;(start|view|highlight)=([/:\-\'(){}.&=_a-zA-Z0-9 ]*)'",
"'(?<!/)modules.php\?name=Forums&file=viewtopic&t=([0-9]*)&amp;([a-zA-Z0-9]*)=topic&amp;start=0'",
"'(?<!/)modules.php\?name=Forums&file=viewtopic&(p|t)=([0-9]*)'",
"'(?<!/)modules.php\?name=Forums&file=profile&mode=register&amp;agreed=true&amp;coppa=([a-zA-Z0-9_]*)'",
"'(?<!/)modules.php\?name=Forums&file=profile&mode=register&amp;agreed=([a-zA-Z0-9_]*)'",
"'(?<!/)modules.php\?name=Forums&file=modcp&mode=([a-zA-Z0-9_]*)&amp;p=([0-9_&]*)&amp;t=([a-zA-Z0-9_&=\.\;]*)'",
"'(?<!/)modules.php\?name=Forums&file=modcp&t=([0-9]*)&amp;mode=([a-zA-Z0-9]*)'",
"'(?<!/)modules.php\?name=Forums&file=([a-zA-Z0-9_]*)&mode=([a-zA-Z0-9_]*)&amp;t=([0-9]*)&popup=([0-9]*)'",
"'(?<!/)modules.php\?name=Forums&file=([a-zA-Z0-9_]*)&mode=([a-zA-Z0-9_]*)&(p|t|f|u|popup)=([0-9]*)'",
"'(?<!/)modules.php\?name=Forums&file=([a-zA-Z0-9_]*)&mode=([a-zA-Z0-9_]*)&amp;(p|t|f|u|popup)=([0-9]*)'",
"'(?<!/)modules.php\?name=Forums&file=([a-zA-Z0-9_]*)&amp;mode=([a-zA-Z0-9_]*)&(p|t|f|u|popup)=([0-9]*)'",
"'(?<!/)modules.php\?name=Forums&file=([a-zA-Z0-9_]*)&mode=([a-zA-Z0-9_]*)'",
"'(?<!/)modules.php\?name=Forums&file=search&([a-zA-Z0-9_]*)=([a-zA-Z0-9_]*)&amp;([a-zA-Z0-9_]*)=([a-zA-Z0-9_]*)'",
"'(?<!/)modules.php\?name=Forums&file=([a-zA-Z0-9_]*)&([a-zA-Z0-9_]*)=([a-zA-Z0-9_]*)'",
"'(?<!/)modules.php\?name=Forums&file=([a-zA-Z0-9_]*)'",
"'(?<!/)modules.php\?name=Forums'",
"'(?<!/)modules.php\?name=Your_Account&op=userinfo&username=([a-zA-Z0-9_-]*)'",
"'(?<!/)modules.php\?name=Your_Account&amp;op=userinfo&amp;userna  me=([a-zA-Z0-9_-]*)'",
"'(?<!/)modules.php\?name=Downloads&amp;cid=([0-9]*)&amp;orderby=(titleA|titleD)'",
"'(?<!/)modules.php\?name=Downloads&amp;cid=([0-9]*)'",
"'(?<!/)modules.php\?name=Downloads&amp;op=getit&amp;lid=([0-9]*)'",
"'(?<!/)modules.php\?name=Downloads&amp;op=modifydownloadrequ  est&amp;lid=([0-9]*)'",
"'(?<!/)modules.php\?name=Downloads&amp;op=NewDownloads&amp;newdo  wnloadshowdays=(7|14|30)'",
"'(?<!/)modules.php\?name=Downloads&amp;op=NewDownloadsDate&amp;s  electdate=([0-9]*)'",
"'(?<!/)modules.php\?name=Downloads&amp;op=MostPopular&amp;ratenu  m=(1|5|10|25|50)&amp;ratetype=(num|percent)'",
"'(?<!/)modules.php\?name=Downloads&amp;op=NewDownloads'",
"'(?<!/)modules.php\?name=Downloads&amp;op=MostPopular'",
"'(?<!/)modules.php\?name=Downloads'",
"'(?<!/)modules.php\?name=Topics'",
"'(?<!/)modules.php\?name=Downloads&op=gfx&random_num=([0-9]*)'",
);
$urlout = array(
"article-\\1-\\2-\\3-\\4.html",
"article\\1.html",
"article\\1.html",
"article-topic-\\1.html",
"forumx\\1-\\2-\\3.html",
"forum\\1-\\2\\3.html",
"forum\\1.html",
"postx\\1-\\2-\\3.html",
"postxf\\1-\\2-\\3.html",
"posts\\1-\\2\\3.html",
"topic\\1-\\2.html",
"post\\1\\2.html",
"register-coppa-\\1.html",
"register-\\1.html",
"poster\\1-\\2_\\3.html",
"modcp\\1-\\2.html",
"forums-\\1-\\2-\\3-\\4.html",
"forums-\\1-\\2-\\3-\\4.html",
"forums-\\1-\\2-\\3-\\4.html",
"forums-\\1-\\2-\\3-\\4.html",
"forums-\\1-\\2.html",
"forum\\1-\\2-\\3-\\4.html",
"forums\\1-\\2-\\3.html",
"forum-\\1.html",
"forums.html",
"userinfo-\\1.html",
"userinfo-\\1.html",
"downloads-order-\\1-\\2.html",
"downloads-cat-\\1.html",
"downloads-getit-\\1.html",
"downloads-modify-\\1.html",
"downloads-new-days-\\1.html",
"downloads-new-date-\\1.html",
"downloads-pop-\\1-\\2.html",
"downloads-new.html",
"downloads-pop.html",
"downloads.html",
"topics.html",
"downloads-gfx-\\1.html",
);
$s preg_replace($urlin$urlout$s);
return 
$s;
}
//php2html MemHT.com Mod Rewrite - END 
احفظ التعديل ومن ثم ارفع الملف لمكانه
3. افتح ملف footer.php وابحث عن

كود PHP:
foot(); 
واضف بعده مباشره

كود PHP:
//sh2soft.net
//php2html MemHT.com Mod Rewrite - START
$contents ob_get_contents();
ob_end_clean();
echo 
replace_for_mod_rewrite($contents);
//php2html MemHT.com Mod Rewrite - END 
احفظ التعديل ومن ثم ارفع الملف لمكانه
بعد هذا روح عدل على روابط المودلزات
مثال : افتح ملف index.php الخاص بـ Sections
وابحث عن
modules.php?name=$module_name&amp;op=listarticles& amp;seci d=$secid
واستبدل الروابط ب
Sections_category$secid.html
ومن ثم ابحث بنفس الملف عن
modules.php?name=$module_name&amp;op=viewarticle&a mp;artid =$artid
استبدل الروابط ب
Sections_article$artid.html
وبكده يمكن الدخول بالرابط الجديد
http://www.Domains.com/nuke/Sections.html
اتمنى الدعاء لي ولوالدي ولجميع المسلمين
الرجاء ثم الرجاء عند نقل الموضوع ذكر المصدر واسم الكاتب
مدير شبكة شباب سوفت للبرامج www.sh2soft.net/nuke







التوقيع
الأمير الصغير