v1.0

diWEBlo is a free tool to let your intranet users modify contents of Web pages

just filling out Web forms...

... with password protection...

... ...no programming...         ... ... DOWNLOAD SOURCE ... ...

Being a webmaster colleges came to me to help them publish information in the intranet. They are USERS (not gurus, like you) and can not handle HTML, FrontPage, ftp and alikes. So I had to design the page and change the content each time they changed a word.

Finally someone came to me to publish the menu of a nearby restaurant that colleges visit for lunch. A weekly update. And the menu was available as printed text to type in. NO!

Instead I created diWEBlo, a CGI script that you can let the users to update the content of the Web pages you have designed.


How it works

  1. You design the page and insert special HTML comments for each text parameter that can be changed by the user.
  2. You set up a teplate file that contains configuration parameters for the Web page, like directory for the html file to put it.
  3. You desing a Web page including a form that the user can define the value for the parameters.
  4. The user fills in the form, submits and the Web page is automatically updated. It is just a form filling for the user and no programming for you (as I have already done it).

Example 1

You create the html template
d:/inetpub/wwwroot/progs/perl/diweblo/example1.htm
:

<html>
<head>
<title><!--#diweblo title--></title>
</head>
<body>
<h1><!--#diweblo title--></h1>
<hr>
<!--#diweblo body-->
</body>
</html>

You also create
d:/inetpub/wwwroot/progs/perl/diweblo/example1.template
with the content:

# html template file
File: d:/inetpub/wwwroot/progs/perl/diweblo/example1.htm
# result file
TemplateFile: d:/inetpub/wwwroot/progs/perl/diweblo/example1.html


and
d:/inetpub/wwwroot/progs/perl/diweblo/example1_form.html
with the content:

<html>
<head>
</head>
<body>
Define title and body of the page:
<form action="http://localhost/iscripts/perl/diweblo/diweblo.pl">
title: <input type=text name="title"><BR>
body: <input type=text name="body"><BR>
<input type=hidden name="template" value="example1">
<input type=submit>
</form>
</bod>

When you load the form you can see a similar picture like this one. Filling in the fields you, or the user can specify the value for the title and for the body of the page. Submitting the form starts diweblo.pl and it generates the file
d:/inetpub/wwwroot/progs/perl/diweblo/example1.htm
with the content:

<html>
<head>
<title>here is the title</title>
</head>
<body>
<h1>here is the title</h1>
<hr>
this is the body
</body>
</html>

To summarize the process here is a picture describing what had happened. The upper box is the template file that defines the result file, the HTML template and other parameters. The HTML template file describes how the final web page should look like, except that the parameters are included with diWEBlo references. The CGI parameters are specified by the user, when he/she submits the form. diWEBlo put all these things together and creates the final HTML page.

The name of the template file was specified by the CGI variable template.


Example 2

After having set this up the users can change the Web page, easily. However you might need some extra features, like password protection. Using diWEBlo this is simple. Just extend the template file including the line:
Password: my_password
and the html file containing the form should also include:
<input type="password" value="" name="Password">
diWEBlo will only accept input with the proper password.

Example 1 is simple enough. Whenever the user wants to change the title and the body he/she can type the new value. But what to do when a web page has several parameters, or some parameters are rather long. (Imagine our weekly menu, three dishes for five days summs up as fifteen parameters.) Should the user type in all the sentences to correct a typo?

The answer is no, the user need not type in all the parameters again. (I guess you have guessed it.) diWEBlo provides a way to have all previous values being displayed in the forms as default values.

To get this we have to extend our example telling diWEBlo to save the parameters to data file. And we can change the html form file to display the saved parameters as default values.

This way diWEBlo runs twice to change a Web page. First it is started to show the editing page for the user and after it is filled in, or corrected diWEBlo runs to modify the Web page.

To perform this you need to create another html template file for the form possibly including a password field, and to specify the file name of this file in the template file as

EditFile: d:/inetpub/wwwroot/progs/perl/diweblo/example2_form.html

Well, here it is example2_form.html:

<html>
<head>
</head>
<body>
Define title and body of the page:
<form action="http://localhost/iscripts/perl/diweblo/diweblo.pl">
password: <input type=password name="Password" value=""><BR>
title: <input type=text name="title" value="<!--#diweblo title-->"><BR>
body: <input type=text name="body" value="<!--#diweblo body-->"><BR>
<input type=hidden name="template" value="example2">
<input type=submit>
</form>
</bod>

The content of the new template file example2.templatefinally is:

# html template file is still example1.htm
File: d:/inetpub/wwwroot/progs/perl/diweblo/example2.htm
# result file
TemplateFile: d:/inetpub/wwwroot/progs/perl/diweblo/example1.html
EditFile:  d:/inetpub/wwwroot/progs/perl/diweblo/example2_form.html
# save data in this directory
Data: d:/inetpub/wwwroot/progs/perl/diweblo
# this is a password, not a real one, only for example
Password: example

When this is ready you can start diWEBlo to display the edit page with the URL:

http://localhost/iscripts/perl/diweblo/diweblo.pl?display=example2
Your host name, or the name of the virtual directory can be different, but the way to invoke diWEBlo is similar. We define the name of the template using the CGI variable display, and this is the fact that tells diWEBlo to display the edit page instead of trying to create a new html file using the CGI parameters.

This is diWEBlo in short. You can use it free under GNU GPL and read a bit more detailed, advanced User's Gude. Well, not for the USERS, for you. The user's guide is less explanatory, more documentary and covers features like using more than one edit page for the same html, let different users to change different parts of the same HTML page, and so on.