Editing Messages

Dr. GBooky is here to help you with your guestbook problems ...
Post Reply
Dimas

Editing Messages

Post by Dimas »

Script URL: http://www.rumormusical.com/guestbook/gbook.php
Version of script: 1.34
Version of PHP: ?
Hosting company: Starlogic
Have you searched THIS FORUM for your problem: yes
(if not please do before posting)
If so, what terms did you try: Editing Messages/How do I edit Msg/Editing Posts, etc.

Write your message below:

Hello,
I'm changing my old guestbook for this, I been under atack with spam, and I love the functionality to prevent it on the gb of PHP Junk Yard, but...

- Does somebody knows how to add the option of edit a message (This is something I miss from my old GB)

- Also to make the message Paragraph wider. I'm just learning to use PHP (I'm more into asp, but I think is time to make the change)

Thanks. Great job you are doing here.
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

I don't know how to add a function for editing the guestbook. I'm not that good with php. You can always edit the entries.txt file manually.


To make the message Paragraph wider.
The cause is the following setting.

In the settings.php file this setting.
/* Maximum chars word length */
$settings['max_word']=75;

It places a <br> (line-break) after 75 chars when a word is too long. The problem is it also places a <br> (line-break) after every 75 chars but when there are spaces it places it not in a word but at a space.
When you have a wide screen it causes a lot of white space at the right of your message.

To prevent this from happening change the gbook.php file so that it places a space instead of a line-break.

Find line 425:
$comments = wordwrap($comments,$settings['max_word'],'<br>',1);
And change it to this (a space instead of <br>):
$comments = wordwrap($comments,$settings['max_word'],' ',1);

In long words it breaks long words with a space after the number of chars set in the max-word setting. And because a regular space is inserted instead of a <br> (line-break) at the other places the lines are fluent because they just autowrap at the width of the table.
You will not even see the extra space because a regular space is used instead of a &nbsp; and two regular spaces are in most browsers displayed as one space where the second space is ignored.

Greetings,
Henrie
Dimas

Wider Paragraph

Post by Dimas »

hello Henrie,
Thanks a lot, it works fine.

Let see if somebody found the way to edit the messages online. I think this is a great GB with the anti spam tool, and can be better.

Have a nice day.
Dimas
Post Reply