Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Snitz Forum BBCode?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
Astralis Posted - 22 February 2011 : 01:35:40
Has anyone compiled the basic Snitz Forum BBCode into a file (or a couple) that has only the minimal relevant components that they could share?

Of all the BBCodes out there, the Snitz BBCode is very nice.
10   L A T E S T    R E P L I E S    (Newest First)
HuwR Posted - 24 February 2011 : 01:38:57
you are not allowed to use the Snitz graphics on a non snitz site without the Permission of Mike (ReinSnitz) who owns them, they do not belong to Snitz so we can't give permission.
Astralis Posted - 24 February 2011 : 01:03:14
Here is the basic compact Snitz BBCode.

1. This is not a Snitz Forum add-on. This is for people who want to use the Snitz BBCode in other applications.

2. This code does not process the BBCode, it's only designed to allow users to format their posts with BBCode in a non-WYSIWYG format. If you need a script to process the submission that's posted, I have a RegEx that might be more efficient than what Snitz Forum is currently using. You can also go through Snitz Forum's code to find the method to process the BBCode.

3. I believe this code will work on almost any browser, all the way from the Netscape era, as long as Javascript is enabled.

4. The contents of inc_code.js includes all the script that I believe is necessary to run the Snitz BBCode but may include some extras that aren't necessary.

5. As you test this, you will notice that icons will not show up. You will need to create your own icon graphics and smilies and place on your own server for them to appear (Yahoo and Google have 'open-sourced' their smilies and allow free use of them). I believe there are over 30 calls to the server with all those icons so it might be time to redesign how the icon buttons and smilies appear on the page ... maybe use CSS positioning??

6. The smilies will need converted into real smiley code because this forum is converting them into graphics. Reply with quote to this topic to see those values.

