Project

General

Profile

« Previous | Next » 

Revision 1986

Added by Dietmar about 11 years ago

! If the advanced option languages ​​Page was disabled or pages exist with one language only,
then all available languages ​​are shown to be selected in the User-Settings implemented in backend

View differences:

branches/2.8.x/CHANGELOG
11 11
! = Update/Change
12 12
===============================================================================
13 13

  
14
19 Oct-2013 Build 1986 Dietmar Woellbrink (Luisehahne)
15
! If the advanced option languages ​​Page was disabled or pages exist with one language only,
16
  then all available languages ​​are shown to be selected in the User-Settings implemented in backend 
14 17
19 Oct-2013 Build 1985 Dietmar Woellbrink (Luisehahne)
15 18
! /modules/news/Reorg.php completely recoded using class AccessFile()
16 19
! /modules/news/upgrade.php  add accessfile report to output details in upgrade-script.php
branches/2.8.x/wb/admin/pages/settings.php
605 605
	}
606 606

  
607 607
/*-- show language select box ----------------------------------------------------------*/
608
	$sql = 'SELECT `directory`, `name` FROM `'.TABLE_PREFIX.'addons` '
609
		 . 'WHERE `type`=\'language\' ';
610
	if( !defined('PAGE_LANGUAGES') || !PAGE_LANGUAGES) {
611
	// display only default and current language if site is single language only
612
		$sql .= 'AND `directory`=\''.DEFAULT_LANGUAGE.'\' ';
613
		if($aCurrentPage['language'] != DEFAULT_LANGUAGE) {
614
			$sql .= 'AND `directory`=\''.$aCurrentPage['language'].'\' ';
615
		}
616
	}
617
	$sql .= 'ORDER BY `name`';
618
	if( ($oLanguages = $database->query($sql)) )
608

  
609
	if( ($oLanguages = $admin->getAvailableLanguagesObjectInstance()) )
