The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Help with a progress widget please.
Hi guys, I'm looking to build a widget either HTML or PHP to display progress.
Let's say I set a target of ?1000. Perhaps I add this to the database or more simply just use a text file on my server. I read the single line of text from the text file which is my current value. I want to display that value as a progress bar. For example, progress bar min value = 0 progress bar max value = 1000 Read value from file, EG, 125 Show this value on the progress bar. Secondly, I want a button that opens an input box where I enter a value, and it adds that value to the value stored in the text file then updates the progress bar. I've got some PHP code for reading and writing to a text file , but I've not idea where to start with a progress bar and input box. Here's what I've got so far, simply displaying the value from the file. PHP Code:
Thanks B. |
#2
|
|||
|
|||
You could of course do what you described. I think the easiest thing would be to add an option in the admincp to set the max and current value, and you wouldn't need to read or write a file (but of course that would mean logging in to the admincp to change the value). As for drawing the bar, I think there are a number of progress bar mods that you could look at, and I'm sure if you googled progress bar you'd find the html for just about any look you wanted. I remember looking at on that was just an image that get's stretched based on the percentage, so it was all done with html.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|