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)
 Private Message Sound Add On MOD
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

msperry
Starting Member

USA
48 Posts

Posted - 13 January 2002 :  14:23:39  Show Profile  Visit msperry's Homepage
Private Message Sound Add On MOD
...................................................
For Snitz Version 3.3.03
with Private Messages Mod for Snitz Forums v3.3.03
...................................................

Author: Michael Sperry

email: msperry1@comcast.net
site: http://www.novasheep.com

Download: http://www.novasheep.com/snitz/PMSoundMOD.zip

Ease of Installation (1-Hard, 10-Easy): 8


Jan 01, 2002

This MOD will add a sound to the default page when the user has a new private message.
The administrator can turn this feature on or off as well as change the sound that is
used. A default GotMail.wav is provided.


Following Files are included in the Zip
-----------------------------------------------------------
Set Up File
-----------------------------------------------------------

This will add two new records to FORUM_CONFIG_NEW in the database
they are:
strPMSound - Used to toggle on/off of the feature.
strSoundFile - Used to hold the location and name of the sound file to use.

dbs_pm_sound.asp

-----------------------------------------------------------------
Admin File
-----------------------------------------------------------------

admin_config_pm.asp - Administration Page

-----------------------------------------------------------------
Sound Files
-----------------------------------------------------------------

gotmail.wav

-----------------------------------------------------------------
Modified Files (included in zip as a reference)
-----------------------------------------------------------------

admin_home.asp

config.asp

pop_config.asp

privatemess.asp

Changes are marked as below


******************************************************
SETUP:
******************************************************


Version 3.3
===============

Add dbs_activeusers.asp to your forum directory and run setup from admin section


********************************************************
Implementation:
********************************************************

Step 1.


Add all the following files to your forum directory.
-------------------------------------------------------

Implementation:

********************************************************
Step 1.
********************************************************


Add all the following files to your forum directory.

admin_config_pm.asp
gotmail.wav


*********************************************************
Step 2.
*********************************************************

-------------------------------------------
Find the following statement in config.asp
-------------------------------------------

dim strModeration, strSubscription

--------------------------------------------------
Add the following statement Just after the above statement
--------------------------------------------------

dim strPMSound, strSoundFile ' ########## PM Sound MOD #############


---------------------------------------------
After addition it will look similar as below:
---------------------------------------------

dim strShowStatistics, strShowImagePoweredBy, strLogonForMail, strShowPaging, strShowTopicNav, strPageSize, strPageNumberSize
dim strNTGroupsSTR
dim strModeration, strSubscription
dim strPMSound, strSoundFile ' ########## PM Sound MOD #############

strCookieURL = Left(Request.ServerVariables("Path_Info"), InstrRev(Request.ServerVariables("Path_Info"), "/"))



-------------------------------------------
further down in the file, find the following
-------------------------------------------

strSubscription = Application(strCookieURL & "STRSUBSCRIPTION")


--------------------------------------------------
Add the following lines just after the above statement
--------------------------------------------------

' ######################## PM Sound Mod #######################
strPMSound = Application(strCookieURL & "STRPMSOUND")
strSoundFile = Application(strCookieURL & "STRSOUNDFILE")
' ###########################################################


---------------------------------------------
After addition it will look similar as below:
---------------------------------------------

strAutoLogon = Application(strCookieURL & "STRAUTOLOGON")
strModeration = Application(strCookieURL & "STRMODERATION")
strSubscription = Application(strCookieURL & "STRSUBSCRIPTION")

' ######################## PM Sound Mod #######################
strPMSound = Application(strCookieURL & "STRPMSOUND")
strSoundFile = Application(strCookieURL & "STRSOUNDFILE")
' ###########################################################

if strSecureAdmin = "0" then
Session(strCookieURL & "Approval") = "15916941253"
end if


*********************************************************
Step 3.
*********************************************************

