178 foreach(static::$instance->parents as $sModuleDirectoryTop)
181 $aTemp = explode(
"\\", $sModuleDirectoryTop);
182 foreach($aTemp as $sModuleDirectory)
187 foreach($aMainClassNames as $sTempModuleDirectory)
189 $sLookUpPath = __DIR__.
"/../../modules/".$sTempModuleDirectory.
"/info.php";
191 if( file_exists($sLookUpPath) )
193 require $sLookUpPath;
233 if(defined(
"LEPTON_PATH"))
235 $aLookUpFilenames = [
237 LANGUAGE.
"_custom.php",
244 foreach( static::$instance->parents as $sClassNameTop)
247 $aTemp = explode(
"\\", $sClassNameTop);
248 $bExitGraceful =
false;
249 foreach( $aTemp as $sClassName )
253 foreach($aMainClassNames as $sTempModuleDirectory)
255 $lookUpPath = LEPTON_PATH.
"/modules/".$sTempModuleDirectory.
"/languages/";
259 foreach($aLookUpFilenames as $sTempFilename)
261 if(
true === file_exists( $lookUpPath.$sTempFilename ) )
263 require $lookUpPath.$sTempFilename;
269 if(
false === $bFoundFile)
274 $tempName =
"MOD_".strtoupper($sTempModuleDirectory);
275 if(isset(${$tempName}))
277 static::$instance->language = ${$tempName};
278 $bExitGraceful =
true;
283 if(
true === $bExitGraceful)
313 $aElements = explode(
"_", $sAnyClassname);
315 $sTempName = array_shift($aElements);
317 $aReturnValue = array( $sTempName );
319 foreach($aElements as $term)
321 $sTempName .=
"_".$term;
322 $aReturnValue[] = $sTempName;
325 if( 1 < count($aReturnValue) )
327 $aReturnValue = array_reverse( $aReturnValue );
330 return $aReturnValue;
381 public function showmodinfo(array $modvalues = [],
bool $bPrompt =
true )
384 $showmodinfo = array(
390 ,
"COLOR" => ( $this->module_function ==
"page" ?
"olive" :
"blue" )
392 ,
"HEADER" => $this->module_name
394 ,
"DESCRIPTION" => ( isset( $this->module_description ) ? $this->module_description :
"" )
396 ,
"IMAGE_URL" => LEPTON_URL.
"/modules/".$this->module_directory.
"/icon.png"
408 "LIVE_SUPPORT" => array(
"AVAILABLE" =>
false
411 ,
"ICON" =>
"call square"
413 ,
"FORUM_SUPPORT"=> array(
"AVAILABLE" =>
true
414 ,
"URL" =>
"https://forum.lepton-cms.org/viewforum.php?f=14"
416 ,
"ICON" =>
"align left"
418 ,
"README" => array(
"AVAILABLE" =>
"hide"
423 ,
"HELP" => array(
"AVAILABLE" =>
"hide"
426 ,
"ICON" =>
"question"
436 if ( isset( $this->module_version ) && empty( $this->module_version ) ===
false )
438 if ( isset( $this->module_platform ) && empty( $this->module_platform ) ===
false )
440 if ( isset( $this->module_guid ) && empty( $this->module_guid ) ===
false )
442 if ( isset( $this->module_author ) && empty( $this->module_author ) ===
false )
444 if ( isset( $this->module_license ) && empty( $this->module_license ) ===
false )
446 $showmodinfo[
"INFO" ][
"S1" ] =
"spacer2";
448 if ( isset( $this->module_license_terms ) && empty( $this->module_license_terms ) ===
false )
453 if ( isset( $this->module_home ) && empty( $this->module_home ) ===
false )
455 $showmodinfo[
"INFO" ][
"S2" ] =
"spacer2";
456 if ( strpos ( $this->module_home ,
"href" ) == 0 )
458 $showmodinfo[
"INFO" ][
"module_home" ] =
"<a href='".$this->module_home.
"' >".$this->module_home.
"</a>";
468 if ( ( is_null( $modvalues ) ===
false )
469 && ( is_array( $modvalues ) ===
true )
470 && ( !empty( $modvalues ) )
473 $showmodinfo = array_replace_recursive( $showmodinfo, $modvalues );
477 $oTWIG = lib_twig_box::getInstance();
480 $sSource = $oTWIG->render(
481 "@theme/showmodinfo.lte"
485 if(
true === $bPrompt )