Permalink
Browse files

Fixed up Metro tile support

Added documentation, and theme config option to change the tile colour
  • Loading branch information...
1 parent c383e71 commit 722a468c6ba4367bb73c7d3c42f29894d949940d @Kroc committed Jul 4, 2012
Showing with 35 additions and 10 deletions.
  1. +6 −4 HISTORY.txt
  2. +20 −4 INSTALL.txt
  3. +5 −0 themes/greyscale/theme.config.default.php
  4. +4 −2 themes/greyscale/theme.php
View
10 HISTORY.txt
@@ -1,10 +1,12 @@
-v21 Support for running without HTAccess
-* NoNonsenseForum will now auto-detect if ".htaccess" is missing or disabled and fall back to running without,
- automatically rewriting URLs to full form. Note that to be able to use NNF without HTAccess, you will have to move
- the "users" folder to a private location, using the feature below
+v21
+* Support for running without HTAccess:
+ NoNonsenseForum will now auto-detect if ".htaccess" is missing or disabled and fall back to running without,
+ automatically rewriting URLs to full form. Note that to be able to use NNF without HTAccess,
+ you will have to move the "users" folder to a private location, using the feature below
* -- todo: change location of users folder
* Added Windows 8 Metro pinned-site tile "metro-tile.default.png",
you can override it by providing your own "metro-tile.png"
+* `METRO_COLOUR` theme option to set the Metro tile colour on Windows 8 and the pinned-site colour on Desktop IE
v20 19.JUN.12
* HiDPI / Retina display graphics
View
24 INSTALL.txt
@@ -13,19 +13,21 @@ Contents:
[2] Customising
[2.1] 'config.php'
[2.2] 'theme.config.php'
-[2.3] Favicon and touch-icon
+[2.3] Favicon, touch-icon and Metro tile
[2.4] Adding a forum introduction (about.html)
[2.5] Custom CSS
[3] Translations
[0] Requirements:
========================================================================
-* Apache 2.1 or above, with .htaccess files enabled
* PHP 5.2.3 or above
+* Apache 2.1 or above, preferably with ".htaccess" files enabled
+ (though optional), or any other webserver, whereby NNF will
+ operate in "no-htaccess" mode
Browser support: (default 'greyscale' theme)
-* IE6, 7, 8, 9+
+* IE6, 7, 8, 9, 10+
* Firefox 3+, Camino 2+
* Chrome Stable, Chrome Dev
* Safari 3+
@@ -149,14 +151,28 @@ explained within.
DO NOT modify, delete or rename 'theme.config.default.php' as it is
still required.
-[2.3] Favicon and touch-icon:
+[2.3] Favicon, touch-icon and Metro tile
------------------------------------------------------------------------
The site will use '/favicon.default.ico' as the favicon and
'/apple-touch-icon.deafult.png' for iOS home-screen icons by default,
just provide your own 'favicon.ico' and 'apple-touch-icon.png' files
to override. Each theme will have examples you can use in the theme
folder, just copy those to webroot to use.
+Windows 8's Start Screen supports a custom icon when you pin a site to
+the Start Screen. '/metro-tile.default.png' is used by default, but you
+can override by providing your own 'metro-tile.png' file.
+
+Your image must be 144x144px, must have a transparent background,
+and the logo should fill the entire space, since Windows 8 already has
+padding around the image.
+
+NOTE: due to a bug in Windows 8, the 'metro-tile.png' file *must* be
+ a 32-bit PNG, and not 8-bit indexed (256-colour).
+
+You can change the colour of the Metro tile by changing the
+`METRO_COLOUR` setting in your theme config.
+
[2.4] Adding a forum introduction ('about.html'):
------------------------------------------------------------------------
You can add a custom message to the top of the forum index / sub-forum
View
5 themes/greyscale/theme.config.default.php
@@ -75,4 +75,9 @@
//- for this theme, it should be 64x64 px (HiDPI) but will appear as 32x32 on lo-DPI screens
@define ('THEME_LOGO', 'logo.png');
+//colour for Windows 8 to use on the Start Screen when a user pins the site.
+//note that this colour is not guaranteed to be used as-is, Windows 8 changes the colour into a nearby colour that it knows
+//warning: you can’t use shorthand colour notation (i.e. "#222")
+@define ('METRO_COLOUR', '#222222');
+
?>
View
6 themes/greyscale/theme.php
@@ -14,8 +14,10 @@ function theme_custom ($template) {
//application title (= forum / sub-forum name):
'//meta[@name="application-name"]/@content' => SUBFORUM ? SUBFORUM : FORUM_NAME,
//application URL (where the pinned site opens at)
- '//meta[@name="msapplication-starturl"]/@content' => FORUM_URL.PATH_URL,
-
+ '//meta[@name="msapplication-starturl"]/@content' => FORUM_URL.url ('index', '', safeURL (PATH)),
+ //pinned site / metro colour to use
+ '//meta[@name="msapplication-navbutton-color"]/@content, //meta[@name="msapplication-TileColor"]/@content'
+ => METRO_COLOUR,
//set the site logo
'img#nnf_logo@src' => FORUM_PATH.'themes/'.FORUM_THEME.'/img/'.THEME_LOGO,

0 comments on commit 722a468

Please sign in to comment.