summaryrefslogtreecommitdiff
path: root/post.bas
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeffrey.armstrong@approximatrix.com>2016-10-14 13:09:47 -0400
committerJeffrey Armstrong <jeffrey.armstrong@approximatrix.com>2016-10-14 13:09:47 -0400
commit3a8cd049da700bfebbc1d4fff3a422cc8bce0a5a (patch)
treed30662ab3f580c5ae923c4f3c6923a6be6256cf9 /post.bas
parent364966ec5d0b463c4786bbfc5119229b85aa4dc0 (diff)
downloadgwblog-3a8cd049da700bfebbc1d4fff3a422cc8bce0a5a.tar.gz
gwblog-3a8cd049da700bfebbc1d4fff3a422cc8bce0a5a.zip
Added next and previous links to post templates. Links to .txt files are now automatically changed to .htm files when creating link HTML.
Diffstat (limited to 'post.bas')
-rw-r--r--post.bas14
1 files changed, 10 insertions, 4 deletions
diff --git a/post.bas b/post.bas
index 4385413..0464a68 100644
--- a/post.bas
+++ b/post.bas
@@ -18,10 +18,16 @@
5030 REM Header template right now
5040 TMPLATE$ = HFILE$
5050 FOR I = 1 TO ILBL
-5060 IF LBL$[I] = "title" THEN LBL$[I] = TIT$[FINDEX]:GOTO 5080
-5070 NEXT I
-5080 GOSUB 18000
-5090 PRINT#13, TTEXT$
+5060 IF LBL$[I] = "title" THEN REPL$[I] = TIT$[FINDEX]
+5070 IF LBL$[I] <> "next" THEN 5100
+5080 IF FINDEX < LC THEN LINKURL$ = SFL$[FINDEX+1]:LINKLBL$ = "Next: "+TIT$[FINDEX+1]:GOSUB 19000 ELSE LINKHTML$=""
+5090 REPL$[I] = LINKHTML$
+5100 IF LBL$[I] <> "previous" THEN 5130
+5110 IF FINDEX > 1 THEN LINKURL$ = SFL$[FINDEX-1]:LINKLBL$ = "Previous: "+TIT$[FINDEX-1]:GOSUB 19000 ELSE LINKHTML$=""
+5120 REPL$[I] = LINKHTML$
+5130 NEXT I
+5140 GOSUB 18000
+5150 PRINT#13, TTEXT$
5500 REM Process textile now
5510 TFILE$ = SFL$[FINDEX]