From dba73421831e3cf848b2ce9732a2fef666e5566e Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 3 Mar 2001 15:31:01 +0000 Subject: code revision: - shortened and improved the code --- modules/story.module | 79 ++++++++++++++++++---------------------------- modules/story/story.module | 79 ++++++++++++++++++---------------------------- 2 files changed, 60 insertions(+), 98 deletions(-) diff --git a/modules/story.module b/modules/story.module index 535821ccd..641c1ed3b 100644 --- a/modules/story.module +++ b/modules/story.module @@ -112,55 +112,36 @@ function story_edit($id) { $output .= "
\n"; - $output .= "

\n"; - $output .= " Author:
\n"; - $output .= " ". format_username($story->userid) ."\n"; - $output .= "

\n"; - - $output .= "

\n"; - $output .= " Subject:
\n"; - $output .= " subject) ."\">
\n"; - $output .= "

\n"; - - $output .= "

\n"; - $output .= " Section:
\n"; - $output .= " \n"; - $output .= "

\n"; - - $output .= "

\n"; - $output .= " Abstract:
\n"; - $output .= "
\n"; - $output .= " Allowed HTML tags: ". htmlspecialchars($allowed_html) .".\n"; - $output .= "

\n"; - - $output .= "

\n"; - $output .= " Editor's note/updates:
\n"; - $output .= "
\n"; - $output .= " Allowed HTML tags: ". htmlspecialchars($allowed_html) .".\n"; - $output .= "

\n"; - - $output .= "

\n"; - $output .= " Extended story:
\n"; - $output .= "
\n"; - $output .= " Allowed HTML tags: ". htmlspecialchars($allowed_html) .".\n"; - $output .= "

\n"; - - $output .= "

\n"; - $output .= " Status:
\n"; - $output .= " status == 3 ? " CHECKED" : "") .">scheduled story for timestamp) ."\">
\n"; - $output .= " status == 2 ? " CHECKED" : "") .">posted story
\n"; - $output .= " status == 1 ? " CHECKED" : "") .">queued story
\n"; - $output .= " status == 0 ? " CHECKED" : "") .">dumped story
\n"; - $output .= " The textfield for scheduled stories expects a string containing an English date format of when you want to have your story automatically published.
Example input: '". date("j F Y G:i") ."', '". date("m/d/y H:i") ."', '". date("F j, Y H:i") ."', ...
\n"; - $output .= "

\n"; - - $output .= "

\n"; - $output .= " \n"; - $output .= "

\n"; + $output .= "Author:
\n"; + $output .= format_username($story->userid) ."

\n"; + + $output .= "Subject:
\n"; + $output .= "subject) ."\">

\n"; + + $output .= "Section:
\n"; + foreach ($sections = section_get() as $value) $options .= " \n"; + $output .= "

\n"; + + $output .= "Abstract:
\n"; + $output .= "
\n"; + $output .= "Allowed HTML tags: ". htmlspecialchars($allowed_html) .".

\n"; + + $output .= "Editor's note/updates:
\n"; + $output .= "
\n"; + $output .= "Allowed HTML tags: ". htmlspecialchars($allowed_html) .".

\n"; + + $output .= "Extended story:
\n"; + $output .= "
\n"; + $output .= "Allowed HTML tags: ". htmlspecialchars($allowed_html) .".

\n"; + + $output .= "Status:
\n"; + $output .= "status == 3 ? " CHECKED" : "") .">scheduled story for timestamp) ."\">
\n"; + $output .= "status == 2 ? " CHECKED" : "") .">posted story
\n"; + $output .= "status == 1 ? " CHECKED" : "") .">queued story
\n"; + $output .= "status == 0 ? " CHECKED" : "") .">dumped story
\n"; + $output .= "The textfield for scheduled stories expects a string containing an English date format of when you want to have your story automatically published.
Example input: '". date("j F Y G:i") ."', '". date("m/d/y H:i") ."', '". date("F j, Y H:i") ."', ...

\n"; + + $output .= "\n"; $output .= "

\n"; print $output; diff --git a/modules/story/story.module b/modules/story/story.module index 535821ccd..641c1ed3b 100644 --- a/modules/story/story.module +++ b/modules/story/story.module @@ -112,55 +112,36 @@ function story_edit($id) { $output .= "
\n"; - $output .= "

\n"; - $output .= " Author:
\n"; - $output .= " ". format_username($story->userid) ."\n"; - $output .= "

\n"; - - $output .= "

\n"; - $output .= " Subject:
\n"; - $output .= " subject) ."\">
\n"; - $output .= "

\n"; - - $output .= "

\n"; - $output .= " Section:
\n"; - $output .= " \n"; - $output .= "

\n"; - - $output .= "

\n"; - $output .= " Abstract:
\n"; - $output .= "
\n"; - $output .= " Allowed HTML tags: ". htmlspecialchars($allowed_html) .".\n"; - $output .= "

\n"; - - $output .= "

\n"; - $output .= " Editor's note/updates:
\n"; - $output .= "
\n"; - $output .= " Allowed HTML tags: ". htmlspecialchars($allowed_html) .".\n"; - $output .= "

\n"; - - $output .= "

\n"; - $output .= " Extended story:
\n"; - $output .= "
\n"; - $output .= " Allowed HTML tags: ". htmlspecialchars($allowed_html) .".\n"; - $output .= "

\n"; - - $output .= "

\n"; - $output .= " Status:
\n"; - $output .= " status == 3 ? " CHECKED" : "") .">scheduled story for timestamp) ."\">
\n"; - $output .= " status == 2 ? " CHECKED" : "") .">posted story
\n"; - $output .= " status == 1 ? " CHECKED" : "") .">queued story
\n"; - $output .= " status == 0 ? " CHECKED" : "") .">dumped story
\n"; - $output .= " The textfield for scheduled stories expects a string containing an English date format of when you want to have your story automatically published.
Example input: '". date("j F Y G:i") ."', '". date("m/d/y H:i") ."', '". date("F j, Y H:i") ."', ...
\n"; - $output .= "

\n"; - - $output .= "

\n"; - $output .= " \n"; - $output .= "

\n"; + $output .= "Author:
\n"; + $output .= format_username($story->userid) ."

\n"; + + $output .= "Subject:
\n"; + $output .= "subject) ."\">

\n"; + + $output .= "Section:
\n"; + foreach ($sections = section_get() as $value) $options .= " \n"; + $output .= "

\n"; + + $output .= "Abstract:
\n"; + $output .= "
\n"; + $output .= "Allowed HTML tags: ". htmlspecialchars($allowed_html) .".

\n"; + + $output .= "Editor's note/updates:
\n"; + $output .= "
\n"; + $output .= "Allowed HTML tags: ". htmlspecialchars($allowed_html) .".

\n"; + + $output .= "Extended story:
\n"; + $output .= "
\n"; + $output .= "Allowed HTML tags: ". htmlspecialchars($allowed_html) .".

\n"; + + $output .= "Status:
\n"; + $output .= "status == 3 ? " CHECKED" : "") .">scheduled story for timestamp) ."\">
\n"; + $output .= "status == 2 ? " CHECKED" : "") .">posted story
\n"; + $output .= "status == 1 ? " CHECKED" : "") .">queued story
\n"; + $output .= "status == 0 ? " CHECKED" : "") .">dumped story
\n"; + $output .= "The textfield for scheduled stories expects a string containing an English date format of when you want to have your story automatically published.
Example input: '". date("j F Y G:i") ."', '". date("m/d/y H:i") ."', '". date("F j, Y H:i") ."', ...

\n"; + + $output .= "\n"; $output .= "

\n"; print $output; -- cgit v1.2.3