Detect root parent forum
I was wondering, do you know of a way in which I can always get the root parent forum ID, regardless of what subforums I have within it?
Parent > Child > Subchild > Subsubchild
Regardless of being in Child, subchild or subsubchild, I want to always get the Parent ID.
Also, is there a way I can detect when people are switching between the pages? so I can revert changes if they are not within those forums anymore?
Thanks in advance.