-------------------------------------------
Find the following lines in pop_config_help.asp
-------------------------------------------

  <tr>
<td bgcolor="<% =strForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>">
Screen out words you and your guests would find offensive.
<a href="#top"><img src="icon_go_up.gif" border="0" align="right"></a>
</font></td>
</tr>


--------------------------------------------------
Add the following just after the above section
--------------------------------------------------

<% ' ############################# PM Sound MOD ################################# %>
<tr>
<td bgcolor="<% =strCategoryCellColor %>"><a name="PMSound"></a><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strCategoryFontColor %>" ><b>
What is the Private Message Sound Option For?
</b></font></td>
</tr>
<tr>
<td bgcolor="<% =strForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>">
Turns On/Off feature that allow users to hear if a new Private Message is waiting for them.
<a href="#top"><img src="icon_go_up.gif" border="0" align="right"></a>
</font></td>
</tr>
<tr>
<td bgcolor="<% =strCategoryCellColor %>"><a name="soundfile"></a><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strCategoryFontColor %>" ><b>
What's Sound File Location?
</b></font></td>
</tr>
<tr>
<td bgcolor="<% =strForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>">
Use a relative path to point to the sound you want heard when a new Private Message has arrived.<br>
<br>
For example:<br>
<b>Gotmail.wav</b><br>
This points to the Gotmail.wav sound in the main forum directory, whereas the following would point to the root of the web server and up into the base /sounds/ directory:<br>
<b>../sounds/Gotmail.wav</b>
<a href="#top"><img src="icon_go_up.gif" border="0" align="right"></a>
</font></td>
</tr>
<% ' ############################################################################ %>



---------------------------------------------
After addition it will look similar as below:
---------------------------------------------

  <tr>
<td bgcolor="<% =strForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>">
Screen out words you and your guests would find offensive.
<a href="#top"><img src="icon_go_up.gif" border="0" align="right"></a>
</font></td>
</tr>
<% ' ############################# PM Sound MOD ################################# %>
<tr>
<td bgcolor="<% =strCategoryCellColor %>"><a name="PMSound"></a><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strCategoryFontColor %>" ><b>
What is the Private Message Sound Option For?
</b></font></td>
</tr>
<tr>
<td bgcolor="<% =strForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>">
Turns On/Off feature that allow users to hear if a new Private Message is waiting for them.
<a href="#top"><img src="icon_go_up.gif" border="0" align="right"></a>
</font></td>
</tr>
<tr>
<td bgcolor="<% =strCategoryCellColor %>"><a name="soundfile"></a><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strCategoryFontColor %>" ><b>
What's Sound File Location?
</b></font></td>
</tr>
<tr>
<td bgcolor="<% =strForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>">
Use a relative path to point to the sound you want heard when a new Private Message has arrived.<br>
<br>
For example:<br>
<b>Gotmail.wav</b><br>
This points to the Gotmail.wav sound in the main forum directory, whereas the following would point to the root of the web server and up into the base /sounds/ directory:<br>
<b>../sounds/Gotmail.wav</b>
<a href="#top"><img src="icon_go_up.gif" border="0" align="right"></a>
</font></td>
</tr>
<% ' ############################################################################ %>
<tr>
<td bgcolor="<% =strCategoryCellColor %>"><a name="columnwidth"></a><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strCategoryFontColor %>" ><b>
How does Column Width Work?
</b></font></td>
</tr>


*********************************************************
Step 4.
*********************************************************

-------------------------------------------------------------------
Find the following statement in privatemess.asp
-------------------------------------------------------------------

		if pmcount = 0 then 


-------------------------------------------------------------------
Add the following lines just below the Response.Write statement
-------------------------------------------------------------------

			' ############## PM Sound MOD ############
Session("MM_newmail") = (" ")
' ########################################


-------------------------------------------------------------------
further down in the file, find the following
-------------------------------------------------------------------

                if pmcount >= 1 then 


-------------------------------------------------------------------
Add the following lines just below the Response.Write statement
-------------------------------------------------------------------

			' ############## PM Sound MOD ############
if strPMSound = "1" then
if Session("MM_newmail") <> ("x") then %>
<EMBED SRC="<% =strSoundFile %>" WIDTH=1 HEIGHT=1 HIDDEN="true" AUTOSTART="true" LOOP="false" volume="75"></EMBED>
<% Session("MM_newmail") = ("x")
end If
end if
' ########################################


-------------------------------------------------------------------
After addition the section will look similar as below:
-------------------------------------------------------------------

		if pmcount = 0 then
Response.Write " "
' ############## PM Sound MOD ############
Session("MM_newmail") = (" ")
' ########################################
end if
if pmcount >= 1 then
Response.Write "<img src=""icon_pm_new.gif"">"
' ############## PM Sound MOD ############
if strPMSound = "1" then
if Session("MM_newmail") <> ("x") then %>
<EMBED SRC="<% =strSoundFile %>" WIDTH=1 HEIGHT=1 HIDDEN="true" AUTOSTART="true" LOOP="false" volume="75"></EMBED>
<% Session("MM_newmail") = ("x")
end If
end if
' ########################################
end if


*********************************************************
Step 5.
*********************************************************

-------------------------------------------------------------------
Add the following line to admin_home.asp
-------------------------------------------------------------------

	<LI><a href="admin_config_pm.asp">Private Message Configuration</a></LI> <% ' ####### PM Sound Mod - 1 line ######## %> 


I added mine above

        <LI><a href="admin_moderators.asp">Moderator Setup</a></LI>


That's All. Have Fun!!!!

Michael


Edited by - msperry on 13 January 2002 14:41:03

@tomic
Senior Member

USA
1790 Posts

Posted - 13 January 2002 :  15:21:50  Show Profile  Visit @tomic's Homepage  Send @tomic an ICQ Message
I have been using such a MOD for a good 6 months now and I have noticed that Mac users with older operating systems crash when that wav tries to load and they really really hate it when that happens because they can't get to the forum anymore.

@tomic

Go to Top of Page

msperry
Starting Member

USA
48 Posts

Posted - 14 January 2002 :  09:43:43  Show Profile  Visit msperry's Homepage
That's interesting.

I see if I have any MAC users to try it with.


Go to Top of Page

GhettoDalaiLama
Junior Member

212 Posts

Posted - 26 January 2002 :  18:31:13  Show Profile  Visit GhettoDalaiLama's Homepage  Send GhettoDalaiLama an ICQ Message
Instead of playing a sound, I'd maybe prefer a nice Javascript. Maybe something like this...

In privatemess.asp, below line #112, enter this

if pmcount = 1 then
Response.Write "<script>var answer=confirm(""You have 1 new private message! View now?"")" & vbNewLine & _
"if (answer) {" & vbNewLine & _
"setTimeout(""location.href='" & strForumURL & "pm_view.asp';"", 1);" & vbNewLine & _
"}" & vbNewLine & _
"else {" & vbNewLine & _
"document.write("""");" & vbNewLine & _
"}" & vbNewLine & _
"</script>"
else
if pmcount >=1 then
Response.Write "<script>var answer=confirm(""You have " & pmcount & " new private messages! View now?"")" & vbNewLine & _
"if (answer) {" & vbNewLine & _
"setTimeout(""location.href='" & strForumURL & "pm_view.asp';"", 1);" & vbNewLine & _
"}" & vbNewLine & _
"else {" & vbNewLine & _
"document.write("""");" & vbNewLine & _
"}" & vbNewLine & _
"</script>"
end if

end if


so it looks like this:


else
Response.Write "<font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """><br><b>"
if strAuthType="nt" then
Response.Write strDBNTUserName & " (" & strDBNTUserName & ")</b>"
else
if strAuthType = "db" then
Response.Write strDBNTUserName & "</b>"
end if
end if
Response.Write " - You have "
if pmcount >=1 then
Response.Write "<font color=""" & strActiveLinkColor & """><b>" & pmcount & "</b></font>"
else
Response.Write pmcount
end if
Response.Write " new private message"
if pmcount >1 then
Response.Write "s"
end if
Response.Write ".</font></td>" & vbNewLine & _
" </tr>" & vbNewLine
end if
if pmcount = 1 then
Response.Write "<script>var answer=confirm(""You have 1 new private message! View now?"")" & vbNewLine & _
"if (answer) {" & vbNewLine & _
"setTimeout(""location.href='" & strForumURL & "pm_view.asp';"", 1);" & vbNewLine & _
"}" & vbNewLine & _
"else {" & vbNewLine & _
"document.write("""");" & vbNewLine & _
"}" & vbNewLine & _
"</script>"
else
if pmcount >=1 then
Response.Write "<script>var answer=confirm(""You have " & pmcount & " new private messages! View now?"")" & vbNewLine & _
"if (answer) {" & vbNewLine & _
"setTimeout(""location.href='" & strForumURL & "pm_view.asp';"", 1);" & vbNewLine & _
"}" & vbNewLine & _
"else {" & vbNewLine & _
"document.write("""");" & vbNewLine & _
"}" & vbNewLine & _
"</script>"
end if

end if
end if
%>



Ideas?

-------------------------
http://forums.akghetto.com
OS: Win2000 Adv Server SP2
Webserver: IIS 5.0
Snitz: 3.3.03
MySQL: 3.23.40
ODBC Driver: MySQL v.2.50.37.00 - 20.Apr.01

Edited by - GhettoDalaiLama on 26 January 2002 18:37:16

Edited by - GhettoDalaiLama on 27 January 2002 03:36:43
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 27 January 2002 :  01:57:15  Show Profile  Visit dayve's Homepage
I find javaSCRIPT not java popups annoying. I find sounds useless
but of course this is not just my opinion the the opinion of my
forum members as well.

I instead use the rule of KISS (Keep It Simple Stupid <not directed
to anyone here>) I make a simple indicator in the header area that
grabs the members attention and provides them with a link to their
mailbox. Here is a screen shot:

Normal Header View



Private Message Header View


____________
dayve@burningsouls.com


http://www.nineinchnailz.com - your source for everything nine inch nails !

Edited by - dayve on 27 January 2002 01:58:29
Go to Top of Page

msperry
Starting Member

USA
48 Posts

Posted - 27 January 2002 :  21:24:23  Show Profile  Visit msperry's Homepage
What the code look like for that dayve?

Go to Top of Page

Dan Martin
Average Member

USA
528 Posts

Posted - 02 February 2002 :  21:51:51  Show Profile  Visit Dan Martin's Homepage  Send Dan Martin an AOL message  Send Dan Martin an ICQ Message  Send Dan Martin a Yahoo! Message
I made something very similar to this mod (although much shorter, 1 line actually) a long time ago. I've been using it for a long time.

And to be honest Dayve, I think the sound is very much KISS. Even more so than adding another bit of visual text to clutter up an increasingly cluttered page. But, that's my opinion. I hate going to Yahoo or www.icq.com and being completely lost in a huge mess of data, and I think a sound here and there is preferable.

-Dan

Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 03 February 2002 :  11:56:41  Show Profile  Visit dayve's Homepage
believe it or not dan, a lot of people still do not
have speakers or have their sounds turned off such
as the case with myself when working late at night

However, I am not stifling the idea completely, in fact
I used to have a sound for incoming mail as well but
it didn't fair well with my members and I even allowed
them to select from 5 different sounds all small in size
in their personal settings area.

the visual addition is actually just a few of lines. for example
mine looks like this:


<% if pmcount > 0 then %>
<font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>">
<hr size=1 noshade color=660000>
<A HREF="pm_view.asp"><% = ChkString(strDBNTUserName, "display") %>, you have <% =pmcount %> private message(s)</a></font>
<hr size=1 noshade color=660000>
</font>
<% end if %>


I put this right under my banner and the message will ONLY show
if there is a message so the clutter is quite minimal as shown
in the screen shots above.

____________
dayve@burningsouls.com


http://www.nineinchnailz.com - your source for everything nine inch nails !
Go to Top of Page

joneill
Starting Member

USA
29 Posts

Posted - 11 February 2002 :  19:48:43  Show Profile
quote:

believe it or not dan, a lot of people still do not
have speakers or have their sounds turned off such
as the case with myself when working late at night

However, I am not stifling the idea completely, in fact
I used to have a sound for incoming mail as well but
it didn't fair well with my members and I even allowed
them to select from 5 different sounds all small in size
in their personal settings area.

the visual addition is actually just a few of lines. for example
mine looks like this:


<% if pmcount > 0 then %>
<font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>">
<hr size=1 noshade color=660000>
<A HREF="pm_view.asp"><% = ChkString(strDBNTUserName, "display") %>, you have <% =pmcount %> private message(s)</a></font>
<hr size=1 noshade color=660000>
</font>
<% end if %>


I put this right under my banner and the message will ONLY show
if there is a message so the clutter is quite minimal as shown
in the screen shots above.



Dayve,
Where in the code are you dropping this snippet? I agree - forget sound - if they are away from their desk, they never hear it. (although you could probably do both) I can't seem to get it to work correctly. I also saw someone's demo site with an animated image when a message is there. (pretty slick)



Edited by - joneill on 11 February 2002 19:52:34
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 12 February 2002 :  11:44:52  Show Profile  Visit dayve's Homepage
here is the source code for my inc_top.asp
this should help ya. look in the area right
underneath my image tag for the logo on my page.

http://dayve.d2g.com:666/forum/display_source.asp?page=inc_top.asp

and for the animated image, you can just find one at http://www.animfactory.com or something like that.

____________
dayve@burningsouls.com


http://www.nineinchnailz.com - your source for everything nine inch nails !
Go to Top of Page

joneill
Starting Member

USA
29 Posts

Posted - 12 February 2002 :  12:07:32  Show Profile
Link down?
The page cannot be displayed
The page you are looking for is currently unavailable. The Web site might be experiencing technical difficulties, or you may need to adjust your browser settings.



Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 15 February 2002 :  12:08:46  Show Profile  Visit dayve's Homepage
quote:

Link down?
The page cannot be displayed
The page you are looking for is currently unavailable. The Web site might be experiencing technical difficulties, or you may need to adjust your browser settings.




I don't know, just checked and it works fine.

____________
dayve@burningsouls.com


http://www.nineinchnailz.com - your source for everything nine inch nails !
Go to Top of Page

joneill
Starting Member

USA
29 Posts

Posted - 15 February 2002 :  13:00:50  Show Profile
Maybe because I'm behind a firewall?
I also noticed that I don't see your image in your signatures.
I'll try from my home PC tonite. I think I had the same results there, though. (or you can email me the portion of the inc_top.asp???)

Thanks.

Go to Top of Page

joneill
Starting Member

USA
29 Posts

Posted - 15 February 2002 :  20:00:32  Show Profile
Got it, thnx.

Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 17 February 2002 :  18:06:26  Show Profile  Visit dayve's Homepage
yeah it must have been your firewall. reason being that RoadRunner does not allow traffic on port 80 anymore which is the default http port for web site hosting so I had to use another port which obviously your firewall disallows traffic on.

____________
dayve@burningsouls.com


http://www.nineinchnailz.com - your source for everything nine inch nails !
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.28 seconds. Powered By: Snitz Forums 2000 Version 3.4.07