I am trying to format the page that takes in the entries to a page where I invite visitors to contribute short messages.
My host uses an Apache server; it offers a proprietary web-gagdet called MAILIT, which has many capabilities. After a quick chat with tech support, I managed to kludge a page for visitors to enter thoughts or comments. I want these to be a blog-like thing with people contributing at will.
In testing, astoundingly, I got the thing to work. My ISP offers docs, but I don’t understand the docs! Should I post them here? I don’t think they’re available normally to non-customers. Anyway, they say to format the results of the entry, you can use a template file. I have no idea what one would look like, nor how to construct it. Undoubtedly, both HTML and CSS will be involved in constructiong the “reply” (same idea as a “thank you” page for comments).
Here’s my current code for the visitor entry page:
[code]
<div class=”feedput”>
<form method=”post” action=”/cgi-bin/mailit”>
<p><input type=”hidden” name=”login” value=”cwhitney” /></p>
<p><input type=”hidden” name=”reply” value=”http://www.coherentdog.org/blogdisplay.htm” /></p>
<p><input type=”hidden” name=”mandatory” value=”firstname lastname email subject message” /></p>
<p><input type=”hidden” name=”sitename” value=”sitename” /></p>
<!–; I don’t yet know how to handle the template part of this!–>
<!– ; <input type=hidden name=template value=”order.tpl”> –>
<!– ; sitemessages will be a single data file with a .db extension in my ROOT dir –>
<p><input type=”hidden” name=”file” value=”blogforcarolonly” /></p>
<!– <p><input type=”hidden” name=”template” value=”remarkstpl” /></p> –>
<p><input type=”hidden” name=”format” value=”human” /></p>
<p><input type=”hidden” name=”fields” value=”firstname lastname email sitename subject message” /></p>
<p><input type=”hidden” name=”file2″ value=”/www/blogremarks” /></p>
<!– <p><input type=”hidden” name=”template” value=”remarkstpl” /></p> –>
<p><input type=”hidden” name=”format2″ value=”human” /></p>
<p><input type=”hidden” name=”fields2″ value=”firstname sitename subject message” /></p>
[skipping instructions to visitors]
<p>What is your first name?<br /><input type=”text” name=”firstname” size=”25″ /></p>
<p>What is your last name (not published)?<br /><input type=”text” name=”lastname” size=”25″ /></p>
<p>Please enter your email address (not published)<br /><input type=”text” name=”email” size=”50″ /></p>
<!– <p>If you would like, you may include the URL of your web site<br /><input type=”text” name=”sitename” size=”50″ /></p> –>
<p>Please type a subject for your message<input type=”text” name=”subject” size=”40″ /></p>
<p><textarea name=”message” rows=”20″ cols=”40″>Please type your remarks here</textarea></p>
<p><input type=”submit” value=”Click here to add your remarks” /></p>
<p><strong>or</strong></p>
<p><input type=”reset” value=”Start over” /></p>
</form>
</div>
And CSS is:
[code]
.feedput {
font-family: Verdana,Geneva,Arial,Helvetica,sans-serif;
font-size: 100%;
margin: 1em;
padding: 2em;
text-align: left;
}
.feedbutton {
margin: 1em;
padding: 2em;
font-family: Verdana,Geneva,Arial,Helvetica,sans-serif;
font-weight: normal;
font-size: 100%;
text-align: center;
}
The page that takes in the data:
HTML
[code]
<div id=”column2″>
<h2>Remarks by CoDog Visitors</h2>
<p>Thank you for your message</p>
<p>Remarks by you and others</p>
<div>
<!–#include file=”blogremarks.db” –>
</div>
As you see, there’s nothing in that code at all except stuff I write to the visitor.
Here is a sample entry; this is from the blogremarks.db file, unaltered:
[code]
firstname: Almali
sitename: sitename
subject: gosh; I am dedicated
message: This is a mess, you know; you will HAVE to learn to format this stuff before putting this page up.
So you need a template, but you have no idea how to go about that, nor do I.
Tue, 05 Apr 2005 18:29:41
P.S. my info is still here when I come back to this page! Is it left there for th next person? I hope not!
Tue, 05 Apr 2005 18:30:11
Almali
On the page it’s fed back to, it looks like this (here I include a bit of the previous entry as well as the entry that follows, so ou can see the mess:
[code]
how about a URL? http://www.coherentdog.org/ How will those come out? Tue, 05 Apr 2005 18:27:36 Almali firstname: Almali sitename: sitename subject: gosh; I am dedicated message: This is a mess, you know; you will HAVE to learn to format this stuff before putting this page up. So you need a template, but you have no idea how to go about that, nor do I. Tue, 05 Apr 2005 18:29:41 P.S. my info is still here when I come back to this page! Is it left there for th next person? I hope not! Tue, 05 Apr 2005 18:30:11 Almali firstname: Almali sitename: sitename subject: Please put the sitename field back in?
So obviously, that’s come back unformatted, with one entry running right into the next one. At least it came back. I have no idea what to do, how to make a template, nor where to put the template, or anything!
Thanks for any help anybody can offer!
Thu, 07 Apr 2005 17:30:58