Ignore:
Timestamp:
Jan 13, 2011, 11:37:05 PM (14 years ago)
Author:
rub
Message:

Fix Arabic language
Fix picture buttons without social plugin

Location:
extensions/FacebookPlug/Plugin/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/FacebookPlug/Plugin/include/header.inc.php

    r8448 r8653  
    2929
    3030  // Array compute by plugins/FacebookPlug/tools/check_language.php script
    31   $valid_fb_locales = array ( 0 => 'ca_ES', 1 => 'cs_CZ', 2 => 'da_DK', 3 => 'de_DE', 4 => 'es_ES', 5 => 'fa_IR', 6 => 'fr_CA', 7 => 'fr_FR', 8 => 'he_IL', 9 => 'hr_HR', 10 => 'hu_HU', 11 => 'it_IT', 12 => 'ja_JP', 13 => 'ka_GE', 14 => 'lv_LV', 15 => 'mk_MK', 16 => 'nl_NL', 17 => 'pl_PL', 18 => 'pt_BR', 19 => 'pt_PT', 20 => 'ro_RO', 21 => 'ru_RU', 22 => 'sk_SK', 23 => 'sr_RS', 24 => 'sv_SE', 25 => 'tr_TR', 26 => 'vi_VN', 27 => 'zh_CN', );
     31  $valid_fb_locales = array ( 0 => 'ar_AR', 1 => 'ca_ES', 2 => 'cs_CZ', 3 => 'da_DK', 4 => 'de_DE', 5 => 'es_ES', 6 => 'fa_IR', 7 => 'fr_CA', 8 => 'fr_FR', 9 => 'he_IL', 10 => 'hr_HR', 11 => 'hu_HU', 12 => 'it_IT', 13 => 'ja_JP', 14 => 'ka_GE', 15 => 'lv_LV', 16 => 'mk_MK', 17 => 'nl_NL', 18 => 'pl_PL', 19 => 'pt_BR', 20 => 'pt_PT', 21 => 'ro_RO', 22 => 'ru_RU', 23 => 'sk_SK', 24 => 'sr_RS', 25 => 'sv_SE', 26 => 'tr_TR', 27 => 'vi_VN', 28 => 'zh_CN', );
    3232
    3333  // User language
    34   $language = $user['language'];
    35   if (! in_array($language, $valid_fb_locales))
    36   {
    37     $code_lang = substr($language, 0, 2);
    38     // Compose a language
    39     $language = $code_lang.'_'.strtoupper($code_lang);
    40     if (! in_array($language, $valid_fb_locales))
    41     {
    42       // Search a language
     34  $locale = $user['language'];
     35  if (! in_array($locale, $valid_fb_locales))
     36  {
     37    $code_lang = substr($locale, 0, 2);
     38    // Compose a locale
     39    $locale = $code_lang.'_'.strtoupper($code_lang);
     40    if (! in_array($locale, $valid_fb_locales))
     41    {
     42      // Search a locale
    4343      foreach ($valid_fb_locales as $valid_fb_locale)
    4444      {
     
    4848        }
    4949      }
    50       // default language
    51       $language = 'en_US';
    52     }
    53   }
    54 
    55   return $language;
     50      // default locale
     51      $locale = 'en_US';
     52    }
     53  }
     54
     55  return $locale;
    5656}
    5757
  • extensions/FacebookPlug/Plugin/include/picture.inc.php

    r8440 r8653  
    3030  if ($page['fbp']['do_facebook_init'])
    3131  {
    32     // Header for each page
    33     //~ $tpls[] = 'picture.header';
     32    // Init array
     33    $tpls = array();
    3434
    3535    // Specific
Note: See TracChangeset for help on using the changeset viewer.