Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Deleted member n/a to Former Member

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
Andy Humm Posted - 15 May 2008 : 18:08:27
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

<
15   L A T E S T    R E P L I E S    (Newest First)
texanman Posted - 09 July 2008 : 14:15:30
Gotcha!
Thanks<
ruirib Posted - 09 July 2008 : 10:35:14
quote:
Originally posted by texanman

Thanks guys
I usually don't delete a member with topics or replies. One of admins today deleted a member and that is why I was wondering.
So, what I did for now was to comment out the portion of the code that shows the delete icon in members.asp.
Regards


Using the icon raises no issues, because the member is not deleted from the DB. Some data is removed and his name is changed to 'n/a', but there is a database record to be retrieved, so no data loss occurs.
The problems occur if you delete a member directly in the database, or using mod setup, for example.<
texanman Posted - 09 July 2008 : 10:26:14
Thanks guys
I usually don't delete a member with topics or replies. One of admins today deleted a member and that is why I was wondering.
So, what I did for now was to comment out the portion of the code that shows the delete icon in members.asp.
Regards<
ruirib Posted - 09 July 2008 : 08:31:12
The posts are retrieved with an INNER JOIN. If there is no author member, the posts will not be retrieved! It's that simple!<
AnonJr Posted - 09 July 2008 : 08:21:10
Mostly you lose the context for the post. If you have a topic with two deleted members contributing, how do you know who said what and if there were 1, 2, or 3 people talking?

Really it comes down to why are you deleting the member? If you don't want them around then lock them. If they are not around just let it be. You're not going to get a significant percentage of your space back by deleting them.<
texanman Posted - 09 July 2008 : 08:17:50
What kind of issues one should expect when deleting a member with replies? I have seen somewhere this is not recommended, but there was no further explanation as to what happens.
Thanks<
MaD2ko0l Posted - 16 May 2008 : 20:17:34
your welcome<
Andy Humm Posted - 16 May 2008 : 17:20:27
Thanks MaD2ko0l<
MaD2ko0l Posted - 16 May 2008 : 14:10:35
try this.

added parts in red

function profileLink(fName, fID)
if instr(fName,"img src=") > 0 then
strExtraStuff = ""
else
strExtraStuff = " title=""View " & fName & "'s Profile""" & dWStatus("View " & fName & "'s Profile")
end if
if fName = "n/a" then
fName = "Former Member"
profileLink = fName
else
if strUseExtendedProfile then
strReturn = "<a href=""pop_profile.asp?mode=display&id=" & fID & """" & strExtraStuff & ">"
else
strReturn = "<a href=""JavaScript:openWindow3('pop_profile.asp?mode=display&id=" & fID & "')""" & strExtraStuff & ">"
end if
end if
profileLink = strReturn & fName & "</a>"
end function
<
Andy Humm Posted - 16 May 2008 : 13:33:12
Yes but, I did not know where to start in the profilelink function. Ideas?
function profileLink(fName, fID)
	if instr(fName,"img src=") > 0 then
		strExtraStuff = ""
	else
		strExtraStuff = " title=""View " & fName & "'s Profile""" & dWStatus("View " & fName & "'s Profile")
	end if
	if strUseExtendedProfile then
		strReturn = "<a href=""pop_profile.asp?mode=display&id=" & fID & """" & strExtraStuff & ">"
	else
		strReturn = "<a href=""JavaScript:openWindow3('pop_profile.asp?mode=display&id=" & fID & "')""" & strExtraStuff & ">"
	end if
	profileLink = strReturn & fName & "</a>"
end function
<
MaD2ko0l Posted - 16 May 2008 : 13:24:05
like shaggy sugests...whoudl it not be easiler to edit the profilelink function to do what you want to do? thay way it affects every page.<
texanman Posted - 16 May 2008 : 13:11:35
You are welcome! :-)<
Andy Humm Posted - 16 May 2008 : 13:08:50
Texanman I was editting my reply above and the fix is there,, Thank you..

The endif was replaced with & vbNewLine

<
texanman Posted - 16 May 2008 : 13:04:06
May be you need to remove that end if. I think no extra if statement is added to the original code.
I will try removing and if it doesn't work add one more end if LOL. Who knows!<
Andy Humm Posted - 16 May 2008 : 12:50:27
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<

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.04 seconds. Powered By: Snitz Forums 2000 Version 3.4.07