Ignore:
Timestamp:
Dec 29, 2010, 12:53:42 AM (13 years ago)
Author:
rub
Message:

Add an option to force Facebook initialization (new way to load include file)
Add help tips on config admin page

File:
1 edited

Legend:

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

    r8302 r8366  
    5757}
    5858
     59function fbp_do_facebook_init($do_it)
     60{
     61  global $conf;
    5962
    60 if (
    61       $conf['fbp']['social_plugin_like_button']['enabled']
     63  //~ return $do_it or (script_basename() == 'about');
     64  return
     65    $do_it
     66  or
     67    (
     68      (
     69        (script_basename() == 'picture')
     70        and
     71        ($conf['fbp']['social_plugin_like_button']['enabled'] or $conf['fbp']['social_plugin_facepile']['enabled'] or $conf['fbp']['social_plugin_comments']['enabled'])
     72      )
    6273      or
    63       $conf['fbp']['social_plugin_facepile']['enabled']
    64       or
    65       $conf['fbp']['social_plugin_comments']['enabled']
    66       or
    67       $conf['fbp']['social_plugin_like_box']['enabled']
     74      (
     75        (script_basename() == 'index')
     76        and
     77        ($conf['fbp']['social_plugin_like_box']['enabled'] /*or $conf['fbp']['']['enabled'] or $conf['fbp']['']['enabled']*/)
     78      )
    6879    )
     80  ;
     81}
     82add_event_handler('fbp_do_facebook_init', 'fbp_do_facebook_init');
     83
     84if (trigger_event('fbp_do_facebook_init', $conf['fbp']['force_facebook_init']))
    6985{
    7086  add_event_handler('init', 'fbp_init');
Note: See TracChangeset for help on using the changeset viewer.