You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by Arun Kumar <ar...@gmail.com> on 2008/02/01 07:05:31 UTC

settitle and dynamic-height features are not working

I have latest code of Gadgets server and container also.
But in my system, settitle and dynamic-height features are not working.

What will be the problem?

Re: settitle and dynamic-height features are not working

Posted by Kevin Brown <et...@google.com>.
Currently we just source in ifpc_relay.html along with everything else in
the javascript/ directory. You could always use a custom build file (pom.xml)
to place this file at a different location in the resource heirarchy. I'd
suggest reading the maven documentation for details on how to achieve
something like this. Alternatively, you could just manually move the file to
wherever you want it to be within the javascript/ directory and it will work
automatically.

On Feb 1, 2008 1:30 AM, Arun Kumar <ar...@gmail.com> wrote:

> Kevin, How to change the path of ifpc_relay.html path in gadgets.js file
> or
> some where? I want to keep it in a seperate directory?
>
> On Feb 1, 2008 2:58 PM, Arun Kumar <ar...@gmail.com>
> wrote:
>
> > Kevin, Thank you very much. It is working now.
>

Re: settitle and dynamic-height features are not working

Posted by Akash Xavier <ak...@gmail.com>.
Arun,

http://code.google.com/apis/gadgets/docs/spec.html
This links you to the page where details about how a gadget container are
discussed. Its just a language independent overview.


On Feb 1, 2008 2:33 AM, Akash Xavier <ak...@gmail.com> wrote:

> Kevin,
> how do I pass my data to the gadget? I do make data available to the
> gadget when the makeRequest() is called?
> I have no ideas of the methods. Can you list a few?
>
>
> --
> Akash Manohar
> akashmanohar@gmail.com
>



-- 
Akash Manohar
akashmanohar@gmail.com

Re: settitle and dynamic-height features are not working

Posted by Arun Kumar <ar...@gmail.com>.
Any one identified the problem at page
http://tech-test.tutorialsforu.com/iGoogle/sample6.html

Re: settitle and dynamic-height features are not working

Posted by Zhen Wang <wa...@google.com>.
If you have to use an alternative prefix for the IFrames, you'll need
to update the following line in gadgets.js:
gadgets.IfrGadget.prototype.GADGET_IFRAME_PREFIX_ = 'remote_module_';

On Feb 1, 2008 10:10 PM, Arun Kumar <ar...@gmail.com> wrote:
> Yes, in the default configuration, dynamic-height is working.
>
> But I've made some changes to the code as per my requirements. Please try to
> identify the problem.
>
>
> On Feb 1, 2008 11:52 PM, Cassie <do...@google.com> wrote:
>
> > Arun - I was able to get the samples to work on my local box. Try
> > following
> > these instructions:
> >
> > 1. cd <root of your svn client on your local machine>
> > 2. svn update
> > 3. cd java/gadgets
> > 4. mvn jetty:run-war
> > 5. hit the url: http://localhost:8080/gadgets/container/sample6.html
> >
> > In your setup with this url:
> > http://tech-test.tutorialsforu.com/iGoogle/sample6.html
> > There must be something messed up with the locations of the ifpc
> > components.
> > I can't seem to find the problem off hand but lets first make sure you can
> > get the default configuration going.
> >
> > This sample actually works for me:
> > http://tech-test.tutorialsforu.com/iGoogle/sample7.html<
> > http://tech-test.tutorialsforu.com/iGoogle/sample6.html>
> > The css is mangled but it does indeed change the title of the gadget
> > window.
> >
> > Let us know how those steps go for you.
> >
> > - Cassie
> >
> > On Fri, Feb 1, 2008 at 6:22 AM, Arun Kumar <
> > arunkumar.boppudi.514@gmail.com>
> > wrote:
> >
> > > Kevin,
> > >
> > > I have modified that shindig code. Gadgets are working fine. But that
> > > dynamic-height and settitle are not working properly. Please let me know
> > > why
> > > I got this problem.
> > >
> > > URL is: http://tech-test.tutorialsforu.com/iGoogle/sample6.html
> > > & http://tech-test.tutorialsforu.com/iGoogle/sample7.html
> > >
> >
>

Re: settitle and dynamic-height features are not working

Posted by Arun Kumar <ar...@gmail.com>.
Yes, in the default configuration, dynamic-height is working.

But I've made some changes to the code as per my requirements. Please try to
identify the problem.

