comments field width comments field width
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

comments field width

Started by crl, June 16, 2007, 01:28:00 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

crl

How do I increase the width of the editable field in "Add your comment"?
For anonymous (guest users) it's then particularly too narrow. I have gone through the settings and also searched the forum but cannot find the answer.

Sami

Copy $template_add_your_comment variable from themes/sample/theme.php to themes/your theme/theme.php
and change the way you want to
‍I don't answer to PM with support question
Please post your issue to related board

crl

Thanks!
Please could you explain a bit more?

Sami

#3
if you don't have $template_add_your_comment variable on themes/your theme/theme.php copy this 
just before ?> and if you have it change it to this

$template_add_your_comment = <<<EOT
<table align="center" width="{WIDTH}" cellspacing="1" cellpadding="0" class="maintable">
        <tr>
                <td width="100%" class="tableh2_compact"><b>{ADD_YOUR_COMMENT}</b></td>
        </tr>
        <tr>
                <td colspan="3">
                <form method="post" name="post" action="db_input.php">
                        <table width="100%" cellpadding="0" cellspacing="0">

<!-- BEGIN user_name_input -->
                                <tr><td class="tableb_compact" style="width:50px;">{NAME}</td>
                                <td class="tableb_compact" style="width: 98%;">
                                        <input type="text" class="textinput" name="msg_author" size="10" maxlength="20" value="{USER_NAME}" />
                                </td>
</tr>
<!-- END user_name_input -->
<!-- BEGIN input_box_smilies -->
                                <tr>
<td class="tableb_compact">{COMMENT} </td>
                                <td class="tableb_compact">
                                <textarea class="textinput" id="message" name="msg_body" onselect="storeCaret_post(this);" onclick="storeCaret_post(this);" onkeyup="storeCaret_post(this);" maxlength="{MAX_COM_LENGTH}" style="width: 98%;" rows="2"></textarea>
</td>
</tr>
<!-- END input_box_smilies -->
<!-- BEGIN input_box_no_smilies -->
<tr>
                                <td class="tableb_compact">{COMMENT} </td>
<td class="tableb_compact">
                                <textarea class="textinput" id="message" name="msg_body"  maxlength="{MAX_COM_LENGTH}" style="width: 98%;" rows="2"></textarea></td></tr>
<!-- END input_box_no_smilies -->
<tr>
                                <td class="tableb_compact" colspan="2" align="center">
                                <input type="hidden" name="event" value="comment" />
                                <input type="hidden" name="pid" value="{PIC_ID}" />
                                <input type="submit" class="comment_button" name="submit" value="{OK}" />
                                </td></tr>
                        </table>
                </form>
                </td>
        </tr>
<!-- BEGIN smilies -->
        <tr>
                <td width="100%" class="tableb_compact">
                        {SMILIES}
                </td>
        </tr>
</table>
<!-- END smilies -->

EOT;



I didn't test it , let me know if it doesn't work
- post a link to your galley
‍I don't answer to PM with support question
Please post your issue to related board

crl

Thank you for assisting me the comment field problem. I found out that a lot of the problem was caused using the multi-line plug in, it's now disabled!
I have added the code you supplied to the theme.php, it's now looking fine! But is there a way that I can extend the fields height? i.e instead of one line have several, like the multi-line plug in is supposed to achieve!

pm sent with the gallery details

thanks

Sami

I've updated my last post try new code
‍I don't answer to PM with support question
Please post your issue to related board

crl

Sami

I have tried the new code!
It's working fine now in Firefox, but with IE7 the fields are too short again.
So perhaps it's an IE problem?

Thanks for you help, it's much appreciated

Chris

Sami

as always M$ doesn't operate !
I don't have IE7 installed it was blind guess
code updated , Try it
‍I don't answer to PM with support question
Please post your issue to related board

crl

Sami

Now working with IE!
It's nearly perfect, but is there a way to increase the field height further? at the moment it's a 3 line field in firefox and 2 in IE. Ideally I would like something like a 7 or 8 lines in the field.

Thanks
Chris

Sami

it's really simple just set the rows attribute of both textarea to 3 or higher , currently they are 2
‍I don't answer to PM with support question
Please post your issue to related board

crl

Sami

Thank you for your invaluable help!
It's all sorted now

Chris
:)