The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Why bother with style="float:$stylevar[right]"
Is there any good reason to use float:$stylevar[right] rather than just using float:right?
Its not like float:right could possibly be any other thing. There's still a lot about the coding in the templates (not to mention the php files) that confounds me and I'm never quite sure if I'm missing some fundamental point about the way vbulletin was programmed when I make decisions like abandoning phrases by just inserting my own or tidying up what seems like a pointless use like $stylevar[right]. |
Благодарность от: | ||
PinkMilk |
#2
|
|||
|
|||
If you needed to change the direction or flow of something you would want it a variable. Without knowing where it is being used I cannot advise you.
|
#3
|
|||
|
|||
If you wanted an object to float left, you'd use either style="float:left" or style="float:$stylevar[left]" if you wanted an object to float right it would be either style="float:right" or style="float:$stylevar[right]".
Float only has left, right, none, inherit (and the very obscure center which I don't think much supports). I see the $stylevar[left] or right used in almost every template, but it just seems so pointless. When would left ever be something other than left? Any why bother with a phrase at all when plain css is shorter, does the same job, is easier to edit, and because of the simplicity of the function could only possibly ever be right-for-right and left-for-left. Thus, that's why I'm confused by the use of a global phrase in this case for something that seems like you'd never ever redefine it. What am I missing? |
#4
|
|||
|
|||
Give me the name of a template where this has you puzzled (to save me time).
|
#5
|
|||
|
|||
It occurs in every single template that uses a float. So pretty much every single template.
I'm not confused by the function...just the reasoning behind the development of Vbulletin to do it this way. I've got blog_member_block open, but you could literally find something like style="$stylevar[right]" in almost every single template. |
#6
|
|||
|
|||
Look at "functions.php", function fetch_stylevars() around line #5000
It will answer your question. Code:
$stylevar['left'] = 'right'; $stylevar['right'] = 'left'; directional layout reasons. |
#8
|
|||
|
|||
Your not alone doob, I've always wondered this aswell
|
#9
|
||||
|
||||
Its for RTL languages, like Arabic.
|
3 благодарности(ей) от: | ||
doob, PinkMilk, RichieBoy67 |
#10
|
|||
|
|||
Brilliant Zachary. Now THAT makes sense as a reason to use a phrase for this.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|