On Feb 1, 2008 11:52 PM, Cassie <do...@google.com> wrote:

> Arun - I was able to get the samples to work on my local box. Try
> following
> these instructions:
>
> 1. cd <root of your svn client on your local machine>
> 2. svn update
> 3. cd java/gadgets
> 4. mvn jetty:run-war
> 5. hit the url: http://localhost:8080/gadgets/container/sample6.html
>
> In your setup with this url:
> http://tech-test.tutorialsforu.com/iGoogle/sample6.html
> There must be something messed up with the locations of the ifpc
> components.
> I can't seem to find the problem off hand but lets first make sure you can
> get the default configuration going.
>
> This sample actually works for me:
> http://tech-test.tutorialsforu.com/iGoogle/sample7.html<
> http://tech-test.tutorialsforu.com/iGoogle/sample6.html>
> The css is mangled but it does indeed change the title of the gadget
> window.
>
> Let us know how those steps go for you.
>
> - Cassie
>
> On Fri, Feb 1, 2008 at 6:22 AM, Arun Kumar <
> arunkumar.boppudi.514@gmail.com>
> wrote:
>
> > Kevin,
> >
> > I have modified that shindig code. Gadgets are working fine. But that
> > dynamic-height and settitle are not working properly. Please let me know
> > why
> > I got this problem.
> >
> > URL is: http://tech-test.tutorialsforu.com/iGoogle/sample6.html
> > & http://tech-test.tutorialsforu.com/iGoogle/sample7.html
> >
>

Re: settitle and dynamic-height features are not working

Posted by Cassie <do...@google.com>.
Arun - I was able to get the samples to work on my local box. Try following
these instructions:

1. cd <root of your svn client on your local machine>
2. svn update
3. cd java/gadgets
4. mvn jetty:run-war
5. hit the url: http://localhost:8080/gadgets/container/sample6.html

In your setup with this url:
http://tech-test.tutorialsforu.com/iGoogle/sample6.html
There must be something messed up with the locations of the ifpc components.
I can't seem to find the problem off hand but lets first make sure you can
get the default configuration going.

This sample actually works for me:
http://tech-test.tutorialsforu.com/iGoogle/sample7.html<http://tech-test.tutorialsforu.com/iGoogle/sample6.html>
The css is mangled but it does indeed change the title of the gadget window.

Let us know how those steps go for you.

- Cassie

On Fri, Feb 1, 2008 at 6:22 AM, Arun Kumar <ar...@gmail.com>
wrote:

> Kevin,
>
> I have modified that shindig code. Gadgets are working fine. But that
> dynamic-height and settitle are not working properly. Please let me know
> why
> I got this problem.
>
> URL is: http://tech-test.tutorialsforu.com/iGoogle/sample6.html
> & http://tech-test.tutorialsforu.com/iGoogle/sample7.html
>

Re: settitle and dynamic-height features are not working

Posted by Arun Kumar <ar...@gmail.com>.
Kevin,

I have modified that shindig code. Gadgets are working fine. But that
dynamic-height and settitle are not working properly. Please let me know why
I got this problem.

URL is: http://tech-test.tutorialsforu.com/iGoogle/sample6.html
& http://tech-test.tutorialsforu.com/iGoogle/sample7.html

Re: settitle and dynamic-height features are not working

Posted by Reinoud Elhorst <cl...@claude.nl>.
To add my 2 cents:

