GBook modifications / styles

Dr. GBooky is here to help you with your guestbook problems ...
Post Reply
wendy
Posts: 3
Joined: Thu Apr 07, 2011 10:53 pm

GBook modifications / styles

Post by wendy »

Script URL: http://www.phpjunkyard.com/php-guestbook-script.php
Version of script: 1.7
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:

Write your message below:

Hi there :)

Nice script!
I'd like to change the appearance of some elements, but I can't seem to find their location, so I'm hoping you can help me out.
- I adjusted the little icons a little (reply, delete, IP) so there's no white showing around the image when the background of the guestbook is a darker color. I know where the images are located, but where's the code that links to them so I can change the filename/url?
- I'd like to remove this character "|" that sits between the top links. How can I do this?
- I'd like to change the color and font size of the "Powered by..." notice at the bottom, but I can't find the style in the CSS file...?
- I would like to enable people to reply to each others messages without asking for a password, can this be done somehow?

Thanks in advance!
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Re: GBook modifications / styles

Post by Henrie »

- I adjusted the little icons a little (reply, delete, IP) so there's no white showing around the image when the background of the guestbook is a darker color. I know where the images are located, but where's the code that links to them so I can change the filename/url?
You can find the code in the file /templates/default/comments.php , the images are located in the subfolder images
The best way to change the guestbook is to create a new folder under /templates/ and copy all the files including subfolders from the "default" folder. Than you can simply replace the images in the images folder by the once you made.
Only thing left to do than is to change in the settings.php file the setting $settings['template']='default'; and change default to the newly created folder.
- I'd like to remove this character "|" that sits between the top links. How can I do this?
Change the text in the file overall_header.php which can be found in /templates/default/overall_header.php.
But ofcourse you have created a new templates folder by now :wink:
- I'd like to change the color and font size of the "Powered by..." notice at the bottom, but I can't find the style in the CSS file...?
The "Powered by..." notice is encoded in the gbook.php and the license of GBook does not permit it to decode it and change it. As you can see the only tag surrounding the copyright text is the <div> tag. So you will to assign a style to the general <div> tag change it's style.
There is a way to assign a new style without decoding and thus not breaking the license, but i am not giving it because I am sure it would be misused to hide the copyright notice without buying a license (sorry :| )
- I would like to enable people to reply to each others messages without asking for a password, can this be done somehow?
Yes it can be done in 2 steps:
1. Open the file gbook.php and find lines 424-433

Code: Select all

    /* Check password */
    if (empty($_POST['pass']))
    {
    	$error_buffer .= $lang['e09'] . '<br />';
    }
    elseif ( gbook_input($_POST['pass']) != $settings['apass'] )
    {
    	$error_buffer .= $lang['e12'];
    }
You can comment it out so the password check will not be done by changing this to

Code: Select all

    /* Check password */
/*    if (empty($_POST['pass']))
    {
    	$error_buffer .= $lang['e09'] . '<br />';
    }
    elseif ( gbook_input($_POST['pass']) != $settings['apass'] )
    {
    	$error_buffer .= $lang['e12'];
    }
*/
Or you can delete this block (not my preferrred way of working).
2. You will have to remove the password entry box in the file admin_reply.php in your new templates folder ( original location is /templates/default/admin_reply.php , but you have made a new templates folder by now). Find line 19

Code: Select all

     <input type="password" name="pass" size="45" /></div>
and comment it out by changing it to

Code: Select all

    <!-- <input type="password" name="pass" size="45" /></div> -->
or simply delete this line (as mentioned before, deleting it is not my preffered methode).

Greetings,
Henrie
I do not monitor the Gbook forums regularly anymore since I do not use the Gbook script myself anymore for a long time. But it helped me a lot in learning to understand php.
wendy
Posts: 3
Joined: Thu Apr 07, 2011 10:53 pm

Re: GBook modifications / styles

Post by wendy »

Thanks so much for your quick reply! :)

It all looks the way I want it now (y)

However, I'd like to disable the reply function all together, cause there's no way for someone to fill in their name in the reply field and therefor will only cause confusion.
Can you tell me how to do this?

Thanks again!
wendy
Posts: 3
Joined: Thu Apr 07, 2011 10:53 pm

Re: GBook modifications / styles

Post by wendy »

Nevermind! I've found a way to make it work!

Thanks again :)
Post Reply