The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Raw Block Data? Responding variable to width change?
Hey there, everyone!
So I've been playing around with the vBExperience plugin, and I've hit a bit of a hard spot. I'm adjust the width of the progression bars, but unfortunately the part that would "fill in" to match the appropriate percentage isn't keeping up. Image: http://i.imgur.com/g6iInau.png I've taken a look into the code, and it seems the green part is responsible; Code:
<dt class="aboutme_left"> <div title="{vb:raw block_data.xperience_gfx_level}" style="width:130px; height:11px; margin-bottom:2px; background-image:url({vb:raw vboptions.bburl}/xperience/progress/{vb:raw vboptions.xperience_bar_colour_level}_faded.png);"> <div title="{vb:raw block_data.xperience_gfx_level}" style="width:1px; height:11px; margin-bottom:2px; background-image:url({vb:raw vboptions.bburl}/xperience/progress/{vb:raw vboptions.xperience_bar_colour_level}_left.png); display:inline; float:left;"></div> <div title="{vb:raw block_data.xperience_gfx_level}" style="width:1px; height:11px; margin-bottom:2px; background-image:url({vb:raw vboptions.bburl}/xperience/progress/{vb:raw vboptions.xperience_bar_colour_level}_right.png); display:inline; float:right;"></div> <img alt="{vb:raw block_data.xperience_gfx_level}" src="{vb:raw vboptions.bburl}/xperience/progress/{vb:raw vboptions.xperience_bar_colour_level}.png" width="{vb:raw block_data.xperience_levelp}" height="11" /> </div> Thank you in advance! |
#2
|
||||
|
||||
Without knowing vBExperience, one can hardly tell you more than: In a plugin. You need to find the plugin that registers that variable for the postbit (I assume) template.
Such questions are really better asked in the thread for that specific addon. |
Благодарность от: | ||
Inked_Mono |
#3
|
|||
|
|||
Well, I've learned that each point in the progress is accounted for by the initial width. In other words, the original width was at 102px, knocking off 2px for the borders on each side, and the scale itself gave 1px per 1%. I think... I might be boned on this one, seeing as how I don't imagine I could rewrite the algorithm for counting in parts of a pixel (with my modified width being at 130px).
|
#4
|
||||
|
||||
You know you can do math in templates? You may not even have to tamper with the PHP side of things at all.
If you want examples, just search your templates for {vb:math in AdminCP. Perhaps this will work for you? Code:
{vb:math {vb:raw block_data.xperience_levelp} * 1.3 - 2} |
Благодарность от: | ||
MarkFL |
#5
|
|||
|
|||
Quote:
Edit: It doesn't seem to have worked. Thanks anyways! |
#6
|
||||
|
||||
What did not work? What's the result of the equation (should be visible in the page source)?
|
#7
|
|||
|
|||
The equation itself doesn't seem to pan out. I'd amended all necessary instances of the above line to match yours and the width still pulls to 1% = 1px.
I can PM you the forum link if that would help! |
#8
|
||||
|
||||
Try this:
Replace Code:
width="{vb:raw block_data.xperience_levelp}" Code:
style="width: {vb:raw block_data.xperience_levelp}%;" |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|