This cronjob with the menu related to it will let you set a Opening/Closing Hour period for the v3arcade, if you want the members to visit on specific hours.
As you can see in this screeny, you can also set who can override this feature.
This engine requires that you upload a cron file in the proper location, so you have to see the « UPLOAD_FILE » and do it in the same folder structure in your server.
If you set a message, here is what it will look like:
remember that the cronjob have to work at least once to be set.
note: 06/07/09 : no version change, bug fix… added an include file because cron was working perfect when called by hand, but not working when automated…
Views: 41
Great work nexia! Thank you very much! 🙂
Could be quite a useful measure for saving bandwidth.. Nice idea! 🙂
i thought of doing the same for ibProArcade, but that one is a port of IPB’s code, and i don’t want to read 50 000 lines of code to see where it activate itself…rofl
when you are a coder like OBK, you can quickly turn this into a useful engine for a lot of things, like closing forumid==x, etc…
Activate/Deactivate v3arcade on scheduled times.
done.
hmm… installed and also started the cron myself, but the arcade is still open. 🙂
By the way… the last part in your image, which displays a text when its closed is not in the addon, but this is not needed, since V3 has own message option on close.
it is still open or you are an admin and have your usergroup accessing ?
and as indicated, if you empty that field, the system will use the default message… this message is customized to display the Opening/Closing hours, which can be useful for your members to know when you open the arcade… 🙂
ah ok nice, but it is just not there. 🙂
Options stop at usergroups override.
I logged in as normal user and its still open. Time is set and cron activated.
ok, as admin, use this url on your own site:
yoursite.com/admincp/options.php?do=options&dogroup=version
at someplace at the end, you will see « v3arcade is open or not«
it’s a yes/no field, and if your cron worked properly, it is supposed to be set to No…
… i think if the cron did not work that the time schedule may be wrong, i tested it on this site and is working properly, but that may be wrong in another server… if you set it at 8:00 instead of 9:00, did it work?
arcade is active. ;/
Does this work for you?
When I use your url, I get to see my admin options categories tho.
yes, that’s what i want you to see, the admin options… these are the « Version Info and Other Untouchables » which is where developers hide their private settings… i added a switch there, it’s the detail which is acting on the opening of the arcade.
the calculation for the cronjob is really simple, it calculate the time or begining and ending, and see if the « actual » hour of the cron is between them… if not, set the switch to closed… else to open.
the only detail i could see is that your server have a different time than yours, and the difference is not the same as the timeoffset of your vBulletin… which would cause at least 1 hour difference in range… i tested this situation, but sometimes it may be a little more complicated to debug…
Hmm okay I just wait then for it to close automatically. Will reply for news here.
you can change the hours you know… if it is 9:45 right now, like here, you can simply set your opening to 12:00 and the ending at 13:00 so you will see if it close right now after activating the cronjob.
OH, i found the FLAW… will fix it in the minute… (server time wrong)
Ok, i recoded the engine to be less stupid… 🙂
it was checking the timezone of the server instead of the default one, so it was setting the wrong time. Also, the if then was wrong due to me coding this too late in the evening…
and i re-added the missing part of the settings!
Yeah! Now the shit runs just as it´s supposed to. 😀
Thanks mate!
Btw you can erase the posts untill #4. For me its fine.
cheers
ah, no, i do not delete them, they are proof that i’m stupid… rofl
first post changed, cronjob changed… by hand, it worked like a charm, but automatic was not, because of the adminfunctions.php file that was not loaded… (i hope this stupidity is fixed with vb 4.0)…
you will have to upload the cron file again, cloni!
Yes SIR! 😉