How Do You Change Textarea Box Size? [SOLVED]
-
- Phoca Newbie
- Posts: 4
- Joined: 01 Dec 2008, 23:51
How Do You Change Textarea Box Size? [SOLVED]
Hi,
I have disabled the TinyMCE text editor so I could have a plain box. But the box is too large and I need to make it smaller. I have changed the settings in parameters, tried changing the view.html.php file and some others. I have poked around and changed other stuff only to come up empty. Could you please point me in the right direction?
Thanks!
Stan
I have disabled the TinyMCE text editor so I could have a plain box. But the box is too large and I need to make it smaller. I have changed the settings in parameters, tried changing the view.html.php file and some others. I have poked around and changed other stuff only to come up empty. Could you please point me in the right direction?
Thanks!
Stan
Last edited by stanhook on 02 Dec 2008, 19:32, edited 1 time in total.
- Jan
- Phoca Hero
- Posts: 48689
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: How Do You Change Textarea Box Size ?
Hi, try to set the table width too (in parameters component)
this is the code for displaying the textarea:
in
components\com_phocaguestbook\views\phocaguestbook\view.html.php
Jan
this is the code for displaying the textarea:
Code: Select all
if ($tmpl['enableeditor'] == 1) {
$editor = PhocaguestbookHelper::displayTextArea('pgbcontent', $formdata->content , (int)$tmpl['editorwidth'].'px', (int)$tmpl['editorheight'].'px', '60', '80', false );
} else {
$editor = '<textarea id="pgbcontent" name="pgbcontent" cols="45" rows="10" style="width: '.(int)$tmpl['editorwidth'].'px; height:'.(int)$tmpl['editorheight'].'px;" >'.$formdata->content.'</textarea>';
}
components\com_phocaguestbook\views\phocaguestbook\view.html.php
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 4
- Joined: 01 Dec 2008, 23:51
Re: How Do You Change Textarea Box Size ?
Hi Jan,
I changed your the cols attribute code in the view.html.php to this:
and I changed the default.php in the tmpl folder to:
but still no luck. I have spent half a day and my mind is melting. I had tried some code that suggested to change the textarea totally but then I had other issues.
By the way, the parameters in the backend are set to text editor no and the table and editor width and height to 100px. Still no effect.
In the view.html.php page should I change the style=width also?
What am I missing?
I changed your the cols attribute code in the view.html.php to this:
Code: Select all
if ($tmpl['enableeditor'] == 1) {
$editor = PhocaguestbookHelper::displayTextArea('pgbcontent', $formdata->content , (int)$tmpl['editorwidth'].'px', (int)$tmpl['editorheight'].'px', '60', '80', false );
} else {
$editor = '<textarea id="pgbcontent" name="pgbcontent" cols="5" rows="10" style="width: '.(int)$tmpl['editorwidth'].'px; height:'.(int)$tmpl['editorheight'].'px;" >'.$formdata->content.'</textarea>';
}
Code: Select all
<table border="0" style="margin-left: 40px;" width="350px">
By the way, the parameters in the backend are set to text editor no and the table and editor width and height to 100px. Still no effect.
In the view.html.php page should I change the style=width also?
What am I missing?
-
- Phoca Newbie
- Posts: 4
- Joined: 01 Dec 2008, 23:51
Re: How Do You Change Textarea Box Size ?
If got it fixed. Here is what I did:
I used this code in the view.html.php page:
and changed the $editor = '<textarea ... to this:
I don't know if the cols and row attribute matter. But it was the width and height that fixed my issue.
Thanks Jan for pointing me in the right direction.
Stan
I used this code in the view.html.php page:
Code: Select all
if ($tmpl['enableeditor'] == 1) {
$editor = PhocaguestbookHelper::displayTextArea('pgbcontent', $formdata->content , (int)$tmpl['editorwidth'].'px', (int)$tmpl['editorheight'].'px', '60', '80', false );
} else {
$editor = '<textarea id="pgbcontent" name="pgbcontent" cols="45" rows="10" style="width: '.(int)$tmpl['editorwidth'].'px; height:'.(int)$tmpl['editorheight'].'px;" >'.$formdata->content.'</textarea>';
}
Code: Select all
else {
$editor = '<textarea id="pgbcontent" name="pgbcontent" cols="5" rows="10" style="width: 300px; height:200px;" >'.$formdata->content.'</textarea>';
}
Thanks Jan for pointing me in the right direction.
Stan
- Jan
- Phoca Hero
- Posts: 48689
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: How Do You Change Textarea Box Size? [SOLVED]
great to hear it, Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 2
- Joined: 20 Dec 2008, 22:27
Re: How Do You Change Textarea Box Size? [SOLVED]
Hi,
I was looking for how to change the dimentions of the text area and find this post, but my situation is TinyMCE enabled. I have changed the parameters from the backand but nothing changed. I have also tried to change the code written above post, but couldn't get any result.
Would you please show me what should be changed on the code above to solve the problem given in the attached image?
I was looking for how to change the dimentions of the text area and find this post, but my situation is TinyMCE enabled. I have changed the parameters from the backand but nothing changed. I have also tried to change the code written above post, but couldn't get any result.
Code: Select all
if ($tmpl['enableeditor'] == 1) {
$editor = PhocaguestbookHelper::displayTextArea('pgbcontent', $formdata->content , (int)$tmpl['editorwidth'].'px', (int)$tmpl['editorheight'].'px', '60', '80', false );
} else {
$editor = '<textarea id="pgbcontent" name="pgbcontent" cols="45" rows="10" style="width: '.(int)$tmpl['editorwidth'].'px; height:'.(int)$tmpl['editorheight'].'px;" >'.$formdata->content.'</textarea>';
}
- Jan
- Phoca Hero
- Posts: 48689
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: How Do You Change Textarea Box Size? [SOLVED]
Did you change the pareamters in Parameters Component in menu link to Phoca Guestbook?
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 2
- Joined: 20 Dec 2008, 22:27
Re: How Do You Change Textarea Box Size? [SOLVED]
Dear Jan,Jan wrote:Did you change the pareamters in Parameters Component in menu link to Phoca Guestbook?
Of course, firstly I have tried to change parameters from the component menu, but it didn't work. I think I have to change something from below, but not sure where;
Code: Select all
} else {
$editor = '<textarea id="pgbcontent" name="pgbcontent" cols="45" rows="10" style="width: '.(int)$tmpl['editorwidth'].'px; height:'.(int)$tmpl['editorheight'].'px;" >'.$formdata->content.'</textarea>';
}
Code: Select all
else {
$editor = '<textarea id="pgbcontent" name="pgbcontent" cols="5" rows="10" style="width: 300px; height:200px;" >'.$formdata->content.'</textarea>';
}
So, still I need help.
Frienly regards.
Suleyman
- Jan
- Phoca Hero
- Posts: 48689
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: How Do You Change Textarea Box Size? [SOLVED]
Hi, the parse error is error in php script, somewhere you have lost ; or ) (, try to check your code
If you find Phoca extensions useful, please support the project