Themester is not reacting and changing the stylesheet when I choose to look for "iPhone" or "AppleWebKit/420+" in the "browser:Ext" field. I´ve written "iPhone:iphone" and my stylesheet is called "style-iphone.css" and is located in the designated directory to watch: "devices" under my current theme folder.
Surprisingly it is reacting on the word "Mobile" but then the stylesheet is also changed in my ordinary Safari 3 on my macbook pro as well.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | themester-sample.jpg | 169.54 KB | katris |
Comments
Comment #1
katris commentedUnfortunately I don't have an iPhone to test this with, but the following is working for me when using web kit: "AppleWebKit/523.11+:webkit" or "AppleWebKit:webkit" to search for style-webkit.css. Seems that if this is loading then the iPhone string should also be working. Thanks so much for entering an issue... I will look into this issue and see if I can figure out why its not working for you.
Can you provide me with more description as to what you are looking for themester to do specifically? Are you looking to specifically use different style sheets on mobile devices?
Themester wasn't set up to completely change the style sheet based on the browser type. Instead it was set up to cascade so that user specifics could be included as overwrites to previously set styles. I like the idea and think that adding this ability may be a good addition in functionality.
Best,
Josh
Comment #2
bohtho commentedThat string for the (current version of) iphone would be "AppleWebKit/420.1" but it´s not reacting on that either. I know it probably is cascading so my specific css for iphone is based on the original style.css and overrides the layout in it.
My iphone´s user-agent is: Mozilla/5.0 (iPhone; U; CPU like Mac OS X; nb-no) AppleWebKit/420.1 (KHTML, like Gecko) Version/3.0 Mobile/3A109a Safari/419.3
as opposed to my desktop Safari 3: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; nb-no) AppleWebKit/522.11.1 (KHTML, like Gecko) Version/3.0.3 Safari/522.12.1
There are several strings that should be able to differentiate the two but it doesn´t seem to react on stuff in parenthesis (?) and also reacts on my desktop safari as "Mobile" (?).
EDIT: it is now reacting on "AppleWebKit/420" but not "iPhone".
If you have a mac you can use iPhoney to simulate an iphone user-agent. (http://www.marketcircle.com/iphoney/)
Comment #3
katris commentedThanks a ton for that iPhoney link. Great app!
I attached a jpg to this comment. In the example jpg I am just updating the h2 tags for iPhones. In iPhoney, the iPhone:iphone declaration seems to be working correctly for me and I also tested the Mobile issue that you mentioned and I am not seeing that style sheet load in Safari 3.0.3 on my macbook pro.
Can you send me a link to your page that is displaying the incorrect style sheets. So I can look at it and see if I can locate any potential issues. Do you have css aggregation turned on, if so, have you cleared your cache tables to insure that the data is not cache?
I hope this helps. Keep me posted and I'll try and help in any way I can.
Josh
Comment #4
bohtho commentedI´m really embarassed if this is a cache issue ... Do I clear this cache too by "update.php" ? Or only some related to modules (eg. views) ? I hestitate to constantly have to go into phpmyadmin and clear tables to develop css for themester. And yes, css aggregation probably would cause problems ..
There´s actually 3 client side caches too (cssedit, iphoney, and MobileSafari on iphone) but I thought I had them under control.
Did I mention that I cannot believe there are not more comments regarding themester on drupal.org. I searched especially for such a module and was very happy when I found themester. Although it fullfills my needs now, are you planning to introduce new features like intervening the theme system and replacing the original style.css (as opposed to override) ?
Comment #5
katris commentedI would love to work more on Themester as a front end helper module. My background is primarily front-end with some back-end knowledge. Themester is my first module that I've contributed back to the community and its only been up for a few weeks now. I was also suprised to see that this issue had not been addressed before I got to it. I am still a newbie to the whole Drupal world, but my current client base are all in love with Drupal and I've been getting more and more Drupal related work in the last six months especially.
As for the cache. I think the best way is to just clear the cache tables in the db, but I also avoid those and usually just try turning off css aggregation to resolve those issues. I'm not as comfortable with cache related stuff.. and even though I've been told its very simple, I find myself completely confused by what's telling what to load or not load...lol.
As for future updates... I usually work 40-60 hours a week.. so I don't get as much time as I would like to maintain. but I would love to see new ideas introduced. I have been approached to build a wrapper style to content types which would take an existing style sheet and assign it to specific content types, so that you would be able to designate style sheets directly to content types.
The reason I didn't opt to overwrite the style.css file is because I felt that in a perfect world you would have one main global style base sheet that could and probably would still be the style.css file. This would reset any or correct any drupal specific style that are set in the primary style sheets. Placing this inside the themester designated directory would be good, but you can always just move the style.css to the designated directory and themester will just look in the designated directory for style.css... then style-myext.css... and so on. Keep in mind that once you place a style.css file inside the themester designated directory that this directory will appear on the theme list in the drupal admin. This could make things confusing, so I opted against it, but it will work if you feel so inclined.
Thanks again, for your support, and feel free to let me know if you have any ideas that you think would be good for themester.
Take care,
Josh