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

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 New PM MOD
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Yellow Aftershock
New Member

55 Posts

Posted - 01 September 2002 :  19:27:55  Show Profile
Great work !

a few things though-

Maybe you could include the PM maintenance mod- I have, just one page in the admin section- very usefull for control of deleting messages !

what is privatemess2.asp for ??

in the readme file it says to update pop_delete.asp - however that is a file included in the zip- so I presume its updated already and therfor the readme file needs adjusting !

Very nice tho ! well done !

opmjdv
Starting Member

USA
3 Posts

Posted - 01 September 2002 :  22:20:59  Show Profile
try this for Private message admin mod... I just changed a couple of lines to get it to work with 3.4.x


<%
'#################################################################################
'## Copyright (C) 2000  Michael Anderson and Pierre Gorissen
'## 
'## This program is free software; you can redistribute it and/or
'## modify it under the terms of the GNU General Public License
'## as published by the Free Software Foundation; either version 2
'## of the License, or any later version.
'##
'## All copyright notices regarding Snitz Forums 2000
'## must remain intact in the scripts and in the outputted HTML
'## The "powered by" text/logo with a link back to 
'## http://forum.snitz.com in the footer of the pages MUST
'## remain visible when the pages are viewed on the internet or intranet.
'## 
'## This program is distributed in the hope that it will be useful,
'## but WITHOUT ANY WARRANTY; without even the implied warranty of
'## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
'## GNU General Public License for more details.
'## 
'## You should have received a copy of the GNU General Public License
'## along with this program; if not, write to the Free Software
'## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
'## 
'## Support can be obtained from support forums at:
'## http://forum.snitz.com 
'##
'## Correspondence and Marketing Questions can be sent to:
'## reinhold@bigfoot.com
'## 
'## or
'## 
'## Snitz Communications 
'## C/O: Michael Anderson
'## PO Box 200
'## Harpswell, ME 04079
'#################################################################################
%>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_func_common.asp" -->
<!--#INCLUDE FILE="inc_header.asp" -->

<% If Session(strCookieURL & "Approval") = "15916941253" Then %>
<table width="95%" align="center" border=0>
  <tr>
    <td width="33%" align="left" nowrap><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">
    <img src="<%= strImageUrl %>icon_folder_open.gif" height=15 width=15 border="0"> <a href="default.asp">All Forums</a><br>
    <img src="<%= strImageUrl %>icon_bar.gif" height=15 width=15 border="0"><img src="<%= strImageUrl %>icon_folder_open.gif" height=15 width=15 border="0"> <a href="admin_home.asp">Admin Section</a><br>
    <img src="<%= strImageUrl %>icon_blank.gif" height=15 width=15 border="0"><img src="<%= strImageUrl %>icon_bar.gif" height=15 width=15 border="0"><img src="<%= strImageUrl %>icon_folder_open_topic.gif" height=15 width=15 border="0"> Private Messages Maintenance<br>
    </font></td>
  </tr>
</table>
<%
	if Request.Form("Method_Type") = "Write_Configuration" then 
		Err_Msg = ""
		if Err_Msg = "" then

			'## Delete private messages
			strMessageDays = datetostr(dateAdd("d",-Request.Form("strMessageDays"),strForumTimeAdjust))
			strSql = "DELETE FROM " & strTablePrefix & "PM "
			strSql = strSql & "WHERE M_SENT < '" & strMessageDays & "'"
			if Request.Form("UnRead") = "yes" then
				strSql = strSql & " AND M_READ = 0"
			else
				strSql = strSql & " AND M_READ = 1"
			end if

			my_Conn.Execute (strSql)

%>
<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">Messages Deleted!</font></p>


<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">Congratulations!</font></p>

<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="admin_home.asp">Back To Admin Home</font></a></p>
<%		else %>
	<p align=center><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">There Was A Problem With Your Details</font></p>

	<table align=center border=0>
	  <tr>
	    <td><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">
		<ul>
		<% =Err_Msg %>
		</ul>
	    </font></td>
	  </tr>
	</table>

	<p align=center><font face="<% =strDefaultFontFace %>" size=<% =strDefaultFontSize %>><a href="JavaScript:history.go(-1)">Go Back To Enter Data</a></font></p>
<%		end if %>
<%	else %>
<%
	strMessage15Days = datetostr(dateAdd("d",-15,strForumTimeAdjust))
	strMessage30Days = datetostr(dateAdd("d",-30,strForumTimeAdjust))
	strMessage45Days = datetostr(dateAdd("d",-45,strForumTimeAdjust))
	strMessage60Days = datetostr(dateAdd("d",-60,strForumTimeAdjust))

	if strDBType = "access" then
		strSqL = "SELECT count(M_TO) as [pmcount] " 
	else
        	strSQL = "SELECT count(M_TO) as pmcount " 
    	end if
	strSql = strSql & " FROM " & strTablePrefix & "PM "
	strSql = strSql & " WHERE M_READ = 1"

	Set rsPM = my_Conn.Execute(strSql)
	pmcountr = rsPM("pmcount")

	rsPM.close
	set rsPM = nothing

	if strDBType = "access" then
		strSqL = "SELECT count(M_TO) as [pmcount] " 
	else
        	strSQL = "SELECT count(M_TO) as pmcount " 
    	end if
	strSql = strSql & " FROM " & strTablePrefix & "PM "
	strSql = strSql & " WHERE M_READ = 0"

	Set rsPM = my_Conn.Execute(strSql)
	pmcountu = rsPM("pmcount")

	rsPM.close
	set rsPM = nothing

	if strDBType = "access" then
		strSqL = "SELECT count(M_TO) as [pmcount] " 
	else
        	strSQL = "SELECT count(M_TO) as pmcount " 
    	end if
	strSql = strSql & " FROM " & strTablePrefix & "PM "
	strSql = strSql & " WHERE M_SENT < '" & strMessage15Days & "' AND M_READ = 1"

	Set rsPM = my_Conn.Execute(strSql)
	pmcount15r = rsPM("pmcount")

	rsPM.close
	set rsPM = nothing

	if strDBType = "access" then
		strSqL = "SELECT count(M_TO) as [pmcount] " 
	else
        	strSQL = "SELECT count(M_TO) as pmcount " 
    	end if
	strSql = strSql & " FROM " & strTablePrefix & "PM "
	strSql = strSql & " WHERE M_SENT < '" & strMessage15Days & "' AND M_READ = 0"

	Set rsPM = my_Conn.Execute(strSql)
	pmcount15u = rsPM("pmcount")

	rsPM.close
	set rsPM = nothing

	if strDBType = "access" then
		strSqL = "SELECT count(M_TO) as [pmcount] " 
	else
        	strSQL = "SELECT count(M_TO) as pmcount " 
    	end if
	strSql = strSql & " FROM " & strTablePrefix & "PM "
	strSql = strSql & " WHERE M_SENT < '" & strMessage30Days & "' AND M_READ = 1"

	Set rsPM = my_Conn.Execute(strSql)
	pmcount30r = rsPM("pmcount")

	rsPM.close
	set rsPM = nothing

	if strDBType = "access" then
		strSqL = "SELECT count(M_TO) as [pmcount] " 
	else
        	strSQL = "SELECT count(M_TO) as pmcount " 
    	end if
	strSql = strSql & " FROM " & strTablePrefix & "PM "
	strSql = strSql & " WHERE M_SENT < '" & strMessage30Days & "' AND M_READ = 0"

	Set rsPM = my_Conn.Execute(strSql)
	pmcount30u = rsPM("pmcount")

	rsPM.close
	set rsPM = nothing

	if strDBType = "access" then
		strSqL = "SELECT count(M_TO) as [pmcount] " 
	else
        	strSQL = "SELECT count(M_TO) as pmcount " 
    	end if
	strSql = strSql & " FROM " & strTablePrefix & "PM "
	strSql = strSql & " WHERE M_SENT < '" & strMessage45Days & "' AND M_READ = 1"

	Set rsPM = my_Conn.Execute(strSql)
	pmcount45r = rsPM("pmcount")

	rsPM.close
	set rsPM = nothing

	if strDBType = "access" then
		strSqL = "SELECT count(M_TO) as [pmcount] " 
	else
        	strSQL = "SELECT count(M_TO) as pmcount " 
    	end if
	strSql = strSql & " FROM " & strTablePrefix & "PM "
	strSql = strSql & " WHERE M_SENT < '" & strMessage45Days & "' AND M_READ = 0"

	Set rsPM = my_Conn.Execute(strSql)
	pmcount45u = rsPM("pmcount")

	rsPM.close
	set rsPM = nothing

	if strDBType = "access" then
		strSqL = "SELECT count(M_TO) as [pmcount] " 
	else
        	strSQL = "SELECT count(M_TO) as pmcount " 
    	end if
	strSql = strSql & " FROM " & strTablePrefix & "PM "
	strSql = strSql & " WHERE M_SENT < '" & strMessage60Days & "' AND M_READ = 1"

	Set rsPM = my_Conn.Execute(strSql)
	pmcount60r = rsPM("pmcount")

	rsPM.close
	set rsPM = nothing

	if strDBType = "access" then
		strSqL = "SELECT count(M_TO) as [pmcount] " 
	else
        	strSQL = "SELECT count(M_TO) as pmcount " 
    	end if
	strSql = strSql & " FROM " & strTablePrefix & "PM "
	strSql = strSql & " WHERE M_SENT < '" & strMessage60Days & "' AND M_READ = 0"

	Set rsPM = my_Conn.Execute(strSql)
	pmcount60u = rsPM("pmcount")

	rsPM.close
	set rsPM = nothing
