Sim Posted February 1, 2021 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
URBANZ Posted February 1, 2021 Posted February 1, 2021 you could use $this->page->modules this gets the modules loaded by the script Quote
Sim Posted February 1, 2021 Author 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
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.