Adjusting table width for "Sign guestbook" page

Dr. GBooky is here to help you with your guestbook problems ...
Post Reply
aceattorney
Posts: 3
Joined: Mon Apr 28, 2008 3:19 am

Adjusting table width for "Sign guestbook" page

Post by aceattorney »

Script URL: http://www.palmstrokemusic.com/guestbook/
Version of script: 1.6
Hosting company: http://www.all-inkl.com/
URL of phpinfo.php: http://www.palmstrokemusic.com/phpinfo.php
URL of session_test.php: http://www.palmstrokemusic.com/session_test.php
What terms did you try when SEARCHING for a solution:
Reading forum topics, trying to modify style.css and gbook.php


Hello,

first of, I really like the gbook script and I found it easy to customize the look of it to my specific needs.
There's just one thing I couldn't manage to figure out by looking up the style.css and gbook.php:

I want to make the table on the "Sign guestbook" page ("gbook.php?a=sign") smaller.
I'm using an iframe with a fixed size to display the guestbook on my website, and the sign table, as it is now, causes the iframe to create a horizontal scroll bar (which I don't want).

Where exactly can I define the width of that table?


Thanks in advance!
Josh


EDIT:
I would also like to know how I can remove the "Back to homepage" link at the very top of the guestbook. Thank you very much.
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

Could you tell us what the width of the Iframe is?
This way I can tell you exactly what you have to do to achieve that width.

Greetings,
Henrie
aceattorney
Posts: 3
Joined: Mon Apr 28, 2008 3:19 am

Post by aceattorney »

Hi Henrie,

the width of the iframe is 382 px (height is 441).


Regards
Josh
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

Hello Josh,

For setting the width, open the file style.css
Go to the end of file and add the following:

Code: Select all

textarea#cmnt {
   width: 362px;
}
You can change the value 362 to your desired value.

For removing the "Back to homepage" link at the very top of the guestbook open the file gbook.php
Find lines 1084 and 1085:

Code: Select all

<p style="text-align:center"><a href="'.$settings['website_url'].'">'.$lang['t61'].' '.$settings['website_title'].'</a>
| <a href="gbook.php">'.$lang['t60'].'</a>
and change these to

Code: Select all

<p style="text-align:center">
<a href="gbook.php">'.$lang['t60'].'</a>
Greetings,
Henrie
aceattorney
Posts: 3
Joined: Mon Apr 28, 2008 3:19 am

Post by aceattorney »

Hey Henrie,

everything works like a charm now, thanks to you!


I'm really satisfied with the script now. I will place a banner to PHPJunkyard on my site (palmstrokemusic.com) as soon as it is launched.
I feel it's the least I can do...


Regards
Josh
p_newton
Posts: 5
Joined: Tue Jun 23, 2009 10:33 am

Post by p_newton »

Hi Henrie,

I have exactly the same problem as aceattorney (want the textarea less wide) but your solution doesn't work for me. I copied your code to the end of style.css, but there is no difference whether I say 200 or 2000 px. Any idea?

Thanks, Peter (PS: thanks for your reply on the admin by txt, that worked)
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

The code given is for the sign page. Is that the page you want to change, or do you want to change the width of the pages showing the guestbook entries.

Plus posting a link to your guestbook would be helpfull too.

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.
p_newton
Posts: 5
Joined: Tue Jun 23, 2009 10:33 am

Post by p_newton »

http://www.gnopgnip.nl/amstelveen/uitslagen.php

When you select "schrijf" the problem will be obvious.
p_newton
Posts: 5
Joined: Tue Jun 23, 2009 10:33 am

Post by p_newton »

Just in case I was not clear: the problem is with the signpage. On the message page things scale along when I scale the iframe, but on the signpage a scrollbox appears.

Ideally, everything would scale on the signpage as well, but to able to fix the sizes of the elements there, would do as well.

Thanks, Peter
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

You were clear, i just have been having internet connection problems. So i could do nothing.
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.
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

Open the file gbook.php
And find cols="50" (lines 432 and 877 in GBook version 1.6)
now remove these.
The lines will look like:
Line 432

Code: Select all

<textarea name="comments" rows="9" id="cmnt"></textarea>
Line 877

Code: Select all

<textarea name="<?php echo $myfield['cmnt']; ?>" rows="9" id="cmnt"><?php echo $comments; ?></textarea>
Now setting textarea#cmnt { width: 340px; } (or other width value) should work


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.
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

Open the file gbook.php
And find cols="50" (lines 432 and 877 in GBook version 1.6)
now remove these.
The lines will look like:
Line 432

Code: Select all

<textarea name="comments" rows="9" id="cmnt"></textarea>
Line 877

Code: Select all

<textarea name="<?php echo $myfield['cmnt']; ?>" rows="9" id="cmnt"><?php echo $comments; ?></textarea>
Now setting textarea#cmnt { width: 340px; } (or other width value) should work


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.
p_newton
Posts: 5
Joined: Tue Jun 23, 2009 10:33 am

Post by p_newton »

Thanks, Henrie, that worked. Let me know when you are in Amsterdam, and I'll buy you a coke ;-)

--Peter
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

Probably not anytime soon. It is a pretty long drive just for a drink :wink:

Groeten,
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.
Post Reply