ProphpBB Support Forum

Official phpBB 3 Free Forum Hosting Support
 FAQ •  Search •  Register •  Login 
It is currently November 19th, 2008, 8:50 am

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: BBCode Calculator
PostPosted: August 14th, 2008, 11:00 am 
Offline
Staff Team Leader
Staff Team Leader
User avatar

Joined: January 24th, 2008, 4:55 pm
Posts: 1140
Location: Charlottesville, Va
Forum URL: http://forumadvertz.com
BBCode usage:
Code:
[calc][/calc]


HTML replacement:
Code:
<html>
<body>
<form name="myform">
    <table width="210" border="1" cellspacing="1" cellpadding="1" bgcolor="#003366">
      <tr>
        <td align="center">
          <table width="173" border="0" cellspacing="0" cellpadding="0" height="130">
            <tr>
             
            </tr>
            <tr>
              <td colspan="3">
                <input type="text" name="display" size="20">
              </td>
              <td width="53" height="0"> <font color="#FFFFFF">
                <input type="button" name="clear" value="   c   "
            onClick="myform.display.value=''" onMouseover="window.status='Clear numbers'" onMouseout="window.status=''">
                </font></td>
            </tr>
            <tr>
              <td width="53" height="0">
                <input type="button" name="seven" value="   7   "
            onClick="myform.display.value+='7'">
              </td>
              <td width="53" height="0">
                <input type="button" name="eight" value="   8   "
            onClick="myform.display.value+='8'">
              </td>
              <td width="53" height="0">
                <input type="button" name="nine" value="   9   "
            onClick="myform.display.value+='9'">
              </td>
              <td width="53" height="0"> <font color="#FFFFFF">
                <input type="button" name="divide" value="   /    "
            onClick="myform.display.value+='/'">
                </font></td>
            </tr>
            <tr>
              <td width="53" height="0">
                <input type="button" name="four" value="   4   "
            onClick="myform.display.value+='4'">
              </td>
              <td width="53" height="0">
                <input type="button" name="five" value="   5   "
            onClick="myform.display.value+='5'">
              </td>
              <td width="53" height="0">
                <input type="button" name="six" value="   6   "
            onClick="myform.display.value+='6'">
              </td>
              <td width="53" height="0"> <font color="#FFFFFF">
                <input type="button" name="times" value="   x   "
            onClick="myform.display.value+='*'">
                </font></td>
            </tr>
            <tr>
              <td width="53" height="0">
                <input type="button" name="one" value="   1   "
            onClick="myform.display.value +='1'">
              </td>
              <td width="53" height="0">
                <input type="button" name="two" value="   2   "
            onClick="myform.display.value +='2'">
              </td>
              <td width="54" height="0">
                <input type="button" name="three" value="   3   "
            onClick="myform.display.value +='3'">
              </td>
              <td width="72" height="0"> <font color="#FFFFFF">
                <input type="button" name="minus" value="    -   "
            onClick="myform.display.value+='-'">
                </font></td>
            </tr>
            <tr>
              <td width="53" height="0">
                <input type="button" name="zero" value="   0   "
            onClick="myform.display.value+='0'">
              </td>
              <td width="53" height="0"> </td>
              <td width="54" height="0">
                <input type="button" name="plus" value="   +   "
            onClick="myform.display.value +='+'">
              </td>
              <td width="72" height="0"> <font color="#FFFFFF">
                <input type="button" name="calculate" value="   =   "
            onClick="myform.display.value=eval(myform.display.value)">
                </font></td>
            </tr>
          </table>
        </td>
      </tr>
    </table>
  </form>
</body>
</html>


Have fun.

-Rich

_________________
Image
Free Graphic Requests
TUTORIALS | ADVERTISING
Check these out! Talk It Off | Coffee Shoppe


Top
 Profile E-mail  
 
 Post subject: Re: BBCode Calculator
PostPosted: August 21st, 2008, 11:38 pm 
Offline
Superstar Contributer
Superstar Contributer
User avatar

Joined: March 11th, 2008, 4:37 pm
Posts: 483
Forum URL: http://www.onesforum.net
Nifty, thanks!

_________________
Join This Site With Nexus And I!
Image
Image


Top
 Profile E-mail  
 
 Post subject: Re: BBCode Calculator
PostPosted: September 1st, 2008, 9:14 pm 
Offline
Regular
Regular

Joined: August 26th, 2008, 1:35 pm
Posts: 32
what are the instructions to use it?
ie..
[calc][/calc] what goes in between the tags?

_________________
Image


Top
 Profile  
 
 Post subject: Re: BBCode Calculator
PostPosted: September 2nd, 2008, 10:02 am 
Offline
Staff Team Leader
Staff Team Leader
User avatar

Joined: January 24th, 2008, 4:55 pm
Posts: 1140
Location: Charlottesville, Va
Forum URL: http://forumadvertz.com
Nothing goes in between the tags.

-Rich

_________________
Image
Free Graphic Requests
TUTORIALS | ADVERTISING
Check these out! Talk It Off | Coffee Shoppe


Top
 Profile E-mail  
 
 Post subject: Re: BBCode Calculator
PostPosted: September 3rd, 2008, 2:19 pm 
Offline
Regular
Regular

Joined: August 26th, 2008, 1:35 pm
Posts: 32
so if the calc bbcode is installed, a user just needs to enter the tags themselves and what when they submit, they will get a calculator?

edit: nevermind, I got it. :D

_________________
Image


Top
 Profile  
 
 Post subject: Re: BBCode Calculator
PostPosted: September 3rd, 2008, 2:25 pm 
Offline
Staff Team Leader
Staff Team Leader
User avatar

Joined: January 24th, 2008, 4:55 pm
Posts: 1140
Location: Charlottesville, Va
Forum URL: http://forumadvertz.com
> Admin Control Panel
> Posting tab
> Add a new BBCode
> BBCode usage:

Code:
[calc][/calc]

> HTML replacement:
Code:
<html>
<body>
<form name="myform">
    <table width="210" border="1" cellspacing="1" cellpadding="1" bgcolor="#003366">
      <tr>
        <td align="center">
          <table width="173" border="0" cellspacing="0" cellpadding="0" height="130">
            <tr>
             
            </tr>
            <tr>
              <td colspan="3">
                <input type="text" name="display" size="20">
              </td>
              <td width="53" height="0"> <font color="#FFFFFF">
                <input type="button" name="clear" value="   c   "
            onClick="myform.display.value=''" onMouseover="window.status='Clear numbers'" onMouseout="window.status=''">
                </font></td>
            </tr>
            <tr>
              <td width="53" height="0">
                <input type="button" name="seven" value="   7   "
            onClick="myform.display.value+='7'">
              </td>
              <td width="53" height="0">
                <input type="button" name="eight" value="   8   "
            onClick="myform.display.value+='8'">
              </td>
              <td width="53" height="0">
                <input type="button" name="nine" value="   9   "
            onClick="myform.display.value+='9'">
              </td>
              <td width="53" height="0"> <font color="#FFFFFF">
                <input type="button" name="divide" value="   /    "
            onClick="myform.display.value+='/'">
                </font></td>
            </tr>
            <tr>
              <td width="53" height="0">
                <input type="button" name="four" value="   4   "
            onClick="myform.display.value+='4'">
              </td>
              <td width="53" height="0">
                <input type="button" name="five" value="   5   "
            onClick="myform.display.value+='5'">
              </td>
              <td width="53" height="0">
                <input type="button" name="six" value="   6   "
            onClick="myform.display.value+='6'">
              </td>
              <td width="53" height="0"> <font color="#FFFFFF">
                <input type="button" name="times" value="   x   "
            onClick="myform.display.value+='*'">
                </font></td>
            </tr>
            <tr>
              <td width="53" height="0">
                <input type="button" name="one" value="   1   "
            onClick="myform.display.value +='1'">
              </td>
              <td width="53" height="0">
                <input type="button" name="two" value="   2   "
            onClick="myform.display.value +='2'">
              </td>
              <td width="54" height="0">
                <input type="button" name="three" value="   3   "
            onClick="myform.display.value +='3'">
              </td>
              <td width="72" height="0"> <font color="#FFFFFF">
                <input type="button" name="minus" value="    -   "
            onClick="myform.display.value+='-'">
                </font></td>
            </tr>
            <tr>
              <td width="53" height="0">
                <input type="button" name="zero" value="   0   "
            onClick="myform.display.value+='0'">
              </td>
              <td width="53" height="0"> </td>
              <td width="54" height="0">
                <input type="button" name="plus" value="   +   "
            onClick="myform.display.value +='+'">
              </td>
              <td width="72" height="0"> <font color="#FFFFFF">
                <input type="button" name="calculate" value="   =   "
            onClick="myform.display.value=eval(myform.display.value)">
                </font></td>
            </tr>
          </table>
        </td>
      </tr>
    </table>
  </form>