- As my description [1] indicates, setting up the gadget server in anything
else then Java is a lot of work at the moment. You'd have to port the
entire java code to PHP, on the way solving alot of php specific
issues. I would not recommend doing it until the Java Shindig server
is "stable" (and you'll have a reference to program against).
- The container in my
description is PHP. I believe that the container and the gadget server
need not be in the same language. At Hyves we'll probably go live with
the container in PHP and Shindig in Java
- I would suggest you to read, and follow the guide. I think it'll answer
most of the questions you have.
- To allow the container and gadget server to be language-independent from
each other, I think the GadgetSigner implementation should be part of the
Shindig specification (or Shindig Best Practices; not of the OpenSocial
specification though). That would allow third parties to create
GadgetSigners in all sorts of languages, that are compatible with
(Java-)Shindig. Obviously, there is some need to share a secret, or share
the link to a public key securly, between Container and Shindig Server. I'd
like to see this specification sooner rather than later.

[1] http://trac.hyves-api.nl/hyves-api/wiki/ShindigStarted

On 2/1/08, Akash Xavier <ak...@gmail.com> wrote:
>
> Kevin,
>
> I read Reinoud's blog entry. But it was about setting up a container in
> java.
>
> On Feb 1, 2008 4:03 AM, Akash Xavier <ak...@gmail.com> wrote:
>
> > Kevin,
> >
> > This is what I am doing currently...
> > I have all the javascript files of opensocial in a directory called
> > 'osocial'. (only the javascript files of opensocial). And then I call
> them
> > after parsing and rendering the data. Thats what is my mindwork.
> >
> > Now whats that 'feature'? I have seen the features directory in Shindig
> > svn.
> >
> > Ok Forget all this stuff we spoke about.
> > Is there any doc that explains the method to create a container.... (a
> > little specific to php)?
> >
> >
> > On Feb 1, 2008 3:47 AM, Kevin Brown <et...@google.com> wrote:
> >
> > > When you write your opensocial-0.[6|7] feature.
> > >
> > > On Feb 1, 2008 3:43 AM, Akash Xavier <ak...@gmail.com> wrote:
> > >
> > > > Kevin,
> > > > That is what I am not able to understand. My question was how to
> make
> > > my
> > > > site's data (like user's friends and activity) available to the
> > > gadget.
> > > > And
> > > > ur answer was this.
> > > >
> > > > *"What do you mean by "pass my data"? What data are you referring
> to?
> > > Most
> > > > data about your container should be "passed" by implementing the
> open
> > > > social
> > > > API according to your site's needs. You can get this data either by
> > > using
> > > > interframe communication (i.e. the "ifpc" feature), or by talking to
> > > some
> > > > back end with a security token. The security token scaffolding is
> > > mostly
> > > > in
> > > > place now, but you'd still have to implement the back end and pass
> the
> > > > token
> > > > your self."*
> > > >
> > > > I can sense that this is what I want.  Can u explain this in simple
> > > words.
> > > > I
> > > > know about ifpc (interframe procedure call). In the second option u
> > > say
> > > > that
> > > > communication should be done with the backend with a security token.
> > > Can u
> > > > please explain that part in simple words? I didn't understand that.
> I
> > > know
> > > > this now... that a security token is issued to the gadget everytime
> > > the
> > > > gadget is rendered. Now what do I have to do to implement the
> > > > communication
> > > > between my database and the opensocial gadget? I mean... my actual
> > > > question
> > > > is this. Where do I tell the container or the gadget, that my
> backend
> > > can
> > > > be
> > > > contacted like this?
> > > >
> > > > On Feb 1, 2008 3:34 AM, Kevin Brown <et...@google.com> wrote:
> > > >
> > > > > On Feb 1, 2008 2:33 AM, Akash Xavier <ak...@gmail.com>
> wrote:
> > > > >
> > > > > > Kevin,
> > > > > > how do I pass my data to the gadget? I do make data available to
> > > the
> > > > > > gadget
> > > > > > when the makeRequest() is called?
> > > > > >
> > > > >
> > > > > What do you mean by "pass my data"? What data are you referring
> to?
> > > Most
> > > > > data about your container should be "passed" by implementing the
> > > open
> > > > > social
> > > > > API according to your site's needs. You can get this data either
> by
> > > > using
> > > > > interframe communication (i.e. the "ifpc" feature), or by talking
> to
> > > > some
> > > > > back end with a security token. The security token scaffolding is
> > > mostly
> > > > > in
> > > > > place now, but you'd still have to implement the back end and pass
> > > the
> > > > > token
> > > > > your self.
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Akash Manohar
> > > > akashmanohar@gmail.com
> > > >
> > >
> >
> >
> >
> > --
> >
> > Akash Manohar
> > akashmanohar@gmail.com
> >
>
>
>
> --
> Akash Manohar
> akashmanohar@gmail.com
>

Re: settitle and dynamic-height features are not working

Posted by Akash Xavier <ak...@gmail.com>.
Kevin,

I read Reinoud's blog entry. But it was about setting up a container in
java.

On Feb 1, 2008 4:03 AM, Akash Xavier <ak...@gmail.com> wrote:

