Hi,
I believe I'm in need of a custom cron job that can evaluate group membership and based on that do certain things in the XenForo database.
Short background information
At the very beginning RagTek helped me out creating a function that would be able to control the use of the "Watch thread" function (http://xenforo.com/community/threads/whatch-thread-permission-not-working.38717/#post-433387) which is incorporated in XenForo. The reason for me wanting this is that I want to be able to offer this specific function in a premium membership.
We started out by hiding "Watch thread" in the thread itself based on the membership of a certain group. That was that. After a while I realized there were more things related to this function that we had not taken care of. With help of TMS I have managed to pin point all visible links related to it. But my great head ache now is the part in the thread create view where the user has options to watch the thread which is about to be created. Once again I used TMS to hide the options and to set values to "0" instead of "1" so that the checkboxes were unchecked. But the threads kept on being watched upon creation. I didn't understand why at the beginning. But I kept on troubleshooting and tried to remove these options from the user settings page. Then there were no "watch thread" anymore because this time the values were actually saved to the database. That's why it didn't work before by just unchecking the boxes "visually".
How to solve this
To solve this I think a cron job would be the best way to go. I want to make a check and filter out all members that are not member of this premium group. For those members I want to execute an SQL UPDATE query to set the "correct" settings, for instance regarding "watch thread". By doing this I will only have to take care of the visible parts of this function in the differents views.
Is this easy to solve? How long time would it take to accomplish?
I believe I'm in need of a custom cron job that can evaluate group membership and based on that do certain things in the XenForo database.
Short background information
At the very beginning RagTek helped me out creating a function that would be able to control the use of the "Watch thread" function (http://xenforo.com/community/threads/whatch-thread-permission-not-working.38717/#post-433387) which is incorporated in XenForo. The reason for me wanting this is that I want to be able to offer this specific function in a premium membership.
We started out by hiding "Watch thread" in the thread itself based on the membership of a certain group. That was that. After a while I realized there were more things related to this function that we had not taken care of. With help of TMS I have managed to pin point all visible links related to it. But my great head ache now is the part in the thread create view where the user has options to watch the thread which is about to be created. Once again I used TMS to hide the options and to set values to "0" instead of "1" so that the checkboxes were unchecked. But the threads kept on being watched upon creation. I didn't understand why at the beginning. But I kept on troubleshooting and tried to remove these options from the user settings page. Then there were no "watch thread" anymore because this time the values were actually saved to the database. That's why it didn't work before by just unchecking the boxes "visually".
How to solve this
To solve this I think a cron job would be the best way to go. I want to make a check and filter out all members that are not member of this premium group. For those members I want to execute an SQL UPDATE query to set the "correct" settings, for instance regarding "watch thread". By doing this I will only have to take care of the visible parts of this function in the differents views.
Is this easy to solve? How long time would it take to accomplish?