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 [2] 3   Go Down

Author Topic: Socialshare Plugin - New Version - Now with Facebook Comments  (Read 41441 times)

0 Members and 1 Guest are viewing this topic.

gtgillis

  • Contributor
  • Coppermine novice
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 40
Re: Socialshare Plugin - New Version - Now with Facebook Comments
« Reply #20 on: November 26, 2011, 05:57:57 pm »

Tried to follow this instruction
Created app than enter $CONF_SOCIALSHARE_CM['comment_appid'] and $CONF_SOCIALSHARE_CM['comment_nameid']
Comment page is available at the picture page. But moderation queue in FB still empty. Suspect the problem is simple, but cant understand :)

If you had comments before you created and entered your app id and name id you may not be able to moderate those comments on Facebook since they are tied together.
Logged

mitko

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 119
    • World of Lighthouses
Re: Socialshare Plugin - New Version - Now with Facebook Comments
« Reply #21 on: November 27, 2011, 08:43:47 am »

No, i tried to add tests comments after creation of application, but they didn't appear. May be it's the syntax problem? Do i need to keep values after =  in ' ' etc ?

gtgillis

  • Contributor
  • Coppermine novice
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 40
Re: Socialshare Plugin - New Version - Now with Facebook Comments
« Reply #22 on: November 27, 2011, 02:54:21 pm »

No, i tried to add tests comments after creation of application, but they didn't appear. May be it's the syntax problem? Do i need to keep values after =  in ' ' etc ?

If your App ID is 123456789123 then you should edit the config file and replace YOUR_APP_ID_GOES_HERE with 123456789123

Code: [Select]
//Enter your App ID here
$CONF_SOCIALSHARE_CM['comment_appid'] = "123456789123";


When I click on  my profile page in Facebook and look at the url I see https://www.facebook.com/greg.gillis. This shows that my facebook ID is greg.gillis. This is the Facebook ID of the person that can moderate the comments. Put your own  Facebook ID here.
Code: [Select]
//Enter your FB account name
$CONF_SOCIALSHARE_CM['comment_nameid'] = "greg.gillis";
Logged

gtgillis

  • Contributor
  • Coppermine novice
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 40
Re: Socialshare Plugin - New Version - Now with Facebook Comments
« Reply #23 on: November 29, 2011, 04:30:53 pm »

Deleted
« Last Edit: November 29, 2011, 04:38:28 pm by gtgillis »
Logged

gtgillis

  • Contributor
  • Coppermine novice
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 40
Re: Socialshare Plugin - New Version - Now with Facebook Comments
« Reply #24 on: November 29, 2011, 06:22:39 pm »

To force the correct photo will require you to edit two theme files. Theme.php and template.html. I tried doing this in the plugin itself but ran into a few issues. I'll keep looking but for now this works.

Let me know the name of the theme you are using and I can give your more detailed instructions for your theme.

Here are the changes for the theme I am using, mac_ox_x.

edit theme.php and add three FB_META_ lines to $template_vars.

Code: [Select]
    $template_vars = array('{LANG_DIR}' => $lang_text_dir,
        '{TITLE}' => $CONFIG['gallery_name'] . ' -- ' . strip_tags(bb_decode($section)),
        '{CHARSET}' => $charset,
        '{META}' => $meta,
        '{GAL_NAME}' => $CONFIG['gallery_name'],
        '{GAL_DESCRIPTION}' => $CONFIG['gallery_description'],
        '{SYS_MENU}' => theme_main_menu('sys_menu'),
        '{SUB_MENU}' => theme_main_menu('sub_menu'),
        '{ADMIN_MENU}' => theme_admin_mode_menu(),
        '{CUSTOM_HEADER}' => $custom_header,
        '{JAVASCRIPT}' => theme_javascript_head(),
        '{MESSAGE_BLOCK}' => theme_display_message_block(),

        '{FB_META_TITLE}' => $CONFIG['gallery_name'],
        '{FB_META_DESC}' => strip_tags(bb_decode($section)),
        '{FB_META_IMG}' => $_CONF['site_url'].'/coppermine/'.$CURRENT_PIC_DATA['url']
        );

edit template.html. Add three lines
Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="{LANG_DIR}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
<meta http-equiv="Pragma" content="no-cache" />

<meta name="title" content="{FB_META_TITLE}" />
<meta name="description" content="{FB_META_DESC}"  />
<link rel="image_src" href="{FB_META_IMG}" />







I have an issue with the thumbnail attached to the facebook comment:

Every time I make a comment on my CPG the comment inside my facebook has the wrong thumbnail attached. The chosen thumbnail for the attachment is always the thumbnail one step to the left, in filmstrip.

I've tried to change in config how many thumbs showing but this won't do it.

