Patriks Blog zum testen
Slideshow
Mittwoch, 24. Mai 2017
Inhaltsverzeichnis
http://bloggerlatein.blogspot.com/2012/02/post-titel-in-einer-seite-bei-blogger.html
http://bloggerlatein.blogspot.com/2011/11/alle-post-titel-ohne-blog-archiv-bei.html
http://www.5202.de/2012/05/archiv-slider-via-json-feed.html
Mittwoch, 8. März 2017
Adding gadgets to your mobile-template
http://blogger-hints-and-tips.blogspot.de/2012/05/add-gadget-to-mobile-template-for-your.html
TUESDAY, MAY 1, 2012
Adding gadgets to your mobile-template makes your blog better for smartphone visitors
Labels: Article, Gadgets, Mobile, Template editing, ZZ - needs 2017 theme review
This article shows how to add gadgets to the mobile version of your blogger template.
If you have not enabled a mobile template for your blog, then visitors who look at it using a mobile device (smartphone, tablet etc) will see all your content and gadgets. But they will probably have to scroll left and right a lot, because your blog will be a lot wider than their screen. There might be some issues if you have gadgets that require javascript or particular media players, which their device doesn't have installed. But these are exactly the same as the issues for your visitors who are using desktop computers.
But if you have enabled a mobile template, then readers who are using a mobile device see a different design which is tailored to their screen-width, though still using the colour/theme that you chose.
Blogger faced some challenged when they built these mobile templates: many bloggers put a lot of effort into design and providing gadgets that. But a 300-ish pixel screen simply does not have room for a sidebar and blog content, and may not have space for some of the things that gadgets do, either.
What Blogger have done is to say that only some gadgets are normally shown on mobile-template versions of your blog:
However it's easy to add other gadgets to your own customized mobile template, and to set up gadgets that are only seen by readers using mobile-devices - provided you are willing to take the risks of editing your template.
(I've described how to remove the attribution gadget from mobile-templates before, because it's one that some people particularly hate - and of course the same approach can be used for the other standard gadgets too.)
Add the gadget to your blog, in the usual way: when you are choosing the parameters, make sure you think about the amount of screen-space that your mobile-readers will have to see it.
Find the gadget ID.
Edit your template: you don't need to expand the widgets.
Locate the gadget code, by searching for the ID you found (tip: use your brower's search function, eg ctrl/F). It will look something like this (slightly different, of course, if the gadget you are working on is of a different type):
To show the gadget only on the mobile template and not to desktop users, add mobile='only' to the code, like this:
Save the changes.
Use either a mobile device (ideally), or another tool that lets you test blogs as they would appear on different screen sizes, to check that the gadgets are showing as you think they should.
The only way I have found to get around the error is to remove the mobile='only' statement.
If you really want to have mobile-only gadgets, then you may need to:
Gadgets that I think could be more troublesome are slideshows, popular posts (if you try to show a thumbnail), newsreel, subscriptions, gadgets from Amazon.com and other 3rd parties.
You just need to remember amount of screen space which your visitors have, and how large the images are likely to be for them. And also that gadgets are likely to be shown as the bottom of the list-of-posts (which is how the blog-posts gadget shows the home page of your mobile blog), so won't be nearly so obvious as they are in the sidebar.
One reason is to provide a simpler alternative to a full-featured gadget that is shown on the non-mobile version of the blog. For example, I use a two-page google-custom-search option here on Blogger-Hints-and-tips. This lets me control what sites are searched, and use some advanced display features. But a mobile-sized screen won't cope with this. So if I wanted to make Blogger-HAT more mobile-friendly, I'd add a regular search-gadget, but only show it to on mobile-devices so that non-mobile visitors didn't get confused.
As far as I can see, Blogger users do not easily have any control over the positioning of gadgets in the mobile-template versions of our blogs.
Some experiments make me think that:
But there could be more going on here - please let me know if you've worked out any more rules that are applied.
Also, I have no idea how mobile templates will cope with tricks like gadgets that are put above your header: test your blog extra carefully if you've tweaked your template in this way before adding mobile-specific tweaks.
The default mobile gadgets are only shown if you have put them onto your blog template: if they are not in your blog at the moment, then they will not automatically be shown just because you enable a mobile template.
What other problems have you had with mobile-templates?
Gadgets and mobile templates
Previously I've described how to add a gadget to your blog.If you have not enabled a mobile template for your blog, then visitors who look at it using a mobile device (smartphone, tablet etc) will see all your content and gadgets. But they will probably have to scroll left and right a lot, because your blog will be a lot wider than their screen. There might be some issues if you have gadgets that require javascript or particular media players, which their device doesn't have installed. But these are exactly the same as the issues for your visitors who are using desktop computers.
But if you have enabled a mobile template, then readers who are using a mobile device see a different design which is tailored to their screen-width, though still using the colour/theme that you chose.
Blogger faced some challenged when they built these mobile templates: many bloggers put a lot of effort into design and providing gadgets that. But a 300-ish pixel screen simply does not have room for a sidebar and blog content, and may not have space for some of the things that gadgets do, either.
What Blogger have done is to say that only some gadgets are normally shown on mobile-template versions of your blog:
- Header
- Blog Posts
- Profile
- Pages
- AdSense
- Attribution
However it's easy to add other gadgets to your own customized mobile template, and to set up gadgets that are only seen by readers using mobile-devices - provided you are willing to take the risks of editing your template.
(I've described how to remove the attribution gadget from mobile-templates before, because it's one that some people particularly hate - and of course the same approach can be used for the other standard gadgets too.)
How to add a gadget to the mobile template
First, check that mobile has been enabled for your blog, and that your mobile template is set up to show customizations: go to the Template tab, click on the gear-wheel under mobile, tick Yes (for show mobile template), then select Custom, and press the Save button.Add the gadget to your blog, in the usual way: when you are choosing the parameters, make sure you think about the amount of screen-space that your mobile-readers will have to see it.
Find the gadget ID.
Edit your template: you don't need to expand the widgets.
Locate the gadget code, by searching for the ID you found (tip: use your brower's search function, eg ctrl/F). It will look something like this (slightly different, of course, if the gadget you are working on is of a different type):
<b:widget id='PlusBadge1' locked='false' title='Google+ Badge' type='PlusBadge'/>To show the gadget on the mobile version of your blog, add mobile='yes' to the code, like this:
<b:widget id='PlusBadge1' locked='false' mobile='yes' title='Google+ Badge' type='PlusBadge'/>
To show the gadget only on the mobile template and not to desktop users, add mobile='only' to the code, like this:
<b:widget id='PlusBadge1' locked='false' mobile='only' title='Google+ Badge' type='PlusBadge'/>
Save the changes.
Use either a mobile device (ideally), or another tool that lets you test blogs as they would appear on different screen sizes, to check that the gadgets are showing as you think they should.
Update:
Since first writing this post, I have found out that due to a bug in Blogger, if you have a gadget with mobile='only' set, then when you try to make changes to the blog using the Dashboard > Layout editor:- They will not save, and
- If you try to preview, you get an error message:
The template is updated in other place. Please reload the original page and retry it again.
Error 500
The only way I have found to get around the error is to remove the mobile='only' statement.
If you really want to have mobile-only gadgets, then you may need to:
- Remove the mobile='only' statement
- Make the Layout editor changes
- Replace the mobile='only' statement.
What gadgets should you add to your mobile template?
There are no hard-and-fast rules here: it's all about what you want your mobile visitors to be able to access. I have seen people add blog-rolls, linked-lists, polls, profiles, and various other simple widgets.Gadgets that I think could be more troublesome are slideshows, popular posts (if you try to show a thumbnail), newsreel, subscriptions, gadgets from Amazon.com and other 3rd parties.
You just need to remember amount of screen space which your visitors have, and how large the images are likely to be for them. And also that gadgets are likely to be shown as the bottom of the list-of-posts (which is how the blog-posts gadget shows the home page of your mobile blog), so won't be nearly so obvious as they are in the sidebar.
Why put gadgets only in the mobile blog?
You may wonder why a gadget should only go on the mobile version.One reason is to provide a simpler alternative to a full-featured gadget that is shown on the non-mobile version of the blog. For example, I use a two-page google-custom-search option here on Blogger-Hints-and-tips. This lets me control what sites are searched, and use some advanced display features. But a mobile-sized screen won't cope with this. So if I wanted to make Blogger-HAT more mobile-friendly, I'd add a regular search-gadget, but only show it to on mobile-devices so that non-mobile visitors didn't get confused.
Positioning gadgets on the mobile template
![Tatami layout 1](https://upload.wikimedia.org/wikipedia/commons/thumb/9/91/Tatami_layout_1.svg/128px-Tatami_layout_1.svg.png)
Some experiments make me think that:
- Gadgets from the header in the regular layout are put above the list of posts in the mobile view
- Gadgets from the footer in the regular layout are put below the list of posts in the mobile view
- Gadgets from the sidebar in the regular layout are put below the list of posts in the mobile view
But there could be more going on here - please let me know if you've worked out any more rules that are applied.
Also, I have no idea how mobile templates will cope with tricks like gadgets that are put above your header: test your blog extra carefully if you've tweaked your template in this way before adding mobile-specific tweaks.
Troubleshooting
Stopping gadgets from showing on mobile-template blogs (ie adding mobile='no') does not require you to choose the Custom option from the list of mobile template. But adding them (except for the ones in the default list) does.The default mobile gadgets are only shown if you have put them onto your blog template: if they are not in your blog at the moment, then they will not automatically be shown just because you enable a mobile template.
What other problems have you had with mobile-templates?
Dienstag, 7. März 2017
Montag, 6. März 2017
Freitag, 3. März 2017
Abonnieren
Posts (Atom)