Author |
Topic |
|
evol
Junior Member
China
157 Posts |
Posted - 16 November 2003 : 11:55:56
|
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
|
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. |
|
|
|
evol
Junior Member
China
157 Posts |
Posted - 17 November 2003 : 04:06:18
|
Oh`thanks dayve
if i want to accomplish "1"like this |
Who am i? I lost my dream! |
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 17 November 2003 : 11:37:47
|
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 |
|
|
evol
Junior Member
China
157 Posts |
Posted - 18 November 2003 : 04:38:33
|
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 |
|
|
evol
Junior Member
China
157 Posts |
Posted - 18 November 2003 : 10:03:12
|
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 |
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 18 November 2003 : 10:47:44
|
I'm not sure what you mean with this
quote: but i wish there were spaces winth font and rectangle
|
|
|
|
evol
Junior Member
China
157 Posts |
Posted - 18 November 2003 : 11:57:58
|
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 |
|
|
evol
Junior Member
China
157 Posts |
Posted - 18 November 2003 : 12:07:49
|
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! |
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 18 November 2003 : 14:40:53
|
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 |
|
|
|
xx ENIGMA xx
Junior Member
166 Posts |
Posted - 18 November 2003 : 21:14:13
|
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 |
|
|
|
Topic |
|