How? "Extended Body" field open without extra clic

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
snafu
Regular
Posts: 108
Joined: Sat Dec 17, 2005 7:34 am

How? "Extended Body" field open without extra clic

Post by snafu »

I'm modificating functions_entries_admin.inc.php a bit to have a bullet proof easy backend for people writing stories for a free local newspaper. We need the two fields "Entry Body" and "Extended Body" always open without click at the "plus" button.

I managed to resize the fields to a new dimension, but failed to have the "Extended Body" field always open, when a new entry is written.

I found toggle_extended(setCookie) the right Point for this, but i do not know enough, how to disable this function without collateral damage :-)

any hints are appreciateted!
tnx a lot.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: How? "Extended Body" field open without extra

Post by garvinhicking »

Hi!

Just modify this:

Code: Select all

    if ((!empty($entry['extended']) || !empty($serendipity['COOKIE']['toggle_extended'])) && !$serendipity['wysiwyg']) {
?>
    <script type="text/javascript" language="JavaScript">
        toggle_extended();
    </script>
<?php } ?>
to this:

Code: Select all

    <script type="text/javascript" language="JavaScript">
        toggle_extended();
    </script>
:) You were right on track. :)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
snafu
Regular
Posts: 108
Joined: Sat Dec 17, 2005 7:34 am

Re: How? "Extended Body" field open without extra

Post by snafu »

Thanky you very much, that's it.

I just try to avoid any unnecessary click for my shy users ;-)

i added the missing line with

Code: Select all

<?php 
tag in your advisory, to cut only this php part.. (im learning)

[quote="garvinhicking"]Hi!
Just modify this:

Code: Select all

<?php 
    if ((!empty($entry['extended']) || !empty($serendipity['COOKIE']['toggle_extended'])) && !$serendipity['wysiwyg']) {
?>
    <script type="text/javascript" language="JavaScript">
        toggle_extended();
    </script>
<?php } ?>
in a few weeks, we will have here http://kassel-zeitung.de/ a tiny newspaper online...
Post Reply