Ignore:
Timestamp:
Dec 24, 2010, 6:00:49 PM (13 years ago)
Author:
rub
Message:

Add comments social plugin.
Fix FB connexion

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/FacebookPlug/Plugin/admin.config.php

    r8282 r8295  
    3838// Data
    3939$base_url = get_admin_plugin_menu_link(__FILE__);
    40 $url_type = array('page', 'image');
    41 $url_type_l10n = array_map('l10n', $url_type);
     40$picture_url_type = array('page', 'image');
     41$picture_url_type_l10n = array_map('l10n', $picture_url_type);
    4242$layout = array('standard', 'button_count', 'box_count');
    4343$layout_l10n = array_map('l10n', $layout);
     
    6767      // Like button
    6868      $conf['fbp']['social_plugin_like_button']['enabled'] = empty($_POST['FBP_SOCIAL_PLUGIN_LIKE_BUTTON_ENABLED']) ? false : true;
    69       $conf['fbp']['social_plugin_like_button']['url_type'] = $url_type[$_POST['FBP_SOCIAL_PLUGIN_LIKE_BUTTON_URL_TYPE']];
    7069      $conf['fbp']['social_plugin_like_button']['layout'] = $layout[$_POST['FBP_SOCIAL_PLUGIN_LIKE_BUTTON_LAYOUT']];
    7170      $conf['fbp']['social_plugin_like_button']['show_faces'] = empty($_POST['FBP_SOCIAL_PLUGIN_LIKE_BUTTON_SHOW_FACES']) ? false : true;
     
    7574      $conf['fbp']['social_plugin_facepile']['enabled'] = empty($_POST['FBP_SOCIAL_PLUGIN_FACEPILE_ENABLED']) ? false : true;
    7675      $conf['fbp']['social_plugin_facepile']['max_rows'] = intval($_POST['FBP_SOCIAL_PLUGIN_FACEPILE_MAX_ROWS']);
     76      // Comments
     77      $conf['fbp']['social_plugin_comments']['enabled'] = empty($_POST['FBP_SOCIAL_PLUGIN_COMMENTS_ENABLED']) ? false : true;
     78      $conf['fbp']['social_plugin_comments']['numposts'] = intval($_POST['FBP_SOCIAL_PLUGIN_COMMENTS_NUMPOSTS']);
     79      $conf['fbp']['social_plugin_comments']['title'] = $_POST['FBP_SOCIAL_PLUGIN_COMMENTS_TITLE'];
     80      $conf['fbp']['social_plugin_comments']['simple'] = empty($_POST['FBP_SOCIAL_PLUGIN_COMMENTS_SIMPLE']) ? false : true;
     81      $conf['fbp']['social_plugin_comments']['reverse'] = empty($_POST['FBP_SOCIAL_PLUGIN_COMMENTS_REVERSE']) ? false : true;
     82      $conf['fbp']['social_plugin_comments']['publish_feed'] = empty($_POST['FBP_SOCIAL_PLUGIN_COMMENTS_PUBLISH_FEED']) ? false : true;
    7783      // Like box
    7884      $conf['fbp']['social_plugin_like_box']['enabled'] = empty($_POST['FBP_SOCIAL_PLUGIN_LIKE_BOX_ENABLED']) ? false : true;
     
    8894    {
    8995      $conf['fbp']['async_script'] = empty($_POST['FBP_ASYNC_SCRIPT']) ? false : true;
     96      $conf['fbp']['picture_url_type'] = $picture_url_type[$_POST['FBP_PICTURE_URL_TYPE']];
    9097      $conf['fbp']['allow_fb_access_private_page'] = empty($_POST['FBP_ALLOW_FB_ACCESS_PRIVATE_PAGE']) ? false : true;
    9198      break;
     
    122129            'FB_PAGE' => 'http://developers.facebook.com/docs/reference/plugins/like/',
    123130            'ENABLED' => ($conf['fbp']['social_plugin_like_button']['enabled'] ? 'checked="checked"' : ''),
    124             'URL_TYPE_OPTIONS' => $url_type_l10n,
    125             'URL_TYPE_OPTIONS_SELECTED' => array_search($conf['fbp']['social_plugin_like_button']['url_type'], $url_type),
    126131            'LAYOUT_OPTIONS' => $layout_l10n,
    127132            'LAYOUT_OPTIONS_SELECTED' => array_search($conf['fbp']['social_plugin_like_button']['layout'], $layout),
     
    137142            'ENABLED' => ($conf['fbp']['social_plugin_facepile']['enabled'] ? 'checked="checked"' : ''),
    138143            'MAX_ROWS' => $conf['fbp']['social_plugin_facepile']['max_rows'],
     144          ),
     145       'comments' => array
     146          (
     147            'FB_PAGE' => 'http://developers.facebook.com/docs/reference/plugins/comments/',
     148            'ENABLED' => ($conf['fbp']['social_plugin_comments']['enabled'] ? 'checked="checked"' : ''),
     149            'NUMPOSTS' => $conf['fbp']['social_plugin_comments']['numposts'],
     150            'TITLE' => $conf['fbp']['social_plugin_comments']['title'],
     151            'SIMPLE' => ($conf['fbp']['social_plugin_comments']['simple'] ? 'checked="checked"' : ''),
     152            'REVERSE' => ($conf['fbp']['social_plugin_comments']['reverse'] ? 'checked="checked"' : ''),
     153            'PUBLISH_FEED' => ($conf['fbp']['social_plugin_comments']['publish_feed'] ? 'checked="checked"' : ''),
    139154          ),
    140155       'like_box' => array
     
    158173      array(
    159174        'FBP_ASYNC_SCRIPT'=> ($conf['fbp']['async_script'] ? 'checked="checked"' : ''),
     175        'FBP_PICTURE_URL_TYPE_OPTIONS' => $picture_url_type_l10n,
     176        'FBP_PICTURE_URL_TYPE_OPTIONS_SELECTED' => array_search($conf['fbp']['picture_url_type'], $picture_url_type),
    160177        'FBP_ALLOW_FB_ACCESS_PRIVATE_PAGE'=> ($conf['fbp']['allow_fb_access_private_page'] ? 'checked="checked"' : ''),
    161178        ));
Note: See TracChangeset for help on using the changeset viewer.