Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Facebook Comment for Albums  (Read 4262 times)

0 Members and 1 Guest are viewing this topic.

profili

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 113
Facebook Comment for Albums
« 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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Facebook Comment for Albums
« Reply #1 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.
Logged

profili

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 113
Re: Facebook Comment for Albums
« Reply #2 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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Facebook Comment for Albums
« Reply #3 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.
Logged

profili

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 113
Re: Facebook Comment for Albums
« Reply #4 on: June 24, 2011, 12:36:29 am »

Code: [Select]
<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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Facebook Comment for Albums
« Reply #5 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.

Don't forget to use something like echo or print when adding HTML code.

What's the error message?

Logged

profili

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 113
Re: Facebook Comment for Albums
« Reply #6 on: June 26, 2011, 06:51:06 pm »

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

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Facebook Comment for Albums
« Reply #7 on: June 27, 2011, 02:24:12 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
Code: [Select]
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.
Logged
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 19 queries.