Customising Trouble

Dr. GBooky is here to help you with your guestbook problems ...
Post Reply
sketch6969
Posts: 2
Joined: Tue Aug 30, 2005 7:07 am

Customising Trouble

Post by sketch6969 »

Script URL: http://guestbook.almamiagallery.com
Version of script: 1.33
Version of PHP: 4.4.0
Hosting company: Network Redux
Have you searched THIS FORUM for your problem:
yes
If so, what terms did you try:
customising
Write your message below:
I am trying to get the guestbook to function in a particular area of the window . I want it to be width 589 (the width of the part of the menu), left positioned at 218. I tried using absolute positioning but that makes the elements overlap each other. HELP! I must be doing something wrong.

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

Post by Henrie »

Hello Nancy,

I could not do it with changing the style.css file so you need to change the gbook.php file.

The following changes should do the trick.

Find (line 133):
<table border=\"0\" cellspacing=\"0\" cellpadding=\"2\" width=\"95%\" class=\"entries\">";
Change it to:
<table border=\"0\" cellspacing=\"0\" cellpadding=\"2\" width=\"589\" class=\"entries\">";

Find (line 504) (change needed to center the table in the Sign guestbook: page in non IE browsers):
<table class="entries" cellspacing="0" cellpadding="4" border="0">
Change it to:
<table class="entries" cellspacing="0" cellpadding="4" border="0" style="margin: 0px auto;">

Find (line 634):
echo "<h3 align=\"center\">$settings[gbook_title]</h3>
Change it to:
echo "<h3 style=\"width: 589px; margin-left: 218px; text-align: center;\">$settings[gbook_title]</h3>

Find (line 635):
<p align=\"center\"><a href=\"$settings[website_url]\">Back to $settings[website_title]</a>
Change it to:
<p style=\"width: 589px; margin-left: 218px; text-align: center;\"><a href=\"$settings[website_url]\">Back to $settings[website_title]</a>

Find (line 638):
<div align=\"center\">
Change it to:
<div style=\"width: 589px; margin-left: 218px; text-align: center;\">

Find (line 639):
<center>
Delete it

Find (line 646):
echo "</center>
Change it to:
echo "

Greetings,
Henrie
sketch6969
Posts: 2
Joined: Tue Aug 30, 2005 7:07 am

Thank you!

Post by sketch6969 »

Henrie,
Thank you so much. Worked like a charm. Just wish I had posted in here sooner. I actually was also trying to move some of the links, sign and view, to the left and move the entries up. But this looks good, my client should like it.
Thanks for your help,
Nancy
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

That looks nice Nancy! :D
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

Hi Nancy,

The links for 'sign guestbook' and 'view guestbook' can easily be placed left of the guestbook like you had yesterday.
The 'Displaying page 1 of 1. Pages: 1' text can not so easily be moved because it is placed in the same <div> as the guestbook entries table is and i have used this div to place the table at the right place.

I saw you removed the guestbook title from the page so you have deleted line 634.

To move the links, find (line 635) (it looks a little different because you removed the 'back to...' link) :
<div style=\"width: 589px; margin-left: 218px; text-align: center;\"><a href=\"$settings[website_url]\">Back to $settings[website_title]</a>
Change it to:
<div style=\"width: 150px; margin-left: 60px; text-align: left; float: left;\"><a href=\"$settings[website_url]\">Back to $settings[website_title]</a>

You can play around with the style. To place the text a little lower for example add 'margin-top: 50px;'.
Beware that the width and margin-left together must have less pixels than the margin-left of the <div> in which the table is placed (thus less than 218 px) otherwise it pushes the table to the right.

And indeed it is a nice design.

Henrie
Post Reply