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)
 MOD: Snitz Forums CSS Conversion
 New Topic  Topic Locked
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 3

StevenP
Starting Member

Italy
4 Posts

Posted - 21 August 2001 :  19:25:32  Show Profile
Hi, I'm relatively new to ASP but made an hand writed CSS conversion for the 3.1SR4 version and currently use this function to convert absolute (snitz) to relative (CSS) font sizes:



function CSS_Size(abssize)
select case abssize
case 1
CSS_Size = "xx-small"
case 2
CSS_Size = "x-small"
case 3
CSS_Size = "small"
case 4
CSS_Size = "medium"
case 5
CSS_Size = "large"
case 6
CSS_Size = "x-large"
case 7
CSS_Size = "xx-large"
end select
end function


This is the way I use it in my style.asp:


FONT.NRM
{
font-family :<% =strDefaultFontFace %>;
font-size :<% =CSS_Size(strDefaultFontSize) %>;
color :<% =strDefaultFontColor %>;
}


Hope to be useful



Go to Top of Page

RDoGG™
Junior Member

USA
329 Posts

Posted - 21 August 2001 :  21:42:33  Show Profile  Visit RDoGG™'s Homepage  Send RDoGG™ an AOL message  Send RDoGG™ a Yahoo! Message
quote:


function CSS_Size(abssize)
select case abssize
case 1
CSS_Size = "xx-small"
case 2
CSS_Size = "x-small"
case 3
CSS_Size = "small"
case 4
CSS_Size = "medium"
case 5
CSS_Size = "large"
case 6
CSS_Size = "x-large"
case 7
CSS_Size = "xx-large"
end select
end function




this function would be called many times.

why not just:

<%
HEADER_SIZE = CSS_Size(strHeadFontSize)
DEFAULT_SIZE = CSS_Size(strDefaultFontSize)
FOOTER_SIZE = CSS_Size(strFooterFontSize)
%>

or whatever and reference HEADER_SIZE, DEFAULT_SIZE, and FOOTER_SIZE

<edit>changed [font=Courier New] to [code] in previous post</edit>

RDoGG™

Edited by - RDoGG™ on 21 August 2001 21:44:42

Edited by - RDoGG™ on 21 August 2001 21:46:40
Go to Top of Page

StevenP
Starting Member

Italy
4 Posts

Posted - 22 August 2001 :  06:43:28  Show Profile
quote:

I'm relatively new to ASP...




quote:

this function would be called many times.

why not just:

<%
HEADER_SIZE = CSS_Size(strHeadFontSize)
DEFAULT_SIZE = CSS_Size(strDefaultFontSize)
FOOTER_SIZE = CSS_Size(strFooterFontSize)
%>




Thanxs for the suggestion

Go to Top of Page

work mule
Senior Member

USA
1358 Posts

Posted - 22 August 2001 :  10:49:21  Show Profile
I made a CSS version of Snitz version 3.3.03 available. See the first post for link.

Most of the readme can be ignored in the zip because I made the post_conversion changes, except for these items:

Problem Files - fonts (search for "<font")
-------------------------------------------------
active.asp (lines 374,427,474)
admin_config_order.asp (lines 123,126,131,169,193,208,235)
inc_jump_to.asp (line 40)
subscription_list.asp (lines 89,92,95)

Problem Files - bgcolor (search for "bgcolor")
-------------------------------------------------
active.asp (lines 371,380,389)
admin_config.asp (lines 167,173,206,212,233,239)
search.asp (lines 250,257,264,270)


Go to Top of Page

Astralis
Senior Member

USA
1218 Posts

Posted - 24 August 2001 :  01:25:35  Show Profile  Send Astralis a Yahoo! Message
I think this mod is very good and useful but, unfortunately, I wish it was all ASP instead of having to download a program for the server which I am not permitted to do.

Will this mod be written in ASP someday?

Go to Top of Page

work mule
Senior Member

USA
1358 Posts

Posted - 24 August 2001 :  02:02:59  Show Profile
quote:

I think this mod is very good and useful but, unfortunately, I wish it was all ASP instead of having to download a program for the server which I am not permitted to do.

Will this mod be written in ASP someday?



Oh, it's not something that runs on your server. The script is used for a one-time conversion (on your desktop or development machine) of all your Snitz code and then you upload the new/converted files to your server. The end result is still ASP. I just use Perl to parse through all the files to replace font tags with style tags.

Also, in case you don't have Perl or don't know how to use it, there's a copy of the latest version of Snitz already converted and ready to go.

Go to Top of Page

adamch25
Starting Member

USA
22 Posts

Posted - 31 August 2001 :  01:13:37  Show Profile  Send adamch25 an AOL message  Send adamch25 an ICQ Message  Send adamch25 a Yahoo! Message
Mine doesn't work. I have found a few coding errors that make it not work....for instance, the includes file config.asp is called in your css file. When you try and open the default.asp page in the browser you will obviously get an error because the includes file is called twice and variables are getting redefined. Even after removing this, it still didn't work. So, I changed it so that the css file is just a regular includes file and writes the style sheet code directly to the page using the <style></style> tags. Although this is not my preferred method for doing this, it works for now. Anyone else have this problem, or am I just missing something?

Go to Top of Page

cpt
Starting Member

2 Posts

Posted - 31 August 2001 :  17:34:20  Show Profile
since the downloads from the first post don't work, I email'ed another poster from this forumn and got the converted bits (thank you).

i've made some changes to the background.. etc and my question is how can I use other mods with the CSS mod, for example the image in cells mod. I looked at the code for the image mod and was unable to find the same code reference.

Does this make any sense?

Go to Top of Page

RDoGG™
Junior Member

USA
329 Posts

Posted - 31 August 2001 :  20:45:56  Show Profile  Visit RDoGG™'s Homepage  Send RDoGG™ an AOL message  Send RDoGG™ a Yahoo! Message
quote:

i've made some changes to the background.. etc and my question is how can I use other mods with the CSS mod, for example the image in cells mod. I looked at the code for the image mod and was unable to find the same code reference.



i don't entirely understand you but...

if you're referring to the "use background images instead of background colors" MOD, make these changes:

look for this line (around line 37 in my version):


response.write ("/* Forum Style Properties - Table/Page Backgrounds */" & vbCrLf &_


then, for the cells you wish to change to the image, change

background-color: " & strCategoryCellColor & ";}" & vbCrLf &_


(the red code varies)

change that to:

background: url(""" & strCellImage & """);}" & vbCrLf &_


where the green code is the name of the variable containing the background image.

tell me if you don't understand.

RDoGG™
Go to Top of Page

RDoGG™
Junior Member

USA
329 Posts

Posted - 31 August 2001 :  20:57:16  Show Profile  Visit RDoGG™'s Homepage  Send RDoGG™ an AOL message  Send RDoGG™ a Yahoo! Message
i don't use that MOD so i'm not entirely sure of the fix, but give it a shot.

RDoGG™
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Previous Page
 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.19 seconds. Powered By: Snitz Forums 2000 Version 3.4.07