Ignore:
Timestamp:
Jan 1, 2011, 11:16:52 AM (13 years ago)
Author:
rub
Message:

Facebook_Integration plugin is inactivated when FacebookPlug is activating
Get representative image for category or random picture (and not only first picture)
Allow Facebook to access private index page

File:
1 edited

Legend:

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

    r8402 r8420  
    9090}
    9191
    92 function ftp_loc_end_section_init()
    93 {
    94   global $conf, $page;
    95 
    96   //~ if ($conf['fbp']['social_plugin_like_button']['enabled'] or $conf['fbp']['social_plugin_comments']['enabled'])
    97   if ($page['fbp']['do_facebook_init'])
    98   {
    99     if ($conf['fbp']['allow_fb_access_private_page'])
    100     {
    101       global $user, $page;
    102 
    103       // No restristion for facebook user
    104       if (preg_match('/'.FBP_IP_FB. '/', $_SERVER["REMOTE_ADDR"]))
    105       {
    106         //Allow guest access
    107         $conf['guest_access'] = true;
    108         // No forbidden categorie
    109         $user['forbidden_categories'] = '';
    110         $user['level'] = max($conf['available_permission_levels']);
    111         $page['rank_of'][$page['image_id']] = 0;
    112         $page['items'] = array_flip($page['rank_of']);
    113       }
    114     }
    115   }
    116 }
    117 
    11892add_event_handler('render_element_content', 'fbp_render_element_content', EVENT_HANDLER_PRIORITY_NEUTRAL+1 /*in order to have picture content*/, 2);
    119 add_event_handler('loc_end_section_init', 'ftp_loc_end_section_init');
    12093
    12194?>
Note: See TracChangeset for help on using the changeset viewer.