vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   BB Code Enhancements - BBCode - Real Fractions !!!! Math (UPDATED x2) (https://vborg.vbsupport.ru/showthread.php?t=255875)

orange gold 12-24-2010 10:00 PM

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...


**Please leave feedback, and mark as installed if you used this, thanks!**

YAY!!!

Here is how:

Admin CP > BBCode > New:

Title:
Code:

Fraction
BBCode Tag Name:
Code:

frc
Replacement(The code below is improved compared to the code when this post first came out):
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">
<center>
<sub><font style="text-decoration: underline; line-height:110%">{option}</font></sub><br>
<sup><font style="text-decoration: overline; line-height:110%">{param}</font></sup>
</center>
</button>

Example:
Code:

[frc=1]10[/frc]˙[frc=12.343](10*a+b)[/frc]
Description:
Code:

Puts a value, a, over a value, b. (a/b)
Use {Option}:
Code:

Yes.
Leave everything else default... :D

Enjoy!


**Please leave feedback, and mark as installed if you used this, thanks!**

sulasno 12-25-2010 06:37 AM

tagged and thanks

a Maths forum might find it useful

sadiq6210 12-25-2010 08:36 AM

1 Attachment(s)
Unfortunately it is not working with me

see the screenshots (RTL language)

Merjawy 12-25-2010 09:00 AM

It works just fine on RTL

Just change the Tag name from frac to frc

sadiq6210 12-25-2010 09:24 AM

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?

Merjawy 12-25-2010 10:14 AM

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:

[frc=12.343](10*a+b)[/frc]&#729;[frc=1]10[/frc] 


For the font you can insert font size right after the center tag. something like this

PHP Code:

<button style="background-color:transparent;border-width:0">
<
center><font size=+1>
<
sub><u>{option}</u></sub><br>
<
sup><font style="text-decoration: overline;">{param}</font></sup>
</
center>
</
button


orange gold 12-25-2010 11:58 AM

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

orange gold 12-25-2010 12:32 PM

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">
<center>
<sub><font style="text-decoration: underline;">{option}</font></sub><br>
<sup><font style="text-decoration: overline;">{param}</font></sup>
</center>
</button>

https://vborg.vbsupport.ru/external/2010/12/9.jpg

sadiq6210 12-25-2010 01:25 PM

1 Attachment(s)
Quote:

Originally Posted by Merjawy (Post 2138866)
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:

[frc=12.343](10*a+b)[/frc]&#729;[frc=1]10[/frc] 


For the font you can insert font size right after the center tag. something like this

PHP Code:

<button style="background-color:transparent;border-width:0">
<
center><font size=+1>
<
sub><u>{option}</u></sub><br>
<
sup><font style="text-decoration: overline;">{param}</font></sup>
</
center>
</
button


Quote:

Originally Posted by orange gold (Post 2138892)
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">
<center>
<sub><font style="text-decoration: underline;">{option}</font></sub><br>
<sup><font style="text-decoration: overline;">{param}</font></sup>
</center>
</button>

https://vborg.vbsupport.ru/attachmen...9&d=1293287571

Thanks, I appreciate your efforts (f)

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:

Originally Posted by Merjawy (Post 2138866)
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:

[frc=12.343](10*a+b)[/frc]&#729;[frc=1]10[/frc] 


It is not useful solution to tell the users to write the equation inverse to get it in right direction, I am looking for another fixing, somthing like that:
https://vborg.vbsupport.ru/showpost....10&postcount=3

orange gold 12-25-2010 05:09 PM

I know the code. I'm on my phone now skiing. Post it when I'm back


All times are GMT. The time now is 09:02 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01103 seconds
  • Memory Usage 1,766KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (8)bbcode_code_printable
  • (5)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete