From da8aaa7672b944d5022921b5beaef90ea29bca29 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 17 Feb 2001 15:52:40 +0000 Subject: [PATCH] - improved layout story.module - fixed bug in translation --- includes/locale.inc | 2 +- modules/story.module | 51 ++++++++++++++------------------------ modules/story/story.module | 51 ++++++++++++++------------------------ 3 files changed, 37 insertions(+), 67 deletions(-) diff --git a/includes/locale.inc b/includes/locale.inc index 85b03eccb74..50d07a7dd02 100644 --- a/includes/locale.inc +++ b/includes/locale.inc @@ -2,7 +2,7 @@ function locale_load() { global $languages, $user; - return ($user->language) ? $user->language : key($languages); + return ($user->id && $user->language) ? $user->language : key($languages); } function t($string) { diff --git a/modules/story.module b/modules/story.module index 822f1a7d715..47671033e8b 100644 --- a/modules/story.module +++ b/modules/story.module @@ -69,44 +69,29 @@ function story_add() { $output .= "
\n"; - $output .= "

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

\n"; + $output .= "Subject:
\n"; + $output .= "
\n"; - $output .= "

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

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

\n"; - $output .= "

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

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

\n"; - $output .= "

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

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

\n"; - $output .= "

\n"; - $output .= " Status:
\n"; - $output .= " scheduled story for
\n"; - $output .= " posted story
\n"; - $output .= " queued story
\n"; - $output .= " 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 .= "Status:
\n"; + $output .= "scheduled story for
\n"; + $output .= "posted story
\n"; + $output .= "queued story
\n"; + $output .= "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 822f1a7d715..47671033e8b 100644 --- a/modules/story/story.module +++ b/modules/story/story.module @@ -69,44 +69,29 @@ function story_add() { $output .= "
\n"; - $output .= "

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

\n"; + $output .= "Subject:
\n"; + $output .= "
\n"; - $output .= "

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

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

\n"; - $output .= "

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

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

\n"; - $output .= "

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

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

\n"; - $output .= "

\n"; - $output .= " Status:
\n"; - $output .= " scheduled story for
\n"; - $output .= " posted story
\n"; - $output .= " queued story
\n"; - $output .= " 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 .= "Status:
\n"; + $output .= "scheduled story for
\n"; + $output .= "posted story
\n"; + $output .= "queued story
\n"; + $output .= "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;