Author |
Topic  |
|
richfed
Average Member
  
United States
999 Posts |
Posted - 10 August 2002 : 21:18:24
|
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 |
|
Roland
Advanced Member
    
Netherlands
9335 Posts |
Posted - 10 August 2002 : 21:33:41
|
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> |
 |
|
Roland
Advanced Member
    
Netherlands
9335 Posts |
Posted - 10 August 2002 : 21:37:58
|
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... |
 |
|
richfed
Average Member
  
United States
999 Posts |
|
Roland
Advanced Member
    
Netherlands
9335 Posts |
Posted - 10 August 2002 : 21:42:51
|
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. |
 |
|
OneWayMule
Dev. Team Member & Support Moderator
    
Austria
4969 Posts |
|
|
Topic  |
|