Search the web
Sign In
New User? Sign Up
yhoomobiledevelopers · Yahoo! Mobile Developers Group
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
how to set content type   Message List  
Reply | Forward Message #489 of 915 |
Re: how to set content type

--- In yhoomobiledevelopers@yahoogroups.com, "cstivers1978" <cstivers1978@...> wrote:
>
> On your php pages, add the following line:
>
>    header('Content-Type: application/x-ywidget+xml');
>
> This will set the content-type to the one expected for blueprint pages.
>

Thanks for replying

I added the line as mentioned by you in my php pages but still it is failing to get displayed. below i 've copied the code that i 've used in php file

<?php
header('Content-Type: application/x-ywidget+xml');
    require_once( "blueprint.php" );
    $writer = new XMLWriter();
    $writer->openMemory();
    $writer->setIndent( true );
    $writer->startDocument('1.0','UTF-8');

    // Create Page and Section nodes
    $page = new Blueprint_Page();
    $module = new Blueprint_Module();
    $page->addContent( $module );

    // Set Module's header text
    $module->setHeader( "PHP Version" );
   
    // Add main content block
    $module->addContent( new Blueprint_Block( "Hello World!" ) );
   
    // Write everything to memory buffer
    $page->Emit( $writer );
   
    // Return buffer & flush
    print( $writer->outputMemory() );
?>



The error which i 'm encountering  on execution of widget  is

XML Parsing Error: no element found
Location: http://beta.m.yahoo.com/w-raw/devtest-38aec7a915603c1dd26a1b1349a9120f-Kleward-2/greet.php
Line Number 2, Column 1:


I don't why the problem is surfacing despite the fact i 'm followed the steps that 're mentioned in BlueprintDevGuide.


Thanks




Thu Aug 28, 2008 4:13 am

success_anil
Offline Offline
Send Email Send Email

Forward
Message #489 of 915 |
Expand Messages Author Sort by Date

Hi I 've succefully uploaded my widget to yahoo's carousel. Carousel is showing the widget. On clicking the widget the it is displaying the first page. But...
success_anil
Offline Send Email
Aug 27, 2008
8:59 pm

On your php pages, add the following line: header('Content-Type: application/x-ywidget+xml'); This will set the content-type to the one expected for blueprint...
cstivers1978
Offline Send Email
Aug 27, 2008
10:19 pm

... pages. ... Thanks for replying I added the line as mentioned by you in my php pages but still it is failing to get displayed. below i 've copied the code...
success_anil
Offline Send Email
Aug 28, 2008
6:38 am

... page...
zaier31karim
Offline
Aug 29, 2008
3:55 pm

I have exactly the same pb. My first page is displayed correctly but the second one (after clicking a button) is not displayed...but both of them have the same...
fvisticot
Offline Send Email
Aug 30, 2008
4:11 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help