</body>
</html>

> Check the checkbox
> Submit

When you are posting, just click the code button. Your post will look like this:

Here is a cool calculator: [calc][/calc]

-Rich

_________________
Image
Free Graphic Requests
TUTORIALS | ADVERTISING
Check these out! Talk It Off | Coffee Shoppe


Top
 Profile E-mail  
 
 Post subject: Re: BBCode Calculator
PostPosted: September 18th, 2008, 8:27 pm 
Offline
Contributer
Contributer
User avatar

Joined: February 29th, 2008, 3:37 am
Posts: 53
Location: Indiana :(
Forum URL: http://thejamesbond.org
Really should not have <html></html> and <body></body> tags in the BBCode ;)

_________________
http://the-webmasters-resource.info - Coding, design, phpBB3 tutorials & more.
www.TheJamesBond.org


Top
 Profile E-mail  
 
 Post subject: Re: BBCode Calculator
PostPosted: September 19th, 2008, 4:01 am 
Offline
Star Contributer
Star Contributer
User avatar

Joined: July 28th, 2008, 1:23 am
Posts: 199
Forum URL: http://rpgaming.prophpbb.com
Mr. Bond wrote:
Really should not have <html></html> and <body></body> tags in the BBCode ;)


Eh? The bbcode doesnt, the html replacement does.

_________________
Image Image


Top
 Profile E-mail  
 
 Post subject: Re: BBCode Calculator
PostPosted: September 19th, 2008, 7:52 am 
Offline
Staff Member
Staff Member
User avatar

Joined: January 8th, 2008, 11:25 am
Posts: 630
Location: Dover, UK
Forum URL: http://headlight.ekam.org.uk
verdilak wrote:
Mr. Bond wrote:
Really should not have <html></html> and <body></body> tags in the BBCode ;)


Eh? The bbcode doesnt, the html replacement does.

What Mr. Bond is saying is that the replacement code doesn't need these tags for the html to work as a BBCode. If it were a stand-alone web page then, of course, it would but BBCode is contained within a web page that already has these tags so they're not required.

_________________
Phil

If at first you don't succeed, use a BIGGER HAMMER
HeadLight: The Forum of East Kent Advanced Motorcyclists
Dour Forum: A local community forum for Dover.


Top
 Profile E-mail  
 
 Post subject: Re: BBCode Calculator
PostPosted: September 19th, 2008, 10:15 am 
Offline
Staff Team Leader
Staff Team Leader
User avatar

Joined: January 24th, 2008, 4:55 pm
Posts: 1140
Location: Charlottesville, Va
Forum URL: http://forumadvertz.com
Doesn't matter if they are in there or not :s_cool Since it's a copy-paste tutorial (hopefully no one is typing that out!! hah) the same amount of effort goes into keeping the tags, than taking them out. :s_tongue

-Rich

_________________
Image
Free Graphic Requests
TUTORIALS | ADVERTISING
Check these out! Talk It Off | Coffee Shoppe


Top
 Profile E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Free forums are powered by phpBB.
This is a demonstration of the new custom footer code we allow, for placing stats tracking or analytics code, messages to users, parter links, etc. Please see this thread for more details.