PPWIZARD is a free preprocessor for HTML, REXX, Visual Basic or any text files.
| Creating HTML pages from Windows URL Shortcuts or OS/2 URL Objects |
| Example - WPS URL Objects to HTML |
I keep all my WPS URL objects off a main URL folder, I then create HTML pages from this so I can effectively access my URL objects from anywhere via the internet (pages at http://dennisbareis.com/bookmark.htm). Different categories can have their own look and feel!
This code highly customises how the header "FTPLIKE.IH" works. At the moment I am still working on separating the code to a generic header file and my specific configuration of this. Ffor this reason there will be things in "bookmark.ih" which should not be and vise versa.
This is the code I use for my specific customisations (as at 28 May 22, 2:55pm):
;----------------------------------------------------------------------------
;--------------------------------[ BOOKMARK.IT ]-----------------------------
;----------------------------------------------------------------------------
;
; *************************************************************************
; WORK IN PROGRESS, I AM GRADUALLY SEPARATING BOOKMARK.IT/.IH so that there
; is a generic component anyone can use and my separate customisations
; (in "BOOKMARK.IT").
; *************************************************************************
;
; This file contains specific customisations to bookmarks for Dennis
; Bareis' site.
;
;----------------------------------------------------------------------------
;--- Include my common header -----------------------------------------------
#define HITCOUNT_NAME bookmark_pages
;#define PAGE_TRANSITION_ENTER Duration=1,Transition=3
#define PAGE_TRANSITION_EXIT Duration=1,Transition=2
#define Title "Dennis' Personal Bookmarks"
#define AddToDescription Dennis' Personal Bookmarks, straight from OS/2 WPS URL Objects
#define COLOR_PAGE_TITLE #003366 ;;Original Dark Blue
;;#define COMPUTER_NO_DESC_KEYWORD_META
#define CSSSTYLE_EXTRA \
.LinkErr A:hover \
{ -\
color: yellow; -\
text-decoration:underline -\
}
#include "computer.ih"
;--- Add counter to this page -----------------------------------------------
#define COUNTER_ID 685720
#define COUNTER_ROOT c1
#include "counter.ih"
;--- Title ------------------------------------------------------------------
<$BackgroundMainWindows>
<$PageTitle TITLE="Dennis' Personal Bookmarks">
;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
;%%%[ Definitions for use in my "DIRATTR.$$$" files ]%%%%%%%%%%%%%%%%%%%%%%%%
;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#evaluate "Eol" "d2c(10)"
#( ''
#define LookAndFeelForOs2
BgImage = graphics/os2warp.jpg<$Eol>
BgColor = #E0E0E0
#)
#( ''
#define LookAndFeelForPpwizard
BgImage = ppwizard/ppw_bg.jpg<$Eol>
BgColor = WHITE
#)
#( ''
#define LookAndFeelForFlowers
BgImage = graphics/flowers.jpg<$Eol>
BgColor = #F7FFCE
#)
#( ''
#define LookAndFeelForLinux
BgImage = graphics/linux_bg.gif<$Eol>
DirIcon = <IMG SRC="graphics/linux14x16.gif" VALIGN="MIDDLE" WIDTH=14 HEIGHT=16 BORDER=0><$Eol>
DotDotIcon = <IMG SRC="graphics/linux14x16.gif" VALIGN="MIDDLE" WIDTH=14 HEIGHT=16 BORDER=0><$Eol>
BgColor = #FFFFC6
#)
#( ''
#define LookAndFeelForWindows
BgImage = graphics/bg_win.jpg<$Eol>
BgColor = #E0E0E0<$Eol>
DirIcon = <IMG SRC="graphics/win16x12.gif" VALIGN="MIDDLE" WIDTH=16 HEIGHT=12 BORDER=0><$Eol>
DotDotIcon = <IMG SRC="graphics/win16x12.gif" VALIGN="MIDDLE" WIDTH=16 HEIGHT=12 BORDER=0>
#)
#DefineRexx REXX_$$Fix4URL
;--- The value is not allowed to contain spaces -----------------
TheValue = ReplaceString(TheValue, ' ', '%20');
#DefineRexx
#define EMAIL_SUBJECT SUGGESTED LINK:
#( '%0d%0a'
#define EMAIL_BODY
1. URL:
2. CATEGORY:
3. DESC:
#)
;--- At end of file listing... ----------------------------------------------
#define? ALL_URL_TOOLTIP \
This page contains all URLS along with any comments \
and all categories the URL is contained in. \
You can use your browser's search facility \
(CTRL+F in Internet Explorer) to locate URLS you \
might be interested in. \
Click on the category to view similar URLs.
#define FTPLIKE_END_PAGE_ABOVE_FOOTER \
#ifdef ALL_URL_NAME -\
<CENTER> -\
<P>A <A HREF="<$ALL_URL_NAME>" TITLE="<$ALL_URL_TOOLTIP>"> -\
complete listing of all URLS</A> \
is available if you are having trouble \
locating a URL. -\
</CENTER> -\
#endif -\
-\
<$ImgBarbedWire> -\
<CENTER> -\
<H2>About these Bookmarks</H2> -\
</CENTER> -\
These bookmarks are of subjects or products I find \
useful (or think I may in the future). \
I never link to a site as a pre-condition for them \
linking to me! \
As I use Windows I am mainly interested in software \
for this operating system. \
Where good free software exists I generally <b>only</b> \
list the free software (I list some shareware and \
even some commercial software where it is exceptional). -\
-\
<p>If you have some <b>completely free software</b> \
(no adware and without timeouts or major restrictions) \
which you would like listed then please \
<a href="mailto:<?PpwizardAuthorEmail>?subject=<$EMAIL_SUBJECT $$Fix4URL>%20&body=<$EMAIL_BODY $$Fix4URL>">email me</a>: \
<ol> \
<li>The URL (direct to resource's page) - \
not to the download. \
<li>A proposed category (existing one if possible) \
<li>A <b>short</b> description \
</ol> \
To bypass my SPAM filter the subject should begin \
"SUGGESTED LINK:". \
-\
<$ImgBarbedWire> -\
<CENTER> -\
<H2>Creating These Book Mark Pages</H2> -\
</CENTER> -\
-\
<P>This page was automatically created from Windows \
internet shortcuts (or favorites) created with IE or \
Netscape (OS/2 WPS URLs can also be imported). \
You can comment any link or category and just about \
anything can be changed (links don't even need to be in \
tables). \
\
<A HREF="ppwizard.htm" target="_blank">PPWIZARD</A>, \
a free tool for Windows, Mac OS X, Unix or OS/2 \
built these pages using \
<A HREF="ppwizard/bookmarks.htm" target="_blank"> -\
this source code \
</A>. -\
-\
<P>All URLs are checked periodically using the \
<A HREF="checkurl.htm" target="_blank">my free URL validation tool</A> \
(for Windows and OS/2). \
This ensures that very few if any links point to moved \
pages or return 404 errors etc.
;--- Look and feel of Good and bad links ------------------------------------
#DefineRexx BOOKMARK_URL_OK_INFO
if eUrl_LASTUPD = '' then
UtTT = '"OK when tested at ' || eUrl_DATE || '"'
else
UtTT = ' "OK when tested at ' || eUrl_DATE || ' (HTML page dated ' || eUrl_LASTUPD || ')"'
UtTT_A = ' title=' || UtTT;
UtTT_IMG = ' title=' || UtTT || ' alt=' || UtTT
OkTick = '<img src="graphics/cb_tick.gif" width=12 height=17 hspace="2" vspace="2" align="top" border="0"' || UtTT_IMG || '>'
#DefineRexx
#DefineRexx BOOKMARK_URL_NOT_YET_CHECKED
OkTick = ''
UtTT = '"This link has not been tested yet"'
UtTT_A = ' title=' || UtTT;
UtTT_IMG = ' title=' || UtTT || ' alt=' || UtTT
#DefineRexx
;--- Include common support code --------------------------------------------
#define BOOKMARK_DIRECTORY D:\DBAREIS\Bookmarks
;#define+ BOOKMARK_DIRECTORY D:\DBAREIS\Bookmarks\My Computer
;#define+ BOOKMARK_DIRECTORY D:\DBAREIS\Bookmarks\Donate (FOR FREE)
;#define+ BOOKMARK_DIRECTORY D:\DBAREIS\Bookmarks\Computer\OpSys\Windows\WIN NT or 2000
;#define+ BOOKMARK_DIRECTORY D:\DBAREIS\Bookmarks\Computer\OpSys\Windows\Software\Specific Purpose\Multi Media\Graphics
;#define BOOKMARK_OPEN_LINK_IN _BareisSame ;;Creates one new window which is reused by all links
#define CHECKURL_MEMFILE D:\DBAREIS\Projects\HOMEPAGE\html\out\REMOTE.URL\checkurl.mem
#define CHECKURL_OKFILE D:\DBAREIS\Projects\HOMEPAGE\html\OkRc.LST
#include "BOOKMARK.IH"
This is the (becoming) generic header code I use (as at 6 Nov 17, 10:42am):
;----------------------------------------------------------------------------
;--------------------------------[ BOOKMARK.IH ]-----------------------------
;----------------------------------------------------------------------------
;
; *************************************************************************
; WORK IN PROGRESS, I AM GRADUALLY SEPARATING BOOKMARK.IT/.IH so that there
; is a generic component anyone can use and my separate customisations
; (in "BOOKMARK.IT").
; *************************************************************************
;
; This header file expands on the basic functionality provided by the
; "FTPLIKE" header to allow you to organise Netscape or Internet Explorer
; URL objects in categories and then generate HTML pages for these.
;
; You can see my bookmarks at:
;
; http://dennisbareis.id.au/bookmark.htm
;
; Some of the features:
;
; * You can nest categories to any level.
;
; * Categories (tree) can appear in more than one place
; WITHOUT duplicating the URLS.
;
; * Url's can be commented, giving you the ability to use normal
; browser URL (shortcut) creation and add comments to your
; generated pages.
;
;
; Some details:
;
; * The main (top level) URLS are incorporated into the page that
; includes this one, all others are generated from start to finish.
;
;
;
; Improvements I need to make
; ~~~~~~~~~~~~~~~~~~~~~~~~~~~
; * Make user customisable "BOOKMARK.IT" header, removing any of my
; stuff into a new private header.
;
; * Use Java (or JavaScript) Tree Navigation
;
; * As well as ALL URLS listed what about being able to indicate
; categories example "all windows".
;
; * What about index similar to all url list. Probably supply list of
; words (but maybe exceptions) so as to exclude "the" etc.
;
;
; * BUG in ">DIRTEXT" etc, only takes first line?
;
; * Files/Dirs starting with '$$' invisible and don't appear
; in generated pages. #define will allow disable or selection
; of different prefix.
;
; * Have dir attributes, need easy way to assign "file"
; attribs (priority , alias etc). Maybe use "[*BOOKMARK*]" to
; mark off section of file, probablt then go to 1st '['?
;
; * Allow option define of collon URLS ALIAS defined in UTL name:
;
; URL TITLE$$$URL ALIAS
;
; * Once mechanism for giving a URL an alias need new DIR command
; (IncludeUrls) to include common file/url Aliases.
;
; * Too much to write down
;----------------------------------------------------------------------------
;--- Initialization ---------------------------------------------------------
#define OpSys <?OpSys>
#if left('<$OpSys>', 3) = 'WIN'
#define+ OpSys WINDOWS
#endif
#if '<$OpSys>' <> 'WINDOWS' & '<$OpSys>' <> 'OS/2'
#error "Sorry but you will need to modify this file to work on operating systems other than Windows & OS/2! These changes are expected to be relatively minor."
#endif
#if ['<$OpSys>' = 'OS/2']
;--- In OS/2 can get "real name" of file from EA's -------------------
#evaluate "" "call RxFuncAdd 'SysGetEA', 'RexxUtil', 'SysGetEA'"
#endif
#RexxVar AllUrlCount = 0
#define ALL_URL_NAME bookmark_all_urls.htm
;--- Need sorting support for URLS ------------------------------------------
#include "PpwSort.h"
;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
;%%%[ Override FTPLIKE Header Defaults ]%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
;--- Used as separator ------------------------------------------------------
#define SPACE <IMG SRC="graphics/clear1x1.gif" ALIGN=middle ALT=" " BORDER=0 WIDTH={$HSIZE=^1^} HEIGHT={$VSIZE=^1^}>
;--- Define the "window" that a bookmark URL opens in -----------------------
#ifndef BOOKMARK_OPEN_LINK_IN
;--- Each link opens its own window ------------------------------
#define BOOKMARK_OPEN_LINK_IN _blank
#endif
;--- Save values of this pages info (they get modified below!) --------------
;;#ifndef VERSION_PUSHPOPM_H
;; #include "PushPopM.H"
;;#endif
#push Macro 'ShortNameHtml'
#push Macro 'ShortNameHtmlLowerCase'
;--- Don't just want filename! We want Title + URL --------------------------
#DefineRexx REXX_PREPARE_LEFT_SIDE
;--- Get the URL, we know a filename -------------------------------------
CloseRc = stream(FtpFile, 'c', 'close');
#if ['<$OpSys>' = 'OS/2']
;--- First line of OS/2 WPS URL file contains the URL ----------------
eUrl = linein(FtpFile);
#endif
#if ['<$OpSys>' = 'WINDOWS']
;--- In WINDOWS Look for "URL=" in column 1 --------------------------
eUrl = '';
do while lines(FtpFile) <> 0
;--- Look for URL line -------------------------------------------
ThisLine = linein(FtpFile);
if left(ThisLine, 4) = "URL=" then
do
;--- Found it! -----------------------------------------------
eUrl = substr(ThisLine, 5); ;;Rest of line is URL
leave; ;;Look no further!
end;
end;
;--- Found the URL within the file? ----------------------------------
if eUrl = '' then
do
;--- Did not find it! --------------------------------------------
eUrl = 'URL not found in "' || FtpFile || '"';
call Warning 'URL_NF', eUrl;
eUrl = 'Error: ' || eUrl;
end;
#endif
CloseRc = stream(FtpFile, 'c', 'close');
;--- Under windows TITLE will end with ".url" ----------------------------
ThinTitle = '{$TITLE}';
#if ['<$OpSys>' = 'WINDOWS']
if translate(right(ThinTitle, 4)) = '.URL' then
ThinTitle = left(ThinTitle, length(ThinTitle)-4);
#endif
;--- Make sure title not too "wide" --------------------------------------
ThinTitle = ReplaceString(ThinTitle, '<BR>', ' '); ;;Not sure why this is here...
ThinTitle = BreakAt(30, ThinTitle, ' -', '<br>');
ThinTitle = ReplaceString(ThinTitle, ' <br>', '<br>');
ThinTitle = ReplaceString(ThinTitle, '<br> ', '<br>');
;--- Fix quote char on some titles ---------------------------------------
ThinTitle = ReplaceString(ThinTitle, '`', "'");
ThinTitle = ReplaceString(ThinTitle, 'EF'x, "'");
;--- Make sure URL not too "wide" ----------------------------------------
ThinUrl = BreakAt(25, eURL);
;--- Was the URL OK? -----------------------------------------------------
OkTick = '';
UtTT = '';
UtTT_A = '';
UtTT_IMG = '';
<$SetUpOkCheckUrlInfo>
#DefineRexx
#define FTPLIKE_FILE_LEFT_SIDE_DISPLAY \
#evaluate '' ^<$REXX_PREPARE_LEFT_SIDE TITLE='<??FtpShortD $$SQx2>'>;^ -\
<TR> ;;Start New File row %\
<TD ALIGN=CENTER> ;;Start filename cell %\
<A HREF="<??eURL>" TARGET=<$BOOKMARK_OPEN_LINK_IN><??UtTT_A>> -\
<??ThinTitle> -\
</A> %\
</TD> ;;End cell \
<TD ALIGN=CENTER> ;;Start filename cell %\
<A HREF="<??eURL>" TARGET=<$BOOKMARK_OPEN_LINK_IN><??UtTT_A>> -\
<??ThinUrl> -\
<??OkTick> -\
</A> -\
</TD> ;;End cell
;--- How to handle external links in the comment (use VALRURL.H") -----------
#define FTPLIKE_WEBLINK_TEMPLATE_HTTP \
'<' || '$ExtHttp VISIBLE=^{URL}^ HTTPURL=^{URL-}^ target="<$BOOKMARK_OPEN_LINK_IN>">' || d2c(10)
#define FTPLIKE_WEBLINK_TEMPLATE_FTP \
'<' || '$ExtFtp VISIBLE=^{URL}^ FTPURL=^{URL-}^ target="<$BOOKMARK_OPEN_LINK_IN>">' || d2c(10)
#DefineRexx+ ValidateUrlR_REXX_Location
UrlSourceLocation = 'URL COMMENT - ' || FtpFile;
#DefineRexx
;--- Right side display (comment) + capture URL -----------------------------
#DefineRexx FTPLIKE_GET_FILE_COMMENT ;;Note comment's are not allowed to contain <ENTER> (don't know how to handle)!
;--- Find comment for URL, we know a filename -------------------
#if ['<$OpSys>' = 'OS/2']
;--- In OS/2 comments are stored in OS/2 Extended Attributes -
if SysGetEA(FtpFile, ".COMMENTS", "FtpComment") <> 0 then
FtpComment = '';
else
FtpComment = substr(FtpComment, 11); ;;Drop EA Type info
FtpComment = space(ReplaceString(FtpComment, '0D0A'x, '<BR>'));
#endif
#if ['<$OpSys>' = 'WINDOWS']
;--- Look for bookmark comment section (freeform text) ------
CommentSection = "[BMCOMMENTS]";
CommentNl = d2c(10);
FoundComment = 'N';
FtpComment = '';
CloseRc = stream(FtpFile, 'c', 'close');
do while lines(FtpFile) <> 0
;--- Get next line (ignore leading/trailing spaces) -----
ThisLine = strip(linein(FtpFile));
if left(ThisLine, 1) = '[' then
do
;--- Found start of Section --------------------------
if FoundComment = 'Y' then
leave; ;;Found end of comment!
ThisLine = translate(ThisLine);
if ThisLine = CommentSection then
FoundComment = 'Y';
end;
else
do
;--- Just a normal line ------------------------------
if FoundComment = 'Y' then
do
if FtpComment == '' then
FtpComment = space(ThisLine);
else
FtpComment = FtpComment || CommentNl || space(ThisLine);
end;
end;
end;
CloseRc = stream(FtpFile, 'c', 'close');
;--- Add "<P>" for paragraphs -------------------------------
FtpComment = ReplaceString(FtpComment, CommentNl || CommentNl, '<P>');
;--- Sort out line wrapping issues --------------------------
FtpComment = ReplaceString(FtpComment, CommentNl, ' ');
#endif
;--- Take care of some common high ascii ------------------------
FtpComment = ReplaceString(FtpComment, d2c(146), "'");
;--- Now see if any high ASCII ----------------------------------
HighPos = verify(FtpComment, xrange('80'x, 'FF'x), 'M');
if HighPos <> 0 then
do
HighChar = substr(FtpComment, HighPos, 1);
call Warning 'BM_HAC', 'High ASCII found for "' || FtpFile || '" ("' || HighChar || '" - ASCII ' || c2d(HighChar) || ') - At character position ' || HighPos || ' - rest of comment: ' || substr(FtpComment, HighPos);
FtpComment = strip(left(FtpComment, HighPos-1)) || '<HR><FONT COLOR="RED"><BLINK>Truncated here.</BLINK></FONT>' || " <B>Please don't use ENTER to separate paragraphs!</B>";
end;
<$AddCheckUrlErrorInfoToComment>
;--- Autocreate http/ftp links in comments ----------------------
<$FTPLIKE_ADJUST_FILE_COMMENT>
;****************************************************************
;***[ Now keep information about this URL (for all URLs page) ***
;****************************************************************
;--- Now compact the title --------------------------------------
Title = ReplaceString(FtpShortD, '<BR>', ' ');
Title = space(Title);
;--- Under Windows title will end with ".url" -------------------
#if ['<$OpSys>' = 'WINDOWS']
if translate(right(Title, 4)) = '.URL' then
Title = left(Title, length(Title)-4);
#endif
;--- Increase count and save info in array ----------------------
AllUrlCount = AllUrlCount + 1;
AllUrl.AllUrlCount.!SortKey = translate(Title);
AllUrl.AllUrlCount.!Url = eURL;
AllUrl.AllUrlCount.!Title = Title;
AllUrl.AllUrlCount.!Comment = FtpComment;
AllUrl.AllUrlCount.!Category= '<$FTPLIKE_DISPLAY_DIR_TITLETAG $$SQx2>';
AllUrl.AllUrlCount.!Html = ToLowerCase(FilePart('name', '<?OutputFile>'));
#DefineRexx
#DefineRexx 'Rexx2AmPm'
TimeAmPmFmt = GetAmPmTimeFromHhMmSs('{$TIME}');
#DefineRexx
#define FTPLIKE_SHOW_FILE_TIME \
#evaluate ^^ ^<$Rexx2AmPm TIME="<??FtpHour>:<??FtpMinute>:<??FtpSecond>">^ -\
<??FtpDay> <??FtpMon> <??FtpYear> \
<??TimeAmPmFmt>
#define FTPLIKE_ADD_FILE_SIZE_AFTER_TIME ;;Don't want file size!
;--- Other stuff ------------------------------------------------------------
#define FTPLIKE_NO_HEADER_FOOTER_ON_1ST_PAGE
#define FTPLIKE_FOLLOW_SUBDIRECTORIES
#define FTPLIKE_USE_LONG_FILENAMES 100
#define FTPLIKE_BODY_BG_IMG graphics/bground.jpg
#define FTPLIKE_BODY_BG_COLOR #CCFFFF
#define FTPLIKE_BODY_LINK_COLOR #3333FF
#define FTPLIKE_BODY_VLINK_COLOR green
#define FTPLIKE_BODY_ATTR_OTHER LEFTMARGIN=5 TOPMARGIN=5 MARGINWIDTH=5 MARGINHEIGHT=5
#define FTPLIKE_DIRECTORY <$BOOKMARK_DIRECTORY>
#define FTPLIKE_DIRECTORY_WEB
#define FTPLIKE_NEWHTML_PREFIX bookmark_
#define FTPLIKE_HEADER <$PageTitle TITLE="{$Title}">
#define FTPLIKE_FOOTER \
#evaluate+ ShortNameHtml "FilePart('name', '<?OutputFile>')" -\
#evaluate+ ShortNameHtmlLowerCase "ToLowerCase('<$ShortNameHtml>')" -\
<$EndHtmlWithStandardFooter>
#define FTPLIKE_TEXT_FILE url
#define FTPLIKE_TEXT_FILES urls
#define FTPLIKE_TEXT_DIR category
#define FTPLIKE_TEXT_DIRS categories
#define FTPLIKE_MINI_DIR_IMG_TAG <IMG SRC="graphics/fldrcls.gif" ALIGN="MIDDLE" ALT="*" TITLE="" BORDER=0 WIDTH=14 HEIGHT=11 VSPACE=3>
#define FTPLIKE_DONT_USE_C2X ;;Have longish dirs/names
#define FTPLIKE_HEAD_STYLE_TAGS <$CssStyle>
#define FTPLIKE_EXTRA_HEAD_TAGS \
<$FULL_PICS_RATING> %\
<$ENGLISH_CHARSET><?NewLine>
;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
;%%%[ Handle CHECKURL ".MEM" file - Initialization ]%%%%%%%%%%%%%%%%%%%%%%%%%
;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#ifdef CHECKURL_MEMFILE
;--- Load CHECKURL support -------------------------------------------
#include "CheckUrl.IH" ;;Interface to my free URL checker
;--- User may not want "OK" indicators -------------------------------
#ifdef BOOKMARK_NO_CHECKURL_OK_INDICATORS
#DefineRexx 'SetUpOkCheckUrlInfo'
;--- Get CheckUrl Info (need for error status) ---------------
<$CHECKURL_CHECK_URL URLVAR="eUrl" BaseVar="eUrl">
#DefineRexx
#else
#DefineRexx 'SetUpOkCheckUrlInfo'
do
;--- Get CheckUrl Info ---------------------------------------
<$CHECKURL_CHECK_URL URLVAR="eUrl" BaseVar="eUrl">
;--- Set up Info ---------------------------------------------
OkTick = '';
if eURL_STATUS = <$CHECKURL_STATUS_OK> then
do
;--- URL is OK -------------------------------------------
<$BOOKMARK_URL_OK_INFO>;
end;
else
do
if eURL_STATUS = <$CHECKURL_STATUS_NO_INFO> then
do
;--- URL is OK -------------------------------------------
<$BOOKMARK_URL_NOT_YET_CHECKED>;
end;
end;
end
#DefineRexx
#end if
;--- Add ERROR indicators --------------------------------------------
#DefineRexx 'AddCheckUrlErrorInfoToComment'
if eURL_STATUS = <$CHECKURL_STATUS_ERROR> then
do
;--- Don't want to URL check any URLS in error message! ------
CmtErrorText = ReplaceString(eUrl_ERROR, ":", ':'); ;;Hide "http:"
;--- See ig any ignore information available -----------------
;;@@ErrTtExplanation = 'I am either monitoring the issue or will fix it soon!'
if eURL_IGNORE_UNTIL_DATE = '' then
@@ErrTtExplanation = 'This appears to be a recent problem as I am not yet monitoring the URL.';
else
@@ErrTtExplanation = 'A review of this URL is scheduled for ' || Bd2Date(BaseDate(eURL_IGNORE_UNTIL_DATE), "%x") || '.';
;--- Format error info ---------------------------------------
MemBit = '<' || '?NewLine>'
if FtpComment <> '' then
MemBit = MemBit || '<br>'
MemBit = MemBit || '<div class="LinkErr" title="Oops, my free URL Checker picked up a problem. ' || @@ErrTtExplanation || '">'
MemBit = MemBit || '<center><table border=4 bordercolor="black" BGCOLOR="#ff6342"><tr><td>'
MemBit = MemBit || '<font size="-1" color="white"><center>[CHECKURL Validation ' || eUrl_DATE || ']<br>' || CmtErrorText || '<center></font>'
MemBit = MemBit || '</td></tr></table></center>'
MemBit = MemBit || '</div>'
FtpComment = FtpComment || MemBit
end;
#DefineRexx
#elseif
#define SetUpOkCheckUrlInfo
#define AddCheckUrlErrorInfoToComment
#endif
;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
;%%%[ Include FTPLIKE Header ]%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#include "FTPLIKE.IH"
;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
;%%%[ Add Footer to "ROOT" Page ]%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#pop Macro 'ShortNameHtmlLowerCase'
#pop Macro 'ShortNameHtml'
<$EndHtmlWithStandardFooter>
;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
;%%%[ Produce ALL URLS List Page ]%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#ifdef ALL_URL_NAME
#output "<$ALL_URL_NAME>"
;--- Output Header stuff ---------------------------------------------
#define+ FTPLIKE_DISPLAY_DIR_TITLETAG ALL <??AllUrlCount> LINKS
#define+ FTPLIKE_DISPLAY_DIR_CATEGORY_LT <$FTPLIKE_DISPLAY_DIR_TITLETAG>
<$FTPLIKE_START_HTML_PAGE>
;--- Generate BODY ---------------------------------------------------
<?NewLine>
#if [AllUrlCount = 0]
<P>No URLs at all!
#elseif
;--- Generate body -----------------------------------------------
#DefineRexx ""
;--- Sort the array by Title -------------------------
<$GenRexx2Sort \
COUNT=^AllUrlCount^ \
GREATER=^SrtGreater = AllUrl.SrtIndex1.!SortKey > AllUrl.SrtIndex2.!SortKey^ \
SWAP=^ \
SrtTemp = AllUrl.SrtIndex1.!SortKey; \
AllUrl.SrtIndex1.!SortKey = AllUrl.SrtIndex2.!SortKey; \
AllUrl.SrtIndex2.!SortKey = SrtTemp; \
SrtTemp = AllUrl.SrtIndex1.!Title; \
AllUrl.SrtIndex1.!Title = AllUrl.SrtIndex2.!Title; \
AllUrl.SrtIndex2.!Title = SrtTemp; \
SrtTemp = AllUrl.SrtIndex1.!Url; \
AllUrl.SrtIndex1.!Url = AllUrl.SrtIndex2.!Url; \
AllUrl.SrtIndex2.!Url = SrtTemp; \
SrtTemp = AllUrl.SrtIndex1.!Comment; \
AllUrl.SrtIndex1.!Comment = AllUrl.SrtIndex2.!Comment; \
AllUrl.SrtIndex2.!Comment = SrtTemp; \
SrtTemp = AllUrl.SrtIndex1.!Category; \
AllUrl.SrtIndex1.!Category = AllUrl.SrtIndex2.!Category; \
AllUrl.SrtIndex2.!Category = SrtTemp; \
SrtTemp = AllUrl.SrtIndex1.!Html; \
AllUrl.SrtIndex1.!Html = AllUrl.SrtIndex2.!Html; \
AllUrl.SrtIndex2.!Html = SrtTemp; \
^ \
>
;--- Display Each item -------------------------------
AllOutput = '';
Index = 1;
do while Index <= AllUrlCount
;--- Get main information ------------------------
StartName = AllUrl.Index.!Title;
StartUrl = AllUrl.Index.!Url;
StartComment = AllUrl.Index.!Comment;
;--- Output Name & URL ---------------------------
UrlLink = '<A HREF="' || StartUrl || '" TARGET=<$BOOKMARK_OPEN_LINK_IN>>' || StartUrl || '</A>';
AllOutput = AllOutput || '<P>';
AllOutput = AllOutput || '<TABLE BORDER=0 WIDTH="100%" CELLPADDING=1 cellspacing=0>';
AllOutput = AllOutput || '<TR><TD BGCOLOR=SILVER>' || StartName || '</TD></TR>';
AllOutput = AllOutput || '<TR><TD BGCOLOR="#FFFF9C">' || UrlLink || '</TD></TR>';
;--- Add category information to comments --------
Comment = StartComment;
do Index = Index to AllUrlCount
;--- Only category differs? ------------------
if StartName <> AllUrl.Index.!Title | StartUrl <> AllUrl.Index.!Url | StartComment <> AllUrl.Index.!Comment then
leave;
;--- Add category ----------------------------
MoreLikeThis = '<A HREF="' || AllUrl.Index.!Html || '"><SMALL>Category: ' || AllUrl.Index.!Category || '</SMALL></A>';
if Comment = '' then
Comment = MoreLikeThis;
else
Comment = Comment || '<BR>' || MoreLikeThis;
end;
;--- Output comments and category information ----
AllOutput = AllOutput || '<TR><TD BGCOLOR=WHITE>';
AllOutput = AllOutput || Comment;
AllOutput = AllOutput || '</TD></TR>';
;--- End the entries table etc -------------------
AllOutput = AllOutput || '</TABLE>';
;--- How many items did we just handle? ----------
end;
#DefineRexx
<??AllOutput>
#endif
;--- Thats All for this file ---------------------------------------------
<$FTPLIKE_FOOTER>
#output
#endif