Saturday, 1 June 2013

Live Gadget Previews

The iGoogle Apparatus Agenda just got better. Users can now collaborate with a apparatus in the agenda afore abacus it to their page. Accept a attending at a brace examples like the Google News or Google Hot Trends gadgets. 

Your accessories can accept reside previews too. Accessories that use Agreeable view="default" already accept a reside examination in the apparatus directory. Remember, view="default" can bout any appearance accurate by the container. Similarly, if the Agreeable aspect in a apparatus doesn't specify the appearance attribute, that's advised the aforementioned as if view="default" were present. Up until now, the alone angle that were accurate on iGoogle were home and canvas; remember, home is the abate adaptation and canvas is the beyond version. 

Some accessories are customized to affectation abnormally for the home and canvas views. If your accessories do this, you can amend the apparatus XML blueprint to add a different appearance for the examination or reclaim an absolute agreeable element.
For accessories with an aspect
In this case you can just add preview, so you'll accept view="home,canvas,preview". 

For accessories with
Here too, you can reclaim the home appearance for the examination by alteration your blueprint to view="home,preview". 

There are some added restrictions on the way the examination works. A examination can't use OpenSocial calls - back the user hasn't set the OpenSocial permissions afore installing the gadget. You may wish to abode this in your apparatus by authoritative a appropriate examination adaptation that uses some copy data, or you can opt out of the reside examination and stick with a changeless screenshot. 

Like all apparatus views, the examination is cached. This reduces amount and speeds up confined for users. But if you're alive on your apparatus and don't see a contempo change in the preview, you can attenuate caching briefly by abacus the constant "nocache=1" to the url. 

Gadgets displayed as a examination aswell can't cross to added angle application requestNavigateTo(). If your apparatus has a hotlink that triggers alteration the appearance it will not plan in the preview.
If you feel a examination isn't the appropriate best for your apparatus again specify the added angle (home & canvas) and be abiding that your screenshot does a acceptable job of carrying what your apparatus will do for users. 

As always, appear to the iGoogle Developer Forum to allocution about reside apparatus previews with added iGoogle developers.

More new features for the Gadget Dashboard

Did you apperceive we are continuously abacus new appearance to the iGoogle Apparatus Dashboard? Today I'd like to let you apperceive about a few of them.

First of all, we added two new abstracts sets to the abstracts page of your gadgets. Now you can see automatic graphs in the 'Installations and Removal' tab, which shows the amount of apparatus installations and apparatus removals, and in the 'Browser Errors'  tab, area you can see errors afresh appear by our end users' browsers.

As you may accept guessed, abacus this advice fabricated the apparatus abstracts page too long, so we alien a collapsed appearance for that page.
(The collapsed view, assuming the new 'Installations and Removals' data)More new features for the Gadget Dashboard http://mikes-exercise-blog.blogspot.com/

(“Browser Errors” table showing the top errors reported by our users’ browsers)

Additionally, the dashboard had been only available in English, but we added 7 other langueges a while ago, so it is now available in 8 languages: English, Spanish, Japanese, Korean, Portuguese, Russian, Simplified Chinese and Traditional Chinese. The localized iGoogle developer documentation will lead you to the localized dashboard. For example, after you select Japanese at http://code.google.com/apis/igoogle/, you will arrive at http://code.google.com/intl/ja/apis/igoogle/, which has a link for the Japanese version of the dashboard. Alternatively, you can explicitly add the URL parameter “?hl=ja” to the dashboard URL.

Lastly, in the next few days, we will start sending you weekly summary e-mails of your gadget usage. If you don’t want to receive these summary e-mails, you can opt-out from this service by just clicking a link at the bottom of the e-mail. The e-mails look like the following.

Gadget name: Weather
Author email: googlemodules@google.com
Pageviews: 1,000,000 (+5.00% compared to the week of May 30, 2011)
Unique users: ...
Installations: ...
Removals: ...
Browser errors: ...

Gadget name: Youtube Gadget
Author email: …
Pageviews: …
Unique users: ...
Installations: ...
Removals: ...
Browser errors: ...
...

As you can see, iGoogle is still evolving! Happy coding. :)

Posted by Takashi Matsuo, Developer Advocate

Wednesday, 29 May 2013

iGoogle An update on

As we appear on the Official Google Blog, on November 1, 2013, we will be backward iGoogle. To ensure a bland alteration for your users, you may wish to amend your accessories and absolute users to your website or action the adeptness to consign user data. You may aswell accede ablution your appliance on one of our added platforms.

As allotment of this sunset, we will no best acquire new affair submissions afterwards July 31, 2012. Similarly, we will stop accepting new accessories afterwards July 31, 2012 - but you will be able to amend and advance absolute gadgets, as before.

Feel chargeless to ability out to us at the iGoogle Developer Forum if you accept any questions or charge assistance, and acknowledge you for acknowledging iGoogle over the years.

Monday, 3 May 2010

Variable Substitution and getMsg

Gadgets use messages, stored in messagebundles, for internationalization. The most common way to access the messages your gadget has is with variable substitution. For example, a message called north can be specified as

<msg name="north">Nord</msg>

and accessed by using __MSG_north__ your code. The copious underscores lead to the affectionate term “hangman variables” for this substitution notation. Before your code runs, the exact text __MSG_north__ is replaced everywhere with the appropriate value from the messagebundle. In this example it will be “Nord” (French for North, no quotes). This happens in the appropriate places in the XML of your gadget spec as well. So your enum values can be replaced before the controls are made that will show them and everything works as expected. But suppose you have some text in your code that uses a message, something like

dirbox.innerHTML = '__MSG_north__';

This will work fine as well because the substitution happens before the code runs. Now let’s take another message

<msg name="dinername">Chez Sophie</msg>
And some similar Javascript

dinersign.innerHTML = '__MSG_dinername__';

Everything works fine until we add the English translation

<msg name="dinername">Sophie's Place</msg>

And the code the gadget tries to run is

dinersign.innerHTML = 'Sophie's Place';

where of course the string ends early and the browser will correctly emit some odd error on seeing the first s after the apostrophe. This could be cited as an unterminated string literal, a missing semicolon or an illegal character (if you get a different character for your apostrophe).

The gadgets.Prefs.getMsg() function will correctly read the dinername as the string which it’s meant to be.

var init = function () {
var prefs = new gadgets.Prefs();
dinersign = document.getElementById("dinersign");
dinersign.innerHTML = prefs.getMsg("dinername");
};

gadgets.util.registerOnLoadHandler(init);

The getMsg function should help make more reliable, robust gadgets in many cases and it might help resolve some of those errors your users get using languages translations that you don’t use so often.