Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Making A Small Reply Box For Visitors


  • Please log in to reply
11 replies to this topic

#1 holytoaster4

holytoaster4

  • Members
  • 166 posts
  • OFFLINE
  •  
  • Local time:10:18 PM

Posted 28 March 2007 - 02:11 PM

I have a website that I'm trying to build up. I want to ask visitors what the site needs and what they think of what is already on it. I want something like a forum but not really. What it does is just sits on the bottom of a page and has a replys spot kind of like howstuffworks.com. I don't want people to have to sign in but just put their name and email to reply. Then once the reply is typed in it appears above the other threads. Is that possible?
TOASTERS WILL RULE THE WORLD!!!!!!!!!!!!

BC AdBot (Login to Remove)

 


m

#2 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:09:18 PM

Posted 29 March 2007 - 05:35 PM

It depends on your capabilities. You want dynamically generated content, so you will need a means to do that, whether it be php, perl, or some other sort of scripting language. You will also need a server that will support that sort of activity.

#3 holytoaster4

holytoaster4
  • Topic Starter

  • Members
  • 166 posts
  • OFFLINE
  •  
  • Local time:10:18 PM

Posted 10 April 2007 - 11:30 AM

I'm going to have to contact them about that. I don't know perl is that going to be a problem?
TOASTERS WILL RULE THE WORLD!!!!!!!!!!!!

#4 Walkman

Walkman

  • Banned
  • 1,327 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:10:18 PM

Posted 10 April 2007 - 12:00 PM

You probably will be better off doing what you're wanting to do in .php. It's pretty easy, and plus you can make your content dynamic. On the other hand, you can also do it easily with Perl too. With perl, you'll need a script to put in your /cgi-bin/ folder, which there are many, many FREE perl scripts out there, including the kind you need to place in your web page/site.

a. What programming capabilities do you have?.. Perl?, PHP, HTML, JAVA?, XML? ASP?...etc..
b. Are you familiar with databases and how to create and implement them?

If you answer no/none to the above questions, then I would say do it with Perl. You can always migrate to another language later on.

#5 holytoaster4

holytoaster4
  • Topic Starter

  • Members
  • 166 posts
  • OFFLINE
  •  
  • Local time:10:18 PM

Posted 11 April 2007 - 11:36 AM

I have a little bit of python down and I know html that's about it and I'm not familiar with databases. So using php I have to know a little bit more where as I can just get a free script if I use pearl right?
TOASTERS WILL RULE THE WORLD!!!!!!!!!!!!

#6 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:09:18 PM

Posted 11 April 2007 - 08:04 PM

Perl is sort of...well, Perl is Perl. I would say avoid it at all costs, but a dear friend of mine would box my ears if he caught me saying that. Actually, Perl is very good at many things. It has a steep learning curve though. Another option would be to have the contents of a form (such as you are proposing) emailed to you. Then you wouldn't need any kind of scripting at all. Somewhere in this section of the forums is a nice explanation of how it is done. I didn't give the advice, but I participated in the thread. If you search this section of the forum for email form, you may find what you need.

#7 Walkman

Walkman

  • Banned
  • 1,327 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:10:18 PM

Posted 11 April 2007 - 09:44 PM

I would have to disagree with the statement avoid it at all costs.

Here is how simple Perl is.

1. All you would do is download a file or files, maybe some folders too, to your hard drive.

2. Open up a file, then set the perl location on the 1st row of the file,,, and then uncomment a few lines, and maybe fill in your server content on a few lines. Normally you'll use a relative path and (or) an absolute path when setting up the file.

3. Save your changes.

4. Upload to your /cgi-bin/ or /cgi/ directory.... set some Permissions.... and you're all done.

You may have just a small bit of code to insert into your HTML page to call up the box, and process it for you. The problem you'll most likely face when using the email to you method is that is still leaves you with manual manipulations of your data, whereas with the script, you can have it automate the task at hand, and still email you the results.

Actually, you could use the formail script, and make whatever modifications you need and want, and it'll do what you need it to do, which includes posting your submitted data into a page where you can see all the responses, in any order you choose.

When doing the above, you'll quickly see that your needs are going to grow, and then you'll need a script and (or) a database one way or another. Having a setup to just email you will leave you still doing most of the manual work, and if you know what I know, you'll want to automate as much as possible as soon as possible.

Since just about all servers have a cgi-bin, I'd say you could do what you're trying to do in just a few hours. And another good thing about Perl is that 9 out of 10 perl scripts are ready to run. Just modify a few lines, set some permissions, and you're all done.

#8 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:09:18 PM

Posted 12 April 2007 - 07:59 AM

Maybe you should read the rest of my post so that you actually know with what you are disagreeing. I said that Perl is actually very good at what it does, although it has a steep learning curve. I'm not sure how you are providing help with lines like "download a file or files, and maybe some folders".

If using Perl was so simple, then it would be easy to explain exactly how to do it. Of course, you would actually have to use Perl in order to explain that:

1) You need to have Perl installed on your server. You can download ActivePerl which is free.
2) You are going to need a Perl Tutorial or two. Perl syntax is a bit weird..
3) You could probably find a script to do exactly what you want, but Perl scripts are a bit harder to find than for other languages. However http://www.cpan.org/ is a good place to start. It is also a good place to find modules that did not come with the base install.
4) If you do decide to place a script on your server, place it wherever you want, as the actual location means nothing.

If you want to go through all of that, great. Perl is not easily readable like other languages, so it takes getting used to. Of course, you could use it without understanding what it does, but that would be stupid. If you don't know what the code does, how would you know that you are not accidentally using a script that also allows for remote management of a server, or something else?

A much simpler way to do it would be to use HTML, or even javascript. Here are some Javascript examples that can be dropped right into your code:
http://willmaster.com/possibilities/archiv...000201001.shtml
http://www.scriptlocker.com/directory/java...pt/email_forms/

#9 holytoaster4

holytoaster4
  • Topic Starter

  • Members
  • 166 posts
  • OFFLINE
  •  
  • Local time:10:18 PM

Posted 16 April 2007 - 02:09 PM

A much simpler way to do it would be to use HTML, or even javascript. Here are some Javascript examples that can be dropped right into your code:

Glad you mentioned that. How did we get on the subject of overly complicated perl when there is a much simpler way to do it. I don't want to use a programming language I don't understand so if there is a javascript that will work then I would much rather use that.
TOASTERS WILL RULE THE WORLD!!!!!!!!!!!!

#10 holytoaster4

holytoaster4
  • Topic Starter

  • Members
  • 166 posts
  • OFFLINE
  •  
  • Local time:10:18 PM

Posted 16 April 2007 - 02:13 PM

Also I don't understand the first link you gave me. It says to put your email address does that mean the feedback is going to go to my email? I want vistitors to be able to read the feedback just as easily as I can.
TOASTERS WILL RULE THE WORLD!!!!!!!!!!!!

#11 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:09:18 PM

Posted 16 April 2007 - 03:17 PM

In order to have your guests ablet o read the comments, you need to be able to dynamically generate web pages. You can't do that with Javascript, or HTML. That puts it back in the realm of PHP, or any number of server side languages; that is, if you don't want to deal with managing the webpage. Otherwise the simple solution would be to just take the comments from your email and manually add them to your HTML.

I'm probably not explaining this clearly, so lets try from square one. (I'll try not to insult your intelligence in the process). So, when you request a web-page, the server delivers html that is then displayed in your browser. How that html comes to exist is in one of two ways. A static web page can be made in which everything is hard coded into the .html page. The disadvantage to this is that any time you want to change anything, you have to do it by hand. The advantage is that that it is relatively simple for anyone to put together a web page.

If you look at Bleeping Computer, the content is changing all of the time. When people reply to threads, their content automatically appears the next time the page is generated; stats are continuously updated, etc. Pages are being dynamically generated upon request; ie, they do not exist until you request the page (there are exceptions to this, but lets ignore them for now). When a page is requested, the server looks at what is being requested, and generates the page based on the request and a template. All of the data is pulled from a database and assembled in such a way that you see a web page. PHP is the engine that drives all of that.

The opposite is also true. When you reply to a post and hit the reply button, the text that you entered into the text box is sent back to the server. Once it gets to the server, some application adds it to the database in the correct place. The next time anyone views that thread, the page is generated and now includes your response as part of the new web page. There are many advantages; content is always changing, site-wide changes can easily be made by tweaking templates, little to no human interaction is necessary. The downside is that there is more stuff to know. Although Bleeping Computer is mostly templates, Grinler spends a lot of time tweaking things and adding functionality.

If you want to automatically add comments, you need something on the server that knows what to do with the text (in your case, visitor comments). Whether that be PHP, Java, or any other language, it doesn't matter. As long as it knows what to do with the text. Then, you need some application that can retrieve the data nad dynamically generate the updated web page. Again, the language does not matter.

Did I explain the process better? And more importantly, did I not manage to insult you. :thumbsup:

#12 holytoaster4

holytoaster4
  • Topic Starter

  • Members
  • 166 posts
  • OFFLINE
  •  
  • Local time:10:18 PM

Posted 20 April 2007 - 01:35 PM

yes you explained better. Is there any way that would be easier to just store their replies on the server and then automatically search it out on the web site. It's not exactly what I wanted but that seems like it wouldn't require more then html and java
TOASTERS WILL RULE THE WORLD!!!!!!!!!!!!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users