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/index.inc.php

    r8425 r8436  
    6565  $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>');*/
    7867}
    7968
     
    129118}
    130119
     120function fbp_loc_end_index()
     121{
     122  global $template;
     123
     124  $template->assign('FBP_SHARE_LI', true);
     125
     126  $tpl = 'share';
     127  $template->set_filename('fbp_'.$tpl, FBP_DIR.'/tpl/'.$tpl.'.tpl');
     128  $template->concat(
     129        'PLUGIN_INDEX_ACTIONS',
     130        $template->parse('fbp_'.$tpl, true)
     131        );
     132}
     133
    131134if ($conf['fbp']['social_plugin_activity_feed']['enabled'] or $conf['fbp']['social_plugin_like_box']['enabled'])
    132135{
     
    139142add_event_handler('loc_begin_index_thumbnails', 'fbp_loc_begin_index_thumbnails', EVENT_HANDLER_PRIORITY_NEUTRAL, 1);
    140143
     144if ($conf['fbp']['share_album'])
     145{
     146  add_event_handler('loc_end_index', 'fbp_loc_end_index', EVENT_HANDLER_PRIORITY_NEUTRAL+999 /* In order to be last*/);
     147}
     148
    141149?>
Note: See TracChangeset for help on using the changeset viewer.