coppermine-gallery.com/forum

Support => cpg1.5.x Support => cpg1.5 themes (visuals) => Topic started by: profili on June 20, 2011, 04:37:52 PM

Title: Facebook Comment for Albums
Post by: profili on June 20, 2011, 04:37:52 PM
I would like to add Facebook comments for each album.
Actually I want to add that under albums pages numbers. I need only to know which is the code block for that album page numbers strip, to add the facebook code just there, or under it.
Title: Re: Facebook Comment for Albums
Post by: Αndré on June 22, 2011, 10:49:08 AM
Either you put it at the end of the function theme_display_thumbnails in your themes's theme.php file, or you use the theme_thumbnails_wrapper_end plugin hook.
Title: Re: Facebook Comment for Albums
Post by: profili on June 23, 2011, 11:35:18 AM
I get some php errors if i try to add anything there. I know it is to much to ask something php related here, but some help would be very welcome. Thank you.
Title: Re: Facebook Comment for Albums
Post by: Αndré on June 23, 2011, 12:41:44 PM
What exactly do you try to add? What's the error message? Don't forget to use something like echo or print when adding HTML code.
Title: Re: Facebook Comment for Albums
Post by: profili on June 24, 2011, 12:36:29 AM
<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:comments href="example.com" num_posts="2" width="500"></fb:comments>

This above is the code for the Facebook comments.
Title: Re: Facebook Comment for Albums
Post by: Αndré on June 24, 2011, 09:25:52 AM
I don't want to know Facebook's code block, but what exactly you added to your theme.php file.

Quote from: Αndré on June 23, 2011, 12:41:44 PM
Don't forget to use something like echo or print when adding HTML code.

Quote from: Αndré on June 23, 2011, 12:41:44 PM
What's the error message?

Title: Re: Facebook Comment for Albums
Post by: profili on June 26, 2011, 06:51:06 PM
Quote from: Αndré on June 24, 2011, 09:25:52 AM
I don't want to know Facebook's code block, but what exactly you added to your theme.php file.



I added that code.

Quote<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:comments href="example.com" num_posts="2" width="500"></fb:comments>

echo or print are klingon for me :)
Title: Re: Facebook Comment for Albums
Post by: Αndré on June 27, 2011, 02:24:12 PM
Quote from: profili on June 26, 2011, 06:51:06 PM
echo or print are klingon for me :)
http://www.php.net/manual/en/function.echo.php
http://www.php.net/manual/en/function.print.php

Try to add
echo '<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:comments href="example.com" num_posts="2" width="500"></fb:comments>';
to your file.