%>
<br>
<table border="0" cellspacing="0" cellpadding="0" align=center>
  <tr>
    <td bgcolor="<% =strPopUpBorderColor %>">
      <table border="0" cellspacing="1" cellpadding="4">
	<tr valign="top">
	  <td bgColor="<% =strHeadCellColor %>" align="center" colspan="3"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>Current Private Message Counts</b></font></td>
	</tr>
	<tr valign="top">
	  <td bgColor="<% =strPopUpTableColor %>" align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>Time Period</b></font></td>
	  <td bgColor="<% =strPopUpTableColor %>" align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>Read</b></font></td>
	  <td bgColor="<% =strPopUpTableColor %>" align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>Unread</b></font></td>
	</tr>
	<tr valign="top">
	  <td bgColor="<% =strPopUpTableColor %>" align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>All</b></font></td>
	  <td bgColor="<% =strPopUpTableColor %>" align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b><% =pmcountr %></b></font></td>
	  <td bgColor="<% =strPopUpTableColor %>" align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b><% =pmcountu %></b></font></td>
	</tr>
	<tr valign="top">
	  <td bgColor="<% =strPopUpTableColor %>" align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>Older than 15 days</b></font></td>
	  <td bgColor="<% =strPopUpTableColor %>" align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b><% =pmcount15r %></b></font></td>
	  <td bgColor="<% =strPopUpTableColor %>" align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b><% =pmcount15u %></b></font></td>
	</tr>
	<tr valign="top">
	  <td bgColor="<% =strPopUpTableColor %>" align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>Older than 30 days</b></font></td>
	  <td bgColor="<% =strPopUpTableColor %>" align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b><% =pmcount30r %></b></font></td>
	  <td bgColor="<% =strPopUpTableColor %>" align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b><% =pmcount30u %></b></font></td>
	</tr>
	<tr valign="top">
	  <td bgColor="<% =strPopUpTableColor %>" align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>Older than 45 days</b></font></td>
	  <td bgColor="<% =strPopUpTableColor %>" align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b><% =pmcount45r %></b></font></td>
	  <td bgColor="<% =strPopUpTableColor %>" align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b><% =pmcount45u %></b></font></td>
	</tr>
	<tr valign="top">
	  <td bgColor="<% =strPopUpTableColor %>" align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>Older than 60 days</b></font></td>
	  <td bgColor="<% =strPopUpTableColor %>" align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b><% =pmcount60r %></b></font></td>
	  <td bgColor="<% =strPopUpTableColor %>" align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b><% =pmcount60u %></b></font></td>
	</tr>
      </table>
    </td>
  </tr>
</table>
<br>
<form action="admin_pmmaint.asp" method="post" id="Form1" name="Form1">
<input type="hidden" name="Method_Type" value="Write_Configuration">
<table border="0" cellspacing="0" cellpadding="0" align=center>
  <tr>
    <td bgcolor="<% =strPopUpBorderColor %>">
      <table border="0" cellspacing="1" cellpadding="4">
	<tr valign="top">
	  <td bgcolor="<% =strHeadCellColor %>" colspan="2"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>"><b>Private Messages Maintenance</b></font></td>
	</tr>
	<tr valign="top">
	  <td bgColor="<% =strPopUpTableColor %>" align="right"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>Delete Private Messages Older than:</b> </font></td>
	  <td bgColor="<% =strPopUpTableColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">
	  <select name="strMessageDays" size=1>
	  	<option value=0>All</option>
	  	<option value=15>15 days</option>
	  	<option value=30 selected>30 days</option>
	  	<option value=45>45 days</option>
	  	<option value=60>60 days</option>
	  </select></font></td>
	</tr>
	<tr valign="top">
	  <td bgColor="<% =strPopUpTableColor %>" colspan="2"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">
          <input name="UnRead" type="checkbox" value="yes">Check here to delete Unread Messages also.<br></font></td>
	</tr>
	<tr valign="top">
	  <td bgColor="<% =strPopUpTableColor %>" colspan="2" align="center"><input type="submit" value="Submit" id="submit1" name="submit1"> <input type="reset" value="Reset Old Values" id="reset1" name="reset1"></td>
	</tr>
      </table>
    </td>
  </tr>
