Pixelpost Forum

Pixelpost Forum (http://www.pixelpost.org/forum/index.php)
-   Addons (http://www.pixelpost.org/forum/forumdisplay.php?f=13)
-   -   Addon: Flickr comment (http://www.pixelpost.org/forum/showthread.php?t=8052)

jdleung 03-08-2008 04:32 PM

Addon: Flickr comment
 
- 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):
Code:

        $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
Code:

$flickr_comments .= "".$content."";
by
Code:

$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)

Code:

                $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:

Code:

  <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:

PHP Code:

    $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?
PHP Code:

<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


All times are GMT. The time now is 12:29 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.