Changeset 8402


Ignore:
Timestamp:
12/31/10 02:33:08 (8 years ago)
Author:
rub
Message:

Use new variables for url
Use article instead of website for og:type (to avoid right problem)
Add fb:admins
Use thumbnail_url for og:image

Location:
extensions/FacebookPlug/Plugin
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • extensions/FacebookPlug/Plugin/include/header.inc.php

    r8400 r8402  
    6464    $template->set_prefilter('header', 'fbp_header'); 
    6565 
    66     if (empty($page['fbp']['og']['url'])) 
     66    if (empty($page['fbp']['url'])) 
    6767    { 
    68       $page['fbp']['og']['url'] = get_absolute_root_url().script_basename(); 
     68      $page['fbp']['url'] = get_absolute_root_url().script_basename(); 
    6969      if ($conf['php_extension_in_urls']) 
    7070      { 
    71         $page['fbp']['og']['url'] .= '.php'; 
     71        $page['fbp']['url'] .= '.php'; 
    7272      } 
    7373    } 
  • extensions/FacebookPlug/Plugin/include/index.inc.php

    r8395 r8402  
    6363 
    6464  set_make_full_url(); 
    65   $page['fbp']['og']['url'] = duplicate_index_url(array(''), array('start', 'flat', 'chronology_date', 'chronology_field', 'chronology_style', 'chronology_view')); 
     65  $page['fbp']['url'] = duplicate_index_url(array(''), array('start', 'flat', 'chronology_date', 'chronology_field', 'chronology_style', 'chronology_view')); 
    6666  unset_make_full_url(); 
     67 
     68/*global $template; 
     69//$link_url = '<a name="fb_share" type="icon" share_url="{$fbp_page.url}"></a> 
     70$link_url = '<a name="fb_share" type="icon" share_url="'.$page['fbp']['url'].'" title="test"></a> 
     71<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share"  
     72        type="text/javascript"> 
     73</script> 
     74'; 
     75$template->concat( 
     76        'PLUGIN_INDEX_ACTIONS', 
     77        '<li>'.$link_url.'</li>');*/ 
    6778} 
    6879 
     
    8495    { 
    8596      set_make_full_url(); 
    86       $page['fbp']['og']['url_image'] = get_element_url($row); 
     97      $page['fbp']['url_image'] = get_thumbnail_url($row); 
    8798      unset_make_full_url(); 
    8899    } 
     
    99110    $picture = reset($pictures); 
    100111    set_make_full_url(); 
    101     $page['fbp']['og']['url_image'] = get_element_url($picture); 
     112    $page['fbp']['url_image'] = get_thumbnail_url($picture); 
    102113    unset_make_full_url(); 
    103114  } 
  • extensions/FacebookPlug/Plugin/include/picture.inc.php

    r8400 r8402  
    5555    if ($conf['fbp']['picture_url_type'] == 'image') 
    5656    { 
    57       $fbp_url_picture = get_element_url($current_picture); 
     57      $page['fbp']['url'] = get_element_url($current_picture); 
    5858    } 
    5959    else 
    6060    { 
    61       $fbp_url_picture = make_picture_url(array('image_id' => $page['image_id'])); 
     61      $page['fbp']['url'] = make_picture_url(array('image_id' => $page['image_id'])); 
    6262    } 
    63     $page['fbp']['og']['url'] = $fbp_url_picture; 
    64     $page['fbp']['og']['url_image'] = get_element_url($current_picture); 
     63    $page['fbp']['url_image'] = get_thumbnail_url($current_picture); 
    6564    unset_make_full_url(); 
    6665 
     66 
    6767    // Assign template 
    68     $template->assign('fbp_url_picture', $fbp_url_picture); 
     68    $template->assign('fbp_page', $page['fbp']); 
    6969 
    7070    // Parse TPL 
     
    7676    } 
    7777  } 
     78 
     79/*global $template; 
     80$link_url = '<a name="fb_share" type="icon" share_url="'.$page['fbp']['url'].'"></a> 
     81<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share"  
     82        type="text/javascript"> 
     83</script> 
     84'; 
     85$template->concat( 
     86        'PLUGIN_PICTURE_ACTIONS', 
     87        $link_url);*/ 
    7888 
    7989  return $content; 
  • extensions/FacebookPlug/Plugin/tpl/init.fb.tpl

    r8395 r8402  
    1919{/if} 
    2020<meta property="og:site_name" content="{if isset($fbp_page.og.site_name)}{$fbp_page.og.site_name|@replace:'"':' '}{else}{$GALLERY_TITLE|@replace:'"':' '}{/if}"> 
     21<meta property="og:type" content="{if isset($fbp_page.og.type)}{$fbp_page.og.type}{else}article{/if}"> 
     22<meta property="og:image" content="{if isset($fbp_page.og.url_image)}{$fbp_page.og.url_image}{else}{$fbp_page.url_image}{/if}"> 
     23<meta property="og:url" content="{if isset($fbp_page.og.url)}{$fbp_page.og.url}"{else}{$fbp_page.url}{/if}"> 
    2124<meta property="fb:app_id" content="{if isset($fbp_page.og.app_id)}{$fbp_page.og.app_id}{else}{$FACEBOOK_APP_ID}{/if}"> 
    22 <meta property="og:type" content="{if isset($fbp_page.og.type)}{$fbp_page.og.type}{else}website{/if}"> 
    23 <meta property="og:image" content="{$fbp_page.og.url_image}"> 
    24 <meta property="og:url" content="{if isset($fbp_page.og.url)}{$fbp_page.og.url}{else}{$smarty.server.REQUEST_URI}{/if}"> 
     25<meta property="fb:admins" content="{$fbp_page.og.admins}"> 
    2526 
    2627{if $fbp.async_script} 
  • extensions/FacebookPlug/Plugin/tpl/social.plugin.comments.tpl

    r8400 r8402  
    11<div id="fb-xfbml-comments"> 
    22<fb:comments 
    3   xid="{$fbp_url_picture|@urlencode}" url="{$fbp_url_picture}" 
     3  xid="{$fbp_page.url|@urlencode}" url="{$fbp_page.url}" 
    44  width="{$fbp.social_plugin_comments.width}" 
    55  numposts="{$fbp.social_plugin_comments.numposts}" 
  • extensions/FacebookPlug/Plugin/tpl/social.plugin.facepile.tpl

    r8386 r8402  
    11<div id="fb-xfbml-facepile"> 
    22<fb:facepile 
    3   href="{$fbp_url_picture}" 
     3  href="{$fbp_page.url}" 
    44  width="{$fbp.social_plugin_facepile.width}" 
    55  max_rows="{$fbp.social_plugin_facepile.max_rows}" 
  • extensions/FacebookPlug/Plugin/tpl/social.plugin.like.button.tpl

    r8386 r8402  
    11<div id="fb-xfbml-like-button"> 
    22<fb:like 
    3   href="{$fbp_url_picture}" 
     3  href="{$fbp_page.url}" 
    44  width="{$fbp.social_plugin_like_button.width}" 
    55  layout="{$fbp.social_plugin_like_button.layout}" 
Note: See TracChangeset for help on using the changeset viewer.