RSS
<% Dim artRec Dim artRec_numRows Set artRec = Server.CreateObject("ADODB.Recordset") artRec.ActiveConnection = MM_blog_STRING artRec.Source = "SELECT * FROM tblBlog ORDER BY BlogDate DESC" artRec.CursorType = 0 artRec.CursorLocation = 2 artRec.LockType = 1 artRec.Open() artRec_numRows = 0 %> <% sFilename = "rss.xml" %> <% Dim oFSO Dim fFile ' create an instance of the FileSystemObject Set oFSO = Server.CreateObject ("Scripting.FileSystemObject") ' create file Set fFile = oFSO.CreateTextFile (Server.MapPath(sFilename)) %> <% Dim oRs__currentDate oRs__currentDate = "Month(Date())" If (Month(Date()) <> "") Then oRs__currentDate = Month(Date()) End If %> <% Dim rsBlogConfig Dim rsBlogConfig_numRows Set rsBlogConfig = Server.CreateObject("ADODB.Recordset") rsBlogConfig.ActiveConnection = MM_blog_STRING rsBlogConfig.Source = "SELECT * FROM tblBlogRSS" rsBlogConfig.CursorType = 0 rsBlogConfig.CursorLocation = 2 rsBlogConfig.LockType = 1 rsBlogConfig.Open() rsBlogConfig_numRows = 0 %> <% FUNCTION CropSentence(strText, intLength, strTrial) Dim wsCount Dim intTempSize Dim intTotalLen Dim strTemp wsCount = 0 intTempSize = 0 intTotalLen = 0 intLength = intLength - Len(strTrial) strTemp = "" IF Len(strText) > intLength THEN arrTemp = Split(strText, " ") FOR EACH x IN arrTemp IF Len(strTemp) <= intLength THEN strTemp = strTemp & x & " " END IF NEXT CropSentence = Left(strTemp, Len(strTemp) - 1) & strTrial ELSE CropSentence = strText END IF END FUNCTION %> <% Function return_RFC822_Date(myDate, offset) Dim myDay, myDays, myMonth, myYear Dim myHours, myMonths, mySeconds myDate = CDate(myDate) myDay = WeekdayName(Weekday(myDate),true) myDays = Day(myDate) myMonth = MonthName(Month(myDate), true) myYear = Year(myDate) myHours = zeroPad(Hour(myDate), 2) myMinutes = zeroPad(Minute(myDate), 2) mySeconds = zeroPad(Second(myDate), 2) return_RFC822_Date = myDay&", "& _ myDays&" "& _ myMonth&" "& _ myYear&" "& _ myHours&":"& _ myMinutes&":"& _ mySeconds&" "& _ offset End Function Function zeroPad(m, t) zeroPad = String(t-Len(m),"0")&m End Function %> <% sSiteTitle = (rsBlogConfig.Fields.Item("blogTitle").Value) sSiteDescr = (rsBlogConfig.Fields.Item("blogDesc").Value) sSiteURL = curpath if right(sSiteURL, 1) <> "/" then sSiteURL = sSiteURL & "/" end if sSiteDetails = "" sImageURL = (rsBlogConfig.Fields.Item("blogImage").Value) sFurtherReading = "" sAuthorNames = (rsBlogConfig.Fields.Item("blogAuthor").Value) sAuthorEmails = (rsBlogConfig.Fields.Item("blogEmail").Value) %> <% fFile.WriteLine ("") fFile.WriteLine ("") fFile.WriteLine ("RSS published in <%=abs(round(StopTimer(1), 2))%> seconds.
Back to the main admin page.