Author Topic: Web design-bore : Need help!  (Read 651 times)

0 Members and 1 Guest are viewing this topic.

Oblivion

  • Senior Member
Web design-bore : Need help!
« 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?

Momo

  • Nebuchadnezzar
  • Senior Member
Re: Web design-bore : Need help!
« Reply #1 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

demi

  • cooler than willco
  • Administrator
Re: Web design-bore : Need help!
« Reply #2 on: January 23, 2012, 10:30:11 AM »
I don't understand a single thing you said.
fat

Tasty

  • Senior Member
Re: Web design-bore : Need help!
« Reply #3 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.

Oblivion

  • Senior Member
Re: Web design-bore : Need help!
« Reply #4 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?

The Sceneman

  • Did my wife send you?
  • Senior Member
Re: Web design-bore : Need help!
« Reply #5 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.
#1

Tasty

  • Senior Member
Re: Web design-bore : Need help!
« Reply #6 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.)