From 883fee8df09668f268fc95a724fa01e77f02fbd4 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 14 Jan 2010 23:09:23 +0300 Subject: neon updates; make more icons themeable; misc fixes --- functions.php | 48 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 15 deletions(-) (limited to 'functions.php') diff --git a/functions.php b/functions.php index cf78cdf30..656cadf7c 100644 --- a/functions.php +++ b/functions.php @@ -1992,10 +1992,14 @@ } function theme_image($link, $filename) { - $theme_path = get_user_theme_path($link); + if ($link) { + $theme_path = get_user_theme_path($link); - if ($theme_path && is_file($theme_path.$filename)) { - return $theme_path.$filename; + if ($theme_path && is_file($theme_path.$filename)) { + return $theme_path.$filename; + } else { + return $filename; + } } else { return $filename; } @@ -3133,6 +3137,15 @@ print ""; print ""; + print ""; + + print ""; + + print ""; + print ""; @@ -4581,18 +4594,21 @@ } function format_warning($msg, $id = "") { + global $link; return "
- $msg
"; + $msg"; } function format_notice($msg) { - return "
- $msg
"; + global $link; + return "
+ $msg
"; } function format_error($msg) { - return "
- $msg
"; + global $link; + return "
+ $msg
"; } function print_notice($msg) { @@ -5079,7 +5095,8 @@ if ($line["last_read"] == "" && !sql_bool_to_bool($line["unread"])) { - $update_pic = "\"Updated\""; } else { $update_pic = ""; */ - $score_pic = ""; if ($score > 500) { @@ -5866,13 +5884,13 @@ if ($score > 100) { return "score_high.png"; } else if ($score > 0) { - return "score_half_high.png"; + return "score_half_high.png"; } else if ($score < -100) { - return "score_low.png"; + return "score_low.png"; } else if ($score < 0) { - return "score_half_low.png"; + return "score_half_low.png"; } else { - return "score_neutral.png"; + return "score_neutral.png"; } } -- cgit v1.2.3