Sim Posted February 1, 2021 Share Posted February 1, 2021 I remember @Dayo saying all the mods was loaded if in remember correctly. What would be the best way to know if another mod is installed or not. I can check if directory exist amd load module json file amd check if information is correct. But as i said i think this information is already loaded? Quote Link to comment Share on other sites More sharing options...
URBANZ Posted February 1, 2021 Share Posted February 1, 2021 you could use $this->page->modules this gets the modules loaded by the script Quote Link to comment Share on other sites More sharing options...
Sim Posted February 1, 2021 Author Share Posted February 1, 2021 (edited) That's what i ended up finding @URBANZ so here's a snipplet for people in future foreach($this->page->modules as $mod) { if($mod['name'] == "Items" && $mod['author']['name'] == "William Hughes") { debug("FOUND YOU"); debug(var_dump($mod)); } } Edit: after being found, the loop should be exited. With a return or break; Edited February 1, 2021 by Sim Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.