> Kevin,
>
> This is what I am doing currently...
> I have all the javascript files of opensocial in a directory called
> 'osocial'. (only the javascript files of opensocial). And then I call them
> after parsing and rendering the data. Thats what is my mindwork.
>
> Now whats that 'feature'? I have seen the features directory in Shindig
> svn.
>
> Ok Forget all this stuff we spoke about.
> Is there any doc that explains the method to create a container.... (a
> little specific to php)?
>
>
> On Feb 1, 2008 3:47 AM, Kevin Brown <et...@google.com> wrote:
>
> > When you write your opensocial-0.[6|7] feature.
> >
> > On Feb 1, 2008 3:43 AM, Akash Xavier <ak...@gmail.com> wrote:
> >
> > > Kevin,
> > > That is what I am not able to understand. My question was how to make
> > my
> > > site's data (like user's friends and activity) available to the
> > gadget.
> > > And
> > > ur answer was this.
> > >
> > > *"What do you mean by "pass my data"? What data are you referring to?
> > Most
> > > data about your container should be "passed" by implementing the open
> > > social
> > > API according to your site's needs. You can get this data either by
> > using
> > > interframe communication (i.e. the "ifpc" feature), or by talking to
> > some
> > > back end with a security token. The security token scaffolding is
> > mostly
> > > in
> > > place now, but you'd still have to implement the back end and pass the
> > > token
> > > your self."*
> > >
> > > I can sense that this is what I want.  Can u explain this in simple
> > words.
> > > I
> > > know about ifpc (interframe procedure call). In the second option u
> > say
> > > that
> > > communication should be done with the backend with a security token.
> > Can u
> > > please explain that part in simple words? I didn't understand that. I
> > know
> > > this now... that a security token is issued to the gadget everytime
> > the
> > > gadget is rendered. Now what do I have to do to implement the
> > > communication
> > > between my database and the opensocial gadget? I mean... my actual
> > > question
> > > is this. Where do I tell the container or the gadget, that my backend
> > can
> > > be
> > > contacted like this?
> > >
> > > On Feb 1, 2008 3:34 AM, Kevin Brown <et...@google.com> wrote:
> > >
> > > > On Feb 1, 2008 2:33 AM, Akash Xavier <ak...@gmail.com> wrote:
> > > >
> > > > > Kevin,
> > > > > how do I pass my data to the gadget? I do make data available to
> > the
> > > > > gadget
> > > > > when the makeRequest() is called?
> > > > >
> > > >
> > > > What do you mean by "pass my data"? What data are you referring to?
> > Most
> > > > data about your container should be "passed" by implementing the
> > open
> > > > social
> > > > API according to your site's needs. You can get this data either by
> > > using
> > > > interframe communication (i.e. the "ifpc" feature), or by talking to
> > > some
> > > > back end with a security token. The security token scaffolding is
> > mostly
> > > > in
> > > > place now, but you'd still have to implement the back end and pass
> > the
> > > > token
> > > > your self.
> > > >
> > >
> > >
> > >
> > > --
> > > Akash Manohar
> > > akashmanohar@gmail.com
> > >
> >
>
>
>
> --
>
> Akash Manohar
> akashmanohar@gmail.com
>



-- 
Akash Manohar
akashmanohar@gmail.com

Re: settitle and dynamic-height features are not working

Posted by Akash Xavier <ak...@gmail.com>.
Kevin,

This is what I am doing currently...
I have all the javascript files of opensocial in a directory called
'osocial'. (only the javascript files of opensocial). And then I call them
after parsing and rendering the data. Thats what is my mindwork.

Now whats that 'feature'? I have seen the features directory in Shindig svn.

Ok Forget all this stuff we spoke about.
Is there any doc that explains the method to create a container.... (a
little specific to php)?

On Feb 1, 2008 3:47 AM, Kevin Brown <et...@google.com> wrote:

