Advanced search  

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]

Pages: [1]   Go Down

Author Topic: comments field width  (Read 3572 times)

0 Members and 1 Guest are viewing this topic.

crl

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 81
comments field width
« on: June 16, 2007, 01:28:00 pm »

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.
« Last Edit: June 25, 2007, 08:39:28 am by GauGau »
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: comments field width
« Reply #1 on: June 16, 2007, 08:18:29 pm »

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

crl

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 81
Re: comments field width
« Reply #2 on: June 16, 2007, 09:31:54 pm »

Thanks!
Please could you explain a bit more?
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: comments field width
« Reply #3 on: June 16, 2007, 09:43:45 pm »

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
Code: [Select]
$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
« Last Edit: June 16, 2007, 11:59:55 pm by Sami »
Logged
‍I don't answer to PM with support question
Please post your issue to related board

crl

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 81
Re: comments field width
« Reply #4 on: June 16, 2007, 10:55:50 pm »

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
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: comments field width
« Reply #5 on: June 16, 2007, 11:25:00 pm »

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

crl

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 81
Re: comments field width
« Reply #6 on: June 16, 2007, 11:49:11 pm »

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
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: comments field width
« Reply #7 on: June 17, 2007, 12:02:31 am »

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

crl

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 81
Re: comments field width
« Reply #8 on: June 17, 2007, 12:29:24 am »

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
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: comments field width
« Reply #9 on: June 17, 2007, 06:28:14 am »

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

crl

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 81
Re: comments field width
« Reply #10 on: June 17, 2007, 11:29:10 am »

Sami

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

Chris
 :)
Logged
Pages: [1]   Go Up
 

Page created in 0.025 seconds with 15 queries.