Ignore:
Timestamp:
Feb 23, 2014, 9:08:38 AM (10 years ago)
Author:
ddtddt
Message:

[extensions] - Photo_add_by - if plugin see photo by user is actif - can show link on user on picture page with parameter plugin see photo by user

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Photo_add_by/admin/admin.php

    r21231 r27458  
    4545        $options['Average'] = l10n('Rating score');
    4646
    47        
    48 
    4947  $template->assign(
    5048    'gestionA',
    5149    array(
    5250      'OPTIONS' => $options,
    53       'SELECTED' => $selected
     51      'SELECTED' => $selected,
    5452      ));
    55    
    5653
    57 if (isset($_POST['infopab']))
     54$PASPBY = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'see_photos_by_user';"));
     55if($PASPBY['state'] == 'active')
     56{
     57$PABS2T = array(
     58    l10n('No'),
     59    l10n('Yes'),
     60  );
     61 
     62$PABS2 = array(
     63    '0',
     64    '1',
     65  );
     66
     67  $template->assign(
     68    'gestionB',
     69    array(
     70          'TOTO' => 'toto',
     71      ));
     72            global $conf;
     73$template->assign('pabs2', $PABS2);
     74$template->assign('pabs2t', $PABS2T);
     75$template->assign('PABS', $conf['Photo_add_by_show']);
     76         
     77}
     78
     79if (isset($_POST['submitpab']))
    5880        {
    5981conf_update_param('Photo_add_by', $_POST['infopab']);
     82if($PASPBY['state'] == 'active')
     83{
     84conf_update_param('Photo_add_by_show', $_POST['inspabs2']);
     85  $template->assign(
     86    'gestionB',
     87    array(
     88          'TOTO' => 'toto',
     89      ));
     90$template->assign('PABS', $_POST['inspabs2']);
     91}
    6092$template->delete_compiled_templates();
    6193array_push($page['infos'], l10n('Your configuration settings are saved'));
     
    6698    array(
    6799      'OPTIONS' => $options,
    68       'SELECTED' => $selected
     100      'SELECTED' => $selected,
    69101      ));
    70    
    71 
    72 
    73102        }
    74103  break;
Note: See TracChangeset for help on using the changeset viewer.