> When you write your opensocial-0.[6|7] feature.
>
> On Feb 1, 2008 3:43 AM, Akash Xavier <ak...@gmail.com> wrote:
>
> > Kevin,
> > That is what I am not able to understand. My question was how to make my
> > site's data (like user's friends and activity) available to the gadget.
> > And
> > ur answer was this.
> >
> > *"What do you mean by "pass my data"? What data are you referring to?
> Most
> > data about your container should be "passed" by implementing the open
> > social
> > API according to your site's needs. You can get this data either by
> using
> > interframe communication (i.e. the "ifpc" feature), or by talking to
> some
> > back end with a security token. The security token scaffolding is mostly
> > in
> > place now, but you'd still have to implement the back end and pass the
> > token
> > your self."*
> >
> > I can sense that this is what I want.  Can u explain this in simple
> words.
> > I
> > know about ifpc (interframe procedure call). In the second option u say
> > that
> > communication should be done with the backend with a security token. Can
> u
> > please explain that part in simple words? I didn't understand that. I
> know
> > this now... that a security token is issued to the gadget everytime the
> > gadget is rendered. Now what do I have to do to implement the
> > communication
> > between my database and the opensocial gadget? I mean... my actual
> > question
> > is this. Where do I tell the container or the gadget, that my backend
> can
> > be
> > contacted like this?
> >
> > On Feb 1, 2008 3:34 AM, Kevin Brown <et...@google.com> wrote:
> >
> > > On Feb 1, 2008 2:33 AM, Akash Xavier <ak...@gmail.com> wrote:
> > >
> > > > Kevin,
> > > > how do I pass my data to the gadget? I do make data available to the
> > > > gadget
> > > > when the makeRequest() is called?
> > > >
> > >
> > > What do you mean by "pass my data"? What data are you referring to?
> Most
> > > data about your container should be "passed" by implementing the open
> > > social
> > > API according to your site's needs. You can get this data either by
> > using
> > > interframe communication (i.e. the "ifpc" feature), or by talking to
> > some
> > > back end with a security token. The security token scaffolding is
> mostly
> > > in
> > > place now, but you'd still have to implement the back end and pass the
> > > token
> > > your self.
> > >
> >
> >
> >
> > --
> > Akash Manohar
> > akashmanohar@gmail.com
> >
>



-- 
Akash Manohar
akashmanohar@gmail.com

Re: settitle and dynamic-height features are not working

Posted by Kevin Brown <et...@google.com>.
When you write your opensocial-0.[6|7] feature.

On Feb 1, 2008 3:43 AM, Akash Xavier <ak...@gmail.com> wrote:

> Kevin,
> That is what I am not able to understand. My question was how to make my
> site's data (like user's friends and activity) available to the gadget.
> And
> ur answer was this.
>
> *"What do you mean by "pass my data"? What data are you referring to? Most
> data about your container should be "passed" by implementing the open
> social
> API according to your site's needs. You can get this data either by using
> interframe communication (i.e. the "ifpc" feature), or by talking to some
> back end with a security token. The security token scaffolding is mostly
> in
> place now, but you'd still have to implement the back end and pass the
> token
> your self."*
>
> I can sense that this is what I want.  Can u explain this in simple words.
> I
> know about ifpc (interframe procedure call). In the second option u say
> that
> communication should be done with the backend with a security token. Can u
> please explain that part in simple words? I didn't understand that. I know
> this now... that a security token is issued to the gadget everytime the
> gadget is rendered. Now what do I have to do to implement the
> communication
> between my database and the opensocial gadget? I mean... my actual
> question
> is this. Where do I tell the container or the gadget, that my backend can
> be
> contacted like this?
>
> On Feb 1, 2008 3:34 AM, Kevin Brown <et...@google.com> wrote:
>
> > On Feb 1, 2008 2:33 AM, Akash Xavier <ak...@gmail.com> wrote:
> >
> > > Kevin,
> > > how do I pass my data to the gadget? I do make data available to the
> > > gadget
> > > when the makeRequest() is called?
> > >
> >
> > What do you mean by "pass my data"? What data are you referring to? Most
> > data about your container should be "passed" by implementing the open
> > social
> > API according to your site's needs. You can get this data either by
> using
> > interframe communication (i.e. the "ifpc" feature), or by talking to
> some
> > back end with a security token. The security token scaffolding is mostly
> > in
> > place now, but you'd still have to implement the back end and pass the
> > token
> > your self.
> >
>
>
>
> --
> Akash Manohar
> akashmanohar@gmail.com
>

Re: settitle and dynamic-height features are not working

Posted by Akash Xavier <ak...@gmail.com>.
Kevin,
That is what I am not able to understand. My question was how to make my
site's data (like user's friends and activity) available to the gadget. And
ur answer was this.

*"What do you mean by "pass my data"? What data are you referring to? Most
data about your container should be "passed" by implementing the open social
API according to your site's needs. You can get this data either by using
interframe communication (i.e. the "ifpc" feature), or by talking to some
back end with a security token. The security token scaffolding is mostly in
place now, but you'd still have to implement the back end and pass the token
your self."*

