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 = [
236 LANGUAGE.
"_custom.php",
242 foreach( static::$instance->parents as $sClassNameTop)
245 $aTemp = explode(
"\\", $sClassNameTop);
246 $bExitGraceful =
false;
247 foreach( $aTemp as $sClassName )
251 foreach($aMainClassNames as $sTempModuleDirectory)
253 $lookUpPath = LEPTON_PATH.
"/modules/".$sTempModuleDirectory.
"/languages/";
257 foreach($aLookUpFilenames as $sTempFilename)
259 if(
true === file_exists( $lookUpPath.$sTempFilename ) )
261 require $lookUpPath.$sTempFilename;
267 if(
false === $bFoundFile)
272 $tempName =
"MOD_".strtoupper($sTempModuleDirectory);
273 if(isset(${$tempName}))
275 static::$instance->language = ${$tempName};
276 $bExitGraceful =
true;
281 if(
true === $bExitGraceful)
311 $aElements = explode(
"_", $sAnyClassname);
313 $sTempName = array_shift($aElements);
315 $aReturnValue = array( $sTempName );
317 foreach($aElements as $term)
319 $sTempName .=
"_".$term;
320 $aReturnValue[] = $sTempName;
323 if( 1 < count($aReturnValue) )
325 $aReturnValue = array_reverse( $aReturnValue );
328 return $aReturnValue;
379 public function showmodinfo(array $modvalues = [],
bool $bPrompt =
true )
382 $showmodinfo = array(
388 ,
"COLOR" => ( $this->module_function ==
"page" ?
"olive" :
"blue" )
390 ,
"HEADER" => $this->module_name
392 ,
"DESCRIPTION" => ( isset( $this->module_description ) ? $this->module_description :
"" )
394 ,
"IMAGE_URL" => LEPTON_URL.
"/modules/".$this->module_directory.
"/icon.png"
406 "LIVE_SUPPORT" => array(
"AVAILABLE" =>
false
409 ,
"ICON" =>
"call square"
411 ,
"FORUM_SUPPORT"=> array(
"AVAILABLE" =>
true
412 ,
"URL" =>
"https://forum.lepton-cms.org/viewforum.php?f=14"
414 ,
"ICON" =>
"align left"
416 ,
"README" => array(
"AVAILABLE" =>
"hide"
421 ,
"HELP" => array(
"AVAILABLE" =>
"hide"
424 ,
"ICON" =>
"question"
434 if ( isset( $this->module_version ) && empty( $this->module_version ) === false )
436 if ( isset( $this->module_platform ) && empty( $this->module_platform ) === false )
438 if ( isset( $this->module_guid ) && empty( $this->module_guid ) === false )
440 if ( isset( $this->module_author ) && empty( $this->module_author ) === false )
442 if ( isset( $this->module_license ) && empty( $this->module_license ) === false )
444 $showmodinfo[
"INFO" ][
"S1" ] =
"spacer2";
446 if ( isset( $this->module_license_terms ) && empty( $this->module_license_terms ) === false )
451 if ( isset( $this->module_home ) && empty( $this->module_home ) === false )
453 $showmodinfo[
"INFO" ][
"S2" ] =
"spacer2";
454 if ( strpos ( $this->module_home ,
"href" ) == 0 )
456 $showmodinfo[
"INFO" ][
"module_home" ] =
"<a href='".$this->module_home.
"' >".$this->module_home.
"</a>";
466 if ( ( is_null( $modvalues ) ===
false )
467 && ( is_array( $modvalues ) ===
true )
468 && ( !empty( $modvalues ) )
471 $showmodinfo = array_replace_recursive( $showmodinfo, $modvalues );
475 $oTWIG = lib_twig_box::getInstance();
478 $sSource = $oTWIG->render(
479 "@theme/showmodinfo.lte"
483 if(
true === $bPrompt )