Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
other
Priority:
Minor
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
27 Jan 2009 at 21:29 UTC
Updated:
29 Jul 2014 at 18:09 UTC
Like the favicon (was once a netscape only standard) it would be nice to add an apple touch icon as well to every theme with
* add option to upload picture
* resize to icon standad
* add
to all themes
Better to do this in a contrib module then core though it is exact the same functionality as the favicon, only now for iPhones and in the future maybe other phones.
Comments
Comment #1
webchickI'm not sure why we would want to embed special handling in Drupal core for some proprietary mobile device (esp. one and not all). "Mobile phone workarounds" module or something sounds like the way to go.
Comment #2
Joel MMCC commentedThe HTML code (in the “<head>” area, of course) to reference the icon itself is easy enough (no more difficult than for a normal favicon):
<link rel="apple-touch-icon" href="/sites/default/files/apple-touch-icon.png" />The specs of the image itself are (as the extension should make clear) a .PNG, 32-bit color depth (with alpha), at 60 pixels square (weird size, I know).
While we’re at it, how about an even more widely useful animated favicon? Mozilla browsers (Firefox, Seamonkey, etc.) support these, and perhaps some others do as well! The line of HTML code is simply:
<link rel="icon" type="image/gif" href="/sites/default/files/animated_favicon.gif" />Note that this one is a .GIF, and obviously an animated one (there would be little point to using it instead of or in addition to a rel="shortcut icon" favicon.ico file if it weren’t). 16×16 pixels (just like any other standard favicon), with index-color transparency (unless the logo is square and fills the 16×16 throughout the animation). Building one of these is quite easy in, say, Macrodobe Fireworks.
These could be added to existing themes easily enough. Just add to the page.tpl.php file after “
<?php print $head ?>” but preferably before “<title><?php print $head_title; ?></title>” (and definitely before “</head>” of course!).Note: take the opportunity to make sure that “
<?php print $head ?>” is indeed before “<title><?php print $head_title; ?></title>” — if it’s after, your site is vulnerable to an XSS attack (the same one closed by Drupal 6.11 and the SA-CORE-2009-005-6.10.patch, but those only patch the themes that come with Drupal Core or Acquia Drupal if you use that — any other themes must be patched separately if the theme maker has not yet provided an upgrade with this fix! All you have to do is move “<?php print $head ?>” before [above] “<title><?php print $head_title; ?></title>”)!To see the Apple iPod Touch / iPhone and Mozilla Animated FavIcon features in action on a Drupal site (using Pixture_reloaded theme): Krewe of Gemini
Since we already have to upload our own FavIcons even if we’ve also uploaded a Logo, I agree that there should be no need to develop code to generate the Apple icon, or even Mozilla Animated FavIcon. But it wouldn’t be that big a deal to provide support for same similar to what is currently provided for normal FavIcons, where users can upload an already-generated Apple icon .PNG and/or Mozilla Animated FavIcon .GIF, and Drupal would treat them the same way it currently treats standard FavIcons and Logos.
Though, if we wanted to get fancy, how about modifying the Color Module so that recolorable themes such as Garland or Pixture_reloaded could take the uploaded logo image, analyze it, and use it to generate a color scheme based on the most prominent colors in the logo? Instant site automatically color-coordinated with the logo! Optional generation of Apple Touch icon, standard FavIcon, and optional Mozilla Animated FavIcon (with any of several canned animation options) would be cool, too.
Comment #4
andrewmacpherson commentedTouch Icons is my module in contrib, which provides the means to specify iPhone icons on a per-theme basis.
Comment #5
dave reidYeah, contrib is definitely the best place for this. Thanks Andrew for taking this up.
Comment #7
lewisnymanSince this issue was posted, the 'apple touch icon' has become widely used in many devices, including non-apple devices!
Creating multiple image sizes for multiple resolutions/devices is a major pain. Giving themers an easy route to doing this, like we already do with the favicon, seems like an obvious step for a mobile friendly CMS.
Here's a post that details the many resolutions you would need for a modern day favicon to cover all your bases - http://www.netmagazine.com/features/create-perfect-favicon
Comment #8
lewisnymanComment #9
kscheirerUse the contributed Touch Icons module, if there are problems with it file an issue there. Re-opening this issue isn't going to do anything.