Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

Reply
 
Thread Tools
vBCalculator version 1.1 Details »»
vBCalculator version 1.1
Version: 1.1, by yoyoyoyo yoyoyoyo is offline
Developer Last Online: Sep 2008 Show Printable Version Email this Page

Version: 3.0.8 Rating:
Released: 06-17-2005 Last Update: 06-17-2005 Installs: 13
Template Edits
 
No support by the author.

vBCalculator
version 1.1



TEMPLATE EDITS: 2 (headinclude, NAVBAR)
NEW TEMPLATES: 1 (calculator)
NEW PHP FILES: 1 (calculator.php)
SCREENSHOTS INCLUDED IN ZIP FILE



TIME TO INSTALL: Less than 5 minutes
LEVEL OF DIFFICULTY: Beginner/Simple


This hack adds a popup multi-function scientific calculator to your forum. In additon to the normal calculator functions (Additon, Subtraction, Multiplication, Division, Equals), this calculator also features Square Root, exponential, cosine, inverse cosine, arcsine, tangent, inverse tangent, squared, cubed, subset and pi functions, as well as memory functions.

INSTALLATION:

1) Go to ADMIN CP -> STYLES & TEMPLATES -> ADD NEW TEMPLATE and create a template called calculator with the contents of template.calculator.txt and click save.

2) Go to ADMIN CP -> STYLES & TEMPLATES -> EDIT TEMPLATES and add the contents of template.headinclude.txt to the end of the headinclude template and click save.

3) Go to ADMIN CP -> STYLES & TEMPLATES -> EDIT TEMPLATES and open the NAVBAR template and search for the following:
Code:
<tr><td class="vbmenu_option"><a href="subscription.php?$session[sessionurl]">$vbphrase[subscribed_threads]</a></td></tr>
BEFORE add:
Code:
<td class="vbmenu_option"><a href="#" onclick="window.open('calculator.php','calculator','statusbar=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes,width=510,height=235'); return false;">Calculator</a></td>
4) Upload calculator.php to your forum root directory

5) That's it! Go to your forum NAVBAR -> QUICK LINKS -> Calculator to view your new popup calculator.

PLEASE CLICK INSTALL

version changes:

1.1: changed the calculator to a popup menu (redo the NAVBAR template edit and replace the contents of the calculator template to upgrade from 1.0) Thanks to nexialys for the suggestion.

Supporters / CoAuthors

Show Your Support

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

Comments
  #22  
Old 08-23-2005, 02:21 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nope, didn't make the buttons themselves any wider. Just the background for them.
Reply With Quote
  #23  
Old 08-23-2005, 03:42 PM
yoyoyoyo's Avatar
yoyoyoyo yoyoyoyo is offline
 
Join Date: Dec 2004
Location: USA
Posts: 1,612
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sorry- I misunderstood- in that case try this:
Code:
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>$vboptions[bbtitle] vBCalculator</title>
$headinclude
</head>
<!-- BEGIN CALCULATOR -->
<FORM NAME="vBCalculate">

<CENTER><TABLE BORDER=6 CELLSPACING=2 CELLPADDING=2>
<TR><TD COLSPAN=7 VALIGN=MIDDLE ALIGN=CENTER NOWRAP><B><FONT SIZE=+1>vBCalculator</FONT></B></TD></TR>

<TR><TD COLSPAN=6 VALIGN=MIDDLE ALIGN=left NOWRAP><input type=text Name="result" 

size=40></TD><TD></td><TD></td></TR>

<TR><TD VALIGN=MIDDLE ALIGN=CENTER><INPUT TYPE="button" VALUE="&nbsp;=&nbsp;" onClick="calcul(this.form)"></TD><TD 

VALIGN=MIDDLE ALIGN=CENTER><INPUT TYPE="button" VALUE="&nbsp;^2&nbsp;" onClick="calculox(this.form)"></TD><TD 

VALIGN=MIDDLE ALIGN=CENTER><INPUT TYPE="button" VALUE="&nbsp;sqrt&nbsp;" onClick="calcusq(this.form)"></TD><TD 

