<$BlogRSDURL$>
Max Web Modders News
Saturday, July 31, 2004

New Talk of a central MOD site
There has been an increase in the ammount of talk of late of starting something to co-ordinate all those great MODs.

While this is all well and good these things have been tried before and there is a certain level of feeling that this will go no where fast.

This is a shame when so much work languishes in the purdition of the unknown. Hopefully this news center will bring some releif for MOD hunters.

There is available an ATOM feed version of this site and MOD number one if I may be so bold is an ASP reader for the atom feed.



<%
Sub atom(URL)
Set objXML = Server.CreateObject("msxml2.DOMDocument.3.0")
objXML.async = false
objXML.setProperty "ServerHTTPRequest", True
objXML.validateOnParse = true
objXML.preserveWhiteSpace = false

If Not objXML.Load(URL) Then

Response.write "<P>ERROR<br>code: " & _
objXML.parseError.errorCode & _
"<br>Linea/Col: " & _
objXML.parseError.line & "/" & _
objXML.parseError.linepos & "</P>"

Else

Set objNodeList = objXML.getElementsByTagName("entry")
For Each objNode In objNodeList
For Each objNode2 In objNode.childNodes

Select Case objNode2.nodeName
Case "issued"
strdate= left(objNode2.firstChild.nodevalue,10)
Case "link"
strURL = objNode2.GetAttribute("href")
Case "title"
strTitle = objNode2.firstChild.nodevalue
Case "content"
strDescription = objNode2.firstChild.data
For Each objNode3 In objNode2.childNodes
Select Case objNode3.nodeName
Case "div"
StrDescription = objNode3.text
For Each objNode4 In objNode3.childNodes
Select Case objNode4.nodeName
Case "a"
linkable=objNode4.firstChild.text
htmlink=" <a href='"& _
objNode4.GetAttribute("href")&"'>"& _
linkable&"</a>"
StrDescription = replace(StrDescription,linkable,htmlink)
end select
next
end select

next
End Select
Next

if strdate<>prevstrdate then
response.write "</ul><b>"&strdate&"</b><ul>"
prevstrdate=strdate
end if

Response.write "<li><b><a href=""" & strURL & """>" & _
strTitle & "</a></b><br>" & strDescription & "</li>"

strTitle = ""
strURL = ""
strDescription = ""

Next

set objNodeList = Nothing

End if
End sub



Sub atomHeadlines(URL)
Set objXML = Server.CreateObject("msxml2.DOMDocument.3.0")
objXML.async = false
objXML.setProperty "ServerHTTPRequest", True
objXML.validateOnParse = true
objXML.preserveWhiteSpace = false

If Not objXML.Load(URL) Then

Response.write "<P>ERROR<br>code: " & _
objXML.parseError.errorCode & _
"<br>Linea/Col: " & _
objXML.parseError.line & "/" & _
objXML.parseError.linepos & "</P>"

Else

Set objNodeList = objXML.getElementsByTagName("entry")
For Each objNode In objNodeList
For Each objNode2 In objNode.childNodes

Select Case objNode2.nodeName
Case "issued"
strdate= left(objNode2.firstChild.nodevalue,10)
Case "link"
strURL = objNode2.GetAttribute("href")
Case "title"
strTitle = objNode2.firstChild.nodevalue
End Select
Next

if strdate<>prevstrdate then
response.write "</ul><b>"&strdate&"</b><ul>"
prevstrdate=strdate
end if

Response.write "<li><b><a href=""" & strURL & """>" & _
strTitle & "</a></b><br>" 

strTitle = ""
strURL = ""
strDescription = ""

Next

set objNodeList = Nothing

End if
End sub

call atom("http://maxwebmod.blogspot.com/atom.xml")
%>





Comments:
I'm useing this code on http://kentindex.com/maxwebedit/ and hope to modify it for use with other blogs too.
 
After all it was my code before I gave it over to modified and cleaned up!
 
Post a Comment