Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 PM add-on (PM alert)
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 3

DavidRhodes
Senior Member

United Kingdom
1222 Posts

Posted - 31 March 2003 :  18:56:26  Show Profile
no, don't mind.
I think I may have missed a bit of code though that is required to set the variable pmcount in inc_pm_alert.asp though, can't remember if this was done in the pm mod or I did it myself! doh!

The UK MkIVs Forum
Go to Top of Page

LeeC
Starting Member

36 Posts

Posted - 31 March 2003 :  19:19:49  Show Profile  Visit LeeC's Homepage
David-

It's done in the PM Mod. I checked. I also stripped the inc_pm_alert.asp down to just the elseif function. I liked your version better, but I'm trying to reduce the number of sql hits the site makes on each load.

If anyone wants that version, I'll be more than happy to post it (albeit it's pretty easy to do ;p).

Thanks again for putting it together David. :D

Oh WTF!com
Convergence - an MMORPG guild
.rdw. a CS clan
GotFrag? - Your online eSports resource

urK?!?
Go to Top of Page

DavidRhodes
Senior Member

United Kingdom
1222 Posts

Posted - 31 March 2003 :  19:28:53  Show Profile
quote:
Originally posted by LeeC

David-

It's done in the PM Mod. I checked. I also stripped the inc_pm_alert.asp down to just the elseif function. I liked your version better, but I'm trying to reduce the number of sql hits the site makes on each load.



You mean so it just goes straight to the inbox no matter how many messages? Remember the first sql statement will only be run if the member has one PM, not on every load of the page

The UK MkIVs Forum
Go to Top of Page

LeeC
Starting Member

36 Posts

Posted - 31 March 2003 :  19:45:49  Show Profile  Visit LeeC's Homepage
quote:
Originally posted by DavidRhodes

You mean so it just goes straight to the inbox no matter how many messages? Remember the first sql statement will only be run if the member has one PM, not on every load of the page



Exactly. It's not a big deal, but I just get stingy with sql calls bcs of how messily I made the front pages on most of the sites I run ;p

Oh WTF!com
Convergence - an MMORPG guild
.rdw. a CS clan
GotFrag? - Your online eSports resource

urK?!?

Edited by - LeeC on 02 April 2003 18:24:20
Go to Top of Page

LeeC
Starting Member

36 Posts

Posted - 02 April 2003 :  20:09:36  Show Profile  Visit LeeC's Homepage
David,

Quick question for you... I'm trying to figure out how to make this work in a scenario where you recieve a new PM in the same browser session AFTER having clicked OK on having more than one PM. The:


setCookie('ShowMsgBox', 'false','','','','')


Keeps a new MsgBox from coming up in this scenario. Twiddled with it some, but can't quite get it to work without it spamming popups at every page load (bcs you still have one msg in there waiting for you).

Thoughts?

Oh WTF!com
Convergence - an MMORPG guild
.rdw. a CS clan
GotFrag? - Your online eSports resource

urK?!?
Go to Top of Page

forumnewbee
Starting Member

Netherlands
42 Posts

Posted - 02 April 2003 :  20:16:04  Show Profile  Visit forumnewbee's Homepage


Greetz

Body & Fitness Forum
Go to Top of Page

DavidRhodes
Senior Member

United Kingdom
1222 Posts

Posted - 03 April 2003 :  08:47:40  Show Profile
It should work in the same session after you click OK. Do you mean clicking Cancel because this will save the cookie and prevent any further popups in the same session

The UK MkIVs Forum
Go to Top of Page

forumnewbee
Starting Member

Netherlands
42 Posts

Posted - 03 April 2003 :  10:25:36  Show Profile  Visit forumnewbee's Homepage
No David we tested it on my forum and only ONE TIME in the same session the pop-up will be there if you click OK then you go to the PM inbox.

If you send a new pm the pop up will not be there, you have to close and open the session to see the pop-up again.

This is the inc_pm_alert.asp
_________________________________________________________________
<%
if strDBNTUserName <> "" Then
if pmcount = 1 then

strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.MEMBER_ID, " & strMemberTablePrefix & "MEMBERS.M_NAME, " & strTablePrefix & "PM.M_ID, " & strTablePrefix & "PM.M_TO, " & strTablePrefix & "PM.M_SUBJECT, " & strTablePrefix & "PM.M_SENT, " & strTablePrefix & "PM.M_FROM, " & strTablePrefix & "PM.M_READ "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS , " & strTablePrefix & "PM "
strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.M_NAME = '" & strDBNTUserName & "'"
strSql = strSql & " AND " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strTablePrefix & "PM.M_TO "
strSql = strSql & " ORDER BY " & strTablePrefix & "PM.M_SENT DESC"

