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)
 PM Link in Active Users

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 - 05 June 2008 : 03:31:02
On the active_users.asp page, I have added a PM icon & link next to the Active Members, Members profile icon, similar to the idea that is given in members.asp (with the PM Mod installed).



Using the following code in active_users.asp (please excuse colours but it may help explanation...)

The new code is between '******pm mod***
red is added 'if' statement1
orange is alternative 'if' statement2
green is existing code around lines 944

 response.write getCurrentIcon(strIconProfile,fLang(strLangMOD_Ls3kAU_01460) & " " & rsAM("M_NAME") & fLang(strLangMOD_Ls3kAU_01470),"hspace=""0""") & "</a>" & VBNewLine
'************pm mod****************
		'If strDBNTUserName <> "" and strPMStatus = "1" Then
		 If strDBNTUserName <> "" and Trim(rs("M_PMRECEIVE")) = "1" and strPMStaus = "1" Then
		Response.Write	"                <a href=""privatesend.asp?method=Topic&mname=" & ChkString(rsAM("M_NAME"),"display") & """>" & getCurrentIcon(strIconPmprivatemessage,"Send " & ChkString(rsAM("M_NAME"),"display") & " a Private Message","align=""absmiddle"" hspace=""0""") & "</a>" & vbNewLine
		End If
'***********pm mod end*************
  if strICQ = "1" and Trim(rsAM("M_ICQ")) <> "" then 


Trying to achieve the same functionality to control the pm link from members PM Options, and the Admin control, I have used the 'if' statement1 (red) from pop_profile.asp and members.asp but receive the following error:

Microsoft VBScript runtime error '800a000d'
Type mismatch: 'rs'
/forum/active_users.asp, line 948


However if I use the 'if' statement2 (orange) the PM Link/Icon displays and no errors. However if a member switches off the PM facility from PM_options.asp, the PM Link still shows. But as admin, I can turn the link off from admin option PM Maintenance.

The error message could be mismatching the rs string and Trim(rs("M_PMRECEIVE")) = "1"

Only a novice with code, I wonder if someone could provide a solution to get rid of the mis match.

Learning thoughts: Do we need a sql to pull the M_PMRECEIVE to get the AND statement to work?

If I change statement1 from
If strDBNTUserName <> "" and Trim(rs("M_PMRECEIVE")) = "1" and strPMStaus = "1" Then
to
If strDBNTUserName <> "" and M_PMRECEIVE = "1" and strPMStaus = "1" Then
I get no error and the PM Link/Icon does not display

Any help in getting this functionality to work would be greatly appreciated..Incidentally, when the PM icon/link is displaying it works correctly to link to the PM options.
<
10   L A T E S T    R E P L I E S    (Newest First)
MaD2ko0l Posted - 05 June 2008 : 17:32:25
lol, glad i could help<
Andy Humm Posted - 05 June 2008 : 16:13:11
Thanks everso much, what a silly mistake the missing 't'
I thank you for your effort and Carfree too.
I'm off for a short while for a cuppa... T
andy<
MaD2ko0l Posted - 05 June 2008 : 15:54:44
  If strDBNTUserName <> "" and Trim(rsAM("M_PMRECEIVE")) = "1" and strPMStatus = "1" Then
Response.Write " <a href=""privatesend.asp?method=Topic&mname=" & ChkString(rsAM("M_NAME"),"display") & """>" & getCurrentIcon(strIconPmprivatemessage,"Send " & ChkString(rsAM("M_NAME"),"display") & " a Private Message","align=""absmiddle"" hspace=""0""") & "</a>" & vbNewLine
End If


u missed the "t" from strPMStatus<
MaD2ko0l Posted - 05 June 2008 : 14:25:12
check you code, because i have only added the sql statement m_PMRECIEVE...the if statement was the same as your apart from this bit

If strDBNTUserName <> "" and Trim(rsAM("M_PMRECEIVE")) = "1" and strPMStaus = "1" Then

rsAM was changed from just rs

i will test it on my forums in a sec and see what i can come up with<
Andy Humm Posted - 05 June 2008 : 13:30:18
Mad2ko0l, initially I tried that and got an error:
Microsoft VBScript compilation error '800a03f8'
Expected 'Sub'
/forum/active_users.asp, line 948
end if
----^

