Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
BBCode - Real Fractions !!!! Math (UPDATED x2) Details »»
BBCode - Real Fractions !!!! Math (UPDATED x2)
Version: 1.00, by orange gold orange gold is offline
Developer Last Online: Sep 2011 Show Printable Version Email this Page

Category: BB Code Enhancements - Version: 4.1.0 Rating:
Released: 12-24-2010 Last Update: Never Installs: 8
 
No support by the author.

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

Enjoy!

**********

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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 12-25-2010, 06:37 AM
sulasno sulasno is offline
 
Join Date: Feb 2010
Posts: 588
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

tagged and thanks

a Maths forum might find it useful
Reply With Quote
  #3  
Old 12-25-2010, 08:36 AM
sadiq6210 sadiq6210 is offline
 
Join Date: Sep 2005
Posts: 684
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Unfortunately it is not working with me

see the screenshots (RTL language)
Attached Images
File Type: png SSS.PNG (5.0 KB, 0 views)
File Type: png FF.PNG (29.6 KB, 0 views)
Reply With Quote
  #4  
Old 12-25-2010, 09:00 AM
Merjawy's Avatar
Merjawy Merjawy is offline
 
Join Date: Sep 2002
Location: USA
Posts: 505
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It works just fine on RTL

Just change the Tag name from frac to frc
Reply With Quote
  #5  
Old 12-25-2010, 09:24 AM
sadiq6210 sadiq6210 is offline
 
Join Date: Sep 2005
Posts: 684
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

oh
Thanks =)

I have two more issues
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?
Attached Images
File Type: png rr.PNG (10.1 KB, 0 views)
Reply With Quote
  #6  
Old 12-25-2010, 10:14 AM
Merjawy's Avatar
Merjawy Merjawy is offline
 
Join Date: Sep 2002
Location: USA
Posts: 505
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #7  
Old 12-25-2010, 11:58 AM
orange gold orange gold is offline
 
Join Date: Dec 2007
Posts: 94
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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...
Reply With Quote
  #8  
Old 12-25-2010, 12:32 PM
orange gold orange gold is offline
 
Join Date: Dec 2007
Posts: 94
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
Attached Images
File Type: png Screen shot 2010-12-25 at 7.28.07 AM.png (11.5 KB, 0 views)
Reply With Quote
  #9  
Old 12-25-2010, 01:25 PM
sadiq6210 sadiq6210 is offline
 
Join Date: Sep 2005
Posts: 684
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Merjawy View Post
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 View Post
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>
Thanks, I appreciate your efforts (f)

About the font size, I just merged the two codes to get this awesome result :up:


About the direction, hmmmm see the previous screenshot (1/10) should be first like your example


Quote:
Originally Posted by Merjawy View Post
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
Attached Images
File Type: png ee.png (2.1 KB, 0 views)
Reply With Quote
  #10  
Old 12-25-2010, 05:09 PM
orange gold orange gold is offline
 
Join Date: Dec 2007
Posts: 94
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:04 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05535 seconds
  • Memory Usage 2,350KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (8)bbcode_code
  • (5)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (5)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete