Changeset 9795


Ignore:
Timestamp:
03/20/11 19:05:17 (9 years ago)
Author:
rub
Message:

2.2 Adaptation

Location:
extensions/FacebookPlug/Plugin
Files:
3 edited
9 moved

Legend:

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

    r9792 r9795  
    2828 
    2929// Lingua 
    30 load_language('admin.config.lang', FBP_DIR.'/'); 
     30load_language('admin.lang', FBP_DIR.'/'); 
    3131 
    3232// Arguments 
     
    3434 
    3535// Data 
    36 $base_url = get_admin_plugin_menu_link(__FILE__); 
     36//~ $base_url = get_admin_plugin_menu_link(__FILE__); 
     37$base_url = get_root_url().'admin.php?page=plugin-'.FBP_PLUGIN_NAME.'-'; 
    3738$picture_url_type = array('page', 'image'); 
    3839$picture_url_type_l10n = array_map('l10n', $picture_url_type); 
     
    4950$tabsheet->add('social_plugin', 
    5051               l10n('Social plugins'), 
    51                add_url_params($base_url, array('tab' => 'social_plugin'))); 
     52               //add_url_params($base_url, array('tab' => 'social_plugin'))); 
     53               $base_url.'social_plugin'); 
    5254$tabsheet->add('button', 
    5355               l10n('Buttons'), 
    54                add_url_params($base_url, array('tab' => 'button'))); 
     56               //add_url_params($base_url, array('tab' => 'button'))); 
     57               $base_url.'button'); 
    5558$tabsheet->add('advanced', 
    5659               l10n('Advanced'), 
    57                add_url_params($base_url, array('tab' => 'advanced'))); 
     60               //add_url_params($base_url, array('tab' => 'advanced'))); 
     61               $base_url.'advanced'); 
    5862$tabsheet->add('activity', 
    5963               l10n('Activity'), 
    60                add_url_params($base_url, array('tab' => 'activity'))); 
     64               //add_url_params($base_url, array('tab' => 'activity'))); 
     65               $base_url.'activity'); 
    6166$tabsheet->select($page['tab']); 
    6267$tabsheet->assign(); 
     
    264269 
    265270// Global value 
    266 $template->assign('FBP_ACTION', add_url_params($base_url, array('tab' => $page['tab']))); 
    267 //~ $template->block_html_head('', '<link rel="stylesheet" type="text/css" href="'.FBP_PATH.'/css/admin.config.css">', $smarty, $repeat); 
     271//~ $template->assign('FBP_ACTION', add_url_params($base_url, array('tab' => $page['tab']))); 
     272$template->assign('FBP_ACTION', $base_url.$page['tab']); 
    268273$template->assign('FACEBOOK_PIWIGO_RUB_URL', FACEBOOK_PIWIGO_RUB_URL); 
    269274$template->assign('FACEBOOK_PIWIGO_GROUP_URL', FACEBOOK_PIWIGO_GROUP_URL); 
     
    272277 
    273278//Apply tpl 
    274 $template->set_filename('fbp_plugin_admin_content', FBP_DIR.'/tpl/admin.config.tpl'); 
     279$template->set_filename('fbp_plugin_admin_content', FBP_DIR.'/tpl/admin.tpl'); 
    275280$template->assign_var_from_handle('ADMIN_CONTENT', 'fbp_plugin_admin_content'); 
    276281 
  • extensions/FacebookPlug/Plugin/include/admin.inc.php

    r8425 r9795  
    3030    array( 
    3131      'NAME' => 'FacebookPlug', 
    32       'URL' => get_admin_plugin_menu_link( 
    33         FBP_DIR.'/admin.config.php') 
     32      'URL' => get_root_url().'admin.php?page=plugin-'.FBP_PLUGIN_NAME 
     33      /*'URL' => get_admin_plugin_menu_link( 
     34        FBP_DIR.'/admin.config.php')*/ 
    3435        ) 
    3536      ); 
  • extensions/FacebookPlug/Plugin/include/constants.inc.php

    r8440 r9795  
    3838define('FBP_DIR', dirname(dirname(__FILE__))); 
    3939define('FBP_PATH' , PHPWG_PLUGINS_PATH.basename(FBP_DIR)); 
     40define('FBP_PLUGIN_NAME', basename(dirname(dirname(__FILE__)))); 
    4041define('FBP_IP_FB', '66.220.'); 
    4142 
  • extensions/FacebookPlug/Plugin/include/header.inc.php

    r8667 r9795  
    121121        ) 
    122122    { 
    123       $template->block_html_head('', '<link rel="stylesheet" type="text/css" href="'.FBP_PATH.'/css/fbp.css">', $smarty, $repeat); 
     123      $template->func_combine_css(array('path' => FBP_PATH.'/css/fbp.css'), $smarty); 
    124124    } 
    125125  } 
     
    149149        (script_basename() == 'admin') 
    150150        and 
    151         (isset($_GET['page']) and $_GET['page'] == 'plugin') 
    152         and 
    153         (isset($_GET['section']) and strtok($_GET['section'], '/') == 'FacebookPlug') 
     151        ( 
     152          (isset($_GET['page']) and preg_match('/^plugin-FacebookPlug(?:-(.*))?$/', $_GET['page'])) 
     153          or 
     154          ( 
     155            (isset($_GET['page']) and $_GET['page'] == 'plugin') 
     156            and 
     157            (isset($_GET['section']) and strtok($_GET['section'], '/') == 'FacebookPlug') 
     158          ) 
     159        ) 
    154160      ) 
    155161    ) 
  • extensions/FacebookPlug/Plugin/tpl/admin.tpl

    r9792 r9795  
    1 {known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js"} 
    2 {known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js"} 
    3 {known_script id="jquery.ui.dialog" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.dialog.packed.js"} 
    4 {known_script id="jquery.tipTip" src=$ROOT_URL|@cat:"themes/default/js/plugins/jquery.tipTip.minified.js" } 
    5  
    6 {html_head} 
    7 <link rel="stylesheet" type="text/css" href="{$FBP_PATH|@cat:'/css/admin.config.css'}"> 
    8 {/html_head} 
     1{combine_script id="jquery.tipTip" path='themes/default/js/plugins/jquery.tipTip.minified.js' load='async'} 
     2 
     3{combine_css path=$FBP_PATH|@cat:"/css/admin.css"} 
     4{combine_css path="plugins/FacebookPlug/css/admin.css"} 
    95 
    106<div class="titrePage"> 
     
    362358{*<div id="dialog_modal_can_close" title="{'Informations'|@translate}">{'Data are modified but not saved! Are you sure to quit this tabsheet?'|@translate}</div>*} 
    363359 
     360{footer_script require='jquery.ui.dialog,jquery.tipTip'} 
    364361{literal} 
    365 <script type="text/javascript"> 
    366362  function show_hide(checkbox_name, div_name) 
    367363  { 
     
    466462{literal} 
    467463    }); 
    468 </script> 
    469464{/literal} 
    470  
     465{/footer_script} 
Note: See TracChangeset for help on using the changeset viewer.