[rfc] encouraging styled admin interfaces
Posted: Tue Nov 08, 2005 12:03 pm
I've put together a small patch for /includes/admin/templates.inc.php that tells the user (using the theme selector) which theme has a styled admin interface. The fact that I'm the only one to contribute a theme with styled admin interface as of now beyond the default ones makes me a bit sad, and I wonder if people actually know that you can do it. (My main reason for doing it was to distinguish different blogs at first glance and not editing sth by mistake)
Main drawback is introducing a new constant.
Discuss.
Main drawback is introducing a new constant.
Discuss.
Code: Select all
--- templates.inc.php 2005-07-08 16:31:58.000000000 +0200
+++ templates.inc.php 2005-11-08 11:54:01.000000000 +0100
@@ -95,6 +95,15 @@
<td valign="top">
<?php echo AUTHOR; ?>: <?php echo $info['author'];?><br />
<?php echo LAST_UPDATED; ?>: <?php echo $info['date']; ?>
+<?php
+ if (@is_dir($serendipity['templatePath'] . $theme . '/admin')) {
+ if (@is_readable($serendipity['templatePath'] . $theme . '/admin/style.css')) {
+ if ($theme != 'default' && $theme != 'default-rtl') {
+ echo '<br />'.CUSTOM_ADMIN_INTERFACE_AVAILABLE.'<br />';
+ }
+ }
+ }
+?>
</td>
</tr>
</table>