Changeset 8298


Ignore:
Timestamp:
Dec 24, 2010, 7:23:54 PM (10 years ago)
Author:
rub
Message:

Can change default facebook application id

Location:
extensions/FacebookPlug/Plugin
Files:
6 edited

Legend:

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

    r8295 r8298  
    9393    case 'advanced' :
    9494    {
     95      $conf['fbp']['facebook_app_id'] = $_POST['FBP_FACEBOOK_APP_ID'];
    9596      $conf['fbp']['async_script'] = empty($_POST['FBP_ASYNC_SCRIPT']) ? false : true;
    9697      $conf['fbp']['picture_url_type'] = $picture_url_type[$_POST['FBP_PICTURE_URL_TYPE']];
     
    172173      $page['tab'],
    173174      array(
    174         'FBP_ASYNC_SCRIPT'=> ($conf['fbp']['async_script'] ? 'checked="checked"' : ''),
     175        'FBP_FACEBOOK_APP_ID' => $conf['fbp']['facebook_app_id'],
     176        'FBP_ASYNC_SCRIPT' => ($conf['fbp']['async_script'] ? 'checked="checked"' : ''),
    175177        'FBP_PICTURE_URL_TYPE_OPTIONS' => $picture_url_type_l10n,
    176178        'FBP_PICTURE_URL_TYPE_OPTIONS_SELECTED' => array_search($conf['fbp']['picture_url_type'], $picture_url_type),
  • extensions/FacebookPlug/Plugin/include/conf.inc.php

    r8295 r8298  
    3030  array
    3131  (
     32    'facebook_app_id' => null,
    3233    'async_script' => false,
    3334    'picture_url_type' => 'page',
     
    6869  (
    6970    'enabled' => false,
    70     'numposts' => 5,
     71    'numposts' => 3,
    7172    'css' => null,
    7273    'title' => null,
  • extensions/FacebookPlug/Plugin/include/header.inc.php

    r8275 r8298  
    2626function fbp_header($content, &$smarty)
    2727{
    28   global $conf;
    29 
    3028  // replace tag html
    3129  $search = '<html ';
     
    4240function fbp_init()
    4341{
    44   global $template, $user, $page, $conf, $picture;
     42  global $template, $conf, $user;
    4543
    4644  // set prefilter
    4745  $template->set_prefilter('header', 'fbp_header');
    4846
    49   $template->assign('FACEBOOK_APP_ID', FACEBOOK_APP_ID);
     47  $template->assign('FACEBOOK_APP_ID', (is_numeric($conf['fbp']['facebook_app_id']) ? $conf['fbp']['facebook_app_id'] : FACEBOOK_APP_ID));
    5048  // define language
    5149  $template->assign('LANGUAGE', $user['language']);
  • extensions/FacebookPlug/Plugin/language/en_UK/plugin.lang.php

    r8295 r8298  
    6262$lang['Reverse'] = 'Reverse';
    6363$lang['Publish feed'] = 'Publish feed';
    64 //~ $lang[''] = '';
     64$lang['Facebook application identifient'] = 'Facebook application identifient';
    6565
    6666?>
  • extensions/FacebookPlug/Plugin/language/fr_FR/plugin.lang.php

    r8295 r8298  
    6262$lang['Reverse'] = 'Ordre inversé';
    6363$lang['Publish feed'] = 'Publier les commentaires';
     64$lang['Facebook application identifient'] = 'Identifiant de l\'application Facebook';
    6465
    6566?>
  • extensions/FacebookPlug/Plugin/tpl/admin.config.tpl

    r8295 r8298  
    169169<fieldset>
    170170  <ul>
     171      <li>
     172      <label>
     173        <span class="property">{'Facebook application identifient'|@translate}</span>
     174        <input type="text" size="15" name="FBP_FACEBOOK_APP_ID" value="{$advanced.FBP_FACEBOOK_APP_ID}" />
     175      </label>
     176    </li>
    171177{*    <li>
    172178      <label>
     
    174180        <input type="checkbox" name="FBP_ASYNC_SCRIPT" {$advanced.FBP_ASYNC_SCRIPT} />
    175181      </label>
    176     </li>
    177 *}
     182    </li>*}
    178183    <li>
    179184      <label>
Note: See TracChangeset for help on using the changeset viewer.