![]() |
BBCode - Real Fractions !!!! Math (UPDATED x2)
1 Attachment(s)
I did it finally! After hours of trying to figure out how to format a real fraction I came up with the code! Please see the screenshot below and judge for yourself.. It is a real post from my forum and it is all selectable text.. no images involved...
*****https://vborg.vbsupport.ru/external/2010/12/9.jpg***** *****https://vborg.vbsupport.ru/external/2010/12/9.jpg***** **Please leave feedback, and mark as installed if you used this, thanks!** YAY!!! Here is how: Admin CP > BBCode > New: Title: Code:
Fraction Code:
frc Code:
<button style="background-color:transparent;border-width:0;font-size:inherit;font-family:inherit;font-style:inherit;font:inherit;font-variant:inherit;font-weight:inherit;text-decoration:inherit;text-transform:inherit;text-shadow:inherit;color:inherit"> Code:
[frc=1]10[/frc]˙[frc=12.343](10*a+b)[/frc] Code:
Puts a value, a, over a value, b. (a/b) Code:
Yes. Enjoy! **Please leave feedback, and mark as installed if you used this, thanks!** |
tagged and thanks
a Maths forum might find it useful |
1 Attachment(s)
Unfortunately it is not working with me
see the screenshots (RTL language) |
It works just fine on RTL
Just change the Tag name from frac to frc |
1 Attachment(s)
oh :D
Thanks =) I have two more issues :rolleyes: see the screen-shot - How to reverse the direction (for RTL lang.) - As you see, It is very small, how can I increase the font size just to be clear to read? |
I am not sure what you mean by reverse direction.. If you mean to have 1/10 before the rest then you just need to switch things around. like this maybe
PHP Code:
For the font you can insert font size right after the center tag. something like this PHP Code:
|
Ahh, yes... There is a slight problem I realized.. The font for the fractions is not the same as the font that you are currently typing in.... I will fix it today after I'm done skiing.. but we leave in like 5 min...
Sorry! haha It will work though... :D |
1 Attachment(s)
EDIT:
Okay! I added the new code that fixes all the font size, color, style, face, weight, etc issues... Here is the new replacement code.. it is also in the original post now: Code:
<button style="background-color:transparent;border-width:0;font-size:inherit;font-family:inherit;font-style:inherit;font:inherit;font-variant:inherit;font-weight:inherit;text-decoration:inherit;text-transform:inherit;text-shadow:inherit;color:inherit"> |
1 Attachment(s)
Quote:
Quote:
About the font size, I just merged the two codes to get this awesome result :up: https://vborg.vbsupport.ru/attachmen...1&d=1293290207 About the direction, hmmmm see the previous screenshot (1/10) should be first like your example https://vborg.vbsupport.ru/attachmen...1&d=1293254369 Quote:
https://vborg.vbsupport.ru/showpost....10&postcount=3 |
I know the code. I'm on my phone now skiing. Post it when I'm back
|
I'm sorry.. I don't understand what you mean now either....
On the other example.. He just moved my code in reverse order to get it to work.. You fractions are still fine.. You just need to type the 1/10 after the other fraction since your forum is formated in that language... There is nothing wrong with the code... Your forum types from right to left so you need to type the order of the fractions right to left... Or choose a font that doesn't go left to right such as times new romans and set that for your font on the code... |
Quote:
I will explain this issue more :) If I want to write (3/4) ? (1/4) (which is equal 3), It will appear in my forum with RTL language (1/4) ? (3/4) (which is equal 0.33). I can't tell all users to write (1/4) ? (3/4) when they want to write (3/4) ? (1/4), and when we have a long equation it will be difficult to get right answer due to this issue. I know the code is true :) and this issue is something should happen logically when we write from right to left with something should be written from left to right. But I am looking for a smart solution for that. i.e: Can we fix the direction (LTR) just we use this code or ...... |
Unfortunatley.. my code isn't what is causing it to write left to right... If I were to add code to mine that would make it write right to left it wouldn't do anything because the fraction tags are all closed after you write one fraction... What you would have to do is create another tag.. say. then the stuff inside the math tags will write left to right.. I think I can create the math tag for you..
It would be something like this in the end to get your desired effect.. [math][frc=3]4[/frc]รท[frc=1]4[/frc][/math] |
Try making a new BBCode:
Title: Math BBCode Tag Name: Math Replacement: Code:
<textarea dir="ltr">{param}</textarea> Code:
[math][frc=3]4[/frc]?[frc=1]4[/frc][/math] Use {option}: no Everything else the same.. Should work then if you post something like this.. Code:
[math][frc=3]4[/frc]?[frc=1]4[/frc][/math] |
Thanks! It Works Wonderfully For Mee :d
|
All times are GMT. The time now is 06:50 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|