Changeset 8216 for extensions


Ignore:
Timestamp:
Dec 21, 2010, 7:25:32 PM (14 years ago)
Author:
rub
Message:

FB link with simple page url instead of picture url.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/FacebookPlug/Plugin/picture.inc.php

    r8215 r8216  
    4848    var e = document.createElement(\'script\');
    4949  {/literal}
    50     e.src = document.location.protocol + \'//connect.facebook.net/{$language}/all.js\';
     50    e.src = document.location.protocol + \'//connect.facebook.net/{$LANGUAGE}/all.js\';
    5151{literal}
    5252    e.async = true;
     
    6868 {rdelim});
    6969</script>
    70 <script src="http://connect.facebook.net/{$language}/all.js#xfbml=1"></script>
     70<script src="http://connect.facebook.net/{$LANGUAGE}/all.js#xfbml=1"></script>
    7171';
     72  /*$fbp_content .= '
     73<fb:like href="{$SRC_IMG}" show_faces="true" width="{$WIDTH_IMG}"></fb:like>
     74';*/
    7275  $fbp_content .= '
    73 <fb:like href="{$SRC_IMG}" show_faces="true" width="{$WIDTH_IMG}"></fb:like>
     76<fb:like href="{$FBP_URL_PICTURE}" show_faces="true" width="{$WIDTH_IMG}"></fb:like>
    7477';
     78
    7579  return $content.$fbp_content;
    7680}
     
    7882function fbp_loc_begin_picture()
    7983{
    80   global $template, $user;
     84  global $template, $user, $page;
    8185
    8286  // set prefilter
     
    8488  $template->set_prefilter('default_content', 'fbp_AddSocial');
    8589  // Always use full url for FB social plugin
     90  //~ set_make_full_url();
     91  // define language
     92  $template->assign('LANGUAGE', $user['language']);
     93  // define picture FB link
    8694  set_make_full_url();
    87   // define language
    88   $template->assign('language', $user['language']);
     95  $template->assign('FBP_URL_PICTURE', make_picture_url(array('image_id' => $page['image_id'])));
     96  unset_make_full_url();
    8997}
    9098
     
    92100{
    93101  // Restore url
    94   unset_make_full_url();
     102  //~ unset_make_full_url();
    95103}
    96104
Note: See TracChangeset for help on using the changeset viewer.