I can sense that this is what I want.  Can u explain this in simple words. I
know about ifpc (interframe procedure call). In the second option u say that
communication should be done with the backend with a security token. Can u
please explain that part in simple words? I didn't understand that. I know
this now... that a security token is issued to the gadget everytime the
gadget is rendered. Now what do I have to do to implement the communication
between my database and the opensocial gadget? I mean... my actual question
is this. Where do I tell the container or the gadget, that my backend can be
contacted like this?

On Feb 1, 2008 3:34 AM, Kevin Brown <et...@google.com> wrote:

> On Feb 1, 2008 2:33 AM, Akash Xavier <ak...@gmail.com> wrote:
>
> > Kevin,
> > how do I pass my data to the gadget? I do make data available to the
> > gadget
> > when the makeRequest() is called?
> >
>
> What do you mean by "pass my data"? What data are you referring to? Most
> data about your container should be "passed" by implementing the open
> social
> API according to your site's needs. You can get this data either by using
> interframe communication (i.e. the "ifpc" feature), or by talking to some
> back end with a security token. The security token scaffolding is mostly
> in
> place now, but you'd still have to implement the back end and pass the
> token
> your self.
>



-- 
Akash Manohar
akashmanohar@gmail.com

Re: settitle and dynamic-height features are not working

Posted by Kevin Brown <et...@google.com>.
On Feb 1, 2008 2:33 AM, Akash Xavier <ak...@gmail.com> wrote:

> Kevin,
> how do I pass my data to the gadget? I do make data available to the
> gadget
> when the makeRequest() is called?
>

What do you mean by "pass my data"? What data are you referring to? Most
data about your container should be "passed" by implementing the open social
API according to your site's needs. You can get this data either by using
interframe communication (i.e. the "ifpc" feature), or by talking to some
back end with a security token. The security token scaffolding is mostly in
place now, but you'd still have to implement the back end and pass the token
your self.

Re: settitle and dynamic-height features are not working

Posted by Akash Xavier <ak...@gmail.com>.
Kevin,
how do I pass my data to the gadget? I do make data available to the gadget
when the makeRequest() is called?
I have no ideas of the methods. Can you list a few?

-- 
Akash Manohar
akashmanohar@gmail.com

Re: settitle and dynamic-height features are not working

Posted by Arun Kumar <ar...@gmail.com>.
How to develop our own container, Are there any instructions or rules in
creating own container?

How to use our own container?

Re: settitle and dynamic-height features are not working

Posted by Kevin Brown <et...@google.com>.
On Feb 1, 2008 1:33 AM, Arun Kumar <ar...@gmail.com> wrote:

> How to create our own container with Drag and drop, sortable support for
> gadgets?


That's beyond the scope of what Shindig is. You'd need to implement this
yourself -- it should  be pretty trivial if you use a stock UI library such
as dojo or YUI.


> Is there any such open source container?


Not that I'm aware of -- if there were, it wouldn't make a whole lot of
sense anyway since every site is different. One site might want an
iGoogle-like dashboard view but another might have a facebook-like profile
page. There's just no way to generalize that, which is why it's beyond the
scope of this project.

With <content type="url" href="xxxxxxxxxxx" />, How can I use dynamic height
> feature?


The type=url gadget has to source the javascript from the containing page.
This is actually a flaw in the spec in that it doesn't indicate how gadgets
are supposed to know what the host to fetch the javascript from when
inspecting the libs parameter. Existing type=url gadgets almost exclusively
have this hard coded to www.gmodules.com, which is what the iGoogle
documentation recommended. Until the spec addresses this issue there really
isn't a safe way to support type=url gadgets using Shindig, unless you've
written the gadgets yourself and are OK with them only running on your
specific container. The parent parameter could be used for this, but that's
only viable if using a whitelist of acceptable containers.

Re: settitle and dynamic-height features are not working

Posted by Arun Kumar <ar...@gmail.com>.
How to create our own container with Drag and drop, sortable support for
gadgets?

Is there any such open source container?

With <content type="url" href="xxxxxxxxxxx" />, How can I use dynamic height
feature?

Re: settitle and dynamic-height features are not working

Posted by Arun Kumar <ar...@gmail.com>.
Kevin, How to change the path of ifpc_relay.html path in gadgets.js file or
some where? I want to keep it in a seperate directory?

On Feb 1, 2008 2:58 PM, Arun Kumar <ar...@gmail.com> wrote:

