The Forum has been Updated
The code has been upgraded to the latest .NET core version. Please check instructions in the Community Announcements about migrating your account.
I am looking to replace a deleted member's reply name from 'n/a' to 'Former Member' in the search.asp listing
The Code which displays the author is: lines 545-548
if IsNull(Topic_LastPostAuthor) then strLastAuthor = ""
else
strLastAuthor = "<br />by: <span class=""spnMessageText"">" & profileLink(Topic_LastPostAuthorName,Topic_LastPostAuthor) & "</span>"
I have utilised this if statement within topic.asp
if Reply_MemberName = "n/a" then
Response.Write " <p><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strSiteBGColor & """><b><span class=""spnMessageText"">Former Member</span></b></font><br />" & vbNewLine
else
Response.Write " <p><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b><span class=""spnMessageText"">" & profileLink(ChkString(Reply_MemberName,"display"),Reply_Author) & "</span></b></font><br />" & vbNewLine
end if
I can not get the if statement slotted into the search.asp to do the same text replacement
Any help would be greatly appreciated. andy
<
The Code which displays the author is: lines 545-548
if IsNull(Topic_LastPostAuthor) then strLastAuthor = ""
else
strLastAuthor = "<br />by: <span class=""spnMessageText"">" & profileLink(Topic_LastPostAuthorName,Topic_LastPostAuthor) & "</span>"
I have utilised this if statement within topic.asp
if Reply_MemberName = "n/a" then
Response.Write " <p><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strSiteBGColor & """><b><span class=""spnMessageText"">Former Member</span></b></font><br />" & vbNewLine
else
Response.Write " <p><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b><span class=""spnMessageText"">" & profileLink(ChkString(Reply_MemberName,"display"),Reply_Author) & "</span></b></font><br />" & vbNewLine
end if
I can not get the if statement slotted into the search.asp to do the same text replacement
Any help would be greatly appreciated. andy
<
Postet den
I could be wrong but have you tried
if Reply_MemberName = "" then<
if Reply_MemberName = "" then<
Postet den
Run an SQL query to update all member's usernames to "Former Member" WHERE M_NAME='n/a'.
Edit pop_delete.asp and change all occurrences of n/a to Former Member.
Done.
<
Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Edit pop_delete.asp and change all occurrences of n/a to Former Member.
Done.
<
Search is your friend
“I was having a mildly paranoid day, mostly due to thefact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Postet den
Shaggy, thanks so far, I think I tried an SQL query a while ago with the topic.asp occurances of n/a which needed to be changed but this kept the links back to the member profile detail.
The code below starting "if Reply_MemberName = "n/a" then... was used in topic and it did remove the link and change n/a to Former Member.
The string that displays the author name in search.asp and search_mod.asp is strLastAuthor = "<br />by: <span class=""spnMessageText"">" & profileLink(Topic_LastPostAuthorName,Topic_LastPostAuthor) & "</span>"
What I was asking if you could amalgamate the string into an 'if statement' so that all occurances of 'n/a' get the link removed and Former Member displayed.. I did have a go but there appears to be another if routine in the first block of code if IsNull shown above on first thread.
The search.asp and search_mod.asp files linked to text files. The code for the author display: search - line 548 and search_mod - line 793
thanking you
andy<
The code below starting "if Reply_MemberName = "n/a" then... was used in topic and it did remove the link and change n/a to Former Member.
The string that displays the author name in search.asp and search_mod.asp is strLastAuthor = "<br />by: <span class=""spnMessageText"">" & profileLink(Topic_LastPostAuthorName,Topic_LastPostAuthor) & "</span>"
What I was asking if you could amalgamate the string into an 'if statement' so that all occurances of 'n/a' get the link removed and Former Member displayed.. I did have a go but there appears to be another if routine in the first block of code if IsNull shown above on first thread.
The search.asp and search_mod.asp files linked to text files. The code for the author display: search - line 548 and search_mod - line 793
thanking you
andy<
Postet den
Sorry, brain seems to be a bit fried today for some reason. If I understand what you're trying to do correctly, you'll need to edit the profileLink function (it should be in either inc_func_common.asp or inc_func_member.asp) and have it output just "Former Member" if the first argument equals "n/a".
<
Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
<
Search is your friend
“I was having a mildly paranoid day, mostly due to thefact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Postet den
Apols too: could you steer us in the right direction as this coding is sometimetime brain surgery. I am having a go at search_mod but keep getting synax errors..
if IsNull(Topic_LastPostAuthor) then
strLastAuthor = ""
else
if Topic_LastPostAuthor = "n/a" then
Response.Write " by: Former Member" & vbNewLine
else
" strLastAuthor = "& "by:" & <span class=""spnMessageText"">" & profileLink(Topic_LastPostAuthorName,Topic_LastPostAuthor) & "</span>"
synax error on red
Microsoft VBScript compilation error '800a03ea'
Syntax error
/forumtest/search_mod.asp, line 796
Response.Write " strLastAuthor = "<br />"by: <span class=""spnMessageText"">" & profileLink(Topic_LastPostAuthorName,Topic_LastPostAuthor) & "</span>"
<
strLastAuthor = ""
else
if Topic_LastPostAuthor = "n/a" then
Response.Write " by: Former Member" & vbNewLine
else
" strLastAuthor = "& "by:" & <span class=""spnMessageText"">" & profileLink(Topic_LastPostAuthorName,Topic_LastPostAuthor) & "</span>"
synax error on red
Microsoft VBScript compilation error '800a03ea'
Syntax error
/forumtest/search_mod.asp, line 796
Response.Write " strLastAuthor = "<br />"by: <span class=""spnMessageText"">" & profileLink(Topic_LastPostAuthorName,Topic_LastPostAuthor) & "</span>"
<
Postet den
I have the following code:
if IsNull(Topic_LastPostAuthor) then
strLastAuthor = ""
end if
if Topic_LastPostAuthor = "n/a" then
Response.Write "Former Member" & vbNewLine
else
strLastAuthor = "<br />by: <span class=""spnMessageText"">" & profileLink(Topic_LastPostAuthorName,Topic_LastPostAuthor) & "</span>" & vbNewLine
Which seems not to be picking up the 'n/a' but continues to display 'by: n/a' which I believe indicates the else element is working.
<
if IsNull(Topic_LastPostAuthor) then
strLastAuthor = ""
end if
if Topic_LastPostAuthor = "n/a" then
Response.Write "Former Member" & vbNewLine
else
strLastAuthor = "<br />by: <span class=""spnMessageText"">" & profileLink(Topic_LastPostAuthorName,Topic_LastPostAuthor) & "</span>" & vbNewLine
Which seems not to be picking up the 'n/a' but continues to display 'by: n/a' which I believe indicates the else element is working.
<
Postet den
I use the following code for what you want, in topic.asp:
And also:
And in forum.asp:
I hope that helps. I can not give you the line numbers as we all have different code lines.<
Code:
if Reply_MemberName = "n/a" then
Response.Write " <p><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strSiteBGColor & """><b><span class=""spnMessageText"">Former Member</span></b></font><br />" & vbNewLine
else
Response.Write " <p><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b><span class=""spnMessageText"">" & profileLink(ChkString(Reply_MemberName,"display"),Reply_Author) & "</span></b></font><br />" & vbNewLine
end ifCode:
if Member_Name = "n/a" then
Response.Write " <p><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strSiteBGColor & """><b><span class=""spnMessageText"">Former Member</span></b></font><br />" & vbNewLine
else
Response.Write " <p><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b><span class=""spnMessageText"">" & profileLink(ChkString(Member_Name,"display"),TMember_ID) & "</span></b></font><br />" & vbNewLine
end ifCode:
if Topic_MName = "n/a" then
Response.Write "Not Available" & vbNewLine
else
Response.Write "<span class=""spnMessageText"">" & profileLink(chkString(Topic_MName,"display"),Topic_Author) & "</span>" & vbNewLine
end ifCheers,
David Greening
David Greening
Postet den
Dave, I recall you kindly provided this code to us a while ago, thanking you once again, but I am trying to get it to work within the search.asp file. See my last post above where I have added the code, tried, but not working. The links to the search.asp and search_mod.asp are above (16 May 2008:05:55:17) in another of my replies.. Thanking you and hope for a solution..
andy<
Postet den
Could this work? :-)
if IsNull(Topic_LastPostAuthor) then strLastAuthor = ""
elseif Topic_LastPostAuthor = "n/a" then strLastAuthor = "Former Member"
else
strLastAuthor = "<br />by: <span class=""spnMessageText"">" & profileLink(Topic_LastPostAuthorName,Topic_LastPostAuthor) & "</span>"
end if
<
if IsNull(Topic_LastPostAuthor) then strLastAuthor = ""
elseif Topic_LastPostAuthor = "n/a" then strLastAuthor = "Former Member"
else
strLastAuthor = "<br />by: <span class=""spnMessageText"">" & profileLink(Topic_LastPostAuthorName,Topic_LastPostAuthor) & "</span>"
end if
<
Postet den
Thank you texanman
I did try that and receive the following error message:
Microsoft VBScript compilation error '800a0400'
Expected statement
/forumtest/search_mod.asp, line 797
end if
^
Working with your suggestion and mine above I came up with the following:
if IsNull(Topic_LastPostAuthor) then
strLastAuthor = ""
end if
if Topic_LastPostAuthorName = "n/a" then
strLastAuthor = "<br />by: Former Member" & vbNewLine
else
strLastAuthor = "<br />by: <span class=""spnMessageText"">" & profileLink(Topic_LastPostAuthorName,Topic_LastPostAuthor) & "</span>" & vbNewLine
I initially did not get any change, and kept changing the str in red and hey presto we have a fix! Thank you all
andy<
I did try that and receive the following error message:
Microsoft VBScript compilation error '800a0400'
Expected statement
/forumtest/search_mod.asp, line 797
end if
^
Working with your suggestion and mine above I came up with the following:
if IsNull(Topic_LastPostAuthor) then
strLastAuthor = ""
end if
if Topic_LastPostAuthorName = "n/a" then
strLastAuthor = "<br />by: Former Member" & vbNewLine
else
strLastAuthor = "<br />by: <span class=""spnMessageText"">" & profileLink(Topic_LastPostAuthorName,Topic_LastPostAuthor) & "</span>" & vbNewLine
I initially did not get any change, and kept changing the str in red and hey presto we have a fix! Thank you all
andy<
Sist redigert av
Email Member
Message Member
Post Moderation
Filopplasting
If you're having problems uploading, try choosing a smaller image.
Forhåndsvis post
Send Topic
Loading...