View Full Version : Addon: Flickr comment
jdleung
03-08-2008, 04:32 PM
- Show image comments from flickr.
- Need IPTC to store the photo's flickr id.
- Need flickr api key.
Please read the readme.txt for more detail..
Demo: www.jdleungs.com
Please click the comment link right below the image to popup comment list.
download here
http://www.pixelpost.org/extend/addons/flickr-comment/
Tiestoo
03-10-2008, 02:11 PM
This is one amazing addon, thx a lot, I was looking for this!
I have one css-related question I hope I can get an answer to, since I am a css/php-n00b:
I wanted to change the color of the comment. So not the color of the date and/or name, but just the comment itself.
In the PHP the related code looks like this (I changed the order a little bit):
$create_date = strftime ("%d-%m-%Y",$c['datecreate']);
$flickr_comments .= "<ul><a href='".$author['photosurl']."' target='_blank'>".$author['username']."</a> @ ".$create_date."<br>";
$flickr_comments .= "".$content."";
$flickr_comments .= "<div style='padding:0px;'></div></ul><br />";
The part to modify was $content I guessed. So I replaced$flickr_comments .= "".$content."";by$flickr_comments .= "<span class=\"comm_msg\">".$content."</span>";
It worked! :D
Now the hard part. I want to display an image in front of the comment. In other words, I want the lay-out to be similar to the lay-out of the 'normal' PP reactions. This part of code is found in my gravatars_comments.php, since I use gravatars.(addon)
$image_comments .= "
<tr class=\"comm" . ($comment_email != $cfgrow['email'] ? "" : " admin_comment") . "\">
<td class=\"comm_grav\">$gravatar</td>
<td class=\"comm_cnt\">
<span class=\"comm_head\">$comment_name @ $comment_datetime</span><br/>
<span class=\"comm_msg\">$comment_message</span>
</td>
</tr>";
But when I trie to wrap these <td>'s and <tr>'s around the code in the flickr_comments.php, PP goes crazy! This code definitely does't work:
<tr class=\"comm\">
<td class=\"comm_grav\">IMAGE_URL_HERE</td>
<td class=\"comm_cnt\">
$create_date = strftime ("%d-%m-%Y",$c['datecreate']);
$flickr_comments .= "<ul><a href='".$author['photosurl']."' target='_blank'>".$author['username']."</a> @ ".$create_date."<br>";
$flickr_comments .= "<span class=\"comm_msg\">".$content."</span>";
</td>
</tr>;
But My Gosh! Why not? It's almost the same as in my gravatars_comments.php...
jdleung
03-11-2008, 12:28 PM
@Tiestoo : Can you show us the site running pixelpost?
Tiestoo
03-11-2008, 02:40 PM
Offcourse! http://www.blauwgestreept.nl/index.php
The first two photos have reactions as I want them to be, they are not yet uploaded to Flickr. The rest of the photos have reactions imported from Flickr.
jdleung
03-11-2008, 03:19 PM
the code should be like this:
$flickr_comments .= " <tr class='comm'><td class='comm_grav'>IMAGE_URL_HERE</td>";
$flickr_comments .= " <td class='comm_cnt'>";
$create_date = strftime ("%d-%m-%Y",$c['datecreate']);
$flickr_comments .= "<ul><a href='".$author['photosurl']."' target='_blank'>".$author['username']."</a> @ ".$create_date."<br>";
$flickr_comments .= "<span class=\"comm_msg\">".$content."</span>";
$flickr_comments .= "</td></tr>";
remember to put the </table> tag behind.
Since all your flickr comment use default Gravatar image, why not only edit the template?
<tr class="comm">
<td class="comm_grav">imge_url</td>
<td class="comm_cnt">
<FLICKR_COMMENTS>
</td>
</tr>
Hope this help.
Tiestoo
03-12-2008, 10:14 AM
Thank you so much! Works exellent! Now I can figure out how to get loose of these unwanted spaces around the text ;)
Thx again!
jdleung
03-29-2008, 08:48 AM
I found many people go to my site, but it seems that most of them didn't know how to popup the comment list, so it showed no demo.
There is a comment link right below the image, at the right side, just click it to popup the comment list and comment form.
Have fun!
tomms
05-13-2008, 05:02 PM
thanks for the great addon
im having a slight issue with <FLICKR_COMMENTS_NUM>, when there are comments, it shows the number, but when there are none it shows a blank
any idea why this is?
jdleung
05-14-2008, 03:28 AM
it should show "0" where there is no comment, please post your site here..
tomms
05-14-2008, 07:08 PM
thanks for the reply jdleung, it was an error on my part, its been fixed
thank you again for sharing this addon
tomms
06-15-2008, 07:00 AM
i wonder jdleung, how hard would it be to have the comment number show as one number
so instead of 1+5 (for example).... it just says 6
jdleung
06-16-2008, 03:47 AM
i wonder jdleung, how hard would it be to have the comment number show as one number
so instead of 1+5 (for example).... it just says 6
yes. it's a little hard for me. :-)
tomms
09-01-2008, 11:56 PM
this addon has worked great for 3 months, however it has today given me problems. Making my page unaccessable, as stated here...
http://www.pixelpost.org/forum/showthread.php?t=8052&page=2&highlight=flickr
when i turned off the addon, everything went back to normal
what do you think caused this, could it have been a comment left on flickr that had some kind of character that screwed things up?
vBulletin® v3.7.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.