picasa api - captions for wgpicasa

This forum is for general questions about extensions for Joomla! version 1.5.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
latristesse
Joomla! Explorer
Joomla! Explorer
Posts: 270
Joined: Mon Dec 12, 2005 9:59 pm

picasa api - captions for wgpicasa

Post by latristesse » Tue Apr 27, 2010 6:43 pm

I posted this on the wgPicasa site as well as the Google code site but I thought I would give it a shot here on the Joomla forum too. wgPicasa is a very nice little component where you can create menu items linking to either all one's public Picasa albums or a specific album (shows pictures in a lightbox rather than taking you to the Picasa site). Works well except that it doesn't fetch the album descriptions, or photo captions or comments. I tried to just bring in the captions and cannot seem to get them. I think that caption is called summary (but I've tried "description" too) and they belong the media group but my programming knowledge is really limited. I think it would be neat to add this functionality and simple for anyone who knows what they're doing (not me unfortunately!).

Here's the code from the file that calls for the photo details:

Code: Select all

// Gphoto namespace data
$ns_gphoto = $entry->children($namespace['gphoto']);
// Media namespace data
$ns_media = $entry->children($namespace['media']);
// Media thumbnail attributes
$thb_attr = $ns_media->group->thumbnail->attributes();
// Media content attributes
$con_attr = $ns_media->group->content->attributes();

// thumbnail is same reference, except other 's<imgmax>' tag
$photo = array (
       'photoTitle' => (string)$entry->title[0],
       'photoURL' => (string)$con_attr['url'],
       'thumbURL' => (string)$thb_attr['url'],
);
And here is what I have tried (along with a lot of variations) under
thumbURL:

Code: Select all

'photoCaption' => (string)$entry->summary
Then I added the following the display page for the album:

Code: Select all

echo "<p>" .  $photo['photoCaption'] . "</p>";
Any ideas would be greatly appreciated!

jonmck
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Fri Aug 06, 2010 3:29 pm

Re: picasa api - captions for wgpicasa

Post by jonmck » Fri Aug 06, 2010 3:31 pm

I am also trying to add captions/descriptions of the photos into wgpicasa. Did you have any luck?

madpiotrek
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Fri Sep 17, 2010 1:51 pm

Re: picasa api - captions for wgpicasa

Post by madpiotrek » Fri Sep 17, 2010 1:56 pm

changing
'photoTitle' => (string)$entry->title[0],
to
'photoTitle' => (string)$entry->summary[0],

makes it
;-)

latristesse
Joomla! Explorer
Joomla! Explorer
Posts: 270
Joined: Mon Dec 12, 2005 9:59 pm

Re: picasa api - captions for wgpicasa

Post by latristesse » Wed Sep 22, 2010 3:47 pm

Yes, wow this totally worked. So simple. In addition to changing the com_wgpicasa/libraries/wgjoomla/wgData.php, line 173 to:

Code: Select all

 'photoTitle' => (string)$entry->summary[0],
You will also need to find com_wgpicasa/views/album/tmpl/default.php, line 104

Code: Select all

echo "src='" . $photo['thumbURL'] . "' class=\"thumbnailwg\" alt='". $photo['photoTitle'] . "' /></a>";
And add:
echo "<p>" . $photo['photoTitle'] . "</p>";
I would also change line 98 in the same file so that the alignment of the rows is at the top:

Code: Select all

if ($i % $this->params->get('picasaMaxPhotosPerRow') == 0) echo "<tr valign=\"top\" >";

madpiotrek
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Fri Sep 17, 2010 1:51 pm

Re: picasa api - captions for wgpicasa

Post by madpiotrek » Wed Sep 22, 2010 6:23 pm

i am glad i could help
;-)

playlet
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Fri Nov 09, 2012 11:38 pm

Re: picasa api - captions for wgpicasa

Post by playlet » Fri Nov 09, 2012 11:50 pm

Hi!

Sorry for posting in this old thread but I really need the answer to the following.
Is it possible to obtain ALBUM date?

I want to use this date to calculate if the album is older than 30 days or not. I want to place a png icon over the album thumbnail saying that this is a new album. Basically I want to highlight the new albums.

Is it possible to obtain album date of creation and how do I convert it to usable form (yearmonthday)?

Thanks!


Locked

Return to “Extensions for Joomla! 1.5”