Author |
Topic  |
|
philsbbs
Junior Member
 
United Kingdom
397 Posts |
Posted - 18 September 2004 : 22:08:02
|
Hi,
I want to have a .bmp file to be shown on the left hand side of topic.asp so when people post it will show :-
name title stars (.bmp image) country xxxx posts
I've added the following code to topic.asp<% =============================================================== <img src="membercard.bmp" height=25 width=35 alt="Show Membership" border="0" align="absmiddle" hspace="6"></a>
================================================================ In the following area of code within topic.asp
%> <tr> <td bgcolor="<% =CColor %>" valign="top"> <% if strUseExtendedProfile then %> <a href="pop_profile.asp?mode=display&id=<% =rsReplies("R_AUTHOR") %>"> <% else %> <a href="JavaScript:openWindow3('pop_profile.asp?mode=display&id=<% =rsReplies("R_AUTHOR") %>')"> <% end if %> <font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b><% =ChkString(rsReplies("M_NAME"),"display") %></a> </b></font> <% if strShowRank = 1 or strShowRank = 3 then %> <br><font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>"><small><% = ChkString(getMember_Level(rsReplies("M_TITLE"), rsReplies("M_LEVEL"), rsReplies("M_POSTS")),"display") %></small></font> <% end if %> <% if strShowRank = 2 or strShowRank = 3 then %> <br><% = getStar_Level(rsReplies("M_LEVEL"), rsReplies("M_POSTS")) %> <% end if %> <br> <% if strShowRank = 2 or strShowRank = 3 then %> <img src="membercard.bmp" height=25 width=35 alt="Show Membership" border="0" align="absmiddle" hspace="6"></a> <% end if %>
<br><font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>"><small><% =rsReplies("M_COUNTRY") %></small></font>
<br><b><font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>"><small><% =rsReplies("M_POSTS") %> Posts</small></b></b></font></td> <td bgcolor="<% =CColor %>" <% if (AdminAllowed = 1) then %>colspan="3"<% else %>colspan="2"<% end if %> valign="top"> <a name="<% =rsReplies("REPLY_ID") %>"></a> <% ' DEM --> Start of Code altered for moderation if rsReplies("R_STATUS") < 2 then Response.Write "<img src=""icon_posticon.gif"" border=""0"" hspace=""3""><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>Posted - " & ChkDate(rsReplies("R_DATE")) & " : " & ChkTime(rsReplies("R_DATE")) & "</font>" & vbNewline elseif rsReplies("R_STATUS") = 2 then Response.Write "<font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>NOT MODERATED!!!</font>" & vbNewline elseif rsReplies("R_STATUS") = 3 then Response.Write "<img src=""icon_posticon_hold.gif"" border=""0"" hspace=""3""><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>ON HOLD</font>" & vbNewline end if ' DEM --> End of Code added for moderation.
Here comes the tricky bit I only want it to be shown if :-
* M_MEMBERSHIP (new column I want to add in MEMBERS) if status = 1 (paid)
How out all this together ??? To make it work. |
Phil |
|
laser
Advanced Member
    
Australia
3859 Posts |
Posted - 18 September 2004 : 22:21:42
|
Instead of using strShowRank you need to include your M_MEMBERSHIP field in the SQL (the same statement that gets the member name, posts, etc...) then change the IF to check that value. |
 |
|
philsbbs
Junior Member
 
United Kingdom
397 Posts |
Posted - 18 September 2004 : 22:29:27
|
added to :-
strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.M_NAME, " & _ strMemberTablePrefix & "MEMBERS.M_ICQ, " & _ strMemberTablePrefix & "MEMBERS.M_YAHOO, " & _ strMemberTablePrefix & "MEMBERS.M_AIM, " & _ strMemberTablePrefix & "MEMBERS.M_TITLE, " & _ strMemberTablePrefix & "MEMBERS.M_HOMEPAGE, " & _ strMemberTablePrefix & "MEMBERS.MEMBER_ID, " & _ strMemberTablePrefix & "MEMBERS.M_LEVEL, " & _ strMemberTablePrefix & "MEMBERS.M_POSTS, " & _ strMemberTablePrefix & "MEMBERS.M_COUNTRY, " & _ strMemberTablePrefix & "MEMBERS.M_MEMBERSHIP, " & _
where else do I need to add it in topic.asp |
Phil |
 |
|
philsbbs
Junior Member
 
United Kingdom
397 Posts |
Posted - 18 September 2004 : 22:31:16
|
and :
'## Forum_SQL strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.M_NAME, " & _ strMemberTablePrefix & "MEMBERS.M_ICQ, " & _ strMemberTablePrefix & "MEMBERS.M_YAHOO, " & _ strMemberTablePrefix & "MEMBERS.M_AIM, " & _ strMemberTablePrefix & "MEMBERS.M_TITLE, " & _ strMemberTablePrefix & "MEMBERS.MEMBER_ID, " & _ strMemberTablePrefix & "MEMBERS.M_HOMEPAGE, " & _ strMemberTablePrefix & "MEMBERS.M_LEVEL, " & _ strMemberTablePrefix & "MEMBERS.M_POSTS, " & _ strMemberTablePrefix & "MEMBERS.M_COUNTRY, " & _ strMemberTablePrefix & "MEMBERS.M_MEMBERSHIP, " & _
|
Phil |
 |
|
philsbbs
Junior Member
 
United Kingdom
397 Posts |
Posted - 18 September 2004 : 22:42:40
|
Ive added :-
<% '## Forum_SQL - Checking if paid member or not strSql = "SELECT " &strMemberTablePrefix & "MEMBERS.M_MEMBERSHIP, " strSql = strSql & " FROM " &strMemberTablePrefix & "MEMBERS " strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.M_MEMBERSHIP > 0 " %>
But still appears on all members even though only 3 members have m_membesrship of 1 |
Phil |
 |
|
laser
Advanced Member
    
Australia
3859 Posts |
Posted - 18 September 2004 : 23:04:08
|
Your image code still needs fixing, something like this might work :
<% if rsReplies("M_MEMBERSHIP") = 1, then %> <img src="membercard.bmp" height=25 width=35 alt="Show Membership" border="0" align="absmiddle" hspace="6"> <% end if %>
I removed the </a> as well 
|
 |
|
philsbbs
Junior Member
 
United Kingdom
397 Posts |
Posted - 18 September 2004 : 23:30:44
|
Thanks for that, there was a mistake in your coding :-
<% if rsReplies("M_MEMBERSHIP") = 1, then %>
should be :-
<% if rsReplies("M_MEMBERSHIP") = 1 then %>
Thanks again for your help. |
Phil |
 |
|
laser
Advanced Member
    
Australia
3859 Posts |
Posted - 19 September 2004 : 02:25:40
|
ah bugger, just a typo, but I'm glad you got it working  |
 |
|
|
Topic  |
|