Parts-File2Page

A classic ASP include file to read txt file of list into a page using bootstrap grid and fontawesome icons.
Used here in this website, (in Website Devlog and website Todos) it is a nice method to have simple dynamic pages without database.


Public

Tested

My Own Work
' What you need is:
' - The include file "Parts-File2Page.asp"
' - A text file having a list that will be converted into page, any extension, but should be simple ASCII file, example below.
' - Functions, all are available here, in this website
' - Then call it where you want to file to be displayed, simply with an include
' <% WholeLog   = ASCII2Read("TextFile_WithList.txt", 2) %>
' <!-- #Include File = "Part-File2Page.asp" -->

' Parts-File2Page.asp : --------
<%
' WholeLog     = Already defined above as full content of file
' WholeLog     = ASCII2Read("TextFile_WithList.txt", 2)
%>
<div class="row"><div class="col">
 <div class="row">
 <%
 For Each DeDo in split(WholeLog, vbcrlf)
  If DeDo = "" Then
  ElseIf DeDo = "'===='" Then
   Response.Write "</div><hr/><div class=""row"">" & vbcrlf
  ElseIf Left(DeDo,1) = "'" Then
  Else
   DoDate   = CutString3(DeDo, 1, "{{$C$}}")
   DeDo1    = CutString3(DeDo, 2, "{{$C$}}")
   If IsDate(DoDate) Then DoDate = VB6Format(CDate(DoDate), "ddd mmm d/'yy")
   Response.Write "<div class=""col-sm-2"">" & DoDate & "</div>" & vbcrlf
   Response.Write "<div class=""col-sm-10""><i class=""fas fa-check-square""></i> "
   Response.Write Replace(DeDo1, "{{$Sepa$}}", "<i class=""fas fa-check-square""></i>") & "</div>" & vbcrlf
  End If
 Next
 %>
 </div>
</div></div>
' End of Parts-File2Page.asp : --------

' Example of "TextFile_WithList.txt" : --------
' 1 item per line
' Lines starts with ' are ignored
' Line having '====' is an hr
' Date {{$C$}} Body with multiple items, separated with {{$Sepa$}} .
'   OR
' Any title {{$C$}} Description.

Bug2 Oct 6'19{{$C$}} Table viewer (AJAX) part in Admin page is broken again.
Bug1 Oct 6'19{{$C$}} Linkedin login does not work for: {{$Sepa$}} DrVBA.com {{$Sepa$}} MyDevLib.com
'===='
Todo13 Oct 6'19{{$C$}} Make all domain redirects into ASP redirect (debug9.com)
Todo12 Oct 6'19{{$C$}} Website log into pages
' End of "TextFile_WithList.txt" : --------

<% WholeLog = ASCII2Read(SiteTodosFile_URL, 2) %>
< ! -- # Include File = "Part-File2Page.asp" -- >

Views 196 Downloads 56

Classic ASP File System
ANmarAmdeen
644
Attachments
Revisions

v3.0