Changeset 2286 for trunk/plugins


Ignore:
Timestamp:
Mar 20, 2008, 1:35:36 AM (16 years ago)
Author:
rvelices
Message:
  • admin/notification_by_mail goes smarty - THE LAST ONE :-) :-)
  • get rid of user_list warnings
  • some code reorganisation in template class + explode modifier
  • minor template and language changes in search.tpl and cat_modify.tpl
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/language_switch/language_switch.inc.php

    r2164 r2286  
    1 <?php 
     1<?php
    22// +-----------------------------------------------------------------------+
    33// | PhpWebGallery - a PHP based picture gallery                           |
     
    3131  if ( isset( $_GET['lang']) )
    3232  {
    33     if ( !empty($_GET['lang'] ) and 
     33    if ( !empty($_GET['lang'] ) and
    3434      file_exists( PHPWG_ROOT_PATH.'language/'
    3535      . $_GET['lang'].'/common.lang.php') )
     
    3737      if (is_a_guest() or is_generic())
    3838      {
    39         setcookie( 'pwg_lang_switch', $_GET['lang'], 
     39        setcookie( 'pwg_lang_switch', $_GET['lang'],
    4040          time()+60*60*24*30, cookie_path() );
    4141      }
     
    5555  if ((is_a_guest() or is_generic())
    5656    and isset( $_COOKIE['pwg_lang_switch'] ) )
    57   { 
    58     $user['language'] = $_COOKIE['pwg_lang_switch']; 
     57  {
     58    $user['language'] = $_COOKIE['pwg_lang_switch'];
    5959  }
    6060// Reload language only if it isn't the same one
    61   if ( $same !== $user['language']) 
     61  if ( $same !== $user['language'])
    6262  {
    6363    load_language('common.lang', '', $user['language']);
     
    7171//if ( isset( $_GET['lang']) ) { redirect( make_index_url() ); }
    7272
    73 function Lang_flags() 
     73function Lang_flags()
    7474{
    7575  global $user, $template;
     
    8080    $qlc_alt = ucwords( $displayname );
    8181    $qlc_title =  $qlc_alt;
    82     $qlc_img =  PHPWG_PLUGINS_PATH.'language_switch/icons/'
     82    $qlc_img =  'plugins/language_switch/icons/'
    8383       . $code . '.gif';
    84  
    85     if ( $code !== $user['language'] and file_exists($qlc_img) )
     84
     85    if ( $code !== $user['language'] and file_exists(PHPWG_ROOT_PATH.$qlc_img) )
    8686    {
    87       $template -> concat_var( 'PLUGIN_INDEX_ACTIONS',
    88         '<li><a href="' . $qlc_url . '" ><img src="' . $qlc_img . '" alt="'
     87      $template->concat( 'PLUGIN_INDEX_ACTIONS',
     88        '<li><a href="' . $qlc_url . '" ><img src="' . get_root_url().$qlc_img . '" alt="'
    8989        . $qlc_alt . '" title="'
    90         . $qlc_title . '" style="border: 1px solid #000000; ' 
     90        . $qlc_title . '" style="border: 1px solid #000000; '
    9191        . ' margin: 0px 2px;" /></a></li>');
    9292    }
Note: See TracChangeset for help on using the changeset viewer.