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)
 Alternative Quote Code (CSS)
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 18 July 2004 :  11:49:12  Show Profile  Visit MarcelG's Homepage
I've made an alternative Quote function for Snitz using CSS.

Level of difficulty (Easy-Normal-Hard) : Easy/Normal
Files to modify : inc_header.asp, inc_header_short.asp, inc_func_common.asp, inc_func_posting.asp
Tested on : www.oxle.com , www.oxle.com/test

How does it work :
We replace the quote function in inc_func_common.asp with a new one, that places a table around the quote.
The setup/color/fonts etc of that table are controlled using CSS.
We add the 'decode' function to inc_func_posting.asp (before the 'old' quote-decode function).
We add the required styles to inc_header.asp and inc_header_short.asp.

Here's the code.

inc_func_common.asp:
Find this: Line 407
fString = doCode(fString, "[quote]", "[/quote]", "<blockquote id=""quote""><font size=""" & strFooterFontSize & """ face=""" & strDefaultFontFace & """ id=""quote"">quote:<hr height=""1"" noshade id=""quote"">", "<hr height=""1"" noshade id=""quote""></font id=""quote""></blockquote id=""quote"">")


Replace with this:
fString = doCode(fString, "[quote]", "[/quote]", "<div align=""right"" id=""quote2""><table class=""quote""><tr><td class=""quotetd""><span class=""quotetext"">quote:</span></td></tr><tr><td class=""quotetd2""><span class=""quotetext"">", "</span></td></tr></table></div align=""right"" id=""quote2"">")


inc_func_posting.asp:
Find this:
fString = replace(fString, "<blockquote id=""quote""><font size=""" & strFooterFontSize & """ face=""" & strDefaultFontFace & """ id=""quote"">quote:<hr height=""1"" noshade id=""quote"">","[quote]", 1, -1, 1)

Add directly above it:
fString = replace(fString, "<div align=""right"" id=""quote2""><table class=""quote""><tr><td class=""quotetd""><span class=""quotetext"">quote:</span></td></tr><tr><td class=""quotetd2""><span class=""quotetext"">","[quote]", 1, -1, 1)
fString = replace(fString, "</span></td></tr></table></div align=""right"" id=""quote2"">","[/quote]", 1, -1, 1)


Okay, now we're going to define the styles.
These are my example settings...feel free to adjust them to your needs.
"table.quote {width: 90%; border: 0px " & strTableBorderColor & " solid}" & vbNewLine & _ 
".quotetd {width: 100%; border: 0px DCDCDC solid}" & vbNewLine & _ 
".quotetd2 {background-color: #F5F5F5 ; width: 100%; border: 1px "& strTableBorderColor &" solid; border-collapse: separate; padding: 0.3em}" & vbNewLine & _ 
".quotetext {font-family: "& strDefaultFontFace &"; font-size: 7pt}" & vbNewLine & _


Add these lines to your inc_header.asp and inc_header_short.asp, just above this line:
".spnMessageText a:link    {color:" & strForumLinkColor & ";text-decoration:" & strForumLinkTextDecoration & "}" & vbNewLine & _


Enjoy.

portfolio - linkshrinker - oxle - twitter

blackinwhite
Average Member

Turkey
657 Posts

Posted - 21 July 2004 :  02:23:13  Show Profile
it's a great idea to take the style of quote to the css.
Go to Top of Page

Gargoyle
Junior Member

USA
280 Posts

Posted - 25 July 2004 :  11:33:00  Show Profile  Visit Gargoyle's Homepage
Thanks for the code! I modified it a little so I didn't have to use the css. I have way to much css on my site now as it is! It works great! Thank-you

Here is a link to my Snitz powered Drag Racing site.
Go to Top of Page

blackinwhite
Average Member

Turkey
657 Posts

Posted - 26 July 2004 :  02:47:07  Show Profile
BTW, it's better to use div instead of span in terms of the control over the elements.
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 26 July 2004 :  04:42:22  Show Profile  Visit MarcelG's Homepage
Ah....okay...I don't know that much about CSS, so if you have a better idea, I'm very glad if you'd share it!

portfolio - linkshrinker - oxle - twitter
Go to Top of Page

blackinwhite
Average Member

Turkey
657 Posts

Posted - 27 July 2004 :  02:31:27  Show Profile
difference between them is simple but crucial.

see this, http://www.csscreator.com/css-forum/ftopic97.html
I'd rather explain it in my own words, but my english is not that good. :(
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 27 July 2004 :  10:31:55  Show Profile  Visit MarcelG's Homepage
erm.... I think I'm too tired or something, but still I don't get it...

portfolio - linkshrinker - oxle - twitter
Go to Top of Page

blackinwhite
Average Member

Turkey
657 Posts

Posted - 28 July 2004 :  04:21:19  Show Profile
things which are used in box model are applicable to only block-level elements.
so you can more easily give padding, margin etc. to divs.
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.17 seconds. Powered By: Snitz Forums 2000 Version 3.4.07