Search This Site

Custom Search

Monday, September 13, 2010

[bloggerDev] Re: A Bug with the Gadget API.

This same problem hindered development of my Blogger Gadget, too (<a
href="http://aratina.blogspot.com/p/last-comments.html">Last Comments</
a>). I got around it in much the same way, by using strings (a painful
experience since strings trigger Internet Explorer's XSS filter when
filled in with default values) rather than lists and checkboxes, which
would have been preferrable and more user friendly. The skin parameter
names themselves are ridiculously oversized, and what's more, most of
them are simply wasting space (others that would be handy to have are
not even passed through, such as the visited link color).

However, I was under the impression that the extremely long skin
parameter passing was due to the requirement that we include
opensocial-07 or 08 if we want to utilize skins. That problem is
currently listed as a bug on the UI Best Practices page for Blogger
Gadgets ( http://code.google.com/apis/blogger/docs/gadgets/gadgets_for_blogger.html#BestUIPractices
) with a note that Google is working on a solution. I look forward to
the day it is corrected!

On Sep 9, 10:56 am, Aneesh <ane...@bloggerplugins.org> wrote:
> 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 gadgethttp://www.blogger.com/add-gadget?url=http://bloggerplugins.org/scrip...
> 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 likehttp://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