STEP 1
Paste the following in an HTML page:


 <script language="JavaScript" type="text/javascript" src="inc_code.js"></script>
 <table border="0" cellspacing="0" cellpadding="0" align="center">

        <tr>

          <td bgcolor="#ffffff">

            <table border="0" cellspacing="1" cellpadding="1">

              <form name="PostTopic" method="post" action="post.asp" onSubmit="return validate();">
              <tr>

                <td bgColor="whitesmoke" noWrap vAlign="top" align="right"><font face="Verdana,Arial,Helvetica" size="2"><b>Screensize:</b></font></td>

                <td bgColor="whitesmoke"><font face="Verdana,Arial,Helvetica" size="2">

                <select name="SelectSize" size="1" tabindex="-1" onchange="resizeTextarea('Snitz00')">

                	<option value="1">640  x 480</option>

                	<option value="2" selected>800  x 600</option>

                	<option value="3">1024 x 768</option>

                	<option value="4">1280 x 1024</option>

                </select>

                </font></td>

              </tr>

              <tr>

                <td bgColor="whitesmoke" align="right" valign="top">

                <font face="Verdana,Arial,Helvetica" size="2"><b>Format Mode:</b></font></td>

                <td bgColor="whitesmoke" align="left">

                <select name="mode" tabindex="-1" onChange="thelp(this.options[this.selectedIndex].value)">

                	<option selected value="0">Basic </option>

                	<option value="1">Help </option>

                	<option value="2">Prompt </option>

                </select>

                <a href="JavaScript:openWindowHelp('pop_help.asp?mode=post#mode')" tabindex="-1"><img src="icon_smile_question.gif" width="15" height="15" border="0" alt="" title="" /></a></td>

              </tr>

              <tr>

                <td bgColor="whitesmoke" align="right" rowspan="2" valign="top">

                <font face="Verdana,Arial,Helvetica" size="2"><b>Format:</b></font></td>

                <td bgColor="whitesmoke" align="left">

                <a href="Javascript:bold();" tabindex="-1"><img src="icon_editor_bold.gif" width="23" height="22" border="0" alt="Bold" title="Bold" align="top" /></a><a href="Javascript:italicize();" tabindex="-1"><img src="icon_editor_italicize.gif" width="23" height="22" border="0" alt="Italicized" title="Italicized" align="top" /></a><a href="Javascript:underline();" tabindex="-1"><img src="icon_editor_underline.gif" width="23" height="22" border="0" alt="Underline" title="Underline" align="top" /></a><a href="Javascript:strike();" tabindex="-1"><img src="icon_editor_strike.gif" width="23" height="22" border="0" alt="Strikethrough" title="Strikethrough" align="top" /></a>

                <a href="Javascript:left();" tabindex="-1"><img src="icon_editor_left.gif" width="23" height="22" border="0" alt="Align Left" title="Align Left" align="top" /></a><a href="Javascript:center();" tabindex="-1"><img src="icon_editor_center.gif" width="23" height="22" border="0" alt="Centered" title="Centered" align="top" /></a><a href="Javascript:right();" tabindex="-1"><img src="icon_editor_right.gif" width="23" height="22" border="0" alt="Align Right" title="Align Right" align="top" /></a>

                <a href="Javascript:hr();" tabindex="-1"><img src="icon_editor_hr.gif" width="23" height="22" border="0" alt="Horizontal Rule" title="Horizontal Rule" align="top" /></a>                <a href="Javascript:hyperlink();" tabindex="-1"><img src="icon_editor_url.gif" width="23" height="22" border="0" alt="Insert Hyperlink" title="Insert Hyperlink" align="top" /></a><a href="Javascript:email();" tabindex="-1"><img src="icon_editor_email.gif" width="23" height="22" border="0" alt="Insert Email" title="Insert Email" align="top" /></a><a href="Javascript:image();" tabindex="-1"><img src="icon_editor_image.gif" width="23" height="22" border="0" alt="Insert Image" title="Insert Image" align="top" /></a>

                <a href="Javascript:showcode();" tabindex="-1"><img src="icon_editor_code.gif" width="23" height="22" border="0" alt="Insert Code" title="Insert Code" align="top" /></a><a href="Javascript:quote();" tabindex="-1"><img src="icon_editor_quote.gif" width="23" height="22" border="0" alt="Insert Quote" title="Insert Quote" align="top" /></a><a href="Javascript:list();" tabindex="-1"><img src="icon_editor_list.gif" width="23" height="22" border="0" alt="Insert List" title="Insert List" align="top" /></a>

                </td>

              </tr>

              <tr>

                <td bgColor="whitesmoke" align="left">

                <font face="Verdana,Arial,Helvetica" size="2">

                <select name="Font" tabindex="-1" onChange="showfont(this.options[this.selectedIndex].value)">

                	<option value="" selected>Font</option>

                	<option value="Andale Mono">Andale Mono</option>

                	<option value="Arial">Arial</option>

                	<option value="Arial Black">Arial Black</option>

                	<option value="Book Antiqua">Book Antiqua</option>

                	<option value="Century Gothic">Century Gothic</option>

                	<option value="Comic Sans MS">Comic Sans MS</option>

                	<option value="Courier New">Courier New</option>

                	<option value="Georgia">Georgia</option>

                	<option value="Impact">Impact</option>

                	<option value="Lucida Console">Lucida Console</option>

                	<option value="Script MT Bold">Script MT Bold</option>

                	<option value="Stencil">Stencil</option>

                	<option value="Tahoma">Tahoma</option>

                	<option value="Times New Roman">Times New Roman</option>

                	<option value="Trebuchet MS">Trebuchet MS</option>

                	<option value="Verdana">Verdana</option>

                </select> 

                <select name="Size" tabindex="-1" onChange="showsize(this.options[this.selectedIndex].value)">

                	<option value="" selected>Size</option>

                	<option value="1">1</option>

                	<option value="2">2</option>

                	<option value="3">3</option>

                	<option value="4">4</option>

                	<option value="5">5</option>

                	<option value="6">6</option>

                </select> 

                <select name="Color" tabindex="-1" onChange="showcolor(this.options[this.selectedIndex].value)">

                	<option value="" selected>Color</option>

                	<option style="color:black" value="black">Black</option>

                	<option style="color:red" value="red">Red</option>

                	<option style="color:yellow" value="yellow">Yellow</option>

                	<option style="color:pink" value="pink">Pink</option>

                	<option style="color:green" value="green">Green</option>

                	<option style="color:orange" value="orange">Orange</option>

                	<option style="color:purple" value="purple">Purple</option>

                	<option style="color:blue" value="blue">Blue</option>

                	<option style="color:beige" value="beige">Beige</option>

                	<option style="color:brown" value="brown">Brown</option>

                	<option style="color:teal" value="teal">Teal</option>

                	<option style="color:navy" value="navy">Navy</option>

                	<option style="color:maroon" value="maroon">Maroon</option>

                	<option style="color:limegreen" value="limegreen">LimeGreen</option>

                </select></font></td>

              </tr>

                <td bgColor="whitesmoke" noWrap vAlign="top" align="right"><font face="Verdana,Arial,Helvetica" size="2"><b>

