Ignore:
Timestamp:
Dec 27, 2009, 9:59:11 PM (14 years ago)
Author:
EXFTB
Message:

LLGBO improve Header management

Location:
extensions/LLGBO2/admin
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • extensions/LLGBO2/admin/llgbo_admin.php

    r4524 r4574  
    4747               l10n('llgbo_M_tooltip'),
    4848               $my_base_url.'&tab=tooltip');
    49 If ($page['tab'] == 'manage')                     
    50         {if (!isset($_POST['llgbo_frame'])   )
    51                 {$conf['LLGBO_SETTINGS'][0] = 'false';}         
    52                 else
    53                 {$conf['LLGBO_SETTINGS'][0]= $_POST['llgbo_frame'];}}
     49$disptabframe = 'false';
     50$disptabheader = 'false';       
     51                           
     52if (!isset($_POST['llgbo_frame'])   )
     53        {$disptabframe = $conf['LLGBO_SETTINGS'][0] ;} 
     54        else
     55        {$disptabframe = $_POST['llgbo_frame'];}
     56if (!isset($_POST['llgbo_header'])   )
     57        {$disptabheader = $conf['LLGBO_SETTINGS'][6] ;}         
     58        else
     59        {$disptabheader = $_POST['llgbo_header'];}
    5460                   
    55 if ($conf['LLGBO_SETTINGS'][0] == 'true')
     61if (($disptabframe == 'true'))
    5662{$tabsheet->add('frame',
    5763               l10n('llgbo_M_frame'),
    5864               $my_base_url.'&tab=frame');}
    59 
    60 
     65                           
     66if (($disptabheader == 'true'))
     67{$tabsheet->add('header',
     68               l10n('llgbo_M_header'),
     69               $my_base_url.'&tab=header');}                   
    6170
    6271$tabsheet->assign();
     
    6776if ($page['tab'] == 'frame' )
    6877{$template->set_filenames( array('llgbo_admin_content' => dirname(__FILE__).'/llgbo_adminframe.tpl') );}
     78if ($page['tab'] == 'header' )
     79{$template->set_filenames( array('llgbo_admin_content' => dirname(__FILE__).'/llgbo_adminheader.tpl') );}
    6980$tabsheet->select($page['tab']);
    7081/* ****************************************************** */
     
    241252  Draw_frame();
    242253}
     254///////////////////////////////////////////////
     255/////            HEADER
     256/////////////////////////////////////////////////
     257if ($page['tab'] == 'header') {
     258        if ( isset($_POST['submit']))
     259        {   if (!isset($_POST['llgbo_header_home'])) {$_POST['llgbo_header_home'] = 'true';} 
     260                if (!isset($_POST['llgbo_header_category'])) {$_POST['llgbo_header_category'] = 'true';}   
     261                if (!isset($_POST['llgbo_header_category_filter_recent'])) {$_POST['llgbo_header_category_filter_recent'] = 'true';}   
     262                if (!isset($_POST['llgbo_header_category_flat'])) {$_POST['llgbo_header_category_flat'] = 'true';} 
     263                if (!isset($_POST['llgbo_header_category_posted_monthly'])) {$_POST['llgbo_header_category_posted_monthly'] = 'true';} 
     264                if (!isset($_POST['llgbo_header_picture'])) {$_POST['llgbo_header_picture'] = 'true';}
     265            if (!isset($_POST['llgbo_header_additional_page'])) {$_POST['llgbo_header_additional_page'] = 'true';} 
     266                if (!isset($_POST['llgbo_header_most_visited'])) {$_POST['llgbo_header_most_visited'] = 'true';}
     267                if (!isset($_POST['llgbo_header_best_rated'])) {$_POST['llgbo_header_best_rated'] = 'true';} 
     268                if (!isset($_POST['llgbo_header_list'])) {$_POST['llgbo_header_list'] = 'true';}       
     269                if (!isset($_POST['llgbo_header_recent_pics'])) {$_POST['llgbo_header_recent_pics'] = 'true';}   
     270                if (!isset($_POST['llgbo_header_created_monthly_calendar'])) {$_POST['llgbo_header_created_monthly_calendar'] = 'true';} 
     271                if (!isset($_POST['llgbo_header_tags'])) {$_POST['llgbo_header_tags'] = 'true';} 
     272                if (!isset($_POST['llgbo_header_search'])) {$_POST['llgbo_header_search'] = 'true';}   
     273            if (!isset($_POST['llgbo_header_comments'])) {$_POST['llgbo_header_comments'] = 'true';} 
     274                if (!isset($_POST['llgbo_header_about'])) {$_POST['llgbo_header_about'] = 'true';}   
     275                if (!isset($_POST['llgbo_header_notification'])) {$_POST['llgbo_header_notification'] = 'true';}   
     276                if (!isset($_POST['llgbo_header_register'])) {$_POST['llgbo_header_register'] = 'true';} 
     277                if (!isset($_POST['llgbo_header_identification'])) {$_POST['llgbo_header_identification'] = 'true';}
     278                if (!isset($_POST['llgbo_header_favorites'])) {$_POST['llgbo_header_favorites'] = 'true';}
     279                if (!isset($_POST['llgbo_header_recent_cats'])) {$_POST['llgbo_header_recent_cats'] = 'true';}         
     280                       
     281                 
     282                 $param_llgbo_header = array(
     283                                        $_POST['llgbo_header_home'],    $_POST['llgbo_header_category'] ,
     284                                        $_POST['llgbo_header_category_filter_recent'],  $_POST['llgbo_header_category_flat'],
     285                                        $_POST['llgbo_header_category_posted_monthly'], $_POST['llgbo_header_picture'],
     286                                        $_POST['llgbo_header_additional_page'], $_POST['llgbo_header_most_visited'],
     287                                        $_POST['llgbo_header_best_rated'] , $_POST['llgbo_header_list'],
     288                                        $_POST['llgbo_header_recent_pics'],             $_POST['llgbo_header_created_monthly_calendar'],
     289                                        $_POST['llgbo_header_tags'],            $_POST['llgbo_header_search'],
     290                                        $_POST['llgbo_header_comments'],                $_POST['llgbo_header_about'],
     291                                        $_POST['llgbo_header_notification'], $_POST['llgbo_header_register'],
     292                                        $_POST['llgbo_header_identification'], $_POST['llgbo_header_favorites'],
     293                                        $_POST['llgbo_header_recent_cats']);
     294                $llgbo_newheader_value = implode ("," , $param_llgbo_header);
     295               
     296                  $query = '
     297                                UPDATE ' . CONFIG_TABLE . '
     298                                  SET value="'.$llgbo_newheader_value.'"
     299                                  WHERE param="LLGBOHEADER"
     300                                  LIMIT 1';
     301                                                pwg_query($query);
     302                                 $template->assign('LLGBOINFO','llgbo_info');
     303                                 
     304                $conf['LLGBO_HEADER'] = explode ("," ,$llgbo_newheader_value);
     305        }
     306 // Reload settings for correct display after update
     307 if (isset($conf['LLGBO_HEADER'][0])) {$template->assign(array( 'LLGBO_HEADER_HOME' => $conf['LLGBO_HEADER'][0]));}
     308 if (isset($conf['LLGBO_HEADER'][1])) {$template->assign(array( 'LLGBO_HEADER_CATEGORY' => $conf['LLGBO_HEADER'][1]));}
     309 if (isset($conf['LLGBO_HEADER'][2])) {$template->assign(array( 'LLGBO_HEADER_CATEGORY_FILTER_RECENT' => $conf['LLGBO_HEADER' ][2]));}
     310 if (isset($conf['LLGBO_HEADER'][3])) {$template->assign(array( 'LLGBO_HEADER_CATEGORY_FLAT' => $conf['LLGBO_HEADER'][3]));}
     311 if (isset($conf['LLGBO_HEADER'][4])) {$template->assign(array( 'LLGBO_HEADER_CATEGORY_POSTED_MONTHLY' => $conf['LLGBO_HEADER'][4]));}
     312 if (isset($conf['LLGBO_HEADER'][5])) {$template->assign(array( 'LLGBO_HEADER_PICTURE' => $conf['LLGBO_HEADER'][5]));}
     313 if (isset($conf['LLGBO_HEADER'][6])) {$template->assign(array( 'LLGBO_HEADER_ADDITIONAL_PAGE' => $conf['LLGBO_HEADER'][6]));}
     314 if (isset($conf['LLGBO_HEADER'][7])) {$template->assign(array( 'LLGBO_HEADER_MOST_VISITED' => $conf['LLGBO_HEADER'][7]));}
     315 if (isset($conf['LLGBO_HEADER'][8])) {$template->assign(array( 'LLGBO_HEADER_BEST_RATED' => $conf['LLGBO_HEADER' ][8]));}
     316 if (isset($conf['LLGBO_HEADER'][9])) {$template->assign(array( 'LLGBO_HEADER_LIST' => $conf['LLGBO_HEADER' ][9]));}
     317 if (isset($conf['LLGBO_HEADER'][10])) {$template->assign(array( 'LLGBO_HEADER_RECENT_PICS' => $conf['LLGBO_HEADER'][10]));}
     318 if (isset($conf['LLGBO_HEADER'][11])) {$template->assign(array( 'LLGBO_HEADER_TAGS' => $conf['LLGBO_HEADER'][11]));}
     319 if (isset($conf['LLGBO_HEADER'][12])) {$template->assign(array( 'LLGBO_HEADER_CREATED_MONTHLY_CALENDAR' => $conf['LLGBO_HEADER'][12]));}
     320 if (isset($conf['LLGBO_HEADER'][13])) {$template->assign(array( 'LLGBO_HEADER_SEARCH' => $conf['LLGBO_HEADER'][13]));}
     321 if (isset($conf['LLGBO_HEADER'][14])) {$template->assign(array( 'LLGBO_HEADER_COMMENTS' => $conf['LLGBO_HEADER'][14]));}
     322 if (isset($conf['LLGBO_HEADER'][15])) {$template->assign(array( 'LLGBO_HEADER_ABOUT' => $conf['LLGBO_HEADER'][15]));}
     323 if (isset($conf['LLGBO_HEADER'][16])) {$template->assign(array( 'LLGBO_HEADER_NOTIFICATION' => $conf['LLGBO_HEADER' ][16]));}
     324 if (isset($conf['LLGBO_HEADER'][17])) {$template->assign(array( 'LLGBO_HEADER_REGISTER' => $conf['LLGBO_HEADER'][17]));}
     325 if (isset($conf['LLGBO_HEADER'][18])) {$template->assign(array( 'LLGBO_HEADER_IDENTIFICATION' => $conf['LLGBO_HEADER'][18]));}
     326 if (isset($conf['LLGBO_HEADER'][19])) {$template->assign(array( 'LLGBO_HEADER_FAVORITES' => $conf['LLGBO_HEADER'][19]));}
     327 if (isset($conf['LLGBO_HEADER'][20])) {$template->assign(array( 'LLGBO_HEADER_RECENT_CATS' => $conf['LLGBO_HEADER'][20]));}
     328
     329 }
    243330
    244331$template->assign_var_from_handle( 'ADMIN_CONTENT', 'llgbo_admin_content');
  • extensions/LLGBO2/admin/llgbo_adminframe.tpl

    r4524 r4574  
     1
    12<div class="infos" style="text-align:left;padding-left:45px;" >{$LLGBOINFO|@translate}</div>
    23 <h2> {'Title'|@translate} <br>  {$LLGBO_VERSION}</h2>
     4 <h3>{'Step3_Title'|@translate}</h3>
    35<form method="post" action="{$llgbo_F_ACTION}" class="properties">
    46<fieldset>
    5 <legend>{'Step3_Title'|@translate}</legend>
    67        <div id="framepicker" align="center" > </div>
    78        <span id="gboh2" style ="position: relative; top:1.5em;margin-left:40%;background:transparent;z-index:3;color:{$LLGBO_TITLE_FRAME_COLOR}">{'llgbo_title_frame_color'|@translate} </span>
    89        {$FRAME_BEGIN}
    910        <table align="center" style ="position: relative; top:-2.5em;" >
    10         <th id="llgbotitle">{'llgo_frame_setting'|@translate}   </th>
     11        <th id="llgbotitle">    </th>
    1112        <tr><br>
    1213                <td   class="llgbolabel" >{'llgbo_title_frame_color'|@translate} </td>
  • extensions/LLGBO2/admin/llgbo_adminsettings.tpl

    r4524 r4574  
    11<div class="infos" style="text-align:left;padding-left:45px;" >{$LLGBOINFO|@translate}</div>
    22 <h2> {'Title'|@translate} <br>  {$LLGBO_VERSION}</h2>
    3 {'Howto'|@translate}
     3<h3>{'Howto'|@translate}</h3>
     4
    45<form method="post" action="{$llgbo_F_ACTION}" class="properties">
    56<fieldset>
    6 <legend>{'Step1_Title'|@translate}</legend>
     7
    78<table id="llgbotable" style="{$LLGBODISPMANAGE}">
    89        <tr>
     
    4243        </tr>   
    4344</table>
    44 <div align="center">
    45 <br>
    46 <span class="llgbotitle">       {'llgbo_maintain_header'|@translate}    </span><br>
    47 <textarea   rows=2 COLS=80  name="llgbo_maintain_header">{$LLGBO_MAINTAIN_HEADER}</TEXTAREA>   
    48 <br> <br>
    49 <table id="llgbotable"
    50 <tr class="llgbotitle"> <td class="llgbolabel"> {'llgbo_maintain_header_help'|@translate}       </td></tr>
    51 <tr class="llgbotitle"> <td class="llgbolabel"> {'llgbo_maintain_header_help1'|@translate}      </td></tr>
    52 <tr class="llgbotitle"> <td class="llgbolabel"> {'llgbo_maintain_header_help2'|@translate}      </td></tr>
    53 </table>
    54 </div>
     45
    5546<div align="center"><br><br><input class="submit" type="submit" value="{'submit'|@translate}" name="submit" /></div>
    5647</fieldset>
  • extensions/LLGBO2/admin/llgbo_admintooltip.tpl

    r4524 r4574  
    11<div class="infos" style="text-align:left;padding-left:45px;" >{$LLGBOINFO|@translate}</div>
    22 <h2> {'Title'|@translate} <br>  {$LLGBO_VERSION}</h2>
    3 {'Howto'|@translate}
     3<h3>{'Step2_Title'|@translate}</h3>
    44<form method="post" action="{$llgbo_F_ACTION}" class="properties">
    55<fieldset>
    6 <legend>{'Step2_Title'|@translate}</legend>
     6
    77<div id="picker"style="{$LLGBODISPTOOLTIP}"></div>
    88<!--           T O O L T I P  -->
Note: See TracChangeset for help on using the changeset viewer.