diff options
author | Dries Buytaert <dries@buytaert.net> | 2001-01-21 19:41:11 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2001-01-21 19:41:11 +0000 |
commit | ea9788853352750389307d94999ebe58991929b1 (patch) | |
tree | 50634b44ac6bf11dd346d9b6f034e415bea4b8c2 /includes/theme.inc | |
parent | 7cc7b405e323f36037dab894b69d6fd739915d5d (diff) | |
download | brdo-ea9788853352750389307d94999ebe58991929b1.tar.gz brdo-ea9788853352750389307d94999ebe58991929b1.tar.bz2 |
I know, I know, it is getting nasty lately but I have another large commit after nothing but code.
This time I redid the "category"-stuff. Categories - from now on called sections - are now maintained from the admin pages, can have their own post, dump and timout thresholds as discussed earlier (some weeks ago). By tomorrow evening users will be able to enable or disable section as well - i.e. to customize the content of drop.org.
Diffstat (limited to 'includes/theme.inc')
-rw-r--r-- | includes/theme.inc | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/includes/theme.inc b/includes/theme.inc index 166470e10..bc09e1588 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -1,5 +1,17 @@ <? +function theme_load() { + global $user, $themes; + + if ($user->theme && file_exists($themes[$user->theme][0])) { + include_once $themes[$user->theme][0]; + } + else { + include_once $themes[key($themes)][0]; + } + return new Theme(); +} + function theme_account($theme) { global $user, $site_name, $links, $menu; @@ -104,8 +116,8 @@ function theme_related_links($theme, $story) { if (!stristr($link, "mailto:")) $content .= "<LI>$link</LI>"; } - // Stories in the same category: - $content .= " <LI>More about <A HREF=\"search.php?category=". urlencode($story->category) ."\">$story->category</A>.</LI>"; + // Stories in the same section: + $content .= " <LI>More about <A HREF=\"index.php?section=". urlencode($story->section) ."\">$story->section</A>.</LI>"; // Stories from the same author: if ($story->userid) $content .= " <LI>Also by <A HREF=\"search.php?author=". urlencode($story->userid) ."\">$story->userid</A>.</LI>"; |