diff options
author | Dries Buytaert <dries@buytaert.net> | 2001-04-30 17:13:08 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2001-04-30 17:13:08 +0000 |
commit | fead09a8de391e2419bdac150a8b63c0228d16a2 (patch) | |
tree | 44b7b853340e8b67ad366674e98339d394700607 /modules/locale | |
parent | c8d16d76f9ca0aa760435388a84482ec29258639 (diff) | |
download | brdo-fead09a8de391e2419bdac150a8b63c0228d16a2.tar.gz brdo-fead09a8de391e2419bdac150a8b63c0228d16a2.tar.bz2 |
Welp. Large commit ahead.
CHANGES:
- Added "read" and "write" permissions into drupal but removed
it again because - when finished after 3 hours of work - it
was considered nothing but added complexity that didn't buy
us anything. :I
(I'll explain this in detail on the mailing list, I guess.)
- Added a very simple help.module to group all available
documentation on a single page.
- Fixed bug in node_control(), book.module: UnConeD forgot to
global $user when updating the combobox code.
- Removed static wishlist.module: in future, the wishlist can
be maintained as a page in our collaborative book.
- Revised most of settings.module: tidied up the code and the
descriptions to accompany the settings and introduced a new
"default maximum number of nodes to display on the main page"
variable.
- Revised most of comment.module: the administration interface
looks better now, integrated node permissions, and -finally-
made it possible to delete comments.
- Polished on:
+ account.module
+ structure.module
+ locale.module
+ module.module
+ forum.module
- Form-ified:
+ account.php
+ account.module
+ setting.module
+ cvs.module
+ submit.php
+ comment.module
+ forum.module
+ book.module
+ page.module
+ locale.module
- Updated CHANGELOG
INFO:
- Designed a "generic tracker system with optional backends"
on paper. The idea is to allow registered users to hot-list
certain topics, individual nodes or threads (comments) and
to "plug-in" output backends like - for instance - an e-mail
digest. The design requires "intelligent blocks" though.
TODO:
- I want to tidy up the headline.module and backend.class as
well as merge in headlineRSS10.module. Julian spent quite
some time working on headline.module but I'm not sure what
he changed and whether he'd contribute it back?
Diffstat (limited to 'modules/locale')
-rw-r--r-- | modules/locale/locale.module | 37 |
1 files changed, 17 insertions, 20 deletions
diff --git a/modules/locale/locale.module b/modules/locale/locale.module index 5fd20b48e..1ddde9a7c 100644 --- a/modules/locale/locale.module +++ b/modules/locale/locale.module @@ -39,21 +39,16 @@ function locale_save($id, $edit) { } function locale_edit($id) { - global $languages; + global $languages, $REQUEST_URI; + $result = db_query("SELECT * FROM locales WHERE id = '$id'"); if ($translation = db_fetch_object($result)) { - $output .= "<FORM ACTION=\"admin.php?mod=locale\" METHOD=\"post\">\n"; - $output .= "<B>Original string:</B><BR>\n"; - $output .= "<PRE>". wordwrap(check_output($translation->string)) ."</PRE><P>"; - foreach ($languages as $code=>$language) { - $output .= "<B>$language:</B><BR>"; - $output .= (strlen($translation->string) > 30) ? "<TEXTAREA WRAP=\"virtual\" COLS=\"50\" ROWS=\"10\" NAME=\"edit[$code]\">". check_textarea($translation->$code) ."</TEXTAREA><P>" : "<INPUT TYPE=\"text\" NAME=\"edit[$code]\" SIZE=\"50\" VALUE=\"". check_textfield($translation->$code) ."\"><P>"; - } - $output .= "<INPUT NAME=\"id\" TYPE=\"hidden\" VALUE=\"$id\">\n"; - $output .= "<INPUT NAME=\"op\" TYPE=\"submit\" VALUE=\"Save translations\">\n"; - $output .= "</FORM>\n"; - - print $output; + $form .= form_item(t("Original text"), "<PRE>". wordwrap(check_output($translation->string)) ."</PRE>"); + foreach ($languages as $code=>$language) $form .= (strlen($translation->string) > 30) ? form_textarea($language, $code, $translation->$code, 50, 10) : form_textfield($language, $code, $translation->$code, 50, 128); + $form .= form_hidden("id", $id); + $form .= form_submit("Save translations"); + + return form($REQUEST_URI, $form); } } @@ -67,6 +62,7 @@ function locale_languages($translation) { function locale_overview() { $result = db_query("SELECT * FROM locales ORDER BY string"); + $output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n"; $output .= " <TR><TH>string</TH><TH>languages</TH><TH COLSPAN=\"2\">operations</TH><TR>\n"; while ($locale = db_fetch_object($result)) { @@ -74,7 +70,8 @@ function locale_overview() { $output .= " <TR><TD>". check_output($locale->string) ."<BR><SMALL><I>$locale->location</I></SMALL></TD><TD ALIGN=\"center\">$languages</TD><TD><A HREF=\"admin.php?mod=locale&op=edit&id=$locale->id\">edit</A></TD><TD><A HREF=\"admin.php?mod=locale&op=delete&id=$locale->id\">delete</A></TD></TR>"; } $output .= "</TABLE>\n"; - print $output; + + return $output; } function locale_admin() { @@ -84,20 +81,20 @@ function locale_admin() { switch ($op) { case "delete": - locale_delete(check_input($id)); - locale_overview(); + print status(locale_delete(check_input($id))); + print locale_overview(); break; case "help": - locale_help(); + print locale_help(); break; case "edit": - locale_edit(check_input($id)); + print locale_edit(check_input($id)); break; case "Save translations": - locale_save(check_input($id), $edit); + print locale_save(check_input($id), $edit); // fall through default: - locale_overview(); + print locale_overview(); } } |