Page 1 of 1

Troubleshoot Field Add On GB: 1.5

Posted: Thu Feb 22, 2007 2:33 am
by Chrystal
Script URL: http://inuyashakarma.moon-blurred.net/gb/gbook.php
Version of script: 1.5
Hosting company: Dreamhost [www.dreamhost.com]
URL of phpinfo.php: http://inuyashakarma.moon-blurred.net/gb/phpinfo.php
URL of session_test.php: http://inuyashakarma.moon-blurred.net/g ... n_test.php
What terms did you try when SEARCHING for a solution: add field, field

Write your message below:

So I did the insane thing with GB 1.34 and added on my own field. Never had any issues with it. I've upgraded to GB 1.5 to hopefully to counter spam and with it I tried to keep that field I created in the previous guestbook.

Everything works just fine if you post, but the problem comes if I try to reply to a GB comment. The comment gets shifted into a "private post" which it's not originally. Even if I view the newly created "private post" there's no sign of my reply.

If I look in the entries txt, I can find my comment. In brackets I'll describe was the field is. It looks like so:

Brittany[name] cranberry portage[from] Shippo[new field] random@hotmail.com[e-mail] http://piczo.com[website] Posters comments yada yada yada[comment] February 18, 2007[time stamp] Thanks for your comment.[my reply]

What I've changed in the 'gbook.php', is under everything that has the "from" field, I have added this: $chara

Here's a text file of my current gbook code: http://inuyashakarma.moon-blurred.net/gbook_change.txt



I'm not a PHP expert in any way shape or form. It's all about edit and testing for me. If you have any idea what I should try to change or look at, any help would be appreciated. I realize from past posts I've see that has anything to do with field adding, there isn't much support due that it's a little complex. However, I've gotten as far to already have a custom field in place, I just need a direction where to go to make it fully work in 1.5

I have no problem just never using the reply function, but it would be nice to try and make it work. ^_^

Thanks,

-Chrystal

Posted: Thu Feb 22, 2007 11:20 am
by Klemen
The problem is you are missing the "Is private?" data. The original entries file setup is:

NAME (tab) FROM (tab) MAIL (tab) URL (tab) COMMENTS (tab) DATE (tab) ISPRIVATE (tab) REPLY (tab) IP

With one field added it would have to be something like

NAME (tab) FROM (tab) NEW_FIELD (tab) MAIL (tab) URL (tab) COMMENTS (tab) DATE (tab) ISPRIVATE (tab) REPLY (tab) IP

(IP can be blank or not even exist) The "ISPRIVATE" should be set to 0 for public messages or to anything other for private post. Since you are missing this one your reply is actually stored in the "Is private" variable and thus GBook displays it as a private post.

What you should do is:
1. backup your entries file
2. edit entries file - add one tab and a 0 in each line after the timestamp

Regards,

Posted: Thu Feb 22, 2007 6:52 pm
by Chrystal
Klemen Stirn wrote:The problem is you are missing the "Is private?" data. The original entries file setup is:

NAME (tab) FROM (tab) MAIL (tab) URL (tab) COMMENTS (tab) DATE (tab) ISPRIVATE (tab) REPLY (tab) IP
Thank you for your reply.

What I'm missing is that it gets confused with the Private and Reply. If I reply to a regular entry (that is not listed as a private entry), it will turn into a private post and my reply is no where to be found.

I'll have a look at what you mention though and see if I can edit anything that will make it correctly displayed.