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",
243 foreach( static::$instance->parents as $sClassNameTop)
246 $aTemp = explode(
"\\", $sClassNameTop);
247 $bExitGraceful =
false;
248 foreach( $aTemp as $sClassName )
252 foreach($aMainClassNames as $sTempModuleDirectory)
254 $lookUpPath = LEPTON_PATH.
"/modules/".$sTempModuleDirectory.
"/languages/";
258 foreach($aLookUpFilenames as $sTempFilename)
260 if(
true === file_exists( $lookUpPath.$sTempFilename ) )
262 require $lookUpPath.$sTempFilename;
268 if(
false === $bFoundFile)
273 $tempName =
"MOD_".strtoupper($sTempModuleDirectory);
274 if(isset(${$tempName}))
276 static::$instance->language = ${$tempName};
277 $bExitGraceful =
true;
282 if(
true === $bExitGraceful)
312 $aElements = explode(
"_", $sAnyClassname);
314 $sTempName = array_shift($aElements);
316 $aReturnValue = array( $sTempName );
318 foreach($aElements as $term)
320 $sTempName .=
"_".$term;
321 $aReturnValue[] = $sTempName;
324 if( 1 < count($aReturnValue) )
326 $aReturnValue = array_reverse( $aReturnValue );
329 return $aReturnValue;
380 public function showmodinfo(array $modvalues = [],
bool $bPrompt =
true )
383 $showmodinfo = array(
389 ,
"COLOR" => ( $this->module_function ==
"page" ?
"olive" :
"blue" )
391 ,
"HEADER" => $this->module_name
393 ,
"DESCRIPTION" => ( isset( $this->module_description ) ? $this->module_description :
"" )
395 ,
"IMAGE_URL" => LEPTON_URL.
"/modules/".$this->module_directory.
"/icon.png"
407 "LIVE_SUPPORT" => array(
"AVAILABLE" =>
false
410 ,
"ICON" =>
"call square"
412 ,
"FORUM_SUPPORT"=> array(
"AVAILABLE" =>
true
413 ,
"URL" =>
"https://forum.lepton-cms.org/viewforum.php?f=14"
415 ,
"ICON" =>
"align left"
417 ,
"README" => array(
"AVAILABLE" =>
"hide"
422 ,
"HELP" => array(
"AVAILABLE" =>
"hide"
425 ,
"ICON" =>
"question"
435 if ( isset( $this->module_version ) && empty( $this->module_version ) === false )
437 if ( isset( $this->module_platform ) && empty( $this->module_platform ) === false )
439 if ( isset( $this->module_guid ) && empty( $this->module_guid ) === false )
441 if ( isset( $this->module_author ) && empty( $this->module_author ) === false )
443 if ( isset( $this->module_license ) && empty( $this->module_license ) === false )
445 $showmodinfo[
"INFO" ][
"S1" ] =
"spacer2";
447 if ( isset( $this->module_license_terms ) && empty( $this->module_license_terms ) === false )
452 if ( isset( $this->module_home ) && empty( $this->module_home ) === false )
454 $showmodinfo[
"INFO" ][
"S2" ] =
"spacer2";
455 if ( strpos ( $this->module_home ,
"href" ) == 0 )
457 $showmodinfo[
"INFO" ][
"module_home" ] =
"<a href='".$this->module_home.
"' >".$this->module_home.
"</a>";
467 if ( ( is_null( $modvalues ) ===
false )
468 && ( is_array( $modvalues ) ===
true )
469 && ( !empty( $modvalues ) )
472 $showmodinfo = array_replace_recursive( $showmodinfo, $modvalues );
476 $oTWIG = lib_twig_box::getInstance();
479 $sSource = $oTWIG->render(
480 "@theme/showmodinfo.lte"
484 if(
true === $bPrompt )