Page 1 of 1
Adjusting table width for "Sign guestbook" page
Posted: Mon Apr 28, 2008 3:42 am
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.
Posted: Mon Apr 28, 2008 5:18 am
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
Posted: Mon Apr 28, 2008 11:44 am
by aceattorney
Hi Henrie,
the width of the iframe is 382 px (height is 441).
Regards
Josh
Posted: Mon Apr 28, 2008 3:16 pm
by Henrie
Hello Josh,
For setting the width, open the file style.css
Go to the end of file and add the following:
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
Posted: Tue Apr 29, 2008 1:03 am
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
Posted: Thu Jun 25, 2009 8:34 am
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)
Posted: Thu Jun 25, 2009 9:04 am
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
Posted: Thu Jun 25, 2009 9:09 am
by p_newton
http://www.gnopgnip.nl/amstelveen/uitslagen.php
When you select "schrijf" the problem will be obvious.
Posted: Fri Jun 26, 2009 10:38 am
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
Posted: Fri Jun 26, 2009 2:43 pm
by Henrie
You were clear, i just have been having internet connection problems. So i could do nothing.
Posted: Fri Jun 26, 2009 10:21 pm
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
Posted: Fri Jun 26, 2009 10:24 pm
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
Posted: Sat Jun 27, 2009 1:36 pm
by p_newton
Thanks, Henrie, that worked. Let me know when you are in Amsterdam, and I'll buy you a coke
--Peter
Posted: Sat Jun 27, 2009 4:49 pm
by Henrie
Probably not anytime soon. It is a pretty long drive just for a drink
Groeten,
Henrie