Set rsMessage = my_Conn.Execute(strSql)
%>
<script language=javascript>
if (window.print) {
if (getCookie('ShowMsgBox') != 'false'){
agree = confirm('You have a new Private Message!\nWould you like to view it now ?');
if (agree) {window.location.href = 'privateread.asp?id=<% =rsMessage("M_ID") %>'; setCookie('ShowMsgBox', 'false','','','','')}
else {setCookie('ShowMsgBox', 'false','','','','')}
}
}
</script>
<%
Set rsMessage = Nothing
elseif pmcount > 1 then
%>
<script language=javascript>
if (window.print) {
if (getCookie('ShowMsgBox') != 'false'){
agree = confirm('You have <%=pmcount%> new Private Messages!\nWould you like to go to your inbox now ?');
if (agree) {window.location.href = '/forum/pm_view.asp?view=inbox'; setCookie('ShowMsgBox', 'false','','','','')}
else {setCookie('ShowMsgBox', 'false','','','','')}
}
}
</script>
<%
end if
end if
%>
_________________________________________________________________

Maybe someone can find whatgs wrong.

Greetz Perry

Body & Fitness Forum

Edited by - forumnewbee on 03 April 2003 14:34:23
Go to Top of Page

LeeC
Starting Member

36 Posts

Posted - 03 April 2003 :  21:20:16  Show Profile  Visit LeeC's Homepage
David,

It occurs after you click OK on MULTIPLE PM's in your code. In Forumnewbee's code, I tweaked your code so that he would get the single PM displayed on the current browser window.

The Multiple PM js sets the cookie to false after you click OK per this line:


if (agree) {window.location.href = 'pm_view.asp?view=inbox'; setCookie('ShowMsgBox', 'false','','','','')}


Once that CookieVar ("ShowMsgBox") has been set to false, no further popups will appear until you delete the cookie (by closing the browser window/session). Sorry to take up so much of your time over this. I've banged my head on it a few times and I can't seem to think of a way around it that will work easily.

Oh WTF!com
Convergence - an MMORPG guild
.rdw. a CS clan
GotFrag? - Your online eSports resource

urK?!?
Go to Top of Page

forumnewbee
Starting Member

Netherlands
42 Posts

Posted - 04 April 2003 :  01:39:31  Show Profile  Visit forumnewbee's Homepage
There must be a solution Lee cause on David's forum (The UK MkIVs Forum) the pop up works fine. So hopefully David know what to do.

Anyway thx both of you for helping me newbee :(

Greetz

Body & Fitness Forum
Go to Top of Page

DavidRhodes
Senior Member

United Kingdom
1222 Posts

Posted - 04 April 2003 :  10:52:55  Show Profile
put

' Get Private Message count for display
if strDBType = "access" then
	strSqL = "SELECT count(M_TO) as [pmcount] "
else
	strSqL = "SELECT count(M_TO) as pmcount "
end if
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS , " & strTablePrefix & "PM "
strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.M_NAME = '" & strDBNTUserName & "'"
strSql = strSql & " AND " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strTablePrefix & "PM.M_TO "
strSql = strSql & " AND " & strTablePrefix & "PM.M_READ = 0 "
Set rsPM = my_Conn.Execute(strSql)
pmcount = rsPM("pmcount")
rsPM.close
set rsPM = nothing


above

if pmcount = 1 then 


Forgot, this mod also needs the pm pager mod

The UK MkIVs Forum
Go to Top of Page

forumnewbee
Starting Member

Netherlands
42 Posts

Posted - 04 April 2003 :  16:35:21  Show Profile  Visit forumnewbee's Homepage
thx David for reply.... research is goin on :D

Oke with help of David its working !!! thx for the help David.

The only thing >> when you get more then one PM you can not click OK - only cancel ??

Greetz

Body & Fitness Forum

Edited by - forumnewbee on 05 April 2003 15:09:08
Go to Top of Page

msperry
Starting Member

USA
48 Posts

Posted - 01 May 2003 :  13:27:47  Show Profile  Visit msperry's Homepage
I haven't been in for forum for a while but I thought this might help.

I did this when 3.4.0.3 was released.

Private Message Sound MOD 3.4.03

Download Here: PMSoundMOD_3403.zip

- Michael
NovaSheep.Com

Edited by - msperry on 01 May 2003 13:32:12
Go to Top of Page

DavidRhodes
Senior Member

United Kingdom
1222 Posts

Posted - 01 May 2003 :  17:55:12  Show Profile
I used that initially but it didn't sound right, you get the ping when a javascript pop-up, pops up along with the sound

The UK MkIVs Forum
Go to Top of Page

MarcoJr
Starting Member

19 Posts

Posted - 21 May 2003 :  02:10:11  Show Profile  Visit MarcoJr's Homepage  Send MarcoJr an ICQ Message
This is Not Working for me.
I Put a Response.Write in the pmcount variable and this is in blank.

Marco Jr - Săo Paulo/Brazil
my forum is http://www.superjobs.com.br Im here cuz I wissh to improve my Forum :) Thanx, guys !
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Previous Page | Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.2 seconds. Powered By: Snitz Forums 2000 Version 3.4.07