Google gadgets (4): defines the gadget attribute

Source: Internet
Author: User

In XML<Moduleprefs>The attributes in the tag specify the attributes of this gadget, such as the title, author, contact information, and so on. Let's take a look at the following example:

 1  <  Module  >  
2 < Moduleprefs Title = "Test with Gadget"
3 Title_url = "Http://biggates.cnblogs.com /"
4 Height = "200"
5 Author = "Biggates"
6 Author_email = "Abc@def.com" />
7 < Content >
8 Here is the content
9 </ Content >
10 </ Module >

These attributes cannot be changed by users.
The values of these attributes are listed below:
 

Attribute Description
title optional string that provides the title of the gadget. this title is displayed in the gadget title bar on igoogle. if this string contains user preference substitution variables and you are planning to submit your gadget to the content directory, you shoshould also provide a directory_title for directory display.
Directory_title Optional string that provides the title that shoshould be displayed for your gadget In the content directory. shocould contain only the literal text to be displayed, not user preference substitution variables. this is because the content directory displays a static view of your gadget, and therefore can't perform the necessary substitution to produce a reasonable title. for example, if your gadget's title is "Friends For _ up_name __", the directory is not able to perform the substitution to provide a reasonable value for "_ up_name __". so you might set yourDirectory_titleTo be simply "friends ".
Title_url Optional string that provides a URL that the gadget title links to. For example, you can link the title to a webpage related to the gadget.
Description Optional string that describes the gadget.
Author Optional string that lists the author of the gadget.
Author_email Optional string that provides the gadget author's email address. you can use any email system, but you shoshould not use a personal email address because of spam. one approach is to use an email address of the formHelensmith. Feedback + coolgadget@gmail.comIn your gadget spec.

Gmail drops everything after the plus sign (+), so this email address is interpretedHelensmith.feedback@gmail.com.

You can create a Gmail account here.

Author_affiliation Optional string such as "google" that indicates the author's affiliation. This attribute is required for gadgets that are encoded in the content directory.
Author_location The author's geographical location, such as "Mountain View, CA, USA ".
Screenshot Optional string that gives the URL of a gadget screenshot. This must be an image on a public web site that is not blockedRobots.txt. PNG is the preferred format, though GIF and jpg are also acceptable. gadget screenshots shocould be 280 pixels wide. the height of the screenshot shocould be the "natural" height of the gadget when it's in use. for more discussion of screenshot guidelines, see publishing to the content directory.
Thumbnail Optional string that gives the URL of a gadget thumbnail. This must be an image on a public web site that is not blockedRobots.txt. PNG is the preferred format, though GIF and jpg are also acceptable. Gadget thumbnails shoshould be 120x60 pixels. For more discussion of thumbnail guidelines, see publishing to the content directory.
Height Optional positive integer that specifies the height of the area in which the gadget runs. The default height is 200.
Width Optional positive integer that specifies the width of the area in which the gadget runs. This setting only applies to syndicated gadgets. The default width is 320.
Scaling Optional Boolean that specifies whether the aspect ratio (height-to-width ratio) of the gadget is maintained when the browser is resized. gadgets that can be automatically scale vertically shocould set this to true, but gadgets which have a fixed height shoshould set this to false. the default is true.
Scrolling Optional Boolean that provides vertical and/or horizontal scrollbars if the content exceeds the space provided. if false, then the content is clipped to the height and width provided (not that width is not allowed ). the default is false.
Singleton Optional Boolean that specifies whether users can add a gadget multiple times from a directory. the default is true, meaning that by default, gadgets can only be added once. directories can handle this attribute however they choose. for example, the content directory handlesSingleton = "true"By graying out and displaying the text "added" for gadgets that have already been added. Note that changes to this attribute may not be picked up by directories right away.

This attribute doesn't prevent users from adding gadgets multiple times through the developer gadget or add by URL. Consequently, you still need to write your gadget to support multiple instances.

Author_photo For the authors page, a URL to a photo (70x100 PNG format preferred, but JPG/GIF are also supported ).
Author_aboutme For the authors page, a statement about yourself (try to keep ~ 500 characters ).
Author_link For the authors page, a link to your website, blog, etc.
Author_quote For the authors page, a quote you 'd like to include (try to keep ~ 300 characters ).

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.