Hallo Thorsten,
wie wäre es mit der option alle beitrage anzeigen zu lassen?
bzw lässt sich dass schnell und einfach einbauen?
gruss
damon
Alle Beiträge anzeigen
Moderator: Thorsten
Hi,
alle Beiträge für alle Rubriken? Lässt sich schon machen, passiert ja beim Export der ganzen FAQ als PDF. Aber ab einer bestimmten Zahl ist die Ausgabe halt recht lang.
bye
Thorsten
alle Beiträge für alle Rubriken? Lässt sich schon machen, passiert ja beim Export der ganzen FAQ als PDF. Aber ab einer bestimmten Zahl ist die Ausgabe halt recht lang.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Hi,
ich kann dir gerne mal den Code hier posten, wenn du magst.
bye
Thorsten
ich kann dir gerne mal den Code hier posten, wenn du magst.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Ich mach das so:
Naja, I habe auch auf den Code gewartet;)
I habe das mit Hilfe von VBA in Excel gemacht.
In Excel in B: habe ich IDs von den FAQ Artikeln die ich extrahiren will, in meinem Fall sind das alle rennenden Nummern bis 1000.
Dann lass ich mein Makro laufen und habe den kompletten Inhalt auf der Festplatte;))
Man kann Formatting aendern, Verzeichnis fuer die Datei und noch Vieles mehr.
Man muss nur bissla mit den Anchors arbeiten, die sind verschieden von Installation zu Installation.
Macht's gut und nochmal danke fuer so 'ne schoene Software.
Sub Get_Me_The_FAQ()
Const ForWriting = 2
With Application
.EnableEvents = False
Dim fso, tf, xmlhttp, topic, faq, mystart, myend, artikelsize, ID, cell, f1
Set fso = CreateObject("Scripting.FileSystemObject")
Set f1 = fso.GetFile("c:\parsed.html")
Set tf = f1.OpenAsTextStream(ForWriting, True)
Set rng = Range("B2:B155") 'specify which FAQs to download - in my case just running numbers
tf.Writeline ("<html><head><title>Parsed from PHPMyFAQ</title></head><body>") 'light html formatting
Set xmlhttp = CreateObject("Microsoft.XMLHTTP")
For Each cell In rng
strURL = "my_working_URL"
xmlhttp.Open "GET", strURL, False, "", ""
xmlhttp.Send
rtnpage = xmlhttp.ResponseText
'Get the topic
Range("A2").Value = cell.Row
mystart = InStr(rtnpage, "</em>")
myend = InStr(rtnpage, "</h2>")
artikelsize = myend - mystart
topic = Mid(rtnpage, mystart + 5, artikelsize - 5)
cell.Offset(0, 1).Value = topic
tf.Write ("formatting" & topic & "formatting") ' Writes the name of the topic
'Get the topic text
mystart = InStr(rtnpage, "<!-- Article -->")
myend = InStr(rtnpage, " <!-- /Article -->")
artikelsize = myend - mystart
faq = Mid(rtnpage, mystart + 22, artikelsize - 21)
cell.Offset(0, 2).Value = faq
tf.Write ("formatting" & faq & "formatting") 'writes the actual answer
Next
.EnableEvents = True
End With
tf.Writeline ("</body></html>")
tf.Close
Exit Sub
error:
MsgBox ("Error occured")
tf.Writeline ("</body></html>")
tf.Close
End Sub
I habe das mit Hilfe von VBA in Excel gemacht.
In Excel in B: habe ich IDs von den FAQ Artikeln die ich extrahiren will, in meinem Fall sind das alle rennenden Nummern bis 1000.
Dann lass ich mein Makro laufen und habe den kompletten Inhalt auf der Festplatte;))
Man kann Formatting aendern, Verzeichnis fuer die Datei und noch Vieles mehr.
Man muss nur bissla mit den Anchors arbeiten, die sind verschieden von Installation zu Installation.
Macht's gut und nochmal danke fuer so 'ne schoene Software.
Sub Get_Me_The_FAQ()
Const ForWriting = 2
With Application
.EnableEvents = False
Dim fso, tf, xmlhttp, topic, faq, mystart, myend, artikelsize, ID, cell, f1
Set fso = CreateObject("Scripting.FileSystemObject")
Set f1 = fso.GetFile("c:\parsed.html")
Set tf = f1.OpenAsTextStream(ForWriting, True)
Set rng = Range("B2:B155") 'specify which FAQs to download - in my case just running numbers
tf.Writeline ("<html><head><title>Parsed from PHPMyFAQ</title></head><body>") 'light html formatting
Set xmlhttp = CreateObject("Microsoft.XMLHTTP")
For Each cell In rng
strURL = "my_working_URL"
xmlhttp.Open "GET", strURL, False, "", ""
xmlhttp.Send
rtnpage = xmlhttp.ResponseText
'Get the topic
Range("A2").Value = cell.Row
mystart = InStr(rtnpage, "</em>")
myend = InStr(rtnpage, "</h2>")
artikelsize = myend - mystart
topic = Mid(rtnpage, mystart + 5, artikelsize - 5)
cell.Offset(0, 1).Value = topic
tf.Write ("formatting" & topic & "formatting") ' Writes the name of the topic
'Get the topic text
mystart = InStr(rtnpage, "<!-- Article -->")
myend = InStr(rtnpage, " <!-- /Article -->")
artikelsize = myend - mystart
faq = Mid(rtnpage, mystart + 22, artikelsize - 21)
cell.Offset(0, 2).Value = faq
tf.Write ("formatting" & faq & "formatting") 'writes the actual answer
Next
.EnableEvents = True
End With
tf.Writeline ("</body></html>")
tf.Close
Exit Sub
error:
MsgBox ("Error occured")
tf.Writeline ("</body></html>")
tf.Close
End Sub
Hi,
ich poste mal den Code für PHP hier.
bye
Thorsten
ich poste mal den Code für PHP hier.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Hi,
den Code gibts, wenn ich dafür mal Zeit habe...
bye
Thorsten
den Code gibts, wenn ich dafür mal Zeit habe...
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist