THE BORE

General => The Superdeep Borehole => Topic started by: Oblivion on January 23, 2012, 07:39:47 AM

Title: Web design-bore : Need help!
Post by: Oblivion on January 23, 2012, 07:39:47 AM
Need some help on a few (seemingly) simple things. First off, how do I create a comment box? Second, and this is one that I've had a little bit more trouble trying to solve. Most comment areas on a website would have you register before you can post. What I would like, is to have a list of names already available. The user would just select one of those names and can post as that username. How do I go about doing that?
Title: Re: Web design-bore : Need help!
Post by: Momo on January 23, 2012, 08:04:21 AM
Quote
Need some help on a few (seemingly) simple things. First off, how do I create a comment box?
Are you using a CMS or coding from scratch?

Quote
The user would just select one of those names and can post as that username. How do I go about doing that?
May as well just allow anonymous posting
Title: Re: Web design-bore : Need help!
Post by: demi on January 23, 2012, 10:30:11 AM
I don't understand a single thing you said.
Title: Re: Web design-bore : Need help!
Post by: Tasty on January 23, 2012, 11:29:07 AM
Need some help on a few (seemingly) simple things. First off, how do I create a comment box?

http://disqus.com

Second, and this is one that I've had a little bit more trouble trying to solve. Most comment areas on a website would have you register before you can post. What I would like, is to have a list of names already available. The user would just select one of those names and can post as that username. How do I go about doing that?

Lots of server side coding. Hope you enjoy PHP.
Title: Re: Web design-bore : Need help!
Post by: Oblivion on January 23, 2012, 07:29:10 PM
Quote
Need some help on a few (seemingly) simple things. First off, how do I create a comment box?
Are you using a CMS or coding from scratch?

I was hoping to use a wordpress template.

Quote
May as well just allow anonymous posting

No! It has to be a pre-selected list of options. There's a reason for this (which will come clear when it's completed)

Quote from: Demi
I don't understand a single thing you said.

Okay, on my home page, somewhere at the top, there will be a comment box. In order to submit a post/comment/message, you have to select a username from a list of options (which will be in the form of a drop down menu).

Make sense?
Title: Re: Web design-bore : Need help!
Post by: The Sceneman on January 23, 2012, 07:44:27 PM
If you're using Wordpress, commenting will be a default feature in most themes.

As for your strange idea of having pre-selected usernames to select, you better hope someone has coded that specific Wordpress plugin (highly unlikely given how specific/unusual that it is). Otherwise as Andrex said, you're gonna have to hack the Wordpress php. If you don't know what you're doing this will be pretty difficult.
Title: Re: Web design-bore : Need help!
Post by: Tasty on January 23, 2012, 08:09:16 PM
Not only PHP but probably the database too, unless you want the names hardcoded.

If hardcoded, you might be able to do something like...

<?php
   $names = ['Andrex', 'demi', 'Oblivion'];

   echo '<select id="author" name="author">';
   foreach ($names as &$val) {
      echo '<option value="' . $val . '">' . $val . '</option>";
   }
   echo '</select>';
?>

You could replace the author input/label in the comments form with this, if it worked. Count it as pseudocode.

But don't hold me to that, I'm not super familiar with PHP (ironically most of my knowledge of it comes from making WP themes, lol.)