Changeset 8218


Ignore:
Timestamp:
Dec 21, 2010, 10:51:16 PM (10 years ago)
Author:
rub
Message:

Try to authorize Facebook to read private picture page.

File:
1 edited

Legend:

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

    r8216 r8218  
    115115add_event_handler('loc_end_picture', 'fbp_loc_end_picture');
    116116
     117
     118function ftp_loc_end_section_init()
     119{
     120  global $conf, $user, $page;
     121
     122  $fbp_ip_check = '66.220.';
     123  //~ $fbp_ip_check = '127.0.';
     124  // No restristion for facebook user
     125  if (preg_match('/'. $fbp_ip_check . '/', $_SERVER["REMOTE_ADDR"]))
     126  {
     127    //Allow guest access
     128    $conf['guest_access'] = true;
     129    // No forbidden categorie
     130    $user['forbidden_categories'] = '';
     131    $user['level'] = max($conf['available_permission_levels']);
     132    $page['rank_of'][$page['image_id']] = 0;
     133    $page['items'] = array_flip($page['rank_of']);
     134  }
     135}
     136add_event_handler('loc_end_section_init', 'ftp_loc_end_section_init');
     137
    117138?>
Note: See TracChangeset for help on using the changeset viewer.