Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
How do I add another textarea on the write page?
Hi!
I will love to know how and if its possible to add another textarea
at the bottom of the write page
by using a custom field please?
(down to the excerpt’s textarea)
Thanks :)
Last edited by THE BLUE DRAGON (2007-11-27 06:58:18)
Offline
Re: How do I add another textarea on the write page?
It requires a hack to the source files that present the write pane but is possible – see this thread (it may be an older version but the principle is the same).
TXP Builders – finely-crafted code, design and txp
Offline
Re: How do I add another textarea on the write page?
Thanks!
works fine now :)
Last edited by THE BLUE DRAGON (2007-11-27 17:33:12)
Offline
Re: How do I add another textarea on the write page?
Hi again!
how, and can I make the new text-area of the this custom field to ‘convert line breaks’ please?
(I can add the HTML tag: <pre></pre> in the form,
but you know its not like the good ‘convert line breaks’ that textpattern do)
Offline
Offline
Re: How do I add another textarea on the write page?
I think it’s better to do that when outputting the custom_field on the website, because otherwise the <br />
will be html-escaped. Also this avoids hacking TXP core code, which makes it easier to upgrade, and it’s more space-efficient, which is important, because custom_fields are limited to 255 chars:
<txp:php>
echo nl2br(trim(custom_field(array('name' => 'your_custom_field_name'))));
</txp:php>
Offline
Offline
Re: How do I add another textarea on the write page?
Still, I believe my solution is better, if only for being able to see normal newlines instead of <br /> tags in the custom field textarea when editing the article.
Btw, the code hack shown in that other thread (pointed out by Jacob) is missing htmlspecialchars() around $custom_7.
Offline
Re: How do I add another textarea on the write page?
if only for being able to see normal newlines instead of <br /> tags
Yep, that’s the good point in it.
htmlspecialchars() around $custom_7
So, THE BLUE DRAGON should corres his txp_article.php
’s code – &
is better than &
obviously.
Cheers!
Offline
Re: How do I add another textarea on the write page?
great!
realy thank you Gocom & ruud !!! :)
now It’s much more comfortable to update, with no using “<br>” all the time ;)
Offline