Re: blogs using single-rendition themes not showing on smartphones
If a cookie replacement option is too time-consuming or hacky to implement, perhaps it would be better for us not to make the perfect the enemy of the good, i.e., have Greg go ahead and update the device detection info even if we lose the cookie stuff. Perhaps 90% of all blogs are going to be just single (responsive) rendition anyway, cookies would benefit only that subset of the 10% where mobile is not the best template for a tablet. I'd like to get 5.1.1 out relatively soon, as Roller's 5.1.0's inability to work with tablets and smartphones OOTB is very harmful for its adoption. Although I've already patched that problem by having mobile requests go to standard if mobile not provided, additionally getting the device detection list updated to Spring Mobile's latest and greatest as part of this release would be very good for Roller and helpful for integrators. Greg at his leisure can later do the SaltCache stuff after 5.1.1 if he wishes. Some other ideas we could consider instead of SaltCache-based solutions (of which I don't really understand but am not too concerned about it), most probably post 5.1.1: 1.) Add a new type to RenditionType, TABLET, allowing the blogger to configure whatever he or she thinks is best for tablets in his theme.xml, still defaulting back to MOBILE, and from there, STANDARD, if a tablet rendition isn't provided. Possibly also, create a top-level tabletDefault property in the theme.xml (or configured in user settings at the weblog level, so it will work with custom themes also), with accepted values of STANDARD or MOBILE, in which the blog writer specifies which rendition he wants used if the device is detected to be a tablet and he or she doesn't wish to manually configure tablet renditions. 2.) Twitter does not provide a standard/mobile button but just separate URLs for the user to choose from: m.twitter.com and www.twitter.com. What we could do is provide the user an ability to create a second (mobile) handle when creating the blog that will use the mobile renditions defined for that theme, if any. That way the blog reader can choose whichever theme desired by his choice of URL. Cheers, Glen On 09/07/2014 02:29 AM, Greg Huber wrote: ok, will look into a more reliable method of remembering the device type, the request attribute is not good. Possibly use something like the SaltCache to store the value via the ip address eg 127.0.0.1 == standard. Kind of how spring does it. Cheers Greg. On 5 September 2014 14:29, Davesnoopd...@gmail.com wrote: On Fri, Sep 5, 2014 at 3:18 AM, Greg Hubergregh3...@gmail.com wrote: Ok, will look into the integration / documentation. Can we drop the cookie switching? Although nice to have, switch manually from standard to mobile is too troublesome to get working reliably, and it was not easy to adopt the spring logic to control this (I may have another look at the spring code to see if it is possible, think it uses too much of spring, annotation stuff, from what I remember). Its better to use an agent switcher for development/viewing. Cheers Greg That's a *very* nice to have feature. I hate it when I'm stuck in a limited mobile version of a website when my tablet's screen is more than enough for the regular version of the site. - Dave
Re: blogs using single-rendition themes not showing on smartphones
ok, will look into a more reliable method of remembering the device type, the request attribute is not good. Possibly use something like the SaltCache to store the value via the ip address eg 127.0.0.1 == standard. Kind of how spring does it. Cheers Greg. On 5 September 2014 14:29, Dave snoopd...@gmail.com wrote: On Fri, Sep 5, 2014 at 3:18 AM, Greg Huber gregh3...@gmail.com wrote: Ok, will look into the integration / documentation. Can we drop the cookie switching? Although nice to have, switch manually from standard to mobile is too troublesome to get working reliably, and it was not easy to adopt the spring logic to control this (I may have another look at the spring code to see if it is possible, think it uses too much of spring, annotation stuff, from what I remember). Its better to use an agent switcher for development/viewing. Cheers Greg That's a *very* nice to have feature. I hate it when I'm stuck in a limited mobile version of a website when my tablet's screen is more than enough for the regular version of the site. - Dave
Re: blogs using single-rendition themes not showing on smartphones
But please, update the license headers in the interim on those files you added... ;-) Glen On 09/07/2014 05:29 AM, Greg Huber wrote: ok, will look into a more reliable method of remembering the device type, the request attribute is not good. Possibly use something like the SaltCache to store the value via the ip address eg 127.0.0.1 == standard. Kind of how spring does it. Cheers Greg. On 5 September 2014 14:29, Dave snoopd...@gmail.com wrote: On Fri, Sep 5, 2014 at 3:18 AM, Greg Huber gregh3...@gmail.com wrote: Ok, will look into the integration / documentation. Can we drop the cookie switching? Although nice to have, switch manually from standard to mobile is too troublesome to get working reliably, and it was not easy to adopt the spring logic to control this (I may have another look at the spring code to see if it is possible, think it uses too much of spring, annotation stuff, from what I remember). Its better to use an agent switcher for development/viewing. Cheers Greg That's a *very* nice to have feature. I hate it when I'm stuck in a limited mobile version of a website when my tablet's screen is more than enough for the regular version of the site. - Dave
Re: blogs using single-rendition themes not showing on smartphones
The only dependant spring class is org.springframework.web.filter.OncePerRequestFilter on the DeviceResolverRequestFilter which can be dropped, but does reduce the overhead of the filter. Tablet defaults currently to mobile. Roller could be enhanced to use more rendering views (standard, mobile, tablet, etc) which does make managing the design easier (less csmess) but a whole lot more work/duplication. I guess why frameworks are switching to mobile first (Foundation, Bootstrap) which makes supporting multiple devices easier (based on viewport size rather than the actual device. Cheers Greg On 4 September 2014 18:43, Dave snoopd...@gmail.com wrote: On Wed, Sep 3, 2014 at 3:14 AM, Greg Huber gregh3...@gmail.com wrote: Checking the spring-mobile license it uses http://www.apache.org/licenses/LICENSE-2.0. So it looks ok to use, I will add a version which uses DeviceResolverRequestFilter and LiteDeviceResolver to determine the browser type (also its easily maintained by spring! ;) ) and which we can easily switch to. I have added the code Committed revision 1622172. If it is OK I will update roller accordingly. Hi Greg, Seems like a good idea, despite the fact that it means more Spring ;-) Does this solution or your design for using it require a theme author to create a mobile, table-size and desktop version of every template or can an author just choose to provide mobile and desktop? - Dave
Re: blogs using single-rendition themes not showing on smartphones
If you're asking to remove the functionality that powers the switch to mobile and switch to standard buttons on the basic and mobile parts of the basic-mobile theme, I would say they aren't vital, if you wouldn't mind pulling out the buttons in the basic-mobile theme if they become unusable as a result. Google Chrome offers a developer tools view where people can view and test the mobile theme from the laptop browser, so people can get to the mobile theme that way. Glen On 09/05/2014 03:18 AM, Greg Huber wrote: Ok, will look into the integration / documentation. Can we drop the cookie switching? Although nice to have, switch manually from standard to mobile is too troublesome to get working reliably, and it was not easy to adopt the spring logic to control this (I may have another look at the spring code to see if it is possible, think it uses too much of spring, annotation stuff, from what I remember). Its better to use an agent switcher for development/viewing. Cheers Greg On 4 September 2014 09:56, Glen Mazza glen.ma...@gmail.com wrote: OK, please make the license changes needed as mentioned in the other email though. If your change is such that a tablet gets treated as a mobile, then we're fine, as Roller won't blow up OOTB if it evaluates a device to be a tablet. Afterwards, if you wish to expand StylesheetEdit and TemplateEdit, as well as the parser for theme.xml to support tablets separately, that's your choice--I don't have that itch to scratch myself though as it seems a bit overkill right now. Thanks for this change -- as you note, it's easy for us to update and gives us the opportunity to support tablets separately in the future should we go that route. Glen On 09/04/2014 02:24 AM, Greg Huber wrote: We will need to check with the original committer where the code came from. I could not find anything similar so rather than not be supported I switched locally to a spring based solution. It also is far superior code than was previously supplied. The tablet renders currently as a mobile, which we can change if needed to render normal. Cheers Greg On 3 September 2014 14:41, Glen Mazza glen.ma...@gmail.com wrote: I'm not comfortable with this change at the present, I think it is too soon for us to move to three device support (now including tablets) and not a good allocation of resources, at a time that multiple device checking is nicely going out the window due to responsive themes and usage of media queries. What we presently have, i.e., check for Mobile in the UA string, then check a device listing, and then fallback to standard theme if mobile unavailable will work for the vast majority of blogs today. And such simplicity saves us time, allowing us to add more important features that grab more bloggers than we'd lose by not separately supporting tablets. Three-device support is going to require code changes throughout the system to support, it's not just bringing in these few classes. I was hoping we could just update our list of devices we presently have and just go with that--update one file alone. (Where did that original source come from?) There are many sources for this information, even JQuery will probably work because it's MIT-licensed. Let's consider whether we need three-device support later, once we get user demand for it (and your solution looks fine for it), but I'd rather we not be maintaining something that our present user base isn't asking for. Glen On 09/03/2014 03:14 AM, Greg Huber wrote: Checking the spring-mobile license it uses http://www.apache.org/licenses/LICENSE-2.0. So it looks ok to use, I will add a version which uses DeviceResolverRequestFilter and LiteDeviceResolver to determine the browser type (also its easily maintained by spring! ;) ) and which we can easily switch to. I have added the code Committed revision 1622172. If it is OK I will update roller accordingly. Cheers Greg On 2 September 2014 10:57, Glen Mazzaglen.ma...@gmail.com wrote: No, we still support multiple renditions (i.e., basic-mobile) to be defined if that's what the blogger wants, for single-rendition the blogger can use either a responsive theme or even a non-responsive one (my smartphone just shrinks the image if it's non responsive, I can enlarge it and view chunks of the blog page.) The older code, if there was just the standard rendition defined, would make a copy of it and make the copy the mobile rendition, requiring the theme user to have to maintain two sets of templates even if they were desired to stay identical (e.g., a responsive theme). When I took that out -- no copies unless two renditions are defined in the theme.xml -- I apparently didn't get the code right for the standard theme to be the default one. I'll get it fixed. As for the browser user agent, I'm not sure if that deviceType parameter is something that a Roller page creates once in a browser or something all browsers supply regardless of the website that
Re: blogs using single-rendition themes not showing on smartphones
On Fri, Sep 5, 2014 at 3:18 AM, Greg Huber gregh3...@gmail.com wrote: Ok, will look into the integration / documentation. Can we drop the cookie switching? Although nice to have, switch manually from standard to mobile is too troublesome to get working reliably, and it was not easy to adopt the spring logic to control this (I may have another look at the spring code to see if it is possible, think it uses too much of spring, annotation stuff, from what I remember). Its better to use an agent switcher for development/viewing. Cheers Greg That's a *very* nice to have feature. I hate it when I'm stuck in a limited mobile version of a website when my tablet's screen is more than enough for the regular version of the site. - Dave
Re: blogs using single-rendition themes not showing on smartphones
We will need to check with the original committer where the code came from. I could not find anything similar so rather than not be supported I switched locally to a spring based solution. It also is far superior code than was previously supplied. The tablet renders currently as a mobile, which we can change if needed to render normal. Cheers Greg On 3 September 2014 14:41, Glen Mazza glen.ma...@gmail.com wrote: I'm not comfortable with this change at the present, I think it is too soon for us to move to three device support (now including tablets) and not a good allocation of resources, at a time that multiple device checking is nicely going out the window due to responsive themes and usage of media queries. What we presently have, i.e., check for Mobile in the UA string, then check a device listing, and then fallback to standard theme if mobile unavailable will work for the vast majority of blogs today. And such simplicity saves us time, allowing us to add more important features that grab more bloggers than we'd lose by not separately supporting tablets. Three-device support is going to require code changes throughout the system to support, it's not just bringing in these few classes. I was hoping we could just update our list of devices we presently have and just go with that--update one file alone. (Where did that original source come from?) There are many sources for this information, even JQuery will probably work because it's MIT-licensed. Let's consider whether we need three-device support later, once we get user demand for it (and your solution looks fine for it), but I'd rather we not be maintaining something that our present user base isn't asking for. Glen On 09/03/2014 03:14 AM, Greg Huber wrote: Checking the spring-mobile license it uses http://www.apache.org/licenses/LICENSE-2.0. So it looks ok to use, I will add a version which uses DeviceResolverRequestFilter and LiteDeviceResolver to determine the browser type (also its easily maintained by spring! ;) ) and which we can easily switch to. I have added the code Committed revision 1622172. If it is OK I will update roller accordingly. Cheers Greg On 2 September 2014 10:57, Glen Mazzaglen.ma...@gmail.com wrote: No, we still support multiple renditions (i.e., basic-mobile) to be defined if that's what the blogger wants, for single-rendition the blogger can use either a responsive theme or even a non-responsive one (my smartphone just shrinks the image if it's non responsive, I can enlarge it and view chunks of the blog page.) The older code, if there was just the standard rendition defined, would make a copy of it and make the copy the mobile rendition, requiring the theme user to have to maintain two sets of templates even if they were desired to stay identical (e.g., a responsive theme). When I took that out -- no copies unless two renditions are defined in the theme.xml -- I apparently didn't get the code right for the standard theme to be the default one. I'll get it fixed. As for the browser user agent, I'm not sure if that deviceType parameter is something that a Roller page creates once in a browser or something all browsers supply regardless of the website that they are on, Googling isn't bringing up much on that parameter so I'm assuming the former. I'm pretty much new to this particular topic. Glen On 09/02/2014 02:45 AM, Greg Huber wrote: If there is no mobile on the theme.xml for the theme it used to show the default, so maybe something has changed. The browser user agent is used to determine if its a mobile device. What I do is to use the jquery mobile logic i.e. LiteDeviceResolver, I can update roller but am not sure on the licensing etc on copying jquery code. As you mentioned previously the preferred method now would be to use a responsive design, rather than a separate theme, so this is kind of parked? Cheers Greg On 2 September 2014 01:49, Glen Mazzaglen.ma...@gmail.com wrote: Hi Team, I noticed today with Roller 5.1 the blogs are not rendering on smartphones (at least mine, I have a Windows 8 smartphone that uses IE as its browser) except for the combo basic-mobile theme, the only one that provides explicit mobile rendition types. For the others, Roller just returns a blank screen or a 404 or similar error page. To test, for my website I created 5 empty blogs, one for each theme we offer: https://web-gmazza.rhcloud.com/frontpage/ https://web-gmazza.rhcloud.com/gaurav/ https://web-gmazza.rhcloud.com/testdual/(basic-mobile). https://web-gmazza.rhcloud.com/frontpage/ https://web-gmazza.rhcloud.com/fauxcoly/ What I would like to have Roller do -- and I had incorrectly assumed was already being done -- was for Roller to fall back to the standard rendition type when the mobile rendition was not available, correct anyway if you're using a responsive theme. Searching through the code I think
Re: blogs using single-rendition themes not showing on smartphones
On Wed, Sep 3, 2014 at 3:14 AM, Greg Huber gregh3...@gmail.com wrote: Checking the spring-mobile license it uses http://www.apache.org/licenses/LICENSE-2.0. So it looks ok to use, I will add a version which uses DeviceResolverRequestFilter and LiteDeviceResolver to determine the browser type (also its easily maintained by spring! ;) ) and which we can easily switch to. I have added the code Committed revision 1622172. If it is OK I will update roller accordingly. Hi Greg, Seems like a good idea, despite the fact that it means more Spring ;-) Does this solution or your design for using it require a theme author to create a mobile, table-size and desktop version of every template or can an author just choose to provide mobile and desktop? - Dave
Re: blogs using single-rendition themes not showing on smartphones
Checking the spring-mobile license it uses http://www.apache.org/licenses/LICENSE-2.0. So it looks ok to use, I will add a version which uses DeviceResolverRequestFilter and LiteDeviceResolver to determine the browser type (also its easily maintained by spring! ;) ) and which we can easily switch to. I have added the code Committed revision 1622172. If it is OK I will update roller accordingly. Cheers Greg On 2 September 2014 10:57, Glen Mazza glen.ma...@gmail.com wrote: No, we still support multiple renditions (i.e., basic-mobile) to be defined if that's what the blogger wants, for single-rendition the blogger can use either a responsive theme or even a non-responsive one (my smartphone just shrinks the image if it's non responsive, I can enlarge it and view chunks of the blog page.) The older code, if there was just the standard rendition defined, would make a copy of it and make the copy the mobile rendition, requiring the theme user to have to maintain two sets of templates even if they were desired to stay identical (e.g., a responsive theme). When I took that out -- no copies unless two renditions are defined in the theme.xml -- I apparently didn't get the code right for the standard theme to be the default one. I'll get it fixed. As for the browser user agent, I'm not sure if that deviceType parameter is something that a Roller page creates once in a browser or something all browsers supply regardless of the website that they are on, Googling isn't bringing up much on that parameter so I'm assuming the former. I'm pretty much new to this particular topic. Glen On 09/02/2014 02:45 AM, Greg Huber wrote: If there is no mobile on the theme.xml for the theme it used to show the default, so maybe something has changed. The browser user agent is used to determine if its a mobile device. What I do is to use the jquery mobile logic i.e. LiteDeviceResolver, I can update roller but am not sure on the licensing etc on copying jquery code. As you mentioned previously the preferred method now would be to use a responsive design, rather than a separate theme, so this is kind of parked? Cheers Greg On 2 September 2014 01:49, Glen Mazza glen.ma...@gmail.com wrote: Hi Team, I noticed today with Roller 5.1 the blogs are not rendering on smartphones (at least mine, I have a Windows 8 smartphone that uses IE as its browser) except for the combo basic-mobile theme, the only one that provides explicit mobile rendition types. For the others, Roller just returns a blank screen or a 404 or similar error page. To test, for my website I created 5 empty blogs, one for each theme we offer: https://web-gmazza.rhcloud.com/frontpage/ https://web-gmazza.rhcloud.com/gaurav/ https://web-gmazza.rhcloud.com/testdual/ (basic-mobile). https://web-gmazza.rhcloud.com/frontpage/ https://web-gmazza.rhcloud.com/fauxcoly/ What I would like to have Roller do -- and I had incorrectly assumed was already being done -- was for Roller to fall back to the standard rendition type when the mobile rendition was not available, correct anyway if you're using a responsive theme. Searching through the code I think the only change I need to do is in class RollerVelocity[1], for those getTemplate() methods that take a deviceType parameter, to attempt to get the standard rendition type as a fallback if the mobile deviceType was requested and is not available. I'll test it. Until a Roller 5.1.1 is out, users should be able to duplicate renditions in their theme.xml, defining the standard one as also the mobile one. Couple of other concerns, in our MobileDeviceRepository class, our device listing[2] used as a backup to determine if mobile is necessary may be out-of-date, I think I can Google something more recent. Also, just to confirm, line #88 of that same file, checks the user agent deviceType parameter for standard or mobile to determine the type, but that parameter is not normally sent by a browser, correct? Regards, Glen [1] http://svn.apache.org/viewvc/roller/trunk/app/src/main/ java/org/apache/roller/weblogger/ui/rendering/ velocity/RollerVelocity.java?revision=1583506view=markup#l96 [2] http://svn.apache.org/viewvc/roller/trunk/app/src/main/ java/org/apache/roller/weblogger/ui/rendering/mobile/ MobileDeviceRepository.java?revision=1611764view=markup#l34
Re: blogs using single-rendition themes not showing on smartphones
I'm not comfortable with this change at the present, I think it is too soon for us to move to three device support (now including tablets) and not a good allocation of resources, at a time that multiple device checking is nicely going out the window due to responsive themes and usage of media queries. What we presently have, i.e., check for Mobile in the UA string, then check a device listing, and then fallback to standard theme if mobile unavailable will work for the vast majority of blogs today. And such simplicity saves us time, allowing us to add more important features that grab more bloggers than we'd lose by not separately supporting tablets. Three-device support is going to require code changes throughout the system to support, it's not just bringing in these few classes. I was hoping we could just update our list of devices we presently have and just go with that--update one file alone. (Where did that original source come from?) There are many sources for this information, even JQuery will probably work because it's MIT-licensed. Let's consider whether we need three-device support later, once we get user demand for it (and your solution looks fine for it), but I'd rather we not be maintaining something that our present user base isn't asking for. Glen On 09/03/2014 03:14 AM, Greg Huber wrote: Checking the spring-mobile license it uses http://www.apache.org/licenses/LICENSE-2.0. So it looks ok to use, I will add a version which uses DeviceResolverRequestFilter and LiteDeviceResolver to determine the browser type (also its easily maintained by spring! ;) ) and which we can easily switch to. I have added the code Committed revision 1622172. If it is OK I will update roller accordingly. Cheers Greg On 2 September 2014 10:57, Glen Mazzaglen.ma...@gmail.com wrote: No, we still support multiple renditions (i.e., basic-mobile) to be defined if that's what the blogger wants, for single-rendition the blogger can use either a responsive theme or even a non-responsive one (my smartphone just shrinks the image if it's non responsive, I can enlarge it and view chunks of the blog page.) The older code, if there was just the standard rendition defined, would make a copy of it and make the copy the mobile rendition, requiring the theme user to have to maintain two sets of templates even if they were desired to stay identical (e.g., a responsive theme). When I took that out -- no copies unless two renditions are defined in the theme.xml -- I apparently didn't get the code right for the standard theme to be the default one. I'll get it fixed. As for the browser user agent, I'm not sure if that deviceType parameter is something that a Roller page creates once in a browser or something all browsers supply regardless of the website that they are on, Googling isn't bringing up much on that parameter so I'm assuming the former. I'm pretty much new to this particular topic. Glen On 09/02/2014 02:45 AM, Greg Huber wrote: If there is no mobile on the theme.xml for the theme it used to show the default, so maybe something has changed. The browser user agent is used to determine if its a mobile device. What I do is to use the jquery mobile logic i.e. LiteDeviceResolver, I can update roller but am not sure on the licensing etc on copying jquery code. As you mentioned previously the preferred method now would be to use a responsive design, rather than a separate theme, so this is kind of parked? Cheers Greg On 2 September 2014 01:49, Glen Mazzaglen.ma...@gmail.com wrote: Hi Team, I noticed today with Roller 5.1 the blogs are not rendering on smartphones (at least mine, I have a Windows 8 smartphone that uses IE as its browser) except for the combo basic-mobile theme, the only one that provides explicit mobile rendition types. For the others, Roller just returns a blank screen or a 404 or similar error page. To test, for my website I created 5 empty blogs, one for each theme we offer: https://web-gmazza.rhcloud.com/frontpage/ https://web-gmazza.rhcloud.com/gaurav/ https://web-gmazza.rhcloud.com/testdual/(basic-mobile). https://web-gmazza.rhcloud.com/frontpage/ https://web-gmazza.rhcloud.com/fauxcoly/ What I would like to have Roller do -- and I had incorrectly assumed was already being done -- was for Roller to fall back to the standard rendition type when the mobile rendition was not available, correct anyway if you're using a responsive theme. Searching through the code I think the only change I need to do is in class RollerVelocity[1], for those getTemplate() methods that take a deviceType parameter, to attempt to get the standard rendition type as a fallback if the mobile deviceType was requested and is not available. I'll test it. Until a Roller 5.1.1 is out, users should be able to duplicate renditions in their theme.xml, defining the standard one as also the mobile one. Couple of other concerns, in our MobileDeviceRepository class, our device
Re: blogs using single-rendition themes not showing on smartphones
Oops, sorry, the LiteDeviceResolver is Spring Mobile not jquery! Cheers Greg On 2 September 2014 01:49, Glen Mazza glen.ma...@gmail.com wrote: Hi Team, I noticed today with Roller 5.1 the blogs are not rendering on smartphones (at least mine, I have a Windows 8 smartphone that uses IE as its browser) except for the combo basic-mobile theme, the only one that provides explicit mobile rendition types. For the others, Roller just returns a blank screen or a 404 or similar error page. To test, for my website I created 5 empty blogs, one for each theme we offer: https://web-gmazza.rhcloud.com/frontpage/ https://web-gmazza.rhcloud.com/gaurav/ https://web-gmazza.rhcloud.com/testdual/ (basic-mobile). https://web-gmazza.rhcloud.com/frontpage/ https://web-gmazza.rhcloud.com/fauxcoly/ What I would like to have Roller do -- and I had incorrectly assumed was already being done -- was for Roller to fall back to the standard rendition type when the mobile rendition was not available, correct anyway if you're using a responsive theme. Searching through the code I think the only change I need to do is in class RollerVelocity[1], for those getTemplate() methods that take a deviceType parameter, to attempt to get the standard rendition type as a fallback if the mobile deviceType was requested and is not available. I'll test it. Until a Roller 5.1.1 is out, users should be able to duplicate renditions in their theme.xml, defining the standard one as also the mobile one. Couple of other concerns, in our MobileDeviceRepository class, our device listing[2] used as a backup to determine if mobile is necessary may be out-of-date, I think I can Google something more recent. Also, just to confirm, line #88 of that same file, checks the user agent deviceType parameter for standard or mobile to determine the type, but that parameter is not normally sent by a browser, correct? Regards, Glen [1] http://svn.apache.org/viewvc/roller/trunk/app/src/main/ java/org/apache/roller/weblogger/ui/rendering/ velocity/RollerVelocity.java?revision=1583506view=markup#l96 [2] http://svn.apache.org/viewvc/roller/trunk/app/src/main/ java/org/apache/roller/weblogger/ui/rendering/mobile/ MobileDeviceRepository.java?revision=1611764view=markup#l34
Re: blogs using single-rendition themes not showing on smartphones
No, we still support multiple renditions (i.e., basic-mobile) to be defined if that's what the blogger wants, for single-rendition the blogger can use either a responsive theme or even a non-responsive one (my smartphone just shrinks the image if it's non responsive, I can enlarge it and view chunks of the blog page.) The older code, if there was just the standard rendition defined, would make a copy of it and make the copy the mobile rendition, requiring the theme user to have to maintain two sets of templates even if they were desired to stay identical (e.g., a responsive theme). When I took that out -- no copies unless two renditions are defined in the theme.xml -- I apparently didn't get the code right for the standard theme to be the default one. I'll get it fixed. As for the browser user agent, I'm not sure if that deviceType parameter is something that a Roller page creates once in a browser or something all browsers supply regardless of the website that they are on, Googling isn't bringing up much on that parameter so I'm assuming the former. I'm pretty much new to this particular topic. Glen On 09/02/2014 02:45 AM, Greg Huber wrote: If there is no mobile on the theme.xml for the theme it used to show the default, so maybe something has changed. The browser user agent is used to determine if its a mobile device. What I do is to use the jquery mobile logic i.e. LiteDeviceResolver, I can update roller but am not sure on the licensing etc on copying jquery code. As you mentioned previously the preferred method now would be to use a responsive design, rather than a separate theme, so this is kind of parked? Cheers Greg On 2 September 2014 01:49, Glen Mazza glen.ma...@gmail.com wrote: Hi Team, I noticed today with Roller 5.1 the blogs are not rendering on smartphones (at least mine, I have a Windows 8 smartphone that uses IE as its browser) except for the combo basic-mobile theme, the only one that provides explicit mobile rendition types. For the others, Roller just returns a blank screen or a 404 or similar error page. To test, for my website I created 5 empty blogs, one for each theme we offer: https://web-gmazza.rhcloud.com/frontpage/ https://web-gmazza.rhcloud.com/gaurav/ https://web-gmazza.rhcloud.com/testdual/ (basic-mobile). https://web-gmazza.rhcloud.com/frontpage/ https://web-gmazza.rhcloud.com/fauxcoly/ What I would like to have Roller do -- and I had incorrectly assumed was already being done -- was for Roller to fall back to the standard rendition type when the mobile rendition was not available, correct anyway if you're using a responsive theme. Searching through the code I think the only change I need to do is in class RollerVelocity[1], for those getTemplate() methods that take a deviceType parameter, to attempt to get the standard rendition type as a fallback if the mobile deviceType was requested and is not available. I'll test it. Until a Roller 5.1.1 is out, users should be able to duplicate renditions in their theme.xml, defining the standard one as also the mobile one. Couple of other concerns, in our MobileDeviceRepository class, our device listing[2] used as a backup to determine if mobile is necessary may be out-of-date, I think I can Google something more recent. Also, just to confirm, line #88 of that same file, checks the user agent deviceType parameter for standard or mobile to determine the type, but that parameter is not normally sent by a browser, correct? Regards, Glen [1] http://svn.apache.org/viewvc/roller/trunk/app/src/main/ java/org/apache/roller/weblogger/ui/rendering/ velocity/RollerVelocity.java?revision=1583506view=markup#l96 [2] http://svn.apache.org/viewvc/roller/trunk/app/src/main/ java/org/apache/roller/weblogger/ui/rendering/mobile/ MobileDeviceRepository.java?revision=1611764view=markup#l34