summaryrefslogtreecommitdiff
path: root/gwblog.bas
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeffrey.armstrong@approximatrix.com>2016-10-29 13:37:11 -0400
committerJeffrey Armstrong <jeffrey.armstrong@approximatrix.com>2016-10-29 13:37:11 -0400
commite69b7ccee31b9827536c320ad6c68bda98329f4a (patch)
tree6febad7198a7f5b5ca7e913fcfef2b217d1a3824 /gwblog.bas
parentef4863661495fd5c8a570b3233eb7581040e69cb (diff)
downloadgwblog-e69b7ccee31b9827536c320ad6c68bda98329f4a.tar.gz
gwblog-e69b7ccee31b9827536c320ad6c68bda98329f4a.zip
Fixed string length issues with template and textile processor routines. Fixed array assignments for building page list. Removed dead txtdir.bas.
Diffstat (limited to 'gwblog.bas')
-rw-r--r--gwblog.bas19
1 files changed, 13 insertions, 6 deletions
diff --git a/gwblog.bas b/gwblog.bas
index e80d4d6..50f33db 100644
--- a/gwblog.bas
+++ b/gwblog.bas
@@ -1,4 +1,5 @@
-10 SITEDIR$ = "E:\GWB\GWBLOG\TEST"
+10 REM SITEDIR$ = "E:\GWB\GWBLOG\TEST"
+20 SITEDIR$ = "E:\BLOG"
500 REM =======================
501 REM Startup Code
502 REM =======================
@@ -32,6 +33,8 @@
830 POSTCNT=LC
840 FOR I=1 TO LC:POSTS$[I] = SFL$[I]:POSTTIT$[I] = TIT$[I]:NEXT I
+850 PRINT "Processing";PAGECNT;" pages and";POSTCNT;" posts..."
+
900 REM =======================
901 REM Prepare template data
902 REM =======================
@@ -42,8 +45,11 @@
940 LBL$[2] = "next":REPL$[2] = ""
950 LBL$[3] = "previous":REPL$[3] = ""
960 LINKURL$ = POSTS$[POSTCNT]:LINKLBL$="Latest Post":GOSUB 19000
-970 LBL$[4] = "latest":REPL$[4] = LINKHTM$
-980 URLS$ = PAGES$:LBLS$ = PAGETIT$:URLCOUNT = PAGECNT:GOSUB 19100
+970 LBL$[4] = "latest":REPL$[4] = LINKHTML$
+974 URLCOUNT = PAGECNT:DIM URLS$[URLCOUNT], LBLS$[URLCOUNT]
+976 FOR I = 1 TO URLCOUNT:URLS$[I] = PAGES$[I]:LBLS$[I] = PAGETIT$[I]:NEXT I
+980 GOSUB 19100
+985 ERASE URLS$, LBLS$
990 LBL$[5] = "pages":REPL$[5] = HTMLLST$
995 LBL$[6] = "date":REPL$[6] = ""
997 LBL$[7] = "postlist":REPL$[7] = "<a href='allposts.htm'>All Posts</a>"
@@ -53,7 +59,7 @@
1120 FOR FINDEX = 1 TO PAGECNT
1125 PRINT "Processing ";PAGES$[FINDEX];"..."
1130 TFILE$ = PAGEDIR$ + "\" + PAGES$[FINDEX]
-1135 PAGET$ = PAGETIT$[FINDEX]
+1135 PTITL$ = PAGETIT$[FINDEX]
1140 OUTFILE$ = DESTDIR$ + "\" + LEFT$(PAGES$[FINDEX], LEN(PAGES$[FINDEX])-3) + "HTM"
1150 GOSUB 6000
1160 NEXT FINDEX
@@ -90,11 +96,12 @@
1502 REM ======================
1505 PRINT "Generating a list of posts..."
1510 PAGET$ = "All Posts"
-1520 ERASE URLS$, LBLS$
1530 DIM URLS$[POSTCNT]
1540 DIM LBLS$[POSTCNT]
1550 FOR FINDEX = 1 TO POSTCNT
-1560 URLS$[FINDEX] = POSTS$[FINDEX]:LBLS$[FINDEX] = POSTTIT$[FINDEX]
+1560 URLS$[FINDEX] = POSTS$[FINDEX]
+1565 DT$ = LEFT$(POSTS$[FINDEX],4) + "-" + MID$(POSTS$[FINDEX],5,2) + "-" + MID$(POSTS$[FINDEX],7,2)
+1567 LBLS$[FINDEX] = POSTTIT$[FINDEX] + " (" + DT$ + ")"
1570 NEXT FINDEX
1580 URLCOUNT = POSTCNT
1590 GOSUB 19100