2008年11月25日星期二

Re: [fw-gdata] images not loading into website

>From the code you provided, I am not sure if this is the problem or not, but it sounds like you are using getContent() to return the actual image data and then attempting to render it somewhere on the page.

I had an issue a while back where i was attempting to pull image data from the filesystem and display it back through an img tag that point at one of my controller actions.

My issue ended up being whitespace trailing the closing ?> tag in my controller file.

It may seem like a long shot, but check your controller files (or anywhere you might be changing headers or outputting something other than html) and make sure either a) There is no closing tag on the file, or b) there is no trailing whitespace (or newlines) following the closing tag. The former is a much safer option.

Hope this helps!


-Mike


On Tue, Nov 25, 2008 at 9:41 AM, Cory D. Wiles <kwylez@gmail.com> wrote:
You should be able to get the full URL to the full size image by using something like:

$photoFeed->mediaGroup->content[0]->url



On Tue, Nov 25, 2008 at 2:35 AM, Peter Marino <marino.peter@gmail.com> wrote:
Hi users,
 
All images retrieved by the getThumbnail works 100%
but when I want a full image and try to retrieve it using
the getContent() method then the image is not displayed`
the <img ... /> displays the correct widh and height border
but with no image.
 
the code I use is:
 
$query = $gp->newAlbumQuery();
$query->setUser("default");
$query->setAlbumId( $album );
$albumFeed = $gp->getAlbumFeed($query);
$album_name = $albumFeed->getTitle();
$w = $photoFeed->getGphotoWidth().getText(false);
if ( $w>600 )
{
 $w = 600;
}
echo "<table style='width:100%'>";
echo "<tr><td align='center' ><img width='".$w."' src='".$contentUrl."' alt='' /></td></tr>";
echo "<tr><td align='center'>
<a href='http://picasaweb.google.com/marino.peter/".$album_name."#".$photo_id." '>
Se billede fra Picasa albumet</a>
</td></tr>";
echo "</table>";
just to clarify the album and photo id's are correct, the link I create using
<a href='http://picasaweb.google.com/marino.peter/".$album_name."#".$photo_id." '>
works just fine.
 
this might be more a html/php problem then actually a gdata problem, but I'm kinda stuck
why this doesn't work,.. perhaps someone could show me the way?
 
regards,
Peter Wraae Marino

--
OSG-Help http://osghelp.com



--
Cory Wiles
kwylez@gmail.com
http://www.corywiles.com
http://www.400mtogo.com

没有评论: