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

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Classic ASP versions(v3.4.XX)
 HTML Within ASP ... How?
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

richfed
Average Member

United States
999 Posts

Posted - 10 August 2002 :  21:18:24  Show Profile  Visit richfed's Homepage
If the moderator[s] of this forum feel this is a double post, I'll understand ... however, my orginal query, in the MODS W/O Code Forum, has been substantially answered. That leads me to a new question.

I created a new user field - using the User Field Mod - that I would like to have show up in the user's posts. In the other Forum, that was accomplished, by the use of following code [duplicated in another another area] of topic.asp:

quote:
<% '########## Added by MeTV ########
if (intUserFields = 1 ) then
set rstemp = My_Conn.Execute("SELECT * FROM " & strMemberTablePrefix & "USERFIELDS ORDER BY USR_FIELD_ID")
do until rstemp.EOF
response.write "<br>"
if rstemp("USR_FIELDTYPE") = "C" then
if getUserFieldValue(rstemp("USR_FIELD_ID"),rsReplies("MEMBER_ID")) = "1" then
response.write "Yes"
Else
response.write "No"
End If
Else
response.write getUserFieldValue(rstemp("USR_FIELD_ID"),rsReplies("MEMBER_ID"))
End If
rstemp.MoveNext
loop
rstemp.Close
set rstemp = nothing
end if
'####################################### %>


This causes the inputed data to appear when the user posts, along with the avatar, rank & stars, etc.

My question: Where, and how, do I insert html into this code to cause the data to be of small text [size=1]??

Can anyone assist in this?

Rich
[size=1]A Complete Idiot's Guide to MOD Implementation || On the Trail of the Last of the Mohicans[/size=1]

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 10 August 2002 :  21:31:25  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message
Try this:


<% '########## Added by MeTV ########
if (intUserFields = 1 ) then
set rstemp = My_Conn.Execute("SELECT * FROM " & strMemberTablePrefix & "USERFIELDS ORDER BY USR_FIELD_ID")
do until rstemp.EOF
response.write "<br><font size=""1"">"
if rstemp("USR_FIELDTYPE") = "C" then
if getUserFieldValue(rstemp("USR_FIELD_ID"),rsReplies("MEMBER_ID")) = "1" then
response.write "Yes"
Else
response.write "No"
End If
Else
response.write getUserFieldValue(rstemp("USR_FIELD_ID"),rsReplies("MEMBER_ID"))
End If
response.write "</font>"
rstemp.MoveNext
loop
rstemp.Close
set rstemp = nothing
end if
'####################################### %>

My MODs:
Birthdays - Custom Policy - F.A.Q. Administration - Forum Rules - Guestbook
Links Manager - MyOwnGoogle - Profile Views - Search Log - WebSearch

Useful stuff:
Forum and MOD Installation - MOD Installation Guide - Snitz v3.4.05 Readme - Free ASP Hosts - Support Snitz
Go to Top of Page

Roland
Advanced Member

Netherlands
9335 Posts

Posted - 10 August 2002 :  21:33:41  Show Profile
Easiest is to add <font> tags around that code in the HTML. If you want to put it in that ASP block you should put the opening font tag right after the line with the IF statement, and the closing font tag right before the end if statement.

Keep in mind that you'll need to make the tags like this:
response.write "<font size=""1"">"
and
response.write "</font>
Go to Top of Page

Roland
Advanced Member

Netherlands
9335 Posts

Posted - 10 August 2002 :  21:37:58  Show Profile
quote:
Originally posted by OneWayMule

Try this:


<% '########## Added by MeTV ########
if (intUserFields = 1 ) then
set rstemp = My_Conn.Execute("SELECT * FROM " & strMemberTablePrefix & "USERFIELDS ORDER BY USR_FIELD_ID")
do until rstemp.EOF
response.write "<br><font size=""1"">"
if rstemp("USR_FIELDTYPE") = "C" then
if getUserFieldValue(rstemp("USR_FIELD_ID"),rsReplies("MEMBER_ID")) = "1" then
response.write "Yes"
Else
response.write "No"
End If
Else
response.write getUserFieldValue(rstemp("USR_FIELD_ID"),rsReplies("MEMBER_ID"))
End If
response.write "</font>"
rstemp.MoveNext
loop
rstemp.Close
set rstemp = nothing
end if
'####################################### %>




This will get you font tags for each line, why not add the tags around the complete loop and use one tag? It makes the HTML a lot cleaner...
Go to Top of Page

richfed
Average Member

United States
999 Posts

Posted - 10 August 2002 :  21:40:41  Show Profile  Visit richfed's Homepage
quote:
Keep in mind that you'll need to make the tags like this:
response.write "<font size=""1"">"
and
response.write "</font>



You mean with an added little " at the end there???

Thanks, fellas ... appreciated!

Rich
[size=1]A Complete Idiot's Guide to MOD Implementation || On the Trail of the Last of the Mohicans[/size=1]
Go to Top of Page

Roland
Advanced Member

Netherlands
9335 Posts

Posted - 10 August 2002 :  21:42:51  Show Profile
When you use HTML inside an ASP block, you need to double the " signs around the attributes. So <font size="1"> becomes <font size=""1"">, <img src="image.gif"> becomes <img src=""image.gif""> etc. etc.
Go to Top of Page

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 10 August 2002 :  21:48:05  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message
quote:

This will get you font tags for each line, why not add the tags around the complete loop and use one tag? It makes the HTML a lot cleaner...



You're right, would be cleaner.
I should avoid a quick reply when posting code...

My MODs:
Birthdays - Custom Policy - F.A.Q. Administration - Forum Rules - Guestbook
Links Manager - MyOwnGoogle - Profile Views - Search Log - WebSearch

Useful stuff:
Forum and MOD Installation - MOD Installation Guide - Snitz v3.4.05 Readme - Free ASP Hosts - Support Snitz
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.46 seconds. Powered By: Snitz Forums 2000 Version 3.4.07