</table>
</form>
<%	end if 
	WriteFooter
else
	scriptname = split(request.servervariables("SCRIPT_NAME"),"/")
	response.redirect "admin_login.asp?target=" & scriptname(ubound(scriptname))
end if
on error goto 0
%>

Go to Top of Page

@tomic
Senior Member

USA
1790 Posts

Posted - 01 September 2002 :  22:59:54  Show Profile  Visit @tomic's Homepage  Send @tomic an ICQ Message
I added this to the Private Message download earlier today. It is 100% 3.4 style.

@tomic

SportsBettingAcumen.com
Go to Top of Page

@tomic
Senior Member

USA
1790 Posts

Posted - 01 September 2002 :  23:04:32  Show Profile  Visit @tomic's Homepage  Send @tomic an ICQ Message
quote:
what is privatemess2.asp for ??

in the readme file it says to update pop_delete.asp - however that is a file included in the zip- so I presume its updated already and therfor the readme file needs adjusting !


yes, pop_delete is updated. Thanks for the catch. I shall update the file.

privatemess2.asp is an alternative file for default.asp
It basically allows a member to collapse the table if desired.

@tomic

SportsBettingAcumen.com
Go to Top of Page

Yellow Aftershock
New Member

55 Posts

Posted - 02 September 2002 :  13:45:44  Show Profile
@tomic- where can I download this from ?
I cant seem to find where it is now !
lol
Go to Top of Page

@tomic
Senior Member

USA
1790 Posts

Posted - 02 September 2002 :  14:05:32  Show Profile  Visit @tomic's Homepage  Send @tomic an ICQ Message
Check here:

http://forum.snitz.com/forum/topic.asp?TOPIC_ID=33717

@tomic

SportsBettingAcumen.com
Go to Top of Page

Yellow Aftershock
New Member

55 Posts

Posted - 02 September 2002 :  16:09:50  Show Profile
Just uploaded your new copy of the PM_maint mod @tomis and came across a few mistakes !

A few are cosmetic, in some parts there are """" (4) when there should be """ (3).

But it does not seem to work- the page appears fine but it incorrectly counts the current messages.
I then uploaded the old version, but changing the links to inc_func_common and inc_header and it works fine !
Go to Top of Page

@tomic
Senior Member

USA
1790 Posts

Posted - 02 September 2002 :  17:07:22  Show Profile  Visit @tomic's Homepage  Send @tomic an ICQ Message
I fixed those and uploaded it again. You might want to get it in case you move your icons to their own folder because the old version does not use the getCurrentIcon function.

@tomic

SportsBettingAcumen.com
Go to Top of Page

Yellow Aftershock
New Member

55 Posts

Posted - 02 September 2002 :  19:31:40  Show Profile
Nice one @tomic !
I up-loaded and it works perfect !!!
Go to Top of Page

cbovis
New Member

United Kingdom
91 Posts

Posted - 06 September 2002 :  12:12:23  Show Profile
i implemented the mod as stated onto a fresh copy of snitz and the pm tables were mucked up on default.asp

it seems to place it inside the statistics rows

Thanks

DJNeuphoria


Go to Top of Page

@tomic
Senior Member

USA
1790 Posts

Posted - 06 September 2002 :  13:37:31  Show Profile  Visit @tomic's Homepage  Send @tomic an ICQ Message
What does you code look like on default.asp? Try to paste a few lines above the PM code and a few lines below.

@tomic

SportsBettingAcumen.com
Go to Top of Page

cbovis
New Member

United Kingdom
91 Posts

Posted - 06 September 2002 :  19:03:51  Show Profile
ok dont worry, i worked around by positioning it differently

Thanks

DJNeuphoria


Go to Top of Page

@tomic
Senior Member

USA
1790 Posts

Posted - 06 September 2002 :  19:29:12  Show Profile  Visit @tomic's Homepage  Send @tomic an ICQ Message
I'm not sure why yet but if active users is on default.asp with Private Messages the table doesn't work right. I'll have to investigate that.

@tomic

SportsBettingAcumen.com
Go to Top of Page

cbovis
New Member

United Kingdom
91 Posts

Posted - 07 September 2002 :  06:04:39  Show Profile
i didnt have active users on, but i added it and grouped em together below the statistics and its working fine.

Thanks

DJNeuphoria


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.36 seconds. Powered By: Snitz Forums 2000 Version 3.4.07