XOOPS 2.5.6  Final
 All Classes Namespaces Files Functions Variables Pages
blocks.php
Go to the documentation of this file.
1 <?php
2 // start hack by Trabis
3 if (!class_exists('ProtectorRegistry')) exit('Registry not found');
4 
6 $mydirname = $registry->getEntry('mydirname');
7 $mydirpath = $registry->getEntry('mydirpath');
8 $language = $registry->getEntry('language');
9 // end hack by Trabis
10 
11 $mytrustdirname = basename( dirname( __FILE__ ) ) ;
12 $mytrustdirpath = dirname( __FILE__ ) ;
13 
14 // language files
15 //$language = empty( $GLOBALS['xoopsConfig']['language'] ) ? 'english' : $GLOBALS['xoopsConfig']['language'] ; //hack by Trabis
16 if( file_exists( "$mydirpath/language/$language/blocks.php" ) ) {
17  // user customized language file (already read by class/xoopsblock.php etc)
18  // include_once "$mydirpath/language/$language/blocks.php" ;
19 } else if( file_exists( "$mytrustdirpath/language/$language/blocks_common.php" ) ) {
20  // default language file
21  include_once "$mytrustdirpath/language/$language/blocks_common.php" ;
22  include "$mytrustdirpath/language/$language/blocks_each.php" ;
23 } else {
24  // fallback english
25  include_once "$mytrustdirpath/language/english/blocks_common.php" ;
26  include "$mytrustdirpath/language/english/blocks_each.php" ;
27 }
28 
29 require_once "$mytrustdirpath/blocks/block_functions.php" ;
30 
31 ?>