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/Code)
 Help with code keyword
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

darkmercenary44
Starting Member

USA
11 Posts

Posted - 03 November 2002 :  01:31:07  Show Profile  Visit darkmercenary44's Homepage
I was wondering if it was possible , without HTML on, to somehow modify snitz to put a table with a white background and black border in the post when someone used the keyword code, like Yabb Forums do, and then put the text after the code keyword in that table. I loved this feature but don't want to enable HTML to be ablt to do it. Does anyone know what file needs to be edited to do this and umm... well what I should put in it to achieve this.

Edited by - ruirib on 08 November 2002 08:16:42

Hamlin
Advanced Member

United Kingdom
2386 Posts

Posted - 03 November 2002 :  04:18:21  Show Profile
You will need to change the ReplaceCodeTags function in the inc_func_common.asp file.

This code here


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


Can have the border wrapped around it, I did it a while ago like this.


	CodeTags(1,1,2) = 	"<table border=""0"" width=""80%"" cellspacing=""0"" cellpadding=""0"">" & _
        			"<tr><td><span class=""textFrontRed"">Code Snippet</span><BR><hr noshade size=""1""></td></tr>"  & _
				"<tr>" & _
				"<td>"  & _
				"<table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""1"">" & _
				"<tr>" & _
				"<td bgcolor=""#000000"">" & _
				"<table border=""0"" cellspacing=""0"" cellpadding=""2"" width=""100%""><tr><td bgcolor=""lightsteelblue"">" & _
 				"<pre id=""code""><span class=""textFront"">"
 	CodeTags(1,2,2) = "</span></pre id=""code"">" & _
 				"</td></tr></table></td></tr></table><hr noshade size=""1""></td></tr></table>"


Its errm messy but it seemed to work
Go to Top of Page

darkmercenary44
Starting Member

USA
11 Posts

Posted - 04 November 2002 :  01:25:53  Show Profile  Visit darkmercenary44's Homepage
schweeeeeeet thanks, I'm going to try it right now
Go to Top of Page

darkmercenary44
Starting Member

USA
11 Posts

Posted - 04 November 2002 :  01:37:07  Show Profile  Visit darkmercenary44's Homepage
you da man, I <3 you. It worked like a charm, took me a minute to figure out how to get the <font> tag to work, but other than that it was perfect. Thank you so much Hamlin.
Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 04 November 2002 :  02:24:45  Show Profile  Visit Gremlin's Homepage
What about if you edit the post after making it with those changes ? does it screw everything up again, becuase it'll be trying to post HTML rather than Forum Code wont it ?

Kiwihosting.Net - The Forum Hosting Specialists
Go to Top of Page

darkmercenary44
Starting Member

USA
11 Posts

Posted - 08 November 2002 :  07:53:48  Show Profile  Visit darkmercenary44's Homepage
Nope, tested it out in my forums, doesn't screw anything up at all!
Go to Top of Page

Ez4arab
Junior Member

479 Posts

Posted - 08 November 2002 :  08:55:00  Show Profile  Visit Ez4arab's Homepage
the ezay way to do this to put css around code here

i do this for my forum

inc_header.asp
add this at

Response.Write	".code {" & vbNewLine & _
	"font-family: Courier, 'Courier New', sans-serif; font-size: 13px; color: #006600;" & vbNewLine & _
	"background-color: #FAFAFA; border: #264621; border-style: solid;" & vbNewLine & _
	"border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px" & vbNewLine & _
"}" & vbNewLine 


inc_func_common.asp

fString = doCode(fString, "[code]", "[/code]", "<pre id=""code"" class=""code""><font face=""courier"" size=""" & strDefaultFontSize & """ id=""code"">", "</font id=""code""></pre id=""code"">")



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

Ez4arab web site Ez4arab |

Edited by - Ez4arab on 08 November 2002 08:58:49
Go to Top of Page

mortioli
Average Member

United Kingdom
898 Posts

Posted - 09 November 2002 :  05:12:40  Show Profile  Visit mortioli's Homepage  Send mortioli an AOL message  Send mortioli a Yahoo! Message
Is there a demo anywhere, as I'm confused as what it does
Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 09 November 2002 :  05:27:00  Show Profile  Visit Gremlin's Homepage
Take a look at any phpbb2 forum and you'll see quotes are in boxes rather than just Horizontal bars top and bottom, thats what this does basically but for the CODE tag instead.

Kiwihosting.Net - The Forum Hosting Specialists

Edited by - Gremlin on 09 November 2002 05:29:57
Go to Top of Page

mortioli
Average Member

United Kingdom
898 Posts

Posted - 09 November 2002 :  08:45:20  Show Profile  Visit mortioli's Homepage  Send mortioli an AOL message  Send mortioli a Yahoo! Message
Ah I see! Pretty smart set up
Go to Top of Page

Arne2
New Member

Denmark
51 Posts

Posted - 09 November 2002 :  11:12:42  Show Profile
quote:
Originally posted by Hamlin

You will need to change the ReplaceCodeTags function in the inc_func_common.asp file.

..snip..



It works fine as long as I remember to change my inc_func_posting.asp to be able to edit the posts as well. I also removed the PRE tag to avoid the left-right scrollbar which is quite annoying.

It is in use here:
http://asp.flaaten.dk/proxo/topic.asp?TOPIC_ID=238

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.33 seconds. Powered By: Snitz Forums 2000 Version 3.4.07