- Posts: 10
COMMUNITY FORUM
How to change introtext text area size
- Daniel
- Topic Author
- Offline
- New Member
Less
More
9 years 6 months ago - 9 years 6 months ago #143853
by Daniel
How to change introtext text area size was created by Daniel
Hi,
I don't seem to find the answer in the forum so I will ask the question.
I'm doing a template override of itemform.php in order to customise it for fron end article submission. In the K2 global settings, advanced tab, I have selected “Use one editor window for introtext & fulltext” = No. Which means I have two text areas, one for the Introtext and another one for the full text. So far, so good.
My issue is that for the Introtext I only will allow users to write a few words, so the text area is far too big. The problem is that its size is not controlled by CSS but by the element style.
In itemform.php the introtext text area is called by:
And the HTML output is:
And I would like the HTML output to be:
In which file can I change this?
(please note that the fulltext text area is fine, the change is only for the introtext text area)
Many thanks!
I don't seem to find the answer in the forum so I will ask the question.
I'm doing a template override of itemform.php in order to customise it for fron end article submission. In the K2 global settings, advanced tab, I have selected “Use one editor window for introtext & fulltext” = No. Which means I have two text areas, one for the Introtext and another one for the full text. So far, so good.
My issue is that for the Introtext I only will allow users to write a few words, so the text area is far too big. The problem is that its size is not controlled by CSS but by the element style.
In itemform.php the introtext text area is called by:
<?php echo $this->introtext; ?>
And the HTML output is:
<textarea name="introtext" id="introtext" cols="" rows="" style="width: 100%; height: 400px;"></textarea>
And I would like the HTML output to be:
<textarea name="introtext" id="introtext" cols="" rows="1" style="width: 100%"></textarea>
In which file can I change this?
(please note that the fulltext text area is fine, the change is only for the introtext text area)
Many thanks!
Last edit: 9 years 6 months ago by Daniel.
Please Log in or Create an account to join the conversation.
- Joe Campbell
- Offline
- Platinum Member
Less
More
- Posts: 438
9 years 6 months ago #143855
by Joe Campbell
Replied by Joe Campbell on topic How to change introtext text area size
Hi Daniel,
For something like this you can always use NoNumber ReReplacer to perform a search & replace:
extensions.joomla.org/extension/rereplacer
I hope this helps,
Joe Campbell
For something like this you can always use NoNumber ReReplacer to perform a search & replace:
extensions.joomla.org/extension/rereplacer
I hope this helps,
Joe Campbell
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
9 years 6 months ago #143860
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic How to change introtext text area size
Hello,
You can control the textarea with css.
Even if there are hardcoded values you can use min/max-height attributes.
The same goes for the textarea's width.
You can control the textarea with css.
Even if there are hardcoded values you can use min/max-height attributes.
The same goes for the textarea's width.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Daniel
- Topic Author
- Offline
- New Member
Less
More
- Posts: 10
9 years 6 months ago #143876
by Daniel
Replied by Daniel on topic How to change introtext text area size
Thank you guys.
Joseph, really liked your out of the box thinking, appreciate the suggestion.
Krikor, perfect solution, max-height worked like a charm.
Cheers!
Joseph, really liked your out of the box thinking, appreciate the suggestion.
Krikor, perfect solution, max-height worked like a charm.
Cheers!
Please Log in or Create an account to join the conversation.
- Joe Campbell
- Offline
- Platinum Member
Less
More
- Posts: 438
9 years 6 months ago - 9 years 6 months ago #143877
by Joe Campbell
Replied by Joe Campbell on topic How to change introtext text area size
It would be cool if K2 offered Admin Customization parameters:
- Tabs (visibility): Content, Image, Image Gallery, Media, Extra Fields, Attachments
- Introtext (remove, size)
- Author publishing status (visibility, active state)
- Metadata Information (visibility, active state)
- Item view options in category listings (visibility, active state)
- Item view options (visibility, active state)
Overall it would allow for a more simplified UI, which is ideal for productivity (developers, site admin, clients).
Plugin developers this could be an opportunity for you :)
- Tabs (visibility): Content, Image, Image Gallery, Media, Extra Fields, Attachments
- Introtext (remove, size)
- Author publishing status (visibility, active state)
- Metadata Information (visibility, active state)
- Item view options in category listings (visibility, active state)
- Item view options (visibility, active state)
Overall it would allow for a more simplified UI, which is ideal for productivity (developers, site admin, clients).
Plugin developers this could be an opportunity for you :)
Last edit: 9 years 6 months ago by Joe Campbell.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
9 years 6 months ago #143906
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic How to change introtext text area size
These actually can all be tweaked with a template override.
Finally you can enable/ disable most of these items from K2' parameters.
However I do think that a custom plugin might be really useful.
Finally you can enable/ disable most of these items from K2' parameters.
However I do think that a custom plugin might be really useful.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Joe Campbell
- Offline
- Platinum Member
Less
More
- Posts: 438
9 years 6 months ago #143912
by Joe Campbell
Replied by Joe Campbell on topic How to change introtext text area size
I ended up hacking the following file:
administrator/components/com_k2/views/items/tmpl/default.php
So now when I go to edit an item, I am presented with only 2 centered tabs (in the following order): Extra Fields & Content.
Best of all, it defaults to the Extra Fields tab which is a time saver. I set my site up where as 85% of the content/data for any given item is stored as an Extra Field (list & item image, title tag, schema, video, gallery, etc.)
administrator/components/com_k2/views/items/tmpl/default.php
So now when I go to edit an item, I am presented with only 2 centered tabs (in the following order): Extra Fields & Content.
Best of all, it defaults to the Extra Fields tab which is a time saver. I set my site up where as 85% of the content/data for any given item is stored as an Extra Field (list & item image, title tag, schema, video, gallery, etc.)
Please Log in or Create an account to join the conversation.