Vendor MindTouch
    Type Native
    Categories Rss, Search, Media, Widget, Graphs, Documents
    Requires MindTouch 1.8.2 or later
    OS Restriction None
    Status Stable
    License Free/Open Source
    SID (service id) sid://mindtouch.com/2007/06/google
    Assembly mindtouch.deki.services

    Install Extension
    URL of your MindTouch install (ex: http://www.mindtouch.com)
        

     

    Description

    This extension contains functions for embedding Google maps and widgets.

    See also How to add an extension, Using the Extension Dialog, Learn about DekiScript, Extensions Directory.

    Configuration

    Before the Google service can be used, it must be configured with a Google API key.  Sign up here.

    Config Key Description
    api-key Google API key

    Functions:

    1. google.calendar
    2. google.feed
    3. google.feedentries
    4. google.feeds
    5. google.findfeeds
    6. google.gadgetscript
    7. google.map
    8. google.search
    9. google.searchblogs
    10. google.searchnews
    11. google.searchvideos
    12. google.spreadsheet
    13. google.barchart
    14. google.linechart
    15. google.piechart

    google.calendar(uri : uri, startdate : str, enddate : str, width : num, height : num) : xml

    Embed Google Calendar.

    Parameters:

    Name Type Description
    uri uri Google calendar feed uri. Details on how to get the URI
    startdate str Optional.  Starting date (default: today)
    enddate str Optional.  Ending date (default: 7 days from today)
    width num Optional.  Calendar width (default: 800)
    height num Optional.  Calendar height (default: 800)

    Remarks:  Refer here for more information about Google Calendar.

    Samples:

      Output

    To embed a calendar using the defaults:

    {{ google.calendar("http://www.google.com/calendar/feeds/ht3jlfaac5lfd6263ulfh4tql8%40group.calendar.google.com/public/basic") }}
    ./GoogleCalendar1.JPG

    To embed a 400 by 400 calendar:

     {{ google.calendar("http://www.google.com/calendar/feeds/ht3jlfaac5lfd6263ulfh4tql8%40group.calendar.google.com/public/basic", _, _, 400, 400) }}
    ./GoogleCalendar2.JPG

     


    google.feed(feed : uri, max : num, label : str) : xml

    Embed a control to show an Atom/RSS feed.

    Parameters:

    Name Type Description
    feed uri Feed uri (Atom or RSS)
    max num Optional.  Max number of entries to return (default: 4)
    label str Optional.  Feed label (default: "")

    Samples:

      Output

    To embed the MindTouch feed using the defaults:

    {{ google.feed("http://feeds.feedburner.com/Mindtouch") }}
    ./GoogleFeed1.JPG

    To embed the 5 most recent stories from the MindTouch feed with a label:

    {{ google.feed("http://feeds.feedburner.com/Mindtouch", 5, "Mindtouch Feed") }}
    ./GoogleFeed2.JPG

     


    google.feedentries(feed : uri, max : num, publish : str, subscribe : str) : xml

    Publish entries of a RSS/Atom feed.

    Parameters:

    Name Type Description
    feed uri Optional.  Feed uri (Atom or RSS)
    max num Optional.  Max number of entries to read (default: 20)
    publish str Optional.  Publish on channel (default: "default")
    subscribe str Optional.  Subscribe to channel (default: nil)

    Publish Format:

    Name Type Description
    label str Title of the feed entry.
    uri str Feed entry link.
    html str Formatted feed entry text.
    text  str Feed entry summary.
    date str Feed entry date.
    name str Feed entry author.

    Subscribe Format:

    Name Type Description
    uri str Feed link.

    Samples:

      Output

    To display the Mindtouch feed in a table:

    {{ google.feedentries("http://feeds.feedburner.com/Mindtouch", _, "feeds") }}
    {{ dhtml.table([{ label: "Title", field: "label" }, { label: "Contents", field: "text" }], "feeds") }} 
    ./GoogleFeedEntry1.JPG

    To prompt for a feed URI and display the result in a table:

    {{ dhtml.inputbox{ publish: "inputbox1", length: 100, label: "Feed URI:  ", field: "uri" } }}
    {{ google.feedentries{ publish:  "feeds", subscribe:  "inputbox1" } }}
    {{ dhtml.table([{ label: "Title", field: "label" }, { label: "Contents", field: "text" }], "feeds") }} 


    ./GoogleFeedEntry2.JPG

     


    google.feeds(feeds : list, max : num, tabbed : bool, subscribe : str) : xml

    Embed a control to show Atom/RSS feeds.

    Parameters:

    Name Type Description
    feeds list Optional.  List of feed objects (Atom or RSS) ({ uri : uri, label: str })
    max num Optional.  max number of entries to return (default: 4)
    tabbed bool Optional.  Tabbed presentation (default: false)
    subscribe str Optional.  Subscribe to channel (default: nil)

    Subscribe Format:

    Name Type Description
    uri str Feed link.
    label str Feed label.

    Samples:

      Output

    To embed two feeds using the defaults:

    {{ google.feeds( [
        { uri: "http://feeds.feedburner.com/Mindtouch", label: "Mindtouch"}, 
        { uri: "http://wiki.opengarden.org/index.php?title=Special:Recentchanges&feed=rss", label: "OpenGarden"}
    ] ) }}
    ./GoogleFeeds1.JPG

    To prompt for a feed URI/label and display the result:

    {{ dhtml.form{ publish: "form1", length: 100, inputs: [ { label: "Feed URI:  ", value: "http://feeds.feedburner.com/Mindtouch", field: "uri", hidden: false }, { label: "Feed Label:  ", value: "Mindtouch", field: "label", hidden: false } ] } }} 
    {{ google.feeds{ tabbed: true, subscribe: "form1"} }} 

    ./GoogleFeedEntry2.JPG

     


    google.findfeeds(search : str, max : num, publish : str, subscribe : str) : xml

    Publish list of RSS/Atom feeds that match search terms.

    Parameters:

    Name Type Description
    search str Optional.  Search term (default: nil)
    max num Optional.  Max number of feeds to find (default: 4)
    publish str Optional.  Publish on channel (default: "default")
    subscribe str Optional.  Subscribe to channel (default: nil)

    Publish Format:

    Name Type Description
    uri str Feed link.
    label str Feed label.

    Subscribe Format:

    Name Type Description
    text str Search term.

    Samples:

      Output

    To prompt for a search term and display the resulting feeds:

    {{ dhtml.inputbox{ publish: "inputbox1", length: 100, field: "text", label: "Find feeds about:" } }} 
    {{ google.findfeeds{ publish: "feeds", subscribe: "inputbox1"} }} 
    {{ google.feeds{ subscribe: "feeds", tabbed: true} }} 

    ./GoogleFindFeeds1.JPG

     


    google.gadgetscript(script : str) : xml

    Embed Google Gadget Script.

    Parameters:

    Name Type Description
    script str Google Gadget script.

    Remarks:  

    To get started, go here, find a gadget you like, and customize its settings.  Once you are done, click on "Get the Code" and pass this result as a parameter to google.gadgetscript.

    Samples:

      Output

    To embed the Google Live Weather gadget:

    {{ google.gadgetscript('<script src="http://gmodules.com/ig/ifr?url=http://www.labpixies.com/campaigns/weather/weather.xml&amp;up_degree_unit_type=0&amp;up_city_code=none&amp;up_zip_code=none&amp;synd=open&amp;w=320&amp;h=240&amp;title=Live+Weather&amp;border=%23ffffff%7C1px%2C1px+solid+%2366ccff%7C1px%2C2px+solid+%2366ccff&amp;output=js"></script>') }}

    ./GoogleGadget1.JPG

    To embed the Google Microsoft Outlook gadget

    {{ google.gadgetscript('<script src="http://gmodules.com/ig/ifr?url=http://andyast.googlepages.com/MSOutlookWidget.xml&amp;up_DefaultView=Inbox&amp;synd=open&amp;w=800&amp;h=400&amp;title=Microsoft+Outlook&amp;border=%23ffffff%7C0px%2C1px+solid+%23004488%7C0px%2C1px+solid+%23005599%7C0px%2C1px+solid+%230077BB%7C0px%2C1px+solid+%230088CC&amp;output=js"></script>') }} 
    ./GoogleGadget2.JPG

     


    google.map(address : str, zoom : num, width : num, height : num, title : str, subscribe : str) : xml

    Embed Google Map with map marker.
     

    Parameters:

    Name Type Description
    address str Optional.  Street address (default: nil)
    zoom num Optional.  Map zoom level (1-17; default: 14)
    width num Optional.  Map width (default: 450)
    height num Optional.  Map height (default: 300)
    title str Optional.  Title for map marker (default: nil)
    subscribe str Optional.  Subscribe to channel (default: nil)

    Subscribe Formats:

    Name Type Description
    latitude str Latitude of address.
    longitude str Longitude of address.
    label str Map marker title.
    info str Map marker description.
    Name Type Description
    address str Street address.
    label str Map marker title.
    info str Map marker description.

     


    Samples:

      Output

    To embed a map using the defaults:

    {{ google.map("555 W. Beech St., San Diego, CA 92101") }}
    ./GoogleMap1.JPG

    To embed a 400 by 400 map with a custom description for the marker:

    {{ google.map("555 W. Beech St., San Diego, CA 92101", _, 400, 400, "MindTouch Offices") }}
    ./GoogleMap2.JPG

    To prompt for an address and display the result:

    {{ dhtml.inputbox{ publish: "inputbox1", length: 70, label: "Address: ", field: "address" } }}
    {{ google.map{ subscribe: "inputbox1", zoom: 10, width: 500, height: 500 } }}
    
    ./GoogleMap3.JPG

     


    google.search(search : str, options : map, tabbed : bool, publish : str, subscribe : str) : xml

    Embed Google search for web, images, videos, news, blogs, and books results.

    Parameters:

    Name Type Description
    search str Optional.  Search terms (default: nil)
    options map Optional.  Search options (default: { web: true, local: true, images: true, videos: true, news: true, blogs: true, books: true })
    tabbed bool Optional.  Tabbed presentation (default: false)
    publish str Optional.  Publish on channel (default: nil)
    subscribe str Optional.  Subscribe to channel (default: nil)

    Publish Format:

    Name Type Description
    label str Search result title.
    uri str Search result URI.
    latitude str Search result latitude.
    longitude str Search result longitude.
    address str Search result address.
    phone str Search result phone.
    text str Search result text.
    date str Search result date.

    Subscribe Format:

    Name Type Description
    text str Search terms.

    Samples:

      Output

    To embed a Google search using the defaults:

    {{ google.search() }}
    ./GoogleSearch1.JPG

    To embed a Google video and image search with tabbed presentation:

    {{ google.search{options: { images: true, videos: true }, tabbed: true} }}
    ./GoogleSearch2.JPG

     


    google.searchblogs(search : str, horizontal : bool, title : str, subscribe : str) : xml

    Embed Google Blog results.

    Parameters:

    Name Type Description
    search str Optional.  Search terms (default: nil)
    horizontal bool Optional.  Horizontal layout (default: false)
    title str Optional.  Search title (default: nil)
    subscribe str Optional.  Subscribe to channel (default: nil)

    Subscribe Format:

    Name Type Description
    text str Search terms.

    Samples:

      Output

    To prompt for search terms and embed the Google Blog search results:

    {{ dhtml.inputbox{ publish: "inputbox1", length: 70, label: "Search terms: ", field: "text" } }}
    {{ google.searchblogs{ subscribe: "inputbox1" } }}
    ./GoogleSearchBlogs1.JPG

     


    google.searchnews(search : str, horizontal : bool, title : str, subscribe : str) : xml

    Embed Google News results.

    Parameters:

    Name Type Description
    search str Optional.  Search terms (default: nil)
    horizontal bool Optional.  Horizontal layout (default: false)
    title str Optional.  Search title (default: nil)
    subscribe str Optional.  Subscribe to channel (default: nil)

    Subscribe Format:

    Name Type Description
    text str Search terms.

    Samples:

      Output

    To prompt for search terms and embed the Google News search results:

    {{ dhtml.inputbox{ publish: "inputbox1", length: 70, label: "Search terms: ", field: "text" } }}
    
    {{ google.searchnews{ subscribe: "inputbox1" } }}
    ./GoogleSearchNews1.JPG

     


    google.searchvideos(search : str, width : num, height : num, subscribe : str) : xml

    Embed Google Video results.

    Parameters:

    Name Type Description
    search str Optional.  Search terms (default: nil)
    width num Optional.  Video search width (default: 260)
    height num Optional.  Video search height (default: nil)
    subscribe str Optional.  Subscribe to channel (default: nil)

    Subscribe Format:

    Name Type Description
    text str Search terms.

    Samples:

      Output

    To embed a Google Video search using the defaults:

    {{ google.searchvideos() }}
    ./GoogleSearchVideos1.JPG

     


    google.spreadsheet(uri : uri, width : num, height : num) : xml

    Embed Google Spreadsheet.

    Parameters:

    Name Type Description
    uri uri Google spreadsheet uri.
    width num Optional.  Spreadsheet width (default: 800)
    height num Optional.  Spreadsheet height (default: 800)

    Remarks:  Refer here for more information about Google Spreadsheets.

    Samples:

      Output
    To embed a 850 by 600 Google Spreadsheet:
    {{ google.spreadsheet("http://spreadsheets.google.com/ccc?key=pbVievtsJlkQzdI7yjYs7SQ&hl=en", 850, 600) }}
    ./GoogleSpreadSheet1.JPG

     

     


    google.barchart(width : num, height : num, values : list, legends : list, colors : list, vertical : bool, stacked : bool, xaxis : list, yaxis : list) : xml

    Embed a Google Bar Chart 

    Parameters:

    Name Type Description
    width num chart width
    height num chart height
    values list chart values (e.g. [ 1, 2, 3 ])
    legends list Optional.  Chart legends (e.g. [ "first", "second", "third" ]; default: nil)
    colors list Optional.  Chart colors (e.g. [ "ff0000", "00ff00", "0000ff" ]; default: nil)
    vertical bool Optional.  Draw bars vertically (default: true)
    stacked bool Optional.  Draw bars stacked (default: false)
    xaxis list Optional.  Chart x-axis labels (e.g. [ "first", "second", "third" ]; default: [ 1, 2, 3, ... ])
    yaxis list Optional.  Chart y-axis labels (e.g. [ 0, 50, 100 ]; default: [ 0, max/2, max ])

     

    Samples:

      Output
    To embed a Google Bar Chart
    {{google.barchart(400,200,[[10,20,30,50,40],[40,50,30,20,10]],["fake","real"],["ff0000","0000ff"],true,false)}}
    http://www.mindtouch.com/blog/wp-content/uploads/2007/12/bar-chart2.png

     

     


    google.linechart(width : num, height : num, values : list, legends : list, colors : list, xaxis : list, yaxis : list) : xml

    Embed a Google Line Chart 

    Parameters:

    Name Type Description
    width num Chart width.
    height num Chart height
    values list chart values (e.g. [ 1, 2, 3 ])
    legends list Optional.  Chart legends (e.g. [ "first", "secong", "third" ]; default: nil)
    colors list Optional.  Chart colors (e.g. [ "ff0000", "00ff00", "0000ff" ]; default: nil)
    xaxis list Optional.  Chart x-axis labels (e.g. [ "first", "second", "third" ]; default: [ 1, 2, 3, ... ])
    yaxis list Optional.  Chart y-axis labels (e.g. [ 0, 50, 100 ]; default: [ 0, max/2, max ])

    Samples:

      Output
    To embed a Google Line Chart
    {{google.linechart(400,200,[[10,20,30,50,40],[40,50,30,20,10]],["fake","real"],["ff0000","0000ff"])}}
    
    

     


    http://www.mindtouch.com/blog/wp-content/uploads/2007/12/line-chart.png

    To embed a Google Line Chart with the values coming from MySQL

     {{google.linechart(400,200,[mysql.List("Select * from tags"), mysql.List("Select * from tags")],["fake","real"],["ff0000","0000ff"])}}
     line chart.png

     

     


    google.piechart(width : num, height : num, values : list, labels : list, colors : list, threed : bool) : xml

    Embed a Google Pie Chart 

    Parameters:

    Name Type Description
    width num Chart width
    height num Chart height
    values list chart values (e.g. [ 1, 2, 3 ])
    labels list Optional.  Chart labels (e.g. [ "first", "secong", "third" ]; default: nil)
    colors list Optional.  Chart colors (e.g. [ "ff0000", "00ff00", "0000ff" ]; default: nil)
    threed bool Optional.  Draw 3D chart (default: true)

    Samples:

      Output
    To embed a Google Pie Chart
    {{google.piechart(400,200,[10,20,30],[‘you’,‘him’,‘me’], _,true)}}
    
    

    http://www.mindtouch.com/blog/wp-content/uploads/2007/12/piechart-3d.png

     

    Files 20

    FileSizeDateAttached by 
     GoogleCalendar1.JPG
    No description
    37.37 kB21:26, 16 Oct 2007BrigetteKActions
     GoogleCalendar2.JPG
    No description
    20.03 kB22:11, 16 Oct 2007BrigetteKActions
     GoogleFeed1.JPG
    No description
    49.7 kB21:03, 16 Oct 2007BrigetteKActions
     GoogleFeed2.JPG
    No description
    65.65 kB21:09, 16 Oct 2007BrigetteKActions
     GoogleFeedEntry1.JPG
    No description
    111.02 kB22:57, 16 Oct 2007BrigetteKActions
    GoogleFeedEntry2.JPG
    No description
    62.73 kB01:20, 17 Oct 2007BrigetteKActions
     GoogleFeeds1.JPG
    No description
    94.42 kB23:57, 16 Oct 2007BrigetteKActions
     GoogleFindFeeds1.JPG
    No description
    63.87 kB00:58, 17 Oct 2007BrigetteKActions
     GoogleGadget1.JPG
    No description
    17.45 kB18:04, 17 Oct 2007BrigetteKActions
     GoogleGadget2.JPG
    No description
    26.4 kB18:22, 17 Oct 2007BrigetteKActions
    GoogleMap1.JPG
    No description
    39.15 kB19:23, 17 Oct 2007BrigetteKActions
    GoogleMap2.JPG
    No description
    41.56 kB19:23, 17 Oct 2007BrigetteKActions
    GoogleMap3.JPG
    No description
    78.85 kB19:16, 17 Oct 2007BrigetteKActions
     GoogleSearch1.JPG
    No description
    10.82 kB19:40, 17 Oct 2007BrigetteKActions
     GoogleSearch2.JPG
    No description
    44.68 kB19:48, 17 Oct 2007BrigetteKActions
     GoogleSearchBlogs1.JPG
    No description
    149.42 kB20:06, 17 Oct 2007BrigetteKActions
     GoogleSearchNews1.JPG
    No description
    51.25 kB20:09, 17 Oct 2007BrigetteKActions
     GoogleSearchVideos1.JPG
    No description
    26.13 kB20:15, 17 Oct 2007BrigetteKActions
     GoogleSpreadSheet1.JPG
    No description
    72.19 kB20:32, 17 Oct 2007BrigetteKActions
     line chart.png
    No description
    7.26 kB20:33, 13 Apr 2009coreygActions
    Viewing 13 of 13 comments: view all
    When I sign out of Google, my Wiki Google spreadsheet signs out too - and no one else can see it. Is that what is supposed to happen? Because if so it doesn't really function for a web community.
    Posted 15:44, 11 Jan 2008
    Nevermind: you need to "publish" it.
    Posted 16:27, 11 Jan 2008
    With google calendar it would be good to have the ability to select the "mode" parameter, this would permit selecting Agenda as a small object instead of a compressed calendar.
    Posted 10:40, 12 Mar 2008
    What is the format for the GCal startdate parameter
    dd/mm/yyyy ?
    yyyy-mm-dd ?
    Thanks
    Posted 15:51, 22 Mar 2008
    Is it possible to change the view mode from monthly to weekly ?
    Posted 15:52, 22 Mar 2008
    Hello, on the Pie chart, the code is not working, susbtitute the ' for "! Enjoy!
    Posted 19:15, 1 May 2008
    A couple of questions to anyone who might know. One, how do you select a default view other than monthly, as asked above. Two, how do I get google map with marker working propoerly. I'm using postcode SG14 3HD, which returns the right location on maps.google.com, but returns a significantly wrong location from the embedded map... Thanks in advance!
    Posted 17:26, 5 May 2008
    Hi,
    Regarding the google.calendarfonction, two improvements will be great :
    - Having the availability to merge more than one calendar
    - Handling the color parameter
    Thanks.

    Kind Regards. edited 13:21, 15 Oct 2008
    Posted 13:21, 15 Oct 2008
    regarding the search fucntion, the "local" search is done for SF, california by default. How can I change this? edited 19:18, 23 Mar 2009
    Posted 19:17, 23 Mar 2009
    when the value "0" (zero) is entered for one of the values for bar chart, the bars do not get displayed. Is it a bug? Hoewver, I switched the number 0 to "nil" and it worked!
    Posted 07:05, 17 Apr 2009
    FYI, the Google extensions won't work for use in private Intranets. This is from Google's Terms of Service Doc:
    9. License Requirements. Google's licenses above are subject to your adherence to the following requirements:
    9.1 Free, Public Accessibility to Your Maps API Implementation. Your Maps API Implementation must be generally accessible to users without charge. You may require users to log in to your Maps API Implementation if you do not require users to pay a fee. Unless you have entered into a separate written agreement with Google or obtained Google's written permission, your Maps API Implementation must not:
    (a) require a fee-based subscription or other fee-based restricted access; or
    (b) operate only behind a firewall or only on an internal network (except during the development and testing phase).
    Posted 15:34, 16 Jul 2009
    Google maps show only the San Diego map, doesnt matter which address I try to use!! Someone had
    this problem? or anyone knows how to fix it? Thank you....
    Posted 19:45, 23 Oct 2009
    We are a professional exporter and wholesaler of brand fashion products,[url=http://www.nfljerseystore.org/denver-broncos-jerseys-c-114.html]Denver Broncos Jerseys[/url]
    [url=http://www.nfljerseystore.org/detroit-lions-jerseys-c-115.html]Detroit Lions Jerseys[/url]
    [url=http://www.nfljerseystore.org/green-bay-packers-jerseys-c-116.html]Green Bay Packers Jerseys[/url]
    [url=http://www.nfljerseystore.org/houston-texans-jerseys-c-117.html]Houston Texans Jerseys[/url]
    [url=http://www.nfljerseystore.org/indianapolis-colts-jerseys-c-118.html]Indianapolis Colts Jerseys[/url],All products have good quality,fast and safe delivery without shipping fee. Our primary goal is to meet our clients’ requirement and establish mutually pleasant business relationships with you.If you are interested, please do not hesitate to contact us.
    Posted 08:24, 31 Aug 2010
    Viewing 13 of 13 comments: view all
    You must login to post a comment.
    Powered by MindTouch 2010
    Powered by MindTouch 2010