هذه النسخة التي اسميتها الـ Master مع مافيها من النواقص والاخطاء.
لكن ان شاء الله ان تكون خالصة لوجهه
ارجو ان يجد احد فائدة من هذا المثال كما ارجو من يجد اخطاء يسهل عليه اصلاحها ان يصلحها ويعيد رفعها للفائدة العامة.
للاسف لم اتمكن من نسخ صور الجيل الثالث لكن المرفقات بسيطة وهي شبيهة الى حد ما لمرفقات النسخة Mybb على كل حال احاول تطبيق مشروع اخر باستخدام اداة المستعرض لانها توفر جهد ووقت كبيرين.
وشكرا جزيلا لوقتكم
Master_Forum_Burner_By_Saud_1434_AH.zip
اشكر جميع الاخوة الذي ساعدوني باي معلومة.
التحديث رقم 1
تم حل مشكلة عدم ربط الصفحات بالاستايل المحلي بعد تحميله
افتح فورم Mybb_Forum.vb وضمن الحدث bgw1_DoWork اضف بعد
إقتباس :'انتهاء خيار تحميل المرفقاتوقبل
إقتباس : lbl.Text = "تجهيز محتوى الصفحة للحفظ"
الكود التالي
كود :
''تحميل ملفات السكريبت والستايل
lbl.Text = "تحميل ملفات السكريبت والستايل انتظر"
Dim mytextbox As New TextBox
With mytextbox
.Text = page
.Multiline = True
.WordWrap = False
.ScrollBars = ScrollBars.Both
End With
Dim textbox3 As New TextBox
With textbox3
.Multiline = True
.WordWrap = False
.ScrollBars = ScrollBars.Both
End With
For Each line In mytextbox.Lines
Dim wc As New Net.WebClient
wc.Encoding = Encoding.Default
'<script type="text/javascript" src="http://vb4arb.com/vb/jscripts/prototype.js?ver=1603"></script>
Dim stregjs As String = "(<script type=.text/javascript. src=.)(.*\.js)"
Dim reg As New Regex(stregjs)
Dim ama As Match = reg.Match(line)
' Dim fn As String = "http://vb4arb.com/vb/"
Dim fn As String = mybb_forum_furl
lbl.Text = "تحميل ملفات السكريبت"
If ama.Success Then
If ama.Groups(2).Value.ToString.StartsWith("http://") = False Then
textbox3.AppendText(fn & ama.Groups(2).Value & vbNewLine)
' MsgBox(fn & ama.Groups(2).Value & vbNewLine & IO.Path.GetFileName(ama.Groups(2).Value))
If IO.File.Exists(mybb_forum_lbldir & "\vb\" & IO.Path.GetFileName(ama.Groups(2).Value)) = False Then
wc.DownloadFile(fn & ama.Groups(2).Value, mybb_forum_lbldir & "vb/" & IO.Path.GetFileName(ama.Groups(2).Value))
End If
Else
textbox3.AppendText(ama.Groups(2).Value & vbNewLine)
' MsgBox(ama.Groups(2).Value & vbNewLine & IO.Path.GetFileName(ama.Groups(2).Value))
If IO.File.Exists(mybb_forum_lbldir & "\vb\" & IO.Path.GetFileName(ama.Groups(2).Value)) = False Then
wc.DownloadFile(ama.Groups(2).Value, mybb_forum_lbldir & "vb/" & IO.Path.GetFileName(ama.Groups(2).Value))
End If
End If
' line = line.Replace(ama.Groups(2).Value, "vb/" & IO.Path.GetFileName(ama.Groups(2).Value))
mytextbox.Text = mytextbox.Text.Replace(ama.Groups(2).Value, "vb/" & IO.Path.GetFileName(ama.Groups(2).Value))
End If
'<link type="text/css" rel="stylesheet" href="http://vb4arb.com/vb/cache/themes/theme5/css3.css" />
Dim stregcss As String = "(<link type=.text/css. rel=.stylesheet. href=.)(.*\.css)"
Dim regcss As New Regex(stregcss)
Dim amacss As Match = regcss.Match(line)
lbl.Text = "تحميل ملفات الستايل"
If amacss.Success Then
textbox3.AppendText(amacss.Groups(2).Value & vbNewLine)
'MsgBox(amacss.Groups(2).Value & vbNewLine & IO.Path.GetFileName(amacss.Groups(2).Value.ToString.Trim))
' line = line.Replace(amacss.Groups(2).Value, "vb/" & IO.Path.GetFileName(amacss.Groups(2).Value))
mytextbox.Text = mytextbox.Text.Replace(amacss.Groups(2).Value, "vb/" & IO.Path.GetFileName(amacss.Groups(2).Value))
If IO.File.Exists(mybb_forum_lbldir & "\vb\" & IO.Path.GetFileName(amacss.Groups(2).Value)) = False Then
wc.DownloadFile(amacss.Groups(2).Value, mybb_forum_lbldir & "vb/" & IO.Path.GetFileName(amacss.Groups(2).Value))
End If
End If
Next
'انتهاء تحميل ملفات السكريبت والستايل
ثم استبدل كلمة page بـ mytextbox في كود حفظ محتوى الصفحة
كود :
IO.File.WriteAllText(mybb_forum_lbldir & Val(mybb_forum_last_thread_number).ToString("00000") & "_.htm", mytextbox.Text, Encoding.Default)