×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Pre defined values

Pre defined values 15 years 8 months ago #3120

  • Christopher Doiron
  • Christopher Doiron's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 0
I would like to know how I can put in pre defined values. This way, when a guest of my website wants to make a comment, the "name" text area has a word in it.

As is, the fields are blank.

My goal is to fill the fields with guest information. I'll be creating an email account for guest posting. This way, visitors will be able to post without having to include their own E-mail and instead use the one I've provided.

Thanks, hope to hear from you.

Pre defined values 15 years 8 months ago #3124

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Sorry, I didn't quite understand what you exactly want to have.

If you want to fill the name field with 'test' when unregistered user is on the site go to comment.class.php

find the form_htmlCode() function.
before this line
$html = str_replace('{username}', $this->_tname, $html);
 

and change it to this
        if(!strcmp($this->_tname,'')) {
$html = str_replace('{username}', 'test', $html);
} else {
 $html = str_replace('{username}', $this->_tname, $html);
}

This should change the empty input name field to a field that has a value test.

Pre defined values 15 years 8 months ago #3126

  • Christopher Doiron
  • Christopher Doiron's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 0
Sorry about the bad explanation. You got it right on the spot! Thats what I wanted, and I thank you very much for it!

I really like the module and want to add: If anyone is browsing the forums looking for a great comment mod, this is the one!
  • Page:
  • 1
Time to create page: 0.106 seconds