I removed the last end if and The active_users page.asp displays but the PM Link is missing. I have PM enabled both on Admin Maintenance and PM Options. It seems its not picking up M_PMRECEIVE in the AND statement, because if I remove the and Trim(rsAM("M_PMRECEIVE")) = "1" the icon shows but is only controlled (enabled/disabled) by admin PM Maintenance and not individual member PM Options

??<
MaD2ko0l Posted - 05 June 2008 : 12:08:14
active_users.asp

find line 124-125

'## Ls3k - Get Online Members information, and print whatever we get
strSql = "SELECT ME.MEMBER_ID, ME.M_NAME, ME.M_AUHIDE, AU.AU_IP, AU.AU_LOGINTIME, AU.AU_LASTACTIVETIME, AU.AU_LASTPAGE, ME.M_ICQ, ME.M_YAHOO, ME.M_AIM, ME.M_MSN, ME.M_LEVEL, AU.AU_QUERYSTRING, AU.AU_USER_AGENT " & _


change it to this - added part in red


'## Ls3k - Get Online Members information, and print whatever we get
strSql = "SELECT ME.MEMBER_ID, ME.M_PMRECEIVE, ME.M_NAME, ME.M_AUHIDE, AU.AU_IP, AU.AU_LOGINTIME, AU.AU_LASTACTIVETIME, AU.AU_LASTPAGE, ME.M_ICQ, ME.M_YAHOO, ME.M_AIM, ME.M_MSN, ME.M_LEVEL, AU.AU_QUERYSTRING, AU.AU_USER_AGENT " & _



then find line 699

    response.write getCurrentIcon(strIconProfile,fLang(strLangMOD_Ls3kAU_01460) & " " & rsAM("M_NAME") & fLang(strLangMOD_Ls3kAU_01470),"hspace=""0""") & "</a>" & VBNewLine


and add this under it

	If strDBNTUserName <> "" and Trim(rsAM("M_PMRECEIVE")) = "1" and strPMStaus = "1" Then
Response.Write " <a href=""privatesend.asp?method=Topic&mname=" & ChkString(rsAM("M_NAME"),"display") & """>" & getCurrentIcon(strIconPmprivatemessage,"Send " & ChkString(rsAM("M_NAME"),"display") & " a Private Message","align=""absmiddle"" hspace=""0""") & "</a>" & vbNewLine
End If


i havent tested it, but i woud limage it will work<
Andy Humm Posted - 05 June 2008 : 11:14:05
Carefree that is the code I had at the top of this thread and it did not turn off the icon and link when members disabled private messages from the PM Options.

I added an 'if' statement at the beginning
If strDBNTUserName <> "" and Trim(rs("M_PMRECEIVE")) = "1" and strPMStaus = "1" Then which works with members.asp and pop_profile.asp however, does not here.
I adjusted the code to:
If strDBNTUserName <> "" and strPMStatus = "1" Then and the enabling and disabling only worked with admin controlling the facility from PM Maintenance.

We have established that the M_PMRECEIVE="1" needs to be functional for the enable/disable to work from members too.

The code proded above will only insert a hard icon and not able to disable.

The plot thickens..


<
Carefree Posted - 05 June 2008 : 09:16:50
Look for this:

		Response.Write getCurrentIcon(strIconProfile,fLang(strLangMOD_Ls3kAU_01460) & " " & rsAM("M_NAME") & fLang(strLangMOD_Ls3kAU_01470),"hspace=""0""") & "</a>" & vbNewLine


After that, add the following:

		'************pm mod****************
		Response.Write	"						<a href=""privatesend.asp?method=Topic&mname=" & ChkString(rsAM("M_NAME"),"display") & """>" & getCurrentIcon(strIconPmprivatemessage,"Send " & ChkString(rsAM("M_NAME"),"display") & " a Private Message","align=""absmiddle"" hspace=""0""") & "</a>" & vbNewLine
		'***********pm mod end*************
<
Andy Humm Posted - 05 June 2008 : 07:45:01
Carefree, I have revisited the PM Mod and prior to installing it I already had the Active Users incorporated. The PM Mod, makes no mention to PM Links in Active Users just the LangMODS_Ls3kAU4_1033 alterations for PM pages..<
Carefree Posted - 05 June 2008 : 04:18:11
You cannot call a value from a sql group (rs) without creating one.

Re-read the private messaging mod. The routines to add PMs to active users are already done, you probably skipped them because you added the PMs first.<

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