diff --git a/themes/danbooru/layout.class.php b/themes/danbooru/layout.class.php
index 283d0511..55e58893 100644
--- a/themes/danbooru/layout.class.php
+++ b/themes/danbooru/layout.class.php
@@ -140,9 +140,10 @@ class Layout {
# be nice to be correct
case "post":
case "upload":
+ $custom_sublinks .= "
Popular by Day/Month/Year";
$custom_sublinks .= "All";
$custom_sublinks .= "My Favorites";
- if(file_exists("ext/random_image")) $custom_sublinks .= "Random Image";
+ if(class_exists("random_image")) $custom_sublinks .= "Random Image";
if($hw){ $custom_sublinks .= "Help";
}else{ $custom_sublinks .= "Help";}
break;
diff --git a/themes/lite/layout.class.php b/themes/lite/layout.class.php
index 560021b1..6dbf16c2 100644
--- a/themes/lite/layout.class.php
+++ b/themes/lite/layout.class.php
@@ -94,10 +94,11 @@ class Layout {
# the subnav links aren't shown, but it would
# be nice to be correct
case "post":
+ $cs .= "Popular by Day/Month/Year ";
$cs .= "All";
$cs .= "My Favorites";
$cs .= "Feed";
- if(file_exists("ext/random_image")) $cs .= "Random Image";
+ if(class_exists("random_image")) $cs .= "Random Image";
if($hw){ $cs .= "Help";
}else{ $cs .= "Help";}
break;