VALIGN=MIDDLE ALIGN=CENTER><INPUT TYPE="button" VALUE="&nbsp;sin&nbsp;" onClick="calcusin(this.form)"></TD><TD 

VALIGN=MIDDLE ALIGN=CENTER><INPUT TYPE="button" VALUE="&nbsp;cos&nbsp;" onClick="calculon(this.form)"></TD><TD 

VALIGN=MIDDLE ALIGN=CENTER><INPUT TYPE="button" VALUE="&nbsp;tan&nbsp;" onClick="calcutan(this.form)"></TD><TD 

VALIGN=MIDDLE ALIGN=CENTER><INPUT TYPE="button" VALUE="&nbsp;exp&nbsp;" onClick="calcuexp(this.form)"></TD><TD 

rowspan=2><TABLE BORDER=1 CELLSPACING=0 CELLPADDING=0>
<TR><TD VALIGN=MIDDLE ALIGN=CENTER><INPUT TYPE="button" VALUE="&nbsp;->M&nbsp;" onClick="calcumk(this.form)"></TD><TD 

VALIGN=MIDDLE ALIGN=CENTER><INPUT TYPE="button" VALUE="&nbsp;<-M&nbsp;" onClick="calcumrx(this.form)"></TD></TR>
<TR><TD VALIGN=MIDDLE ALIGN=CENTER><INPUT TYPE="button" VALUE="&nbsp;+M&nbsp;" onClick="calcumtemp(this.form)"></TD><TD 

VALIGN=MIDDLE ALIGN=CENTER><INPUT TYPE="button" VALUE="&nbsp;clM&nbsp;" onClick="calcxmc(this.form)"></TD></TR>
</TABLE></td></TR>


<TR><TD VALIGN=MIDDLE ALIGN=CENTER><INPUT TYPE="button" VALUE="&nbsp;pi&nbsp;" onClick="calcxpi(this.form)"></TD>

<TD VALIGN=MIDDLE ALIGN=CENTER><INPUT TYPE="button" VALUE="&nbsp;^3&nbsp;" onClick="calcx3(this.form)"></TD>

<TD VALIGN=MIDDLE ALIGN=CENTER><INPUT TYPE="button" VALUE="&nbsp;clr&nbsp;" onClick="calcxcl(this.form)"></TD>

<TD VALIGN=MIDDLE ALIGN=CENTER><INPUT TYPE="button" VALUE="&nbsp;asin&nbsp;" onClick="calcxas(this.form)"></TD>

<TD VALIGN=MIDDLE ALIGN=CENTER><INPUT TYPE="button" VALUE="&nbsp;acos&nbsp;" onClick="calcxac(this.form)"></TD>
<TD VALIGN=MIDDLE ALIGN=CENTER><INPUT TYPE="button" VALUE="&nbsp;atan&nbsp;" onClick="calcxat(this.form)"></TD>
<TD VALIGN=MIDDLE ALIGN=CENTER><INPUT TYPE="button" VALUE="&nbsp;ln&nbsp;" onClick="calcxlo(this.form)"></TD></TR>


<TR><TD COLSPAN=6 VALIGN=MIDDLE ALIGN=CENTER><TABLE><TR><TD><TABLE BORDER=1 CELLSPACING=0 CELLPADDING=0>
<TR><TD VALIGN=MIDDLE ALIGN=CENTER><INPUT TYPE="button" VALUE="&nbsp;0&nbsp;" onClick="calcx0(this.form)"></TD><TD 

VALIGN=MIDDLE ALIGN=CENTER><INPUT TYPE="button" VALUE="&nbsp;1&nbsp;" onClick="calcx1(this.form)"></TD><TD 

VALIGN=MIDDLE ALIGN=CENTER><INPUT TYPE="button" VALUE="&nbsp;2&nbsp;" onClick="calcxn2(this.form)"></TD><TD 

VALIGN=MIDDLE ALIGN=CENTER><INPUT TYPE="button" VALUE="&nbsp;3&nbsp;" onClick="calcxn3(this.form)"></TD><TD 

VALIGN=MIDDLE ALIGN=CENTER><INPUT TYPE="button" VALUE="&nbsp;+&nbsp;" onClick="calcxplu(this.form)"></TD><TD 

VALIGN=MIDDLE ALIGN=CENTER><INPUT TYPE="button" VALUE="-" onClick="calcxmin(this.form)"></TD></TR>
<TR><TD VALIGN=MIDDLE ALIGN=CENTER><INPUT TYPE="button" VALUE="&nbsp;4&nbsp;" onClick="calcx4(this.form)"></TD><TD 

VALIGN=MIDDLE ALIGN=CENTER><INPUT TYPE="button" VALUE="&nbsp;5&nbsp;" onClick="calcx5(this.form)"></TD><TD 

VALIGN=MIDDLE ALIGN=CENTER><INPUT TYPE="button" VALUE="&nbsp;6&nbsp;" onClick="calcx6(this.form)"></TD><TD 

VALIGN=MIDDLE ALIGN=CENTER><INPUT TYPE="button" VALUE="&nbsp;7&nbsp;" onClick="calcx7(this.form)"></TD><TD 

VALIGN=MIDDLE ALIGN=CENTER><INPUT TYPE="button" VALUE="&nbsp;*&nbsp;" onClick="calcxmul(this.form)"></TD><TD 

VALIGN=MIDDLE ALIGN=CENTER><INPUT TYPE="button" VALUE="&nbsp;/&nbsp;" onClick="calcdiv(this.form)"></TD></TR>
<TR><TD VALIGN=MIDDLE ALIGN=CENTER><INPUT TYPE="button" VALUE="&nbsp;8&nbsp;" onClick="calcx8(this.form)"></TD><TD 

VALIGN=MIDDLE ALIGN=CENTER><INPUT TYPE="button" VALUE="&nbsp;9&nbsp;" onClick="calcx9(this.form)"></TD><TD 

VALIGN=MIDDLE ALIGN=CENTER><INPUT TYPE="button" VALUE="&nbsp;.&nbsp;" onClick="calcxper(this.form)"></TD><TD 

VALIGN=MIDDLE ALIGN=CENTER><INPUT TYPE="button" VALUE="&nbsp;e&nbsp;" onClick="calcxe(this.form)"></TD><TD 

VALIGN=MIDDLE ALIGN=CENTER><INPUT TYPE="button" VALUE="&nbsp;(&nbsp;" onClick="calcxleft(this.form)"></TD><TD 

VALIGN=MIDDLE ALIGN=CENTER><INPUT TYPE="button" VALUE="&nbsp;)&nbsp;" onClick="calcxright(this.form)"></TD></TR>
</TABLE></TD><TD><TABLE BORDER=3 CELLSPACING=0 CELLPADDING=0>
<TR><TD VALIGN=MIDDLE ALIGN=CENTER><INPUT TYPE="button" VALUE="&nbsp;=&nbsp;" onClick="calcul(this.form)"></TD></TR>
</TABLE></td></tr></table></TD><TD></TD><TD VALIGN=MIDDLE ALIGN=CENTER><B><FONT SIZE=2>vBCalculator<br></FONT></B><FONT SIZE=1>by yoyoyoyo</FONT></TD></TR>
</TABLE></CENTER>
<input type=hidden name="memory">
</form>
<!-- END CALCULATOR -->
</body>
</html>
Reply With Quote
  #24  
Old 08-23-2005, 04:31 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, that's a little better. The numbers buttons look right now but the buttons above them are still off size.
Reply With Quote
  #25  
Old 09-16-2005, 09:19 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any more luck yet? LOL

Also, maybe a small help file to tell the user what the certain calculations do?
Reply With Quote
  #26  
Old 03-11-2006, 04:08 PM
yesfans yesfans is offline
 
Join Date: Feb 2002
Location: In your head!
Posts: 262
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great little addition. I can't count how many times I was online and wife or kid needed a quick HOW MUCH IS THIS and I had to scramble to find a calc or pull it up on my PC. Great stuff!
Reply With Quote
Reply

Thread Tools

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 02:17 AM.


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.04032 seconds
  • Memory Usage 2,277KB
  • Queries Executed 23 (?)
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
  • (3)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (5)postbit
  • (6)postbit_onlinestatus
  • (6)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_postinfo_query
  • fetch_postinfo
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete