diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-07-09 18:39:46 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-07-09 18:39:46 +0000 |
commit | b59094355a1878b416f79b329b3d78868b64a23c (patch) | |
tree | 6ed63b141a4b4a5e938c51feb57a7d201b12f7b6 | |
parent | bfd68e80eb57c5ba6deb7016e743b36b0acb5136 (diff) | |
download | brdo-b59094355a1878b416f79b329b3d78868b64a23c.tar.gz brdo-b59094355a1878b416f79b329b3d78868b64a23c.tar.bz2 |
- Made the tracker module link to your own posts. Patch 79 from Gerhard.
- Added a permalink to the Xtemplate theme. Requested by Scott.
- Added pager support to the locale module.
-rw-r--r-- | modules/locale.module | 8 | ||||
-rw-r--r-- | modules/locale/locale.module | 8 | ||||
-rw-r--r-- | modules/tracker.module | 1 | ||||
-rw-r--r-- | modules/tracker/tracker.module | 1 | ||||
-rw-r--r-- | themes/xtemplate/xtemplate.theme | 3 | ||||
-rw-r--r-- | themes/xtemplate/xtemplate.xtmpl | 2 |
6 files changed, 19 insertions, 4 deletions
diff --git a/modules/locale.module b/modules/locale.module index 4e8c4d568..750124313 100644 --- a/modules/locale.module +++ b/modules/locale.module @@ -173,13 +173,19 @@ function locale_seek() { $query[] = "(". implode(" || ", $string_query) .")"; } - $result = db_query("SELECT * FROM locales". (count($query) ? " WHERE ". implode(" && ", $query) : "") ." ORDER BY string"); + $result = pager_query("SELECT * FROM locales". (count($query) ? " WHERE ". implode(" && ", $query) : "") ." ORDER BY string", 50); $header = array(t("string"), (($edit["status"] != 2 && strlen($edit["language"]) == 2) ? t("translated string") : t("languages")), array("data" => t("operations"), "colspan" => "2")); while ($locale = db_fetch_object($result)) { $rows[] = array("$locale->string<br /><small><i>$locale->location</i></small>", array("data" => (($edit["status"] != 2 && strlen($edit["language"]) == 2) ? $locale->$edit["language"] : locale_languages($locale)), "align" => "center"), array("data" => l(t("edit locale"), "admin/locale/edit/$locale->lid"), "nowrap" => "nowrap"), array("data" => l(t("delete locale"), "admin/locale/delete/$locale->lid"), "nowrap" => "nowrap")); } + + if ($pager = pager_display(NULL, 50, 0, "admin")) { + $rows[] = array(array("data" => "$pager", "colspan" => "5")); + } + $output .= table($header, $rows); + } return $output; diff --git a/modules/locale/locale.module b/modules/locale/locale.module index 4e8c4d568..750124313 100644 --- a/modules/locale/locale.module +++ b/modules/locale/locale.module @@ -173,13 +173,19 @@ function locale_seek() { $query[] = "(". implode(" || ", $string_query) .")"; } - $result = db_query("SELECT * FROM locales". (count($query) ? " WHERE ". implode(" && ", $query) : "") ." ORDER BY string"); + $result = pager_query("SELECT * FROM locales". (count($query) ? " WHERE ". implode(" && ", $query) : "") ." ORDER BY string", 50); $header = array(t("string"), (($edit["status"] != 2 && strlen($edit["language"]) == 2) ? t("translated string") : t("languages")), array("data" => t("operations"), "colspan" => "2")); while ($locale = db_fetch_object($result)) { $rows[] = array("$locale->string<br /><small><i>$locale->location</i></small>", array("data" => (($edit["status"] != 2 && strlen($edit["language"]) == 2) ? $locale->$edit["language"] : locale_languages($locale)), "align" => "center"), array("data" => l(t("edit locale"), "admin/locale/edit/$locale->lid"), "nowrap" => "nowrap"), array("data" => l(t("delete locale"), "admin/locale/delete/$locale->lid"), "nowrap" => "nowrap")); } + + if ($pager = pager_display(NULL, 50, 0, "admin")) { + $rows[] = array(array("data" => "$pager", "colspan" => "5")); + } + $output .= table($header, $rows); + } return $output; diff --git a/modules/tracker.module b/modules/tracker.module index 383bd5edb..4ce6be416 100644 --- a/modules/tracker.module +++ b/modules/tracker.module @@ -73,6 +73,7 @@ function tracker_posts($id = 0) { function tracker_user($type, &$edit, &$user) { switch ($type) { + case "view_private": case "view_public": if (user_access("access content")) { return form_item(t("Recent posts"), l(t("view recent posts"), "tracker/$user->uid")); diff --git a/modules/tracker/tracker.module b/modules/tracker/tracker.module index 383bd5edb..4ce6be416 100644 --- a/modules/tracker/tracker.module +++ b/modules/tracker/tracker.module @@ -73,6 +73,7 @@ function tracker_posts($id = 0) { function tracker_user($type, &$edit, &$user) { switch ($type) { + case "view_private": case "view_public": if (user_access("access content")) { return form_item(t("Recent posts"), l(t("view recent posts"), "tracker/$user->uid")); diff --git a/themes/xtemplate/xtemplate.theme b/themes/xtemplate/xtemplate.theme index afea90bcc..65ccbf9ee 100644 --- a/themes/xtemplate/xtemplate.theme +++ b/themes/xtemplate/xtemplate.theme @@ -31,7 +31,8 @@ class Theme_xtemplate extends BaseTheme { function node($node, $main = 0) { - $this->template->assign(array ( + $this->template->assign(array( + "link" => url("node/view/$node->nid"), "title" => ucfirst($node->title), "author" => format_name($node), "date" => format_date($node->created), diff --git a/themes/xtemplate/xtemplate.xtmpl b/themes/xtemplate/xtemplate.xtmpl index ae673efb8..9b0233426 100644 --- a/themes/xtemplate/xtemplate.xtmpl +++ b/themes/xtemplate/xtemplate.xtmpl @@ -46,7 +46,7 @@ <!-- BEGIN: node --> <div class="node"> - <div class="title">{title}</div> + <div class="title"><a href="{link}">{title}</a></div> <span class="author">Submitted by {author} on {date}.</span> <span class="taxonomy">{taxonomy}</span> <div class="content">{content}</div> |