Page 1 of 1

Setting default to "sign guestbook"

Posted: Fri Aug 17, 2007 8:42 am
by skyguy
Script URL: phpjunkyard.com
Version of script: 1.5
Hosting company: midphase.com
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:
default sign
Write your message below:

How can I modify my guestbook so it automatically defaults to the "sign guestbook" screen when people click on my guestbook link? Right now it defaults to "view guestbook." Since no one has signed it yet, it says "no entries yet!" I've had several people think they're getting some kind of error message when they see that.

Posted: Fri Aug 17, 2007 12:38 pm
by gildionne
The default view in gbook is to show the entries. What you can do is:

If you can open gbook.php, look around line 227 for code like shown below.
[code]
.....
if ($total == 0) {
echo '
<tr>
<td>No entries yet!</td>
</tr>
</table>
......
[/code]

change the line containing No entries yet! to make it read:
[code]
.....
<td>No entries yet!<br />You will be the first!</td>
.....
[/code]

Maybe you don't need this fix as someone has already signed your book, but if not, you may encourage someone to be the first


gil

first message

Posted: Mon Aug 20, 2007 1:55 pm
by karel
why not simply write the first message yourself, as an invitation?

Posted: Tue Aug 21, 2007 6:29 am
by gildionne
I don't think that skyguy is aware yet that his guest book will not work. It displays OK on his page, but when you try to sign up, you get the dreaded 'Wrong Security Number" message. No wonder no one has signed it yet.