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
 Birthday Mod Display is Odd!
 New Topic
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 5

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 31 January 2015 :  23:32:10  Show Profile
Look for this in "default.asp":

Call DisplayBirthdays

The number in parentheses immediately after that is the range of recent birthdays to show. In the modular forum, I added a setting from an admin page instead of requiring forum admins to change the code. If you're using my change, it will say something like this:

Call DisplayBirthdays(intB_Range,intB_Age)

In that case, you'll have to go to "admin_birthdays.asp" in order to change the setting.

Edited by - Carefree on 31 January 2015 23:37:16
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 01 February 2015 :  00:58:47  Show Profile

The default.asp has this: Call DisplayBirthdays(30,0). Isn't that what it should have, Carefree?


"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

Maxime
Average Member

France
521 Posts

Posted - 01 February 2015 :  01:27:11  Show Profile  Visit Maxime's Homepage
Hello,

Home on my default.asp page, I have that Call DisplayBirthdays(30,1)

Cordially,
Maxime

Taxation consists in so plucking the goose to get the most out of feathers with the least possible cries.(Jean-Baptiste Colbert)


Edited by - Maxime on 01 February 2015 01:27:31
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 01 February 2015 :  02:22:44  Show Profile
30,1 means the date range is 30 days, displaying the users' ages. 30,0 would show birthdays but not ages.
Go to Top of Page

Maxime
Average Member

France
521 Posts

Posted - 01 February 2015 :  02:36:33  Show Profile  Visit Maxime's Homepage
Hello Carefree,

Thank you I did not know. I post at my anniversary date and age. Here is a picture of the birthday display, unfortunately for you it's in French


Cordially,
Maxime

Taxation consists in so plucking the goose to get the most out of feathers with the least possible cries.(Jean-Baptiste Colbert)

Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 01 February 2015 :  09:54:14  Show Profile
quote:
Originally posted by Carefree

30,1 means the date range is 30 days, displaying the users' ages. 30,0 would show birthdays but not ages.




Then my default.asp setting "Call DisplayBirthdays(30,0)" is correct for my upcoming birthdays. It's displaying upcoming birthdays for the month of February without displaying members' ages.

Is there a different setting that needs to be changed for the recent birthdays listings since it's displaying the entire year?



"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley

Edited by - MaGraham on 01 February 2015 09:59:32
Go to Top of Page

Maxime
Average Member

France
521 Posts

Posted - 01 February 2015 :  11:06:56  Show Profile  Visit Maxime's Homepage
To show the age of the member must put that (30.1) made a test

Cordially,
Maxime

Taxation consists in so plucking the goose to get the most out of feathers with the least possible cries.(Jean-Baptiste Colbert)

Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 01 February 2015 :  23:54:11  Show Profile

Thanks, Maxime, but I don't wish to display members' age.

My only concern is that which I stated in my last post.


"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

Maxime
Average Member

France
521 Posts

Posted - 02 February 2015 :  03:45:45  Show Profile  Visit Maxime's Homepage
But age is displayed on the profile of the members since the anniversary date should be mandatory for this feature to work .. We must ask our Carefree specialist.

Cordially,
Maxime

Taxation consists in so plucking the goose to get the most out of feathers with the least possible cries.(Jean-Baptiste Colbert)

Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 02 February 2015 :  09:48:08  Show Profile
30,0 (change the 30 to how many days you want to display) will display the birthdays, but not the members' ages.

30,1 displays the ages, as well.
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 02 February 2015 :  11:15:21  Show Profile

Any ideas on what could cause it to display recent birthdays for the entire year, Carefree?


"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 02 February 2015 :  21:41:48  Show Profile
Best guess is that your "inc_birthdays.asp" has been changed in some way. My test version here didn't change its behavior.
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 02 February 2015 :  23:41:05  Show Profile

I replaced my inc_birthdays.asp with a backup and it's working fine now.

I admit, I would not have thought of that, Carefree.

Thank you so much!


"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 08 February 2015 :  11:08:41  Show Profile

When I did my last reply to this I failed to realize the upcoming birthdays were displaying incorrectly. March birthdays are being displayed before February birthdays, but only some of the March birthdays are currently displayed.

Here's the pattern I've observed. It only displayed March 1-7 birthdays at first (first week of March). But now that we are in the second week of the month, it's now displaying any birthdays for the second week of March. However; all the while, it displays the entire month of February birthdays.

This really has me scratching my head!

Here is my inc_birthdays.asp below if someone has time to look at it.




<%
'###############################################################################
'##
'##                Snitz Forums 2000 v3.4.07
'##
'###############################################################################
'##
'## Copyright © 2000-09 Michael Anderson, Pierre Gorissen,
'##            Huw Reddick and Richard Kinser
'##
'## This program is free. You can redistribute and/or modify it under the
'## terms of the GNU General Public License as published by the Free Software
'## Foundation; either version 2 or (at your option) any later version.
'##
'## All copyright notices regarding Snitz Forums 2000 must remain intact in
'## the scripts and in the HTML output.  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 an 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:
'##
'##            Free Software Foundation, Inc.
'##            59 Temple Place, Suite 330
'##            Boston, MA 02111-1307
'##
'## Support can be obtained from our support forums at:
'##
'##              http://forum.snitz.com
'##
'## Correspondence and marketing questions can be sent to:
'##
'##               manderson@snitz.com
'##
'###############################################################################
'## MOD: Birthdays v1.0 for Snitz Forums v3.4
'## Author: Michael Reisinger (OneWayMule)
'## File: inc_birthdays.asp
'##
'## Get the latest version of this MOD at
'## http://www.onewaymule.org/onewayscripts/
'#################################################################################
Sub DisplayBirthdays(intRange,intAge)
	Call DoHideCategory("Birthdays")
	HideForumCat = strUniqueID & "HideCatBirthdays"
	If Request.Cookies <> "Y" Then
		strBDToday = Left(DateToStr(strForumTimeAdjust),8) & "000000"
		strBDRecentDay = Mid(DateToStr(DateAdd("d",-intRange,strToDate(strBDToday))),5,4)
		strBDUpcomingDay = Mid(DateToStr(DateAdd("d",+intRange,strToDate(strBDToday))),5,4)
		strBDToday = Mid(strBDToday,5,4)
		strsql = "SELECT MEMBER_ID, M_NAME, M_DOB FROM " & strMemberTablePrefix & "MEMBERS WHERE M_DOB<>'' AND M_STATUS=1 ORDER BY mid(M_DOB,5,2) DESC, mid(m_dob,7,2) ASC"
		Set rsBirthday = my_conn.Execute(strsql)
		bolRecentBD = False
		bolTodaysBD = False
		bolUpcomingBD = False
		If intRange = 1 Then
			strRecentBD = "Yesterday: "
			strUpcomingBD = "Tomorrow: "
		Else
			strRecentBD = "Recent: "
			strUpcomingBD = "Upcoming: "
		End If
		strTodaysBD = ""
		If NOT rsBirthday.EOF Then
			arrBD = rsBirthday.GetRows()
			bolBDFound = True
			rsBirthday.Close
		Else
			bolBDFound = False
		End If
		Set rsBirthday = Nothing
		If bolBDFound Then 
			For iBD = 0 to ubound(arrBD, 2)
				intBDID = arrBD(0, iBD)
				strBDName = chkString(arrBD(1, iBD),"display")
				intTPPostcount = arrBD(2, iBD)
				strDOB = Right(arrBD(2, iBD),4)
				strBirthdate = strToDate(arrBD(2, iBD) & "000000")
				If strDOB = strBDToday Then
					If bolTodaysBD = True Then 
						strTodaysBD = strTodaysBD & ", "
					End If
					strTodaysBD = strTodaysBD & profileLink(strBDName,intBDID) & " ("
					If intAge = 1 Then
						strTodaysBD = strTodaysBD & DisplayUsersAge(strBirthdate) & " on " 
					End If
					strTodaysBD = strTodaysBD & monthName(Datepart("m",strBirthDate)) & " " & day(strBirthDate) & ")"          
					bolTodaysBD = True
				End If   
				If strBDRecentDay > strBDToday Then
					If (strDOB > strBDRecentDay AND strDOB < "1231") OR (strDOB > "0101" AND strDOB < strBDToday) Then
						If bolRecentBD = True Then 
							strRecentBD = strRecentBD & ", "
						End If
						strRecentBD = strRecentBD & profileLink(strBDName,intBDID) & " ("
						If intAge = 1 Then
							strRecentBD = strRecentBD & DisplayUsersAge(strBirthdate) & " on " 
						End If
						strRecentBD = strRecentBD & monthName(Datepart("m",strBirthDate)) & " " & day(strBirthDate) & ")"          
						bolRecentBD = True
				  End If       
				Else
					If strDOB < strBDToday AND strDOB >= strBDRecentDay Then
						If bolRecentBD = True Then 
							strRecentBD = strRecentBD & ", "
						End If
						strRecentBD = strRecentBD & profileLink(strBDName,intBDID) & " ("
						If intAge = 1 Then
							strRecentBD = strRecentBD & DisplayUsersAge(strBirthdate) & " on " 
						End If
						strRecentBD = strRecentBD & monthName(Datepart("m",strBirthDate)) & " " & day(strBirthDate) & ")"          
						bolRecentBD = True
					End If
				End If
				If strBDUpcomingDay < strBDToday Then
					If (strDOB =< strBDUpcomingDay AND strDOB >= "0101") OR (strDOB =< "1231" AND strDOB > strBDToday) Then
						If bolUpcomingBD = True Then 
							strUpcomingBD = strUpcomingBD & ", "
						End If
						strUpcomingBD = strUpcomingBD & profileLink(strBDName,intBDID) & " ("
						If intAge = 1 Then
							strUpcomingBD = strUpcomingBD & DisplayUsersAge(strBirthdate)+1 & " on " 
						End If
						strUpcomingBD = strUpcomingBD & monthName(Datepart("m",strBirthDate), true) & " " & day(strBirthDate) & ")"          
						bolUpcomingBD = True
					End If       
				Else
					If strDOB > strBDToday AND strDOB <= strBDUpcomingDay Then
						If bolUpcomingBD = True Then 
							strUpcomingBD = strUpcomingBD & ", "
						End If
						strUpcomingBD = strUpcomingBD & profileLink(strBDName,intBDID) & " ("
						If intAge = 1 Then
							strUpcomingBD = strUpcomingBD & DisplayUsersAge(strBirthdate)+1 & " on " 
						End If
						strUpcomingBD = strUpcomingBD & monthName(Datepart("m",strBirthDate), true) & " " & day(strBirthDate) & ")"          
						bolUpcomingBD = True
					End If
				End If
			Next
		End If                  
		intBDRowSpan = 1
		If bolRecentBD Then 
			intBDRowSpan = intBDRowSpan + 1
			strRecentBD = strRecentBD & "."
		End If
		If bolTodaysBD Then 
			strTodaysBD = strTodaysBD & "."
		Else
			strTodaysBD = "None."
		End If
		If bolUpcomingBD Then 
			intBDRowSpan = intBDRowSpan + 1
			strUpcomingBD = strUpcomingBD & "."
		End If
        End If
	If Request.Cookies(HideForumCat) = "Y" Then
		Response.Write  "                <td bgcolor=""" & strCategoryCellColor & """ colspan=""" & sGetColspan(7,6) & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """><a href=""" & ScriptName & "?" & HideForumCat & "=N"">" & getCurrentIcon(strIconPlus,"Expand This Category","") & "</a> <b>Birthdays</b></font></td>" & vbNewLine
	Else
		Response.Write  "                <td bgcolor=""" & strCategoryCellColor & """ colspan=""" & sGetColspan(7,6) & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """><a href=""" & ScriptName & "?" & HideForumCat & "=Y"">" & getCurrentIcon(strIconMinus,"Collapse This Category","") & "</a> <b>Birthdays</b></font></td>" & vbNewLine
	End If
	Response.Write  "              </tr>" & vbNewLine 
	If Request.Cookies(HideForumCat) <> "Y" Then
		Response.write  "              <tr>" & vbNewLine & _
				"                <td align=""center"" bgcolor=""" & strForumCellColor & """ colspan=""1"" rowspan=""" & intBDRowSpan & """ valign=""middle"">" & getCurrentIcon(strIconBirthdays,"","") & vbNewLine & _
				"              </td>" & vbNewLine
		If (NOT bolTodaysBD) AND (NOT bolUpcomingBD) AND (NOT bolRecentBD) Then
			Response.Write  "                <td bgcolor=""" & strForumCellColor & """ colspan=""" & sGetColspan(7,5) & """>" & vbNewLine & _
					"                <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """>None today." & vbNewLine
		Else
			Response.Write  "                <td bgcolor=""" & strForumCellColor & """ colspan=""" & sGetColspan(7,5) & """>" & vbNewLine & _
					"                  <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & strTodaysBD & "</font>" & vbNewLine & _
					"		      </td></tr>" & vbNewLine
			If bolUpcomingBD Then
				Response.Write  "                <tr><td bgcolor=""" & strForumCellColor & """ colspan=""" & sGetColspan(7,5) & """>" & vbNewLine & _
						"                  <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """>" & strUpcomingBD & "</font></td></tr>" & vbNewLine
			End If
			If bolRecentBD Then
				Response.Write  "                <tr><td bgcolor=""" & strForumCellColor & """ colspan=""" & sGetColspan(7,5) & """>" & vbNewLine & _
						"                  <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """>" & strRecentBD & "</font></td></tr>" & vbNewLine
			End If
		End If
		Response.Write  "		</tr>" & vbNewLine
 	End If
End Sub
%>



"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

Maxime
Average Member

France
521 Posts

Posted - 09 February 2015 :  03:18:30  Show Profile  Visit Maxime's Homepage
Hello,

See line 56 you have it:
strsql = "SELECT MEMBER_ID, M_NAME, M_DOB FROM " & strMemberTablePrefix & "MEMBERS WHERE M_DOB<>'' AND M_STATUS=1 ORDER BY mid(M_DOB,5,2) DESC, mid(m_dob,7,2) ASC"


My file to me what I have:
strsql = "SELECT MEMBER_ID, M_NAME, M_DOB FROM " & strMemberTablePrefix & "MEMBERS WHERE M_DOB<>'' AND M_STATUS=1 ORDER BY Right(M_DOB,4)"

Made a test if this is?

Cordially,
Maxime

Taxation consists in so plucking the goose to get the most out of feathers with the least possible cries.(Jean-Baptiste Colbert)

Go to Top of Page
Page: of 5 Previous Topic Topic Next Topic  
Previous Page | Next Page
 New Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.29 seconds. Powered By: Snitz Forums 2000 Version 3.4.07