The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I'm creating a vb product and having this scenario which i don't know how to do it.
In the product there is two textbox options that the administrator can alter their values. The first box got a values like 3,4,7,...,100 and the second can take any integer number like 2. A variable x in the product should start with the first number in the first textbox which is 3. The second textbox represent a time in hours where each time the system time elapsed that time the variable x will jump to the next value of the first textbox which is 4 in the example above and so on until it reaches 100 then it will get back to value 3. regards, |
#2
|
|||
|
|||
![]()
You need to create a scheduled task that runs once an hour then use some PHP along the lines of:
PHP Code:
![]() |
#3
|
|||
|
|||
![]()
Thanks Opserty for your reply but the problem I don't know how to
create a scheduled task for the plugin or product? ![]() I tried to search the forum to see how but to many posts to find what i need. |
#4
|
||||
|
||||
![]()
Admin CP > Scheduled Task > Add New Task?
|
#5
|
|||
|
|||
![]()
Thanks for the reply.
But I don't get it! this is ok for my forum but how to distribute the corn with the product files to be used by other vb forums. Also what is the line in code to check if number of hours had elapsed in the corn php file something like if((timenow-lasttimesaved)>numberofhours){ lasttimesaved=timenow; do something... } Thanks for your time |
#6
|
||||
|
||||
![]()
Have you turned on debug mode, attached the task to your product, and export the product like that?
|
#7
|
|||
|
|||
![]()
Ok I got this task working but how to read a variable like $curval in the product templates? It always returns null!
|
#8
|
|||
|
|||
![]() PHP Code:
Then run build_options(). Then you should be able to read curval from $vbulletin->options array. Bear in mind this is just a rough guide to the procedure to follow, it is by no means a work example. You will need to refine it appropriately. |
#9
|
|||
|
|||
![]()
How to do it? I don't know what is the settings table and never done it before...
|
#10
|
|||
|
|||
![]()
Anybody has any clue on how to solve this issue? Hint , example...
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|