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
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
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
change it to this - added part in red
then find line 699
and add this under it
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:
After that, add the following: < |
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.< |
|
|