Is there any possibillity to change what thumbnail is attached by editing the code of this plugin?

Morgan
http://echinopsis.eu
Logged

metamog

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50
Re: Socialshare Plugin - New Version - Now with Facebook Comments
« Reply #25 on: November 29, 2011, 06:41:03 pm »

Thank you gtgillis!


I'm using the theme "Igames".

Can I use your code anyway?


Morgan Larsson
Logged

metamog

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50
Re: Socialshare Plugin - New Version - Now with Facebook Comments
« Reply #26 on: November 29, 2011, 07:41:27 pm »

my theme.php looks nothing like yours code (on macosx).

I've edited the "theme.html" but that didn't make it (no thumbnail at all).

Morgan Larsson
Logged

gtgillis

  • Contributor
  • Coppermine novice
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 40
Re: Socialshare Plugin - New Version - Now with Facebook Comments
« Reply #27 on: November 29, 2011, 08:06:41 pm »

You will need to add the following function to your theme.php. Edit theme.php go to the bottom of the file and insert the following code just before the ?>

Code: [Select]
function pageheader($section, $meta = '')
{
    global $CONFIG, $THEME_DIR, $CURRENT_PIC_DATA, $_CONF;
    global $template_header, $lang_charset, $lang_text_dir;

    $custom_header = cpg_get_custom_include($CONFIG['custom_header_path']);

        $charset = ($CONFIG['charset'] == 'language file') ? $lang_charset : $CONFIG['charset'];

    header('P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"');
        header("Content-Type: text/html; charset=$charset");
//    user_save_profile();

    $template_vars = array('{LANG_DIR}' => $lang_text_dir,
        '{FB_META_TITLE}' => $CONFIG['gallery_name'],
        '{FB_META_DESC}' => strip_tags(bb_decode($section)),
        '{FB_META_IMG}' => $_CONF['site_url'].'/coppermine/'.$CURRENT_PIC_DATA['url']
        );

    echo template_eval($template_header, $template_vars);
}


Double check the the top of your template.html looks like this
Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="{LANG_DIR}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
<meta http-equiv="Pragma" content="no-cache" />
<meta name="title" content="{FB_META_TITLE}" />
<meta name="description" content="{FB_META_DESC}"  />
<link rel="image_src" href="{FB_META_IMG}" />
<title>{TITLE}</title>


my theme.php looks nothing like yours code (on macosx).

I've edited the "theme.html" but that didn't make it (no thumbnail at all).

Morgan Larsson
Logged

metamog

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50
Re: Socialshare Plugin - New Version - Now with Facebook Comments
« Reply #28 on: November 29, 2011, 08:23:10 pm »

When I did what said in your last message: I've got problem with all my "buttons" top menu. See attachment.
Logged

gtgillis

  • Contributor
  • Coppermine novice
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 40
Re: Socialshare Plugin - New Version - Now with Facebook Comments
« Reply #29 on: November 29, 2011, 08:30:36 pm »

OK. Change the function in theme.php to the following.

Code: [Select]
function pageheader($section, $meta = '')
{
    global $CONFIG, $THEME_DIR, $CURRENT_PIC_DATA, $_CONF;
    global $template_header, $lang_charset, $lang_text_dir;

    $custom_header = cpg_get_custom_include($CONFIG['custom_header_path']);

        $charset = ($CONFIG['charset'] == 'language file') ? $lang_charset : $CONFIG['charset'];

    header('P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"');
        header("Content-Type: text/html; charset=$charset");
//    user_save_profile();

    $template_vars = array('{LANG_DIR}' => $lang_text_dir,
        '{TITLE}' => $CONFIG['gallery_name'] . ' -- ' . strip_tags(bb_decode($section)),
        '{CHARSET}' => $charset,
        '{META}' => $meta,
        '{GAL_NAME}' => $CONFIG['gallery_name'],
        '{GAL_DESCRIPTION}' => $CONFIG['gallery_description'],
        '{SYS_MENU}' => theme_main_menu('sys_menu'),
        '{SUB_MENU}' => theme_main_menu('sub_menu'),
        '{ADMIN_MENU}' => theme_admin_mode_menu(),
        '{CUSTOM_HEADER}' => $custom_header,
        '{JAVASCRIPT}' => theme_javascript_head(),
        '{MESSAGE_BLOCK}' => theme_display_message_block(),
'{FB_META_TITLE}' => $CONFIG['gallery_name'],
        '{FB_META_DESC}' => strip_tags(bb_decode($section)),
        '{FB_META_IMG}' => $_CONF['site_url'].'/coppermine/'.$CURRENT_PIC_DATA['url']
        );

    echo template_eval($template_header, $template_vars);
}


