Ignore:
Timestamp:
Dec 28, 2010, 12:15:48 AM (13 years ago)
Author:
rub
Message:

Admin configuration page:

o Fix cancel Button
o Change layout
o Like Button and comments cannot be enabled together (php and JQuery test)

File:
1 edited

Legend:

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

    r8298 r8331  
    4747$colorscheme_l10n = array_map('l10n', $colorscheme);
    4848
     49
    4950// Tabsheet
    5051$tabsheet = new tabsheet();
     
    6162if (isset($_POST['submit']))
    6263{
     64  $save_conf['fbp'] = $conf['fbp'];
     65
    6366  switch ($page['tab'])
    6467  {
     
    8891      $conf['fbp']['social_plugin_like_box']['stream'] = empty($_POST['FBP_SOCIAL_PLUGIN_LIKE_BOX_STREAM']) ? false : true;
    8992      $conf['fbp']['social_plugin_like_box']['header'] = empty($_POST['FBP_SOCIAL_PLUGIN_LIKE_BOX_HEADER']) ? false : true;
     93     
     94      // Check
     95      if ($conf['fbp']['social_plugin_like_button']['enabled'] and $conf['fbp']['social_plugin_comments']['enabled'])
     96      {
     97        $conf['fbp']['social_plugin_like_button']['enabled'] = $save_conf['fbp']['social_plugin_like_button']['enabled'];
     98        $conf['fbp']['social_plugin_comments']['enabled'] = $save_conf['fbp']['social_plugin_comments']['enabled'];
     99        array_push($page['infos'], l10n('Like button and comments cannot be enabled together').', '.l10n('enabled values are restored'));
     100      }
    90101      break;
    91102    }
     
    183194}
    184195
    185 /*$template->assign(
    186   array(
    187     'FBP_ALLOW_FB_ACCESS_PRIVATE_PAGE'=> ($conf['fbp']['allow_fb_access_private_page'] ? 'checked="checked"' : ''),
    188     //~ 'FBP_DAY_NUMBER'=> $conf['fbp']['day_number'],
    189     ));*/
    190 
     196// Global value
     197//~ $template->assign('FBP_PATH', FBP_PATH);
     198$template->assign('FBP_ACTION', add_url_params($base_url, array('tab' => $page['tab'])));
     199$template->block_html_head('', '<link rel="stylesheet" type="text/css" href="'.FBP_PATH.'/css/admin.config.css">', $smarty, $repeat);
     200
     201//Apply tpl
    191202$template->set_filename('plugin_admin_content', FBP_DIR.'/tpl/admin.config.tpl');
    192203$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
Note: See TracChangeset for help on using the changeset viewer.