Esempio n. 1
0
 public static function _($image, $lang = "")
 {
     $o = FALSE;
     if ($image) {
         //------------------------------------------------------------------------------
         // look in imagepaths defined in system.xml
         $imagePath = system::imagepath();
         if ($imagePath) {
             foreach ($imagePath->children() as $entry) {
                 $tempPath = explode(".", (string) $entry);
                 $tempVal = "";
                 foreach ($tempPath as $pathPart) {
                     // use system variables
                     if (system::$pathPart()) {
                         $tempVal .= system::$pathPart();
                     } else {
                         $tempVal .= $pathPart;
                     }
                 }
                 if ($tempImage = img_exists($tempVal, (string) $image, $lang)) {
                     $o = session_path($tempImage);
                     break;
                 }
             }
         }
         //------------------------------------------------------------------------------
         // look in module paths
         $modules = system::modules();
         if (is_array($modules)) {
             foreach ($modules as $entry) {
                 $path = OLIVModule::getImagePath((string) $entry->name);
                 if ($tempImage = img_exists($path, $image, $lang)) {
                     $o = session_path($tempImage);
                     break;
                 }
             }
         }
     }
     // return image path-name
     return $o;
 }
Esempio n. 2
0
 public static function getContentDefine($mod, $name)
 {
     if ($mod and $name) {
         $modules = system::modules();
         $header = $modules[$mod];
         // module header found
         if ($header) {
             $content = OLIVModule::load_content($header, $name);
             if ($content) {
                 return $content->define;
             }
         }
     }
 }