Ignore:
Timestamp:
Jun 3, 2011, 6:09:08 PM (13 years ago)
Author:
mistic100
Message:

add some options, better intégration

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Back2Front/admin.php

    r10981 r11219  
    66$conf['back2front'] = explode(',', $conf['back2front']);
    77
     8include_once(B2F_PATH.'functions.inc.php');
     9
    810// Enregistrement de la configuration
    911if (isset($_POST['submit']))
     
    1214    $conf['back2front'][0],
    1315    $_POST['switch_mode'],
    14     $_POST['transition']
     16    $_POST['transition'],
     17    $_POST['position'],
     18    serialize(stripslashes_deep(str_replace(array("'",'"',','), null, $_POST['link_name']))),
    1519  );
    1620       
     
    1923}
    2024
     25// Gestion des langues pour le bloc menu
     26$conf['back2front'][4] = unserialize($conf['back2front'][4]);
     27$template->append('link_name', array(
     28  'LANGUAGE_NAME' => l10n('Default'),
     29  'LANGUAGE_CODE' => 'default',
     30  'VALUE' => @$conf['back2front'][4]['default'],
     31  )
     32);
     33foreach (get_languages() as $language_code => $language_name)
     34{
     35        $template->append('link_name', array(
     36    'LANGUAGE_NAME' => $language_name,
     37    'LANGUAGE_CODE' => $language_code,
     38    'VALUE' => isset($conf['back2front'][4][$language_code]) ? $conf['back2front'][4][$language_code] : '',
     39    )
     40  );
     41}
     42
    2143$template->assign(array(
     44  'B2F_PATH' => B2F_PATH,
    2245        'SWITCH_MODE' => $conf['back2front'][1],
    2346        'TRANSITION' => $conf['back2front'][2],
     47  'POSITION' => $conf['back2front'][3],
    2448));
    2549       
Note: See TracChangeset for help on using the changeset viewer.