Adding a hint for you...

Create a PHP file like this:
<?php
echo $header;
include("file_with_layout.php");
echo $footer;
?>

Where:

$header = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>
<Module>
 <ModulePrefs title=\"Meu Gadget\">
        <Require feature=\"opensocial-0.7\"/>
        <Require feature=\"views\" />
 </ModulePrefs>
<![CDATA[
";


$footer = "    $footer = "    ]]>
</Module>";
";

and the file_with_layout.php is your php script with your own layout.
Remember that, when using the MakeRequest() call you have always to use the
absolute URL!

Hope it helps!
On Sat, Jun 7, 2008 at 2:39 PM, Samuka <[EMAIL PROTECTED]> wrote:

>
> Hi ppl. I had a basic XML file like this:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <Module>
>  <ModulePrefs title="Vamo lá denovo!">
>    <Require feature="opensocial-0.7"/>
>        <Require feature="views" />
>  </ModulePrefs>
>  <Content type="html">
>    <![CDATA[
> ... content ...
>  ]]>
>  </Content>
> </Module>
>
> It worked just fine. But now I want to create it dinamically as a PHP
> file:
>
> <?php
> header('Content-type: application/xml; charset="UTF-8"', true);
> echo("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
> ?>
> <Module>
>  <ModulePrefs title="Vamo lá denovo!">
>    <Require feature="opensocial-0.7"/>
>        <Require feature="views" />
>  </ModulePrefs>
>  <Content type="html">
>    <![CDATA[
> ..... content ....]]>
>  </Content>
> </Module>
>
> But now, when i try to add the *.php file to orkut it gives the error
> saying it could not obtain the necessary information about my gadget.
> Can anyone help me? I don't want to generate the entire xml file
> dinamically with php (using all those coding of nodes, childs), i just
> want some fields to be into a <?php ?> tag. Can you help me plz ?
>
> tkz
> Samuel Brandão
> >
>


-- 
Luciano

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"OpenSocial Application Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/opensocial-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to