Liberty Basic is develeopped by Carl Gundel
Original Newsletter compiled by Alyce Watson and Brosco
Translation to HTML: Raymond Roumeas

The Liberty Basic Newsletter - Issue #52 - OCT 99

© 1999, Cliff Bros and Alyce Watson All Rights Reserved

In this issue:

  1. Promoting Liberty BASIC
  2. Make a Liberty BASIC Website:
  3. Web Servers
  4. FTP Clients
  5. HTML Tags
  6. Images for Webpages
  7. Template for YOUR website!


PROMOTING LIBERTY BASIC

We are all here because we enjoy programming in Liberty BASIC. We would all like to see this great language continue and flourish. We can help!

Some easy ways to promote Liberty BASIC include telling your friends (and enemies!) about LB, starting your own user group, posting questions, answers and announcements on the LB message boards, adding content to the LB Community Website, and posting enthusiastic messages on the two usenet groups:

comp.lang.basic.misc

and

alt.lang.basic

The All Basic Code site offers packets of BASIC code for many BASIC languages, including Liberty BASIC. You can submit code for inclusion in the ABC packets here:

http://www.basicguru.com/abc

OR, you can submit the code to David Szafranski at his website, Liberty Now! He has undertaken a project of LB code packets, which he also submits to the ABC packets:

http://libertynow.webjump.com/


MAKE A LIBERTY BASIC HOMEPAGE

You can see that there are many ways that we, as individuals can promote LB, but the best way may be maintaining a Liberty BASIC website.

ITS REALLY EASY!

If you have never had a website of your own, you might think that it will be difficult to learn and accomplish, but it is not! You might think that it will be expensive, but again, it is not! It can cost nothing at all!

For those of you who have authored websites, this article may seem elementary, but we are providing just the most basic information here, so as not to confuse or intimidate beginners. If someone would like to extend this idea, and write an article on advanced web design, that would be great!

If anyone is inspired to create a website, please let us know!

You need three things to put up a website, server space, an FTP client, and a grounding in HTML.


SERVER SPACE

It is not necessary to pay for space on a webserver to host your site. The first place to look for space is in your own backyard. Many ISP's provide server space to their subscribers. If you do not know, ask your ISP if they provide space, and the cost.

The Liberty BASIC Network hosts some websites. Go to this URL to sign up:

http://www.liberty-basic.com/free/

or email questions to Ian Davies, the LBN webmaster.

mailto:ia-@liberty-basic.com

There are many free servers available on the 'net to host your website. Look around and see which one best suits your needs. Some require advertizing banners on some or all of your pages. Some have popup windows for their advertizing. Some don't require ads at all. Some servers allow more flexibility than others, so look into the details.

Some servers require you to use only their library of images. Webpage writing tools and tutorials are often available.

The amount of free space offered can vary from 2 megs to unlimited space.

The following URL is a GREAT place to start looking. It lists and evaluates free servers, FTP clients and HTML editors:

http://www.thefreesite.com/freewebpages.htm

Here is a short list of freeservers you might want to visit:

http://xoom.com/home/ - XOOM.COM

http://www.fortunecity.com/ - Fortune City

http://www.crosswinds.net/ - Crosswinds

http://webjump.com/ - Webjump

http://www.tripod.com/ - Tripod

When you sign up for web space, the server will give you the information you need to begin and maintain your site.

You will need the FTP address for uploading files, and you will need to remember your password, so write it down and keep it in a safe place!


FTP CLIENTS

Once you have chosen a server to host your website, you will need a program that allows you to upload files via FTP (file transfer protocol.) Some FTP programs have been written in Liberty BASIC, so you could even write your OWN FTP Client. We won't discuss the use of FTP here, since the program you choose will have documentation for its use. If anyone would like to write an article on using FTP, or writing FTP programs in Liberty BASIC,

please do!

Simtel net is a great place to get downloads:

http://www.simtel.net/simtel.net/

Look for these two, popular FTP Clients:

wsftp32.zip WS_FTP

cute3032.zip Cute FTP


HTML TAGS

HTML is Hyper Text Markup Language. It is the only language we will discuss here. It is not necessary to use the fancy scripting languages, like Perl and Java. Consider HTML writing to be another form of programming. (It is!)

There are plenty of HTML tutorials, guidelines and templates available on the 'net. This article only attempts to cover the very basic stuff!

There are many HTML editors available, and some are freeware. Some good ones have been written in Liberty BASIC. If you are very visually oriented, you can get a WYSIWIG - style editor. What You See Is What You Get. WYSIWIG applications function like Freeform. You design your webpage by adding elements to a window, dragging sizing, choosing colors etc.

When you like the look, the application will generate the HTML code FOR you!

You DO NOT need a special HTML editor. Notepad will work just fine for writing HTML. Any text editor will work, including the Liberty BASIC editor, itself. When you save the code, give it the extension .html or .htm. Watch out for Notepad, though. Even if you choose to save as "all files" with an html extension, you may find that Notepad has added an additional .txt extension to the filename. If this happens, just change the name using Windows Explorer.

HTML commands/instructions are called tags, and are placed within angle brackets: <P> You may comment your code by placing the comments within this tag:

<!-- comment here -->

Some people prefer to type the tags in lowercase, while others prefer uppercase. We will use uppercase here, to make the tags easy to spot.

There are a few tags that must be included in the code. Every HTML document must begin with:

<HTML>
<HEAD>
<TITLE>Page name goes here </TITLE>
</HEAD>

The <HEAD> tag designates the document heading. It must contain a <TITLE> tag. The text you place in the title tag is the default label for bookmarks in a browser. The <TITLE> tag, and most other tags come in pairs. The tag that designates the start will contain the command within angle brackets, while the end tag will contain the same command, preceded by a slash ( / ) In the above example, the <HEAD></HEAD> tags enclose the <TITLE></TITLE> tags.

Then, you must have a tag to designate the body of the document. Everything contained within the document will be bracketed by the <BODY></BODY> tags. The document must end with a closing </HTML> tag. Some browsers are very forgiving about the use of tags, while others are not, so try to do it properly. It is a good idea to test your web page in different browsers to make sure that it works properly.

You may simply type the text you want to include within the <BODY></BODY> tags. The browser will wrap lines according to the size of the display window. If you choose to do this, the background color of the page will be the default contained in the browser. MSIE will give a gray background, while Netscape defaults to white. Text will be colored black.

If you try this method, you will see that your text does NOT display in the way that you typed it! Browsers ignore carriage returns, tabs, and multiple blank spaces. The easiest way to avoid this problem, and have your text appear just as you format it, is to use the <PRE></PRE> tags. Text placed within these tags will retain the exact formatting you gave it, including carriage returns, tabs, multiple blank spaces, and paragraphs.

If you do not wish to use the <PRE></PRE> tags, you may tell the browser how to format the text with tags. A carriage return, signalling the end of a line is marked with the tag <BR>, which stands for line break. Note that you do not need an ending tag for this one.

The tag <P> indicates the beginning of a paragraph. It will give a bit more space between lines than using the <BR> tag will do. The ending </P> tag is optional. Browsers will assume that a paragraph ends when you begin another one.

To insert multiple blank spaces, use this for each one:

&nbsp;

It stands for non-breaking space. If you have text that needs many multiple blank spaces, it is easier to use the <PRE></PRE> tags.

*** IMPORTANT NOTE ***

If you publish source code on your webpage, the symbols for less than and greater than will be interpreted to be HTML tag indicators. The easiest way to avoid this problem is to use the <PRE></PRE> tags. You may instead use the code for these special characters:

< = less than = &lt;

> = greater than = &gt;

Using the above designations, here is a code example:

IF a <> b THEN [inputLoop]

would translate in HTML to:

IF a &lt; &gt; b THEN [inpuLoop]

A simple, horizontal dividing line, or horizontal rule is placed on the page with <HR>. It does not have an ending tag.

By default, all items on an HTML page will be alligned left. If you would like to center text or images, place them within the <CENTER></CENTER> tags.

You may specify bold text for headings with the <Hn></Hn> tag. The n is a number, specifying the size of the heading. The largest heading is <H1></H1>. <H2></H2> will be smaller, and so on.

Right about now, you may be thinking that this is far too complicated! It might be time to jump to the end of this article and peek at the HTML template that is included.

If you do, you will see how simple it is to use, after all. You may use the template as a starting point for your own webpage.

You may designate text to be either bold, or italic, or both, by placing it within these tags: B = bold, I = italic:

<I></I>
<B></B>
<I><B>This text is bold AND italic!</B></I>

You can change the look of the page by selecting colors. Do this within the <BODY> tag. The color for text is set with the command TEXT="COLOR" where color is the name of the color you want, or a hexadecimal color value. Hex numbers are in the form "#RRGGBB" where RR is the red value, GG is the green value and BB is the blue value. Hex numbers have values between 0 and F, with F being the highest concentration. If one of the color values is FF, it is the highest concentration for that color, if it is 00, it is the lowest. White is hexadecimal "#FFFFFF" while black is "#000000". Red is hexadecimal "#FF0000", green is "#00FF00" and so on. Either of the following examples will set the text color to be pure blue:

<BODY TEXT="BLUE">
<BODY TEXT="#0000FF">

The background color for the page is set in just the same way, using BGCOLOR="COLOR". The following examples both set text color to blue and background color to white:

<BODY TEXT="BLUE" BGCOLOR="WHITE">
<BODY TEXT="#0000FF" BGCOLOR="#FFFFFF">

You may want to have pictures on your web page. See the section following this one for some picture tips. The tag to include a picture is <IMG SRC=" " > The filename of the picture will be within the double quote marks. You may add the HEIGHT= and WIDTH= information. If you do not specify the dimensions of the picture, most browsers will display it in its proper size, so dimensions are optional.

We will assume that the image file is in the same directory as the HTML file. The following examples will display "banner.gif."

<IMG SRC="banner.gif" HEIGHT=60 WIDTH=469>
<IMG SRC="banner.gif">

You may have files available for download on your web site. You indicate these with the <A HREF=" ">text</A> tag. This tag is a little more complicated than the previous examples. The name of the downloadable file will be contained within the double quote marks and followed by an angle bracket. The text that will appear on the browser page comes next, followed by the ending </A> tag.

In this example, the downloadable file is called "prog.zip." The text that will appear on the page is "Download my first program!" It will be underlined, to indicate that it is a hyperlink - a clickable link.

<A HREF="prog.zip">Download my first program!</A>

Hyperlinks to other websites are done in the same way, but instead of a file name within the double quote marks, you will have the URL of the desired website. In the example here, the words "The Liberty BASIC Homepage" will appear on the web page, underlined to show that it is a hyperlink:

<A HREF="http://www.libertybasic.com/">The Liberty BASIC Homepage</A>

If you have multiple HTML pages on your site, you also use a clickable hyperlink. In this case, it is only necessary to have the name of the HTML document, not a complete URL. To link to a file called "second.html" whose title is "My Snippets Page:"

<A HREF="second.htm">My Snippet Page</A>

There is one more use for the <A HREF=""> tag. It will allow you to specify an email address. When the link is clicked, the user's default email client will pop up and contain the email address specified in the link. This requires the word "mailto:" inside of the quote marks, followed by the email address. This example will show the text, "Email Carl Gundel" underlined on the web page.

When it is clicked, the default emailer will be activated, with the send-to field filled with "carl-@libertybasic.com"

<A HREF="mailto:carl-@libertybasic.com">Email Carl Gundel,</A>


IMAGES FOR WEBPAGES

Images must be in the format JPG or GIF. You may use a fancy imaging program to create images. If you do not have one, just create your images in Windows Paint and save as a bitmap. Then, download this terrific image program, that is FREEWARE. IrfanView will allow you to manipulate your bitmap in a number of ways, and then save it in JPG or GIF format. There is a sample banner, included with this newsletter called "banner.gif." It is used in the HTML template contained here.

IrfanView Homepage: http://stud1.tuwien.ac.at/~e9227474/


HTML TEMPLATES

<!-- HTML TEMPLATE -->
<!-- Cut and paste the following into Notepad, then
save as template.html and view in your browser. -->
 
<HTML>
 
<HEAD>
<TITLE>My Way Kewl Liberty BASIC Page</TITLE>
</HEAD>
 
<BODY TEXT="BLUE" BGCOLOR="#FCFFFF">
 
<CENTER>
<IMG SRC="banner.gif" HEIGHT=60 WIDTH=469>
 
<H1>MY WAY KEWL LIBERTY BASIC PAGE</H1>
 
<I>Welcome!</I>
 
<BR><BR>
 
<H2>News:</H2>
January 1, 2000 - This website opens!<BR>
January 1, 2001 - One year anniversay!<BR>
</CENTER>
 
<HR>
 
<H3>LINKS:</H3>
 
<A HREF="second.htm">My Snippet Page</A>
- Helpful source code!<BR>
 
<A HREF="http://www.libertybasic.com/>
The Liberty BASIC Homepage</A>
- get your copy of Liberty BASIC here!<BR>
 
<A HREF="http://www.liberty-basic.com/>
The Liberty BASIC Network</A> - lots of helpful stuff here!<BR>
 
<HR>
 
<H3>DOWNLOADS:</H3>
<A HREF="prog.zip">Download my first program!</A><BR>
 
<HR>
 
<H3>CONTACT INFORMATION:</H3>
<A HREF="mailto:carl-@libertybasic.com">Email Carl Gundel,</A>
author of Liberty BASIC<BR>
 
<A HREF="mailto:yournam-@isp.net">Email ME!</A>
 
<HR>
 
<CENTER>
<H4>THANKS!</H4>
Come back soon!<BR>
</CENTER>
 
<BR><BR>
</BODY>
</HTML>

<!-- SECOND HTML TEMPLATE --> <!-- Cut and paste the following into Notepad, then save as second.htm and view in your browser. -->   <HTML>   <HEAD> <TITLE>My Snippet Page</TITLE> </HEAD>   <CENTER> <H1>MY SNIPPET PAGE</H1> </CENTER>   <HR>   <H3>Line Input from File</H3>   <PRE> filedialog "Open text file","*.txt",file$   DIM LineArray$(1000)   counter=1   open file$ for input as #f   While eof(#f)=0 Line input #f, Line$ LineArray$(counter)=Line$ : counter=counter+1 print Line$ Wend   print:print:print print "The number of lines in this file is " + str$(counter) print "Line number 7 in this file is: " + LineArray$(7) close #f   </PRE>   <BR><BR> </BODY> </HTML>


Newsletter compiled and edited by: Brosco and Alyce.

Comments, requests or corrections: Hit 'REPLY' now!

mailto:brosc-@orac.net.au or mailto:awatso-@mail.wctc.net