Search This Site

Custom Search

Thursday, September 9, 2010

[bloggerDev] A Bug with the Gadget API.

I have been playing around with Blogger Gadgets for a couple of weeks
and ran into a bug which makes Gadget Creation more difficult.The
Gadget API generates an iFrame URL which contains all the gadget
options (parameter name and value), the url of the container, the url
of the gadget xml file, the skin properties and many other stuff which
makes it a pretty big url. IE wont render iframes which have too
lengthy urls. If the length of the url is too long, it will be
rendered as a Google Error Page saying that the request uri is too
large. In order to make the url smaller, i have converted most of the
user options to enum(so that the parameter is passed as a small
integer) and also used single characters as the gadget option
parameters in my gadget to reduce the length of the url.

I had made this gadget
http://www.blogger.com/add-gadget?url=http://bloggerplugins.org/scripts/recent_posts_with_thumbnails_and_more_from_www.bloggerplugins.org.xml
and it has the same problem. This was made long back and i didn't know
of this problem at that time. If f i had known of this i would have
uploaded the gadget at some small url like http://bloggerplugins.org/1.xml
It would have saved 70+ characters.

I hope that you some one will look into the problem with the API. The
iframe URL can be made much shorter if some unwanted parameters are
not added onto the iframe url.
skin['FACE_SIZE'] = '32';
skin['HEIGHT'] = "200";
skin['TITLE'] = "Share it";
skin['BORDER_COLOR'] = "transparent";
skin['ENDCAP_BG_COLOR'] = "transparent";
skin['ENDCAP_TEXT_COLOR'] = "#000000";
skin['ENDCAP_LINK_COLOR'] = "#660000";
skin['ALTERNATE_BG_COLOR'] = "transparent";

skin['CONTENT_BG_COLOR'] = "transparent";
skin['CONTENT_LINK_COLOR'] = "#660000";
skin['CONTENT_TEXT_COLOR'] = "#000000";
skin['CONTENT_SECONDARY_LINK_COLOR'] = "#660000";
skin['CONTENT_SECONDARY_TEXT_COLOR'] = "#660000";
skin['CONTENT_HEADLINE_COLOR'] = "#660000";
skin['FONT_FACE'] = "normal normal 100% Trebuchet, Trebuchet MS,
Arial, sans-serif";
These are a set of Sample parameters that the API adds on to the
Iframe URL . Out of these only CONTENT_LINK_COLOR , CONTENT_BG_COLOR ,
and CONTENT_TEXT_COLOR are important for most Gadget Developers.With
all these options , the generated url will be nearly 2k characters
long. If you want to test the condition, try inputting some really
long text into some text fields of any gadget developed using the
Gadget API.

--
You received this message because you are subscribed to the Google Groups "Blogger Developer Group" group.
To post to this group, send email to bloggerdev@googlegroups.com.
To unsubscribe from this group, send email to bloggerdev+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/bloggerdev?hl=en.

No comments:

Post a Comment