Updated (trying to "integrate" it more with XThreads):
- Trying to use some hooks provided by XThreads to automatically deactivate our XThreads related plugins if user deactivates/uninstalls XThreads (maybe it is better if our XThreads related plugins use install-uninstall function).
- Trying to prevent user to be able to activate our XThreads related plugins if XThreads isn't installed or activated, or some XThreads functions to be used for our plugins isn't available (depends on which XThreads functions we'll use for our plugins).
- Trying to use a XThreads function to "detects" in which forum id(s) our custom thread fields applied by user (in this example, xtdispportal), and use the forum id(s) in our query (if user selects some forum(s) only), and trying to run our codes, only if the specific custom thread fields already available/created (trying to prevent SQL error if user deletes the custom thread fields later).
Please tell me if there is something wrong with the codes. I'm still learning