Message:</b><br />

                <br />

                  <table border="0">

                    <tr>

                      <td align="left" nowrap><font face="Verdana,Arial,Helvetica" size="2">

                      <script language="Javascript" type="text/javascript">

                      <!-- hide

                      function insertsmilie(smilieface) {

                      		AddText(smilieface);

                      }

                      // -->

                      </script>

                      <table width="100%" border="0" cellspacing="0" cellpadding="2" align="center">

                        <tr align="center">

                          <td align="center" colspan="4"><a name="smilies"></a><font face="Verdana,Arial,Helvetica" size="1"><b>Smilies</b></font></td>

                        </tr>

                        <tr align="center" valign="middle">

                          <td><a href="Javascript:insertsmilie('')" tabindex="-1"><img src="icon_smile.gif" width="15" height="15" border="0" alt="Smile " title="Smile " /></a></td>

                          <td><a href="Javascript:insertsmilie('')" tabindex="-1"><img src="icon_smile_big.gif" width="15" height="15" border="0" alt="Big Smile " title="Big Smile " /></a></td>

                          <td><a href="Javascript:insertsmilie('')" tabindex="-1"><img src="icon_smile_cool.gif" width="15" height="15" border="0" alt="Cool " title="Cool " /></a></td>

                          <td><a href="Javascript:insertsmilie('')" tabindex="-1"><img src="icon_smile_blush.gif" width="15" height="15" border="0" alt="Blush " title="Blush " /></a></td>

                        </tr>

                        <tr align="center" valign="middle">

                          <td><a href="Javascript:insertsmilie('')" tabindex="-1"><img src="icon_smile_tongue.gif" width="15" height="15" border="0" alt="Tongue " title="Tongue " /></a></td>

                          <td><a href="Javascript:insertsmilie('')" tabindex="-1"><img src="icon_smile_evil.gif" width="15" height="15" border="0" alt="Evil [):]" title="Evil [):]" /></a></td>

                          <td><a href="Javascript:insertsmilie('')" tabindex="-1"><img src="icon_smile_wink.gif" width="15" height="15" border="0" alt="Wink " title="Wink " /></a></td>

                          <td><a href="Javascript:insertsmilie('')" tabindex="-1"><img src="icon_smile_clown.gif" width="15" height="15" border="0" alt="Clown " title="Clown " /></a></td>

                        </tr>

                        <tr align="center" valign="middle">

                          <td><a href="Javascript:insertsmilie('')" tabindex="-1"><img src="icon_smile_blackeye.gif" width="15" height="15" border="0" alt="Black Eye " title="Black Eye " /></a></td>

                          <td><a href="Javascript:insertsmilie('')" tabindex="-1"><img src="icon_smile_8ball.gif" width="15" height="15" border="0" alt="Eight Ball " title="Eight Ball " /></a></td>

                          <td><a href="Javascript:insertsmilie('')" tabindex="-1"><img src="icon_smile_sad.gif" width="15" height="15" border="0" alt="Frown " title="Frown " /></a></td>

                          <td><a href="Javascript:insertsmilie('')" tabindex="-1"><img src="icon_smile_shy.gif" width="15" height="15" border="0" alt="Shy " title="Shy " /></a></td>

                        </tr>

                        <tr align="center" valign="middle">

                          <td><a href="Javascript:insertsmilie('')" tabindex="-1"><img src="icon_smile_shock.gif" width="15" height="15" border="0" alt="Shocked " title="Shocked " /></a></td>

                          <td><a href="Javascript:insertsmilie('')" tabindex="-1"><img src="icon_smile_angry.gif" width="15" height="15" border="0" alt="Angry " title="Angry " /></a></td>

                          <td><a href="Javascript:insertsmilie('')" tabindex="-1"><img src="icon_smile_dead.gif" width="15" height="15" border="0" alt="Dead " title="Dead " /></a></td>

                          <td><a href="Javascript:insertsmilie('')" tabindex="-1"><img src="icon_smile_sleepy.gif" width="15" height="15" border="0" alt="Sleepy " title="Sleepy " /></a></td>

                        </tr>

                        <tr align="center" valign="middle">

                          <td><a href="Javascript:insertsmilie('')" tabindex="-1"><img src="icon_smile_kisses.gif" width="15" height="15" border="0" alt="Kisses " title="Kisses " /></a></td>

                          <td><a href="Javascript:insertsmilie('')" tabindex="-1"><img src="icon_smile_approve.gif" width="15" height="15" border="0" alt="Approve " title="Approve " /></a></td>

                          <td><a href="Javascript:insertsmilie('')" tabindex="-1"><img src="icon_smile_disapprove.gif" width="15" height="15" border="0" alt="Disapprove " title="Disapprove " /></a></td>

                          <td><a href="Javascript:insertsmilie('')" tabindex="-1"><img src="icon_smile_question.gif" width="15" height="15" border="0" alt="Question " title="Question " /></a></td>

                        </tr>

                      </table>

                      </font></td>

                    </tr>

                  </table>

                </font></td>

                <td bgColor="whitesmoke"><textarea cols="70" name="Message" rows="12" wrap="VIRTUAL" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onchange="storeCaret(this);"></td>

              </tr>

              <script language="JavaScript" type="text/javascript">document.PostTopic.Message.focus();</script>

              <tr>

<td bgColor="whitesmoke"> </td>

<td bgColor="whitesmoke">

                <font face="Verdana,Arial,Helvetica" size="2"><input name="Sig" id="Sig" type="checkbox" value="yes" checked><label for="Sig">Check here to include your profile signature.</label><br /></font>

                <font face="Verdana,Arial,Helvetica" size="2"><input name="lock" id="lock" type="checkbox" value="1"><label for="lock">Check here to lock the topic after this post.</label><br /></font>

                </td>

              </tr>

              <tr>

                <td bgColor="whitesmoke"> </td>

                <td bgColor="whitesmoke"><input name="Submit" type="submit" value="Post New Reply"> <input name="Preview" type="button" value=" Preview " onclick="OpenPreview()"></td>

              </tr>

              </form>

            </table>

          </td>

        </tr>

      </table>

      <br />

    </td>

  </tr>

</table>



STEP TWO
Copy the code below and paste into a file named "inc_code.js" and upload to the same directory as the html page you created above.
Download inc_code.js
AnonJr Posted - 23 February 2011 : 18:15:23
I built a small stand-alone wiki for an in-house project, and rather than make the staff learn yet another markup language I set it up to use the Snitz BBCode.

I've heard a lot of folks over at StackOverflow.com (and the other StackExchange sites) love Markdown. For me, it was a matter of keeping everything the same and not making people learn new skills. Obviously you should always use the solution that best fits the problem. I seem to remember Jeff Atwood had a blog post about humane markup, a precursor to the decision to use Markdown.
Astralis Posted - 23 February 2011 : 16:23:27
Anon,

This is very nice. I remember trying to obtain the BBCode a couple of years ago and it was a beast so I abandoned it. But I keep coming back to it as the best one available if the code was more compact. It looks like you've done almost all the work so it could be a good project that I can do and share.

Unless anyone knows of a BBCode system that's more effective??
AnonJr Posted - 23 February 2011 : 13:33:05
quote:
Originally posted by Astralis

Is the js in inc_smile.asp only for inserting smilies?


Last I checked, yes. I think there's a little more than just what's been listed to include BBCode in another project - its just been a while since I last looked.

At a glance, I can see in the last project I used the BBCode for, I included/used the following: (some are repeats from config.asp that I doubled because I did not want to include all of config.asp in the project in question)


<!-- #include virtual="/forum/inc_iconfiles.asp"-->
<!-- #include virtual="/forum/inc_func_common.asp"-->
<!-- #include virtual="/forum/inc_func_posting.asp"-->
'used for configuring the forum-type functions
Dim strAllowForumCode : strAllowForumCode = "1"
Dim strAllowHTML : strAllowHTML = "0"
Dim strIMGInPosts : strIMGInPosts = "1"
Dim strIcons : strIcons = "1"
Dim strImageUrl : strImageUrl = "http://training.capefearvalley.com/forum/images/"
Dim strDateType : strDateType = "dmmy"
Dim strDBType : strDBType = "sqlserver"
FormatStr() 'Used prior to final display
CleanCode() 'Used for editing
Smile() 'Processes the smilies


I think there's something else missing too, but it isn't exactly jumping out at me as I glance through the code. One of these days I do plan on cleaning up the code to release as a MOD... someday when I have spare time again.
Astralis Posted - 23 February 2011 : 12:28:35
Is the js in inc_smile.asp only for inserting smilies?
SiSL Posted - 23 February 2011 : 02:47:15
quote:
Originally posted by Astralis

Thanks. What about the javascript? Is that located in one single file?



All JS for Editor is at inc_code.js as well...
HuwR Posted - 22 February 2011 : 16:07:23
I think that is in inc_smile.asp
Astralis Posted - 22 February 2011 : 15:35:21
Thanks. What about the javascript? Is that located in one single file?
HuwR Posted - 22 February 2011 : 02:29:34
you probably only need inc_iconfiles.asp and the 'Smile' function out of inc_func_common.asp

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000 Version 3.4.07