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 dialog pop-up
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

wavp
Starting Member

United Kingdom
33 Posts

Posted - 17 June 2001 :  07:00:35  Show Profile  Visit wavp's Homepage
Here is a simple mod which will display an alert when the user logs on, alerting the user that there are PM waiting to be read:

The JavaScript:

<SCRIPT LANGUAGE="JavaScript">
alert("You have messages!")
</script>


The place where this bit of JavaScript goes is in the "privatemess.asp" at this point:

<td align="center" bgcolor="<% =strForumCellColor %>" valign="middle">
<% if strDBNTUserName = "" Then %>
<IMG SRC="icon_pmdead.gif">
<% else
if pmcount = 0 then %>
<IMG SRC="icon_pm.gif">
<% end if
if pmcount >= 1 then %>
<IMG SRC="icon_pm_new.gif">

<SCRIPT LANGUAGE="JavaScript">
alert("You have messages!")
</script>

<% end if %>
<% end if %>
</td>


Thats it.

Will

Edited by - wavp on 17 June 2001 07:24:48

stuF
Average Member

United Kingdom
561 Posts

Posted - 17 June 2001 :  09:29:07  Show Profile  Visit stuF's Homepage
would you be able to make it so it says
"you have new private messages" then have options to read or igonre. If the read option is selected, the user is deirected to their inbox, if ignore is selected, the box disappears until more messages are recived.

that would be excellent.
cheers.
stuart@36-degrees.co.uk

Go to Top of Page

wavp
Starting Member

United Kingdom
33 Posts

Posted - 02 July 2001 :  11:42:20  Show Profile  Visit wavp's Homepage
Here is a more interactive alert box:

The VBScript:

<SCRIPT LANGUAGE="VBscript">
returnvalue=MsgBox ("Read the new private message?",36,"Private Message!")
If returnvalue=6 Then
window.location="pm_view.asp"
Else
End If
</SCRIPT>


The place where this bit of VBScript goes is in the "privatemess.asp" at this point:

<td align="center" bgcolor="<% =strForumCellColor %>" valign="middle">
<% if strDBNTUserName = "" Then %>
<IMG SRC="icon_pmdead.gif">
<% else
if pmcount = 0 then %>
<IMG SRC="icon_pm.gif">
<% end if
if pmcount >= 1 then %>
<IMG SRC="icon_pm_new.gif">
<SCRIPT LANGUAGE="VBscript">
returnvalue=MsgBox ("Read the new private message?",36,"Private Message!")
If returnvalue=6 Then
window.location="pm_view.asp"
Else
End If
</SCRIPT>

<% end if %>
<% end if %>
</td>

This will allow the person to choose either to read the new message or carry on loading the main forum page.

try it

Will


Go to Top of Page

RDoGG™
Junior Member

USA
329 Posts

Posted - 02 July 2001 :  16:32:00  Show Profile  Visit RDoGG™'s Homepage  Send RDoGG™ an AOL message  Send RDoGG™ a Yahoo! Message
quote:

Here is a more interactive alert box:

The VBScript:

<SCRIPT LANGUAGE="VBscript">
returnvalue=MsgBox ("Read the new private message?",36,"Private Message!")
If returnvalue=6 Then
window.location="pm_view.asp"
Else
End If
</SCRIPT>


The place where this bit of VBScript goes is in the "privatemess.asp" at this point:

<td align="center" bgcolor="<% =strForumCellColor %>" valign="middle">
<% if strDBNTUserName = "" Then %>
<IMG SRC="icon_pmdead.gif">
<% else
if pmcount = 0 then %>
<IMG SRC="icon_pm.gif">
<% end if
if pmcount >= 1 then %>
<IMG SRC="icon_pm_new.gif">
<SCRIPT LANGUAGE="VBscript">
returnvalue=MsgBox ("Read the new private message?",36,"Private Message!")
If returnvalue=6 Then
window.location="pm_view.asp"
Else
End If
</SCRIPT>

<% end if %>
<% end if %>
</td>

This will allow the person to choose either to read the new message or carry on loading the main forum page.

try it

Will







that's great!

i made an ASP file popup that shows details about the new PM.

Go to Top of Page

gimpism
Starting Member

8 Posts

Posted - 09 August 2001 :  20:52:12  Show Profile
would ther be a way for it not to mention the vbscript: in the popup?
that may scare people



Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 09 August 2001 :  22:41:01  Show Profile  Visit dayve's Homepage
that is a javascript warning and NO you cannot get rid of that without signed certificates which is a whole other story.

I don't use javascript alerts because they can be rather annoying. Instead I have a message appear under the forum banner that tells the visitor that they have a message, it really gets their attention, that and the audio indicator that they receive.

you can give it a whirl along with the other features I have at my site by logging in with

user: snitz
pwd: snitz

Dayve
Go to Top of Page
  Previous Topic Topic Next Topic  
 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.12 seconds. Powered By: Snitz Forums 2000 Version 3.4.07