+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 17

Thread: Problem w/embedding Google Gadget Script

  1. #1

    Default Problem w/embedding Google Gadget Script

    Choose the google.gadgetscript extension. Fill in the required "script" field with:

    <script src="http://gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/googletalk.xml&amp;synd=open&amp;w=320&amp;h=451&a mp;title=__MSG_title__&amp;lang=en&amp;country=US& amp;border=%23ffffff%7C3px%2C1px+solid+%23999999&a mp;output=js"></script>

    (...though any script will do.)

    Looks like this after inserting:

    {{ google.gadgetscript{script: ""} }}


    Get this failure message:

    Function 'google.gadgetscript' failed with response:
    Google gadget must contained in a <script> tag

    Check html:
    <p><br />{{ google.gadgetscript{script: &quot;&quot;} }} </p>

    The gadget script has been stripped away.

    Am I doing something wrong here? How do I embed one of those 46,000 Google Gadget scripts?

    This is on 1.8.3. Same thing happens on opengarden's sandbox.

    Thanks,
    Adam

  2. #2
    Join Date
    Jul 2006
    Location
    San Diego, CA
    Posts
    5,450

    Default

    It should look like this:
    Code:
    {{ google.gadgetscript('
    <script src="http://gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/googletalk.xml&amp;synd=open&amp;w=320&amp;h=451&a mp;title=__MSG_title__&amp;lang=en&amp;country=US& amp;border=%23ffffff%7C3px%2C1px+solid+%23999999&a mp;output=js"></script>') }}
    Steve G. Bjorg - Chief Architect
    Did you check the MindTouch FAQ?
    Found a bug? Report it.
    Follow me on Twitter
    Find us on IRC: irc.freenode.net #mindtouch

  3. #3

    Default

    Thanks... but the problem is Deki seems to be stripping the script from the html.

    I just pasted your stuff in there...

    {{ google.gadgetscript('<script src="http://gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/googletalk.xml&amp;synd=open&amp;w=320&amp;h=451&a mp;title=__MSG_title__&amp;lang=en&amp;country=US& amp;border=%23ffffff%7C3px%2C1px+solid+%23999999&a mp;output=js"></script>') }}

    ...then toggled to WYSIWIG mode... and this is what it turned into:

    {{ google.gadgetscript('') }}

    Everything between the quotes is stripped out.

    Then I save it and get:

    Google gadget must contained in a <script> tag

  4. #4
    Join Date
    Feb 2007
    Location
    San Diego, CA
    Posts
    733

    Default

    Paste directly into the WYSIWIG view. If you paste into the HTML view, you need the following encoding:

    {{ google.gadgetscript('&lt;script src=&quot;http://gmodules.com/ig/ifr?url=http:...mp;h=451&amp;a mp;title=__MSG_title__&amp;lang=en&amp;country=US& amp; amp;border=%23ffffff%7C3px%2C1px+solid+%23999999&a mp;a mp;output=js&quot;&gt;&lt;/script&gt;') }}

  5. #5

    Default

    Sadly, that doesn't seem to make a difference.

    FWIW, the other Google extensions work fine. It's just this Google Gadget extension.

    I've inserted the google-supplied script via the wizard in both html & WYSIWIG modes. I've also pasted the complete code...

    {{ google.gadgetscript('<script src="http://gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/googletalk.xml&amp;synd=open&amp;w=320&amp;h=451&a mp;title=__MSG_title__&amp;lang=en&amp;country=US& amp;border=%23ffffff%7C3px%2C1px+solid+%23999999&a mp;output=js"></script>') }}

    ...in both modes. Everything between the (single) quotes gets stripped away.

    This can be reproduced on the sandbox.
    Last edited by adamcampb; 03-06-2008 at 06:11 PM.

  6. #6
    Join Date
    Jul 2006
    Location
    San Diego, CA
    Posts
    5,450

    Default

    Correct, the <script> tag has be passed in as string parameter to the google.gadgetscript function.
    Steve G. Bjorg - Chief Architect
    Did you check the MindTouch FAQ?
    Found a bug? Report it.
    Follow me on Twitter
    Find us on IRC: irc.freenode.net #mindtouch

  7. #7

    Default

    To be clear, when I insert Google's script via the extension insert tool in WYSIWIG view, the script is nowhere to be seen on the page. Just
    {{ google.gadgetscript('') }} .

  8. #8
    Join Date
    Feb 2007
    Location
    San Diego, CA
    Posts
    733

    Default

    I've filed a bug on the Extension Dialog issue here - thank you for reporting it to us!

    One thing might be throwing things off when you paste into the WYSIWIG editor are line breaks - I was seeing the "Google gadget must contained in a <script> tag" error until I removed them. I've got your gadgetscript running at http://wiki.opengarden.org/User:BrigetteK.

  9. #9

    Default

    Thanks!

    Can you please let me know if you come up with a workaround?

    [Ooops- just noticed your second paragraph. Okay, I'll see what happens with the line breaks.]

    -Adam

  10. #10

    Default

    Brigette-

    Which line breaks are you talking about?

    {{ google.gadgetscript('<script src="http://gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/googletalk.xml&amp;synd=open&amp;w=320&amp;h=451&a mp;title=__MSG_title__&amp;lang=en&amp;country=US& amp;border=%23ffffff%7C3px%2C1px+solid+%23999999&a mp;output=js"></script>') }}

    Anything in there?

    Or do you mean the <p>'s before the code?

    And are you saying those line breaks appear when you insert via the extension tool in WYSIWIG? Are the line breaks editable through the Deki interface - or are you talking about something I'd have to edit at the source?

    Thanks,
    Adam
    Last edited by adamcampb; 03-06-2008 at 06:56 PM.

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts