Well, you can almost think of XML as being a flat-file version of a database...
For instance, you could represent a thread as this:
Code:
<?xml version="1.0"?>
<thread id="11432423">
<title>Do you like bacon?</title>
<threadstarter>bob</threadstarter>
<post id="21312">
<userid>32423</userid> (or you could use <userid="32423"/>)
<username>bob</username>
<dateline>343242</dateline>
<signature="1">
<pagetext>This is the first post of the thread. I am cool. Yadda yadda yadda</pagetext>
</post>
<post id="21316">
<userid>324322</userid>
<username>joe</username>
<dateline>343299</dateline>
<signature="1"/>
<pagetext>Poop on that</pagetext>
</post>
</thread>
Off of the top of my head, you'd set up a logical directory structure like this if you want to retain discrete posts / threads / forums:
/forum32/thread34234/post3243.xml
/forum32/thread34234/post3244.xml
or maybe:
/forum32/thread23323.xml (which would contain the same content that I made above)
/forum32/thread23233.xml
Then you'd call up PHP with the same parameters:
forumdisplay?forumid=32
would open the /forum32/ directory and loop through X number of threads depending on the settings and then you'd use PHP to parse the XML and turn it into the familiar thread display. I'm still fuzzy on PHP's XML parsing techniques but I think with some study I can pound something out (http://www.php.net/manual/en/ref.xml.php).
Bookmarks