summaryrefslogtreecommitdiff
path: root/link.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 /link.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 'link.bas')
-rw-r--r--link.bas8
1 files changed, 6 insertions, 2 deletions
diff --git a/link.bas b/link.bas
index 92a1982..c256035 100644
--- a/link.bas
+++ b/link.bas
@@ -5,8 +5,12 @@
19004 REM LINKLBL$ - Label
19005 REM OUTPUT - LINKHTM$ - HTML link
19006 REM ==============================
-19010 LINKHTML$ = "<A HREF='"+LINKURL$+"'>"+LINKLBL$+"</A>"
-19020 RETURN
+19010 REM Check if the extension of a URL is TXT and change it
+19020 EXTI = INSTR(LINKURL$, ".TXT") + INSTR(LINKURL$, ".txt")
+19030 IF EXTI <> 0 AND LEN(LINKURL$) - EXTI = 3 THEN LURL$ = LEFT$(LINKURL$, LEN(LINKURL$)-3)+"htm" ELSE LURL$=LINKURL$
+19040 LINKHTML$ = "<A HREF='"+LURL$+"'>"+LINKLBL$+"</A>"
+19050 RETURN
+
19100 REM ==============================
19101 REM Build a list of links
19102 REM