When I did what said in your last message: I've got problem with all my "buttons" top menu. See attachment.
Logged

metamog

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50
Re: Socialshare Plugin - New Version - Now with Facebook Comments
« Reply #30 on: November 29, 2011, 08:45:55 pm »

Thank you gtgillis!

Now it doesn't show up any thumbnail at facebook (tried 2 times).

Morgan Larsson
Logged

gtgillis

  • Contributor
  • Coppermine novice
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 40
Re: Socialshare Plugin - New Version - Now with Facebook Comments
« Reply #31 on: November 29, 2011, 10:50:48 pm »

Make sure that template.html has the following 3 lines just below the <head> tag.

Code: [Select]
<meta name="title" content="{FB_META_TITLE}" />
<meta name="description" content="{FB_META_DESC}"  />
<link rel="image_src" href="{FB_META_IMG}" />

Once you have this and the function added to theme.php it should work.

I also did a view source of the web page below and I see the meta name="title", meta name="description" and link rel="image_src".
http://www.rudebastard.com/coppermine/displayimage.php?album=31&pid=2742#top_display_media

Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">



<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<meta http-equiv="Pragma" content="no-cache" />

<meta name="title" content="Photo Gallery" />

<meta name="description" content="0012 - 0012-10"  />

<link rel="image_src" href="http://www.rudebastard.com/coppermine/../Photographs/0012/normal_0012-10.jpg" />




Thank you gtgillis!

Now it doesn't show up any thumbnail at facebook (tried 2 times).

Morgan Larsson
Logged

metamog

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50
Re: Socialshare Plugin - New Version - Now with Facebook Comments
« Reply #32 on: November 29, 2011, 11:07:12 pm »

Same trouble: no thumbnail at facebook comment.

(I've also noticed that people has replied to comments on my CPG, that was not updated to facebook, I never got any hint about people replying until I saw the replies at my CPG)


Morgan Larsson
http://echinopsis.eu
Logged

TeknoSounds

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 83
    • TeknoSounds
Re: Socialshare Plugin - New Version - Now with Facebook Comments
« Reply #33 on: November 30, 2011, 04:56:22 am »

does this use the new styled version of FB comments? the one in the other share/comment plugin uses an old style, I can't remember off the top of my head the difference... 

but anyway, what I would really like to see as a feature request:
ability to email admin upon comment
insert comment into CPG DB so comments aren't lost if FB does an update (this is whats about to happen to me since I need to switch it to the new style of FB comments, its going to cause me to lose all the comments that were made since I put in the other plugin)

Russ_

  • Coppermine regular visitor
  • **
  • Country: nz
  • Offline Offline
  • Posts: 57
Re: Socialshare Plugin - New Version - Now with Facebook Comments
« Reply #34 on: March 02, 2012, 12:00:53 am »

Two things:
1. Can I turn off the FB comments? I can't see how.
2. Instead of icons under the picture I get text links, like the attachment. Any ideas on what's wrong (keep in mind I'm ungeeky please  :-\)

Russ_

  • Coppermine regular visitor
  • **
  • Country: nz
  • Offline Offline
  • Posts: 57

gtgillis

  • Contributor
  • Coppermine novice
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 40
Re: Socialshare Plugin - New Version - Now with Facebook Comments
« Reply #36 on: March 02, 2012, 08:37:11 pm »

Two things:
1. Can I turn off the FB comments? I can't see how.
2. Instead of icons under the picture I get text links, like the attachment. Any ideas on what's wrong (keep in mind I'm ungeeky please  :-\)

I would guess that it's related to your theme's CSS. What theme are you using and is it somewhere where I can download it?

Logged

gtgillis

  • Contributor
  • Coppermine novice
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 40
Re: Socialshare Plugin - New Version - Now with Facebook Comments
« Reply #38 on: March 05, 2012, 07:07:17 pm »

It's "curve dark": http://coppermine-gallery.net/demo/cpg15x/?theme=curve_dark
Here: http://sourceforge.net/projects/coppermine/files/Themes/1.5.x/cpg1.5.x_theme_curve_dark_v1.0.zip/download

Thanks.

I tried the curve_dark theme and did not see any problems there. What plugins do you have installed? Are you running Coppermine bridged with a CMS?
Logged

Russ_

  • Coppermine regular visitor
  • **
  • Country: nz
  • Offline Offline
  • Posts: 57
Re: Socialshare Plugin - New Version - Now with Facebook Comments
« Reply #39 on: March 05, 2012, 08:28:36 pm »

No other plug-ins at all, and no cms.
Maybe I'll try uploading all the theme files again.
Pages: 1 [2] 3   Go Up
 

Page created in 0.031 seconds with 19 queries.