619 610
	{
620 611
		$aAvailLanguages = array();
621 612
		while($aLanguage = $oLanguages->fetchRow(MYSQL_ASSOC)) {
branches/2.8.x/wb/admin/pages/settings_save.php
135 135
// Validate data
136 136
if($page_title == '' || substr($page_title,0,1)=='.')
137 137
{
138
	$admin->print_error($MESSAGE['PAGES_BLANK_PAGE_TITLE'],$target_url);
138
	$admin->print_error($mLang->PAGES_BLANK_PAGE_TITLE,$target_url);
139 139
}
140 140
if($menu_title == '' || substr($menu_title,0,1)=='.')
141 141
{
branches/2.8.x/wb/admin/pages/languages/EN.php
61 61

  
62 62
$MESSAGE['PAGES_LAST_MODIFIED'] = 'Last modification by';
63 63
$MESSAGE['PAGES_BLANK_SEO_TITLE'] = 'Please enter a Filename';
64
$MESSAGE['PAGES_ADDED'] = 'Page added successfully';
65
$MESSAGE['PAGES_SAVED'] = 'Page saved successfully';
66
$MESSAGE['PAGES_SAVED_SETTINGS'] = 'Page settings saved successfully';
64 67
$MESSAGE['PAGES_CANNOT_CREATE_PROTECTED_FILE'] = 'Protected File, Page cannot be add!';
65
$MESSAGE['PAGES_CANNOT_MODIFY_PROTECTED_FILE'] = 'Geschützter Name, Page cannot be modified!';
68
$MESSAGE['PAGES_CANNOT_MODIFY_PROTECTED_FILE'] = 'Protected File, Page cannot be modified!';
66 69

  
67

  
68 70
$HELP['PAGE_IMAGE_DIR']  = '<p>The topical side picture path is<br /> <b>{{icon_dir}}</b>.</p>';
69 71
$HELP['PAGE_IMAGE_DIR'] .='<p>As a system administrator you can change the folder for side pictures and menu pictures under options extendet options in server setting.</p>';
70 72
$HELP['PAGE_IMAGE_DIR'] .='<p>Example::<br /><b>/media/banner</b></p>';
branches/2.8.x/wb/admin/interface/version.php
51 51

  
52 52
// check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
53 53
if(!defined('VERSION')) define('VERSION', '2.8.3');
54
if(!defined('REVISION')) define('REVISION', '1985');
54
if(!defined('REVISION')) define('REVISION', '1986');
55 55
if(!defined('SP')) define('SP', '');
branches/2.8.x/wb/admin/settings/index.php
44 44
require_once(WB_PATH.'/framework/functions.php');
45 45
require_once(WB_PATH.'/framework/functions-utf8.php');
46 46

  
47
if(!class_exists('Template', false)){ include(WB_PATH.'/include/phplib/ttemplate.inc'); }
48

  
49 47
// Setup template object, parse vars to it, then parse it
50 48
// Create new template object
51 49
$oTpl = new Template(dirname($admin->correct_theme_source('settings.htt')),'comment');
branches/2.8.x/wb/admin/preferences/index.php
23 23
function build_page( &$admin, &$database )
24 24
{
25 25
//	global $HEADING, $TEXT;
26
    $mLang = Translate::getinstance();
27
	$oReg  = WbAdaptor::getInstance();
26 28
	include_once(WB_PATH.'/framework/functions-utf8.php');
27 29
	// Setup template object, parse vars to it, then parse it
28 30
	// Setup template object, parse vars to it, then parse it
......
67 69
$aLangAddons = array();
68 70
$aLangBrowser = array();
69 71

  
70
// read available languages from table addons
71
$sql  = 'SELECT * FROM `'.TABLE_PREFIX.'addons` ';
72
$sql .= 'WHERE `type` = \'language\' ORDER BY `directory`';
73
if( $oLang = $database->query($sql) )
74
{
75
    while( $aLang = $oLang->fetchRow(MYSQL_ASSOC) )
76
    {
77
        $aLangAddons[$aLang['directory']] = $aLang['name'];
78
    }
79
}
80 72

  
81 73
// default, if no information from client available
82 74
$sAutoLanguage = DEFAULT_LANGUAGE;
75
// read available languages from table addons
76
$aLangAddons = $admin->getAvailableLanguages();
83 77

  
84
$aLangUsed = array_flip(explode(',',$admin->GetLanguagesInUsed()));
78
$aLangUsed = array_flip(explode(',',$admin->getLanguagesInUsed()));
85 79
$aLangUsed = array_intersect_key($aLangAddons, $aLangUsed);
80
if( (sizeof($aLangUsed)<2) || !($oReg->PageLanguages) ){
81
    $aLangUsed =  $aLangAddons;    
82
}
86 83
$template->set_block('main_block', 'language_list_block', 'language_list');
87 84
foreach( $aLangUsed as $sDirectory => $sName  )
88 85
{
branches/2.8.x/wb/templates/wb_theme/css/screen.css
135 135
div.settings_table { margin :0 auto; width :90%; }
136 136
form.settings_table { border :1px none #eeee; font-family :verdana,arial,helvetica,sans-serif; margin :5px auto; padding :5px; }
137 137
   form.settings_table fieldset { border :2px none #eeeeee; display :block; line-height :1.0em; margin :1px auto; padding :3px 0px 3px 0px; }
138
   input[type="file"] { width :100%; border :1px solid #000000; background-color :#ccccff; }
138
   input[type="file"] { max-width :75%; border :1px solid #000000; background-color :#ccccff; }
139 139
   legend.settings_table ,
140 140
   form.settings_table legend { border :none; color :#006699; font-size :140%; margin :5px; padding :0; }
141 141
   form.settings_table div.sub-row { background-color :transparent !important; background-color :#eeeeee; }
......
145 145
   form.settings_table fieldset div.input input.radio { margin :0.8em auto; border :none; padding-left :6px; }
146 146
   form.settings_table fieldset div.input label { margin :6px auto; padding-left :6px; min-height :1em; width :35%; float :none; display :inline; vertical-align :top; }
147 147
   form.settings_table input[type="text"],
148
   form.settings_table input[type="password"] { border :1px solid #666666; margin :0px auto; padding-left :5px; width :59%; }
148
   form.settings_table input[type="password"] { border :1px solid #666666; margin :2px auto; padding :2px 0px 2px 6px; width :59.5%; }
149 149
   form.settings_table input.radio { border :1px none #666666; margin :0px auto; padding-left :0.5em; height :1em; }
150 150
   form.settings_table input[type="button"].button { border :1px solid #666666; color :#000000; text-align :left; font-weight :bold; background-color :#dddddd; margin :2px auto; padding :2px 0px 2px 6px; width :60%; }
151
   form.settings_table textarea { border :1px solid #666666; margin :3px auto; padding-left :0.5em; min-height :1em; width :59%; }
151
   form.settings_table textarea { border :1px solid #666666; margin :3px auto; padding-left :0.5em; min-height :1em; width :59.5%; }
152 152
   form.settings_table select { border :1px solid #666666; margin :3px auto; padding-left :0.5em; min-height :1em; width :60%; }
153 153
/* */
154 154
div.content_box form { }
branches/2.8.x/wb/modules/MultiLingual/include.php
38 38
	function language_menu($sExtension = "auto")
39 39
	{
40 40
		global $wb;
41
		$oReg   = WbAdaptor::getInstance();
42
        if(!$oReg->PageLanguages) {return false;}
41 43
		$sExtension = strtolower($sExtension);
42 44
		switch($sExtension)
43 45
		{
......
48 50
				$sExtension = 'auto';
49 51
		}
50 52

  
51
		if ( $wb->page_id  < 1){ return false; }
53
		if ( ($wb->page_id  < 1) ){ return false; }
52 54
		$oPageLang = new m_MultiLingual_Lib();
53 55
        $oPageLang->setExtension($sExtension);
54 56
		$sRetVal = $oPageLang->getLangMenu();

Also available in: Unified diff