Page 1 of 1

load order for elements in contentArea?

Posted: Wed Jan 16, 2019 8:17 pm
by cbsarge
Not sure if anyone is still watching this forum but, thought I would ask anyways. I've started a bit of a revamp of the way my game looks and part of that has caused some annoying CSS issues. One of them would probably be a lot easier to deal with if I could control the load order of the elements in the main contenArea div. Can anyone help me out with where that is defined?

Thanks! :D

Re: load order for elements in contentArea?

Posted: Thu Jan 17, 2019 12:42 am
by hallsofvallhalla
Hmm can't remember. it is not top to bottom?

Re: load order for elements in contentArea?

Posted: Thu Jan 17, 2019 1:24 am
by cbsarge
Well, it loads all of the modules that have home page elements but, I was wondering if there is a way to control what order they load in.

Re: load order for elements in contentArea?

Posted: Fri Jan 18, 2019 7:46 am
by KaL
Yes! It control through the database

Re: load order for elements in contentArea?

Posted: Fri Jan 18, 2019 4:22 pm
by cbsarge
KaL wrote:Yes! It control through the database
Thanks Kal. Can you expand on that a little bit?

Re: load order for elements in contentArea?

Posted: Sun Jan 20, 2019 3:41 am
by KyleMassacre
I want to say it is one of a few things, I just don’t remember which one exactly
  1. Like Kal said, it’s loaded by order in the database which means in the order the module was installed
  2. Alphabetically
In any case you can look to see where the hook is created like in lib.php and use something like u*sort kind of like how the main menu is sorted by the sort order parameter in the constructor by creating a file or even using the xml file and adding a sort order there

Re: load order for elements in contentArea?

Posted: Sun Jan 20, 2019 4:59 am
by KaL
My bad. It was the stats that you can sort by order on the database. For the menu itself you have to script it. The best way to get an example is to look at illusion “TOWN Modules” he list all the script on how to loop the content menu or grab it one by one.

Re: load order for elements in contentArea?

Posted: Sun Jan 20, 2019 5:08 am
by KaL
Here is the town module script.
I can upload the script because it was set as a free module by illusion.

Re: load order for elements in contentArea?

Posted: Sat Jan 26, 2019 3:21 am
by mystik1
Small world! Imagine seeing you here, cbsarge! :)