Ignore:
Timestamp:
Jan 2, 2011, 2:24:22 AM (13 years ago)
Author:
rub
Message:

Add share icon on picture and album page

Rename footer.lang.php to common.lang.php
Remove use of target to open a new window

File:
1 edited

Legend:

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

    r8425 r8436  
    7272    {
    7373      // XFBML implementation
    74       $template->set_filename($tpl, FBP_DIR.'/tpl/'.$tpl.'.tpl');
    75       $content .= $template->parse($tpl, true);
     74      $template->set_filename('fbp_'.$tpl, FBP_DIR.'/tpl/'.$tpl.'.tpl');
     75      $content .= $template->parse('fbp_'.$tpl, true);
    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);*/
    8878
    8979  return $content;
    9080}
    9181
     82function fbp_loc_end_picture()
     83{
     84  global $template;
     85
     86  $template->assign('FBP_SHARE_LI', false);
     87
     88  $tpl = 'share';
     89  $template->set_filename('fbp_'.$tpl, FBP_DIR.'/tpl/'.$tpl.'.tpl');
     90  $template->concat(
     91        'PLUGIN_PICTURE_ACTIONS',
     92        $template->parse('fbp_'.$tpl, true)
     93        );
     94}
     95
    9296add_event_handler('render_element_content', 'fbp_render_element_content', EVENT_HANDLER_PRIORITY_NEUTRAL+1 /*in order to have picture content*/, 2);
    9397
     98if ($conf['fbp']['share_picture'])
     99{
     100  add_event_handler('loc_end_picture', 'fbp_loc_end_picture');//, EVENT_HANDLER_PRIORITY_NEUTRAL+999 /* In order to be last*/);
     101}
     102
    94103?>
Note: See TracChangeset for help on using the changeset viewer.