Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 how to define [code]
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

evol
Junior Member

China
157 Posts

Posted - 16 November 2003 :  11:55:56  Show Profile
In someone forum [code],this code can be defined a specifically form in some forum.
ex:
1.


2.

And how to achieved these for form with [code] in snitz
thanks

Who am i?
I lost my dream!

Edited by - ruirib on 16 November 2003 12:39:16

dayve
Forum Moderator

USA
5820 Posts

Posted - 16 November 2003 :  13:52:21  Show Profile  Visit dayve's Homepage
This is really easy to accomplish, however, there is an issue with urls and images getting converted to html links when you use this. I have created a workaround for this problem, but for the sake of simplicity, this is the code that you need to accomplish what you want.

inc_func_common.asp
===================

Search for Function ReplaceCodeTags(fString)

Replace this:

CodeTags(1,1,1) = "[ code]"
CodeTags(1,2,1) = "[ /code]"
CodeTags(1,1,2) = "<pre id=""code""><font face=""courier"" size=""" & strDefaultFontSize & """ id=""code"">"
CodeTags(1,2,2) = "</font id=""code""></pre id=""code"">"

with this:

CodeTags(1,1,1) = "[ code]"
CodeTags(1,2,1) = "[ /code]"
CodeTags(1,1,2) = "<div align=""center"" id=""codeTag""><form><textarea class=""code"" rows=""12"" cols=""80"" name=""getcode"">"
CodeTags(1,2,2) = "</textarea><p><input type=""button"" value=""Click Here To Select Above Code"" onClick=""JavaScript:this.form.getcode.focus();this.form.getcode.select();var ttr=this.form.getcode.createTextRange();ttr.execCommand('copy');""></form></div>"


remove the spaces in the [ code] and [ /code] tags above.

Go to Top of Page

evol
Junior Member

China
157 Posts

Posted - 17 November 2003 :  04:06:18  Show Profile
Oh`thanks dayve

if i want to accomplish "1"like this

Who am i?
I lost my dream!
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 17 November 2003 :  11:37:47  Show Profile  Visit dayve's Homepage
You may want to change the formatting to your needs:


CodeTags(1,1,1) = "[ code]"
CodeTags(1,2,1) = "[ /code]"
CodeTags(1,1,2) = "<table width=""400"" cellpadding=""2""><tr><td  style=""border:1px solid gray;background-color:#eeeeee"">"
CodeTags(1,2,2) = "</td></tr></table>"


Edited by - dayve on 17 November 2003 11:38:13
Go to Top of Page

evol
Junior Member

China
157 Posts

Posted - 18 November 2003 :  04:38:33  Show Profile
OH~thanks dayve.
My chinese snitz forum will be finished,thanks for your help:)
but in the rectangle the font size cann't to be defined.

Who am i?
I lost my dream!

Edited by - evol on 18 November 2003 09:39:07
Go to Top of Page

evol
Junior Member

China
157 Posts

Posted - 18 November 2003 :  10:03:12  Show Profile
i can do it with font size
like this:
CodeTags(1,1,1) = "[ code]"
CodeTags(1,2,1) = "[ /code]"
CodeTags(1,1,2) = "<table width=""400"" cellpadding=""2""><tr><td style=""border:1px solid gray;background-color:#eeeeee"">" & "<pre id=""code""><font face=""courier"" size=""" & strDefaultFontSize & """ id=""code"">"
CodeTags(1,2,2) = "</td></tr></table>"
but i wish there were spaces winth font and rectangle.
like this:

Who am i?
I lost my dream!

Edited by - evol on 18 November 2003 10:06:04
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 18 November 2003 :  10:47:44  Show Profile  Visit dayve's Homepage
I'm not sure what you mean with this

quote:
but i wish there were spaces winth font and rectangle


Go to Top of Page

evol
Junior Member

China
157 Posts

Posted - 18 November 2003 :  11:57:58  Show Profile
hi~dayve,i so thanks for you
sorry to my poor english
My means is
when i amend the cellpadding=""2 value to "5"can solve this question
IS THERE ANY PROBLEM IN MY code?

Another quetion about the last post
i view your forum i find you can solve this qestion

how did you amend your code


my the last post

how do make the topic and author in a row?

Who am i?
I lost my dream!

Edited by - evol on 18 November 2003 11:59:53
Go to Top of Page

evol
Junior Member

China
157 Posts

Posted - 18 November 2003 :  12:07:49  Show Profile
a qeustion to trouble you
how do you hide the "new post" and etc. button in the default page

Who am i?
I lost my dream!
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 18 November 2003 :  14:40:53  Show Profile  Visit dayve's Homepage
Increasing the cellpadding from 2 to 5 should do the trick.

as for the last post thing I did, you'd have to wait until I got home to show you the exact code. all I really
did was move a couple of things around by concatenating some fields.

feel free to look at my code if you want to give it a stab here:

Default Page

Go to Top of Page

xx ENIGMA xx
Junior Member

166 Posts

Posted - 18 November 2003 :  21:14:13  Show Profile  Send xx ENIGMA xx an AOL message
to have one line like this evol


look for this in default.asp (line 634 in mine) and remove whats in red.
Note: you may need to add (& nbsp;) right in front of by: to space it evenly.

strLastUser = "<br />by:& nbsp;<span class=""spnMessageText"">" & profileLink(chkString(ForumMemberName,"display"),ForumMemberID) & "</span>"

then 4 lines below that remove the <br /> again

"<b>" & ChkDate(ForumLastPost, "</b><br />" ,true) & strLastUser & "</font></td>" & vbNewline


hope that helps


my little forum playground


Edited by - xx ENIGMA xx on 18 November 2003 21:47:12
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.45 seconds. Powered By: Snitz Forums 2000 Version 3.4.07