I have one s9y installation used by many authors. The problem: they often do write the whole article into the body and nothing to the extended field.
Is this a problem, others know, too?
OK, perhaps I worked out a solution by adapting the search form as some themes using it:
in the form appears "search ...". By clicking into the form, the text disappear and the visitor can type his search string. If nothing is written, "search ..." will be shown again.
example: http://www.sankt-joseph-siemensstadt.de/ on the right top. (suche ...)
What do you think about this? Is this a relevant problem? Is my solution a good one which could be imported into s9y?
I do the following changes:
lang_xxx.php
Code: Select all
@define('BACKEND_EDITOR_BODY_EXPLAIN','Please insert an appetizer here, e.g. one or two paragraphs!');
@define('BACKEND_EDITOR_EXTENDED_BODY_EXPLAIN','Please insert the main text here!');
admin/style.css
Code: Select all
textarea.grey {
color:grey;
}
textarea.normal {
}
and the main (javascript changes) in admin/entries.tpl the textarea-things:
Code: Select all
<textarea
{if (($entry_vars.entry.body|@escape)=='') || (($entry_vars.entry.body|@escape)==$CONST.BACKEND_EDITOR_BODY_EXPLAIN)}
class="grey"
{else}
class="normal"
{/if}
onblur="if(this.value==''){ldelim}value='{$CONST.BACKEND_EDITOR_BODY_EXPLAIN}'; this.className='grey'{rdelim}"
onfocus="if(this.value=='{$CONST.BACKEND_EDITOR_BODY_EXPLAIN}')value=''; this.className='normal'"
style="width: 100%" name="serendipity[body]" id="serendipity[body]" cols="80" rows="20">
{if ($entry_vars.entry.body|@escape)==''}
{$CONST.BACKEND_EDITOR_BODY_EXPLAIN}
{else}
{$entry_vars.entry.body|@escape}
{/if}
</textarea>
and
<textarea {if (($entry_vars.entry.extended|@escape)=='') || (($entry_vars.entry.extended|@escape)==$CONST.BACKEND_EDITOR_EXTENDED_BODY_EXPLAIN)}class="grey"{else}class="normal"{/if}
onblur="if(this.value==''){ldelim}value='{$CONST.BACKEND_EDITOR_EXTENDED_BODY_EXPLAIN}'; this.className='grey'{rdelim}" onfocus="if(this.value=='{$CONST.BACKEND_EDITOR_EXTENDED_BODY_EXPLAIN}')value=''; this.className='normal'" style="width: 100%;" name="serendipity[extended]" id="serendipity[extended]" cols="80" rows="30">{if ($entry_vars.entry.extended|@escape)==''}{$CONST.BACKEND_EDITOR_EXTENDED_BODY_EXPLAIN}{else}{$entry_vars.entry.extended|@escape}{/if}</textarea>