> Kevin, Thank you very much. It is working now.

Re: settitle and dynamic-height features are not working

Posted by Arun Kumar <ar...@gmail.com>.
Kevin, Thank you very much. It is working now.

Re: settitle and dynamic-height features are not working

Posted by Kevin Brown <et...@google.com>.
You should probably modify your sample page to not assume localhost:8080.
Actually, I think all the samples should just refer to the relative path
since for testing a single domain is OK.

Did you just copy the html files somewhere? The examples only work with the
provided directory structure; if you modify one piece, you need to modify
the others as well.

On Jan 31, 2008 11:32 PM, Arun Kumar <ar...@gmail.com>
wrote:

> Yes I tried both of those examples and I'm using Java server.
>
> Container?
>
> I haven't created any container at all. That sample7.html and
> sample6.htmlare also not working.
>
> Visit for online link :  http://tech-test.tutorialsforu.com/sample6.html
>

Re: settitle and dynamic-height features are not working

Posted by Kevin Brown <et...@google.com>.
On Feb 1, 2008 1:02 AM, Akash Xavier <ak...@gmail.com> wrote:

> If what I assume is right and can be done, then here are my doubts...
> 1.) In step 2 what is the brief logic to assign permissions. Is this where
> a
> gadgetsigner token will be generated with the permissions for the gadget
> to
> run?


This is up to you. Most implementations would probably prefer to do
permission checks at run time since there's no way to know what fields an
app is going to request until it is actually rendered.


> 2.) In step 4, how do I pass my data to the gadget? I do I make it
> available
> when the makeRequest() is called? Do I need to edit the javascript files
> of
> opensocial?


That's entirely up to you; as long as it conforms to the spec you can do
whatever makes sense for your site. I'm not sure what you mean by "edit the
javascript files of opensocial". If you want to support open social you need
to provide an open social feature such as opensocial-0.6 or opensocial-0.7.

Re: settitle and dynamic-height features are not working

Posted by Akash Xavier <ak...@gmail.com>.
Kevin,

This is how I am going about creating my own php container. Not yet done.
This is just mind work. :)
I have a few doubts with this.

1.) I first use CURL to get the xml file and parse it in php. Perform
hangman variable substitutions. This is done by replacing
__UP, __MSG, __MODULE, and other placeholders with other values.

2.) Then I check what userdata the app requires...  And then ask the user
whether that data can be utilized by the app. (this permission process is
done thru OAuth).

3.) Next the app is provided only with the data it requested permission for
in step 2. If it requests any other data other than common operational data
(like surface type), that is.... when it asks for userdata... only the ones
it obtained permission for will be provided.

4.) Now anyother info that the gadget asks for will be through
opensocial.makeRequest() acccording to specs and reference.


If what I assume is right and can be done, then here are my doubts...
1.) In step 2 what is the brief logic to assign permissions. Is this where a
gadgetsigner token will be generated with the permissions for the gadget to
run?
2.) In step 4, how do I pass my data to the gadget? I do I make it available
when the makeRequest() is called? Do I need to edit the javascript files of
opensocial?

On Feb 1, 2008 12:47 AM, Arun Kumar <ar...@gmail.com> wrote:

> I'm using _IG_AdjustIFrameHeight()
>
> and in the case of container, I'm using gadgets.container not any special
> open social container.
>
> If I want to use opensocial container, how to use it?
>



-- 
Akash Manohar
akashmanohar@gmail.com

Re: settitle and dynamic-height features are not working

Posted by Arun Kumar <ar...@gmail.com>.
I'm using _IG_AdjustIFrameHeight()

and in the case of container, I'm using gadgets.container not any special
open social container.

If I want to use opensocial container, how to use it?

Re: settitle and dynamic-height features are not working

Posted by Akash Xavier <ak...@gmail.com>.
Arun,
Are u using _IG_AdjustIFrameHeight() or opensocial.adjustIFrameHeight() ?

On Jan 31, 2008 11:32 PM, Arun Kumar <ar...@gmail.com>
wrote:

> Yes I tried both of those examples and I'm using Java server.
>
> Container?
>
> I haven't created any container at all. That sample7.html and
> sample6.htmlare also not working.
>
> Visit for online link :  http://tech-test.tutorialsforu.com/sample6.html
>



-- 
Akash Manohar
akashmanohar@gmail.com

Re: settitle and dynamic-height features are not working

Posted by Arun Kumar <ar...@gmail.com>.
Yes I tried both of those examples and I'm using Java server.

Container?

I haven't created any container at all. That sample7.html and
sample6.htmlare also not working.

Visit for online link :  http://tech-test.tutorialsforu.com/sample6.html

Re: settitle and dynamic-height features are not working

Posted by Kevin Brown <et...@google.com>.
On Jan 31, 2008 11:11 PM, Akash Xavier <ak...@gmail.com> wrote:

> Kevin,
> Can u explain what is a dependency injection and how its used in shindig
> (with respect to php... I saw that php too has dome DI conatiners...) ?


Dependency injection is simply the concept of 'injecting' dependencies into
a piece of code (typically achieved by using  interfaces or callbacks). Try
this link: http://en.wikipedia.org/wiki/Dependency_Injection


> And also how to implement a gadgetSigner in php? (just tell the basic
> logic
> on how this is done....)


In PHP the logical thing would probably be to generate tokens by serializing
a php array with the appropriate data (viewer / owner id or other such
information) and encrypting it using one of the standard encryption
extensions (I believe the openssl extension can handle RSA, so that's
probably what you want).

Something like this:

<?php

class MySigner implements GadgetSigner {
  private $crypter;
  private $viewerId;
  private $ownerId;
  // Getters for all of these fields...
  // OpenSSL class assumed to be similar to the one found in the comments on
http://us.php.net/openssl
  public function __construct(OpenSSL $crypter, $viewerId, $ownerId) {
    $this->crypter = $crypter;
    $this->viewerId = $viewerId;
    $this->ownerId = $ownerId;
  }
  public function createToken($gadget) {
    if ($gadget instanceof Gadget) {
      return new MyToken($this, $gadget->getId()->getUrl(), $viewerId,
$ownerId);
    } else /* assume a string */ {
      $data = unserialize($this->crypter->decrypt($gadget));
      // assert that it's correct...
     return new MyToken($this, $data['url'], $data['viewer'],
$data['owner']);
    }
  }

  public function encrypt($viewerId, $ownerId, $gadgetUrl) {
    return
$this->crypter->encrypt(serialize(array('viewer'=>$viewerId,'owner'=>$ownerId,'url'=>$gadgetUrl)));
  }
}

class MyToken implements GadgetToken {
  private MySigner $signer;
  private $gadgetUrl;
  private $viewerId;
  private $ownerId;

  public function __construct(MySigner $signer, $gadgetUrl, $viewerId,
$ownerId) {
    $this->signer = $signer;
    $this->gadget = $gadget;
  }
  public function toSerialForm() {
    return $this->signer->encrypt($this->gadgetUrl, $this->viewerId,
$this->ownerId);
  }
}

Re: settitle and dynamic-height features are not working

Posted by Akash Xavier <ak...@gmail.com>.
Kevin,
Can u explain what is a dependency injection and how its used in shindig
(with respect to php... I saw that php too has dome DI conatiners...) ?
And also how to implement a gadgetSigner in php? (just tell the basic logic
on how this is done....)

On Jan 31, 2008 11:08 PM, Kevin Brown <et...@google.com> wrote:

> We'll need more details than this. Have you tried starting the server and
> going to http://localhost:8080/gadgets/container/sample7.html (or
> sample6.html for dynamic-height) ?
>
> What version of the server are you using? (Java or PHP)
> Which "container" are you trying to use? Did you implement your own? Are
> you
> referring to one of the demos?
>
> On Jan 31, 2008 10:05 PM, Arun Kumar <ar...@gmail.com>
> wrote:
>
> > I have latest code of Gadgets server and container also.
> > But in my system, settitle and dynamic-height features are not working.
> >
> > What will be the problem?
> >
>



-- 
Akash Manohar
akashmanohar@gmail.com

Re: settitle and dynamic-height features are not working

Posted by Kevin Brown <et...@google.com>.
We'll need more details than this. Have you tried starting the server and
going to http://localhost:8080/gadgets/container/sample7.html (or
sample6.html for dynamic-height) ?

What version of the server are you using? (Java or PHP)
Which "container" are you trying to use? Did you implement your own? Are you
referring to one of the demos?

On Jan 31, 2008 10:05 PM, Arun Kumar <ar...@gmail.com>
wrote:

> I have latest code of Gadgets server and container also.
> But in my system, settitle and dynamic-height features are not working.
>
> What will be the problem?
>