Page 1 of 1
Make Comments optional
Posted: Mon Oct 29, 2012 4:38 pm
by cma2007
Script URL:
http://www.bibleversusconstitution.org/ ... /gbook.php
Version of script: 1.7
Hosting company: ipower.com
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution: Make comments optional; comments; remove comments;
Write your message below:
I searched 20 pages deep into the forum and maybe I missed it, but I can't figure out how to make "Comments" optional instead of required.
Re: Make Comments optional
Posted: Mon Oct 29, 2012 7:21 pm
by Henrie
Hello cma2007,
There is no option to make comments optional.
It would not make sense to have a guestbook where someone does not leave a comment, because that is the whole idea of having a guestbook.
Greetings,
Henrie
Re: Make Comments optional
Posted: Mon Oct 29, 2012 9:22 pm
by cma2007
Thank you for your reply. I actually converted your Guestbook into a "Sign a Petition" page. The person that asked me to do this for him, asked me to allow comments, just not make them a required field. Shouldn't there be a way to do this? Your guestbook is awesome, by the way. And I do so appreciate the fact that you try to help people the way you do.
Re: Make Comments optional
Posted: Mon Oct 29, 2012 11:40 pm
by Henrie
Hello cma2007,
I decided to describe this mod because it is not so difficult to implement.
Optional 'comments' field for GBook version 1.7
Edit file
settings.php
Add
Code: Select all
/* The 'commments' field is required? 1 = YES, 0 = NO */
$settings['req_comments']=0;
Put it before /* DO NOT EDIT BELOW */
Save and close the settings.php file.
Edit file
gbook.php
Search for (line 788)
and replace with
Code: Select all
if (empty($comments) && $settings['req_comments'] == 1)
Save and close the gbook.php file.
Edit file
sign_form.php in your template folder
Search for (line 53)
Code: Select all
<div class="gbook_left"><span class="gbook_entries"><b><?php echo $lang['t16']; ?></b></span></div>
and replace with
Code: Select all
<div class="gbook_left"><span class="gbook_entries"><?php if ($settings['req_comments'] == 1) { echo '<b>' .$lang['t16']. '<b>'; } else { echo $lang['t16']; } ?></span></div>
Save and close the sign_form.php file.
That should be all.
Now you can control wether the comments field is required or not by setting $settings['req_comments']= in the settings.php file.
Greetings,
Henrie
Re: Make Comments optional
Posted: Tue Oct 30, 2012 2:44 am
by cma2007
Henrie - You are one awesome fellow! Thank you. You didn't have to do that - but you helped me and I really appreciate it. The world needs more people like you.
Thanks again - Charlie
Re: Make Comments optional
Posted: Tue Oct 30, 2012 5:12 am
by Henrie
Hi Charlie,
You are welcome. And btw, it is not my guestbook, but Klemen's.I am a user just like you. I changed an older version of GBook to my needs, and stuck to these forums after that.
Greetings,
Henrie
Re: Make Comments optional
Posted: Tue Oct 30, 2012 11:00 am
by cma2007
Henrie - Works perfectly. Thanks. And thanks for filling me in on Klemen.
C
Re: Make Comments optional
Posted: Tue Oct 30, 2012 12:24 pm
by Klemen
Yeah, Klemen is the creator, but Henrie is the one providing most support for GBook lately with Klemen being too busy
Thanks again, Henrie

Re: Make Comments optional
Posted: Tue Oct 30, 2012 8:03 pm
by Henrie
Klemen,
Are you feeling well? You talk about yourself as another person.
And I understand that you are busy with Hesk. It gets a lot of questions and still needs active development, while GBook is working very well as it is now.
Greetings,
Henrie