Register My Account Search Members F.A.Q. Admin  
Support Forums  


Post new topic Post reply

Page: 1 2
Author Message
shellspeare

Member
Posts: 1518
Registered: Jul 2004
 
 Posted August 13th, 2005 06:46 AM   IP           Reply with quote Edit Post Delete post
courtesy of wishmaster of 33bit forums

First Part :
As Exco doesnt provide you with the birthdates automatically, you'll have to enter it manually yourself ...
in var Nicks, type in each user in quotes and separated by commas ...

In the dates array, type in the dates in the format : date/month in quotes in the same order as you have entered the usernames

You'll need to modify this and paste it on top of the page in which you want to display the box ( index page )
Quote:

<script language="JavaScript">
var Nicks = new Array('user1', 'user2', 'user3', 'etc');
var Dates = new Array('d1/m1', 'd2/m2', 'd3/m3', 'etc');
</script>



Second Part
Just copy paste this code wherever you want the box to be displayed ...
I put it on my index page, just over the statistics box.

This code does not need to be modified, unless you want to change the style ...
Quote:

<table border="0" bordercolor="#000000" bgcolor="#FFFFFF">
<tr>
<td class="Heading" align="left" colspan="1"><b><span class="HeadingText">Birthdays</span></b>
</tr>
<tr>
<td class="FirstAlt" align="left">
<script language="javascript">
var today = new Date()
var todaym = today.getMonth()
var todayd = today.getDate()
var bdate
var bmonth
var flag = 0;

document.write('<span class="SmallText">' + "Members having their birthdays today " + '<span><br>');

for(i=0; i<Dates.length; i++) {
var x1 = Dates[i].split("/");
if(todayd == x1[0] && (todaym+1) == x1[1]) {
document.write('<span class="SmallText"><b>' + Nicks[i].replace("+", " ") + '</b></span><br>');
flag = 1;
}
}
if(flag == 0) {
document.write(" none<br>");
}

document.write('<br>');

flag = 0;
document.write('<span class="SmallText">' + "Members having their birthdays this month" + '</span><br>');

for(i=0; i<Dates.length; i++) {
var x2 = Dates[i].split("/")
bmonth = x2[1];
if((todaym+1) == bmonth) {
document.write('<span class="SmallText"><b>' + Nicks[i].replace("+", " ") + " - " + x2[0] + '</b></span><br>')
flag = 1;
}
}

if(flag == 0) {
document.write(" none");
}

</script></td>
</tr>
</table>


Pure Robbie
The Wishmaster

Member
Posts: 8
Registered: Mar 2004
 
 Posted October 11th, 2005 10:19 AM   IP           Reply with quote Edit Post Delete post
Hey ...
shellspeare ... thanks for putting that code snippet out here ...

Had no idea about that it was worth putting out here

According to recognized Aurotechnical tests, the bumble bee cannot fly because of the shape and the weight of its body in relation to its total wing area ...
The bumble bee doesn't know this, so it goes ahead and flies anyways ...
DIVA6371

Member
Posts: 54
Registered: Mar 2005
 
 Posted January 3rd, 2006 07:13 PM   IP           Reply with quote Edit Post Delete post
Shell,

This script is great. However, due to my lack of expertise....I flubbed it up. LOL

Was able to get the box on my test board, however, I couldnt get the names and dates in. When I went to put it on my families board, the box was the same length as the statistics box.

Believe all the instructions were followed correctly, but apparently not...and I'm an idiot.

Any suggestions would be appreciated.

Thanks!!!
dizzilizz

Member
Posts: 367
Registered: Nov 2004
 
 Posted January 3rd, 2006 11:20 PM   IP           Reply with quote Edit Post Delete post
Sounds like you just put it in the wrong spot D. Look for this in your index template and put the second part of the code right after it.

<img border="0" src="{notnewimage}"> No new posts since your last visit</span>


Put the first part of the code at the top of the index template.
DIVA6371

Member
Posts: 54
Registered: Mar 2005
 
 Posted January 3rd, 2006 11:39 PM   IP           Reply with quote Edit Post Delete post
Will try that tomorrow Liz...thanks. What about the names and dates??? Couldnt get those in either.

What's up with that avatar????? Scaring me. LOL
dizzilizz

Member
Posts: 367
Registered: Nov 2004
 
 Posted January 4th, 2006 08:35 AM   IP           Reply with quote Edit Post Delete post
Make sure you put the dates in right. It's day first, then the month exactly how it's shown and make sure they all correspond...the first name to the 1st birthday.

I just took a new pic for new year...you likey?
DIVA6371

Member
Posts: 54
Registered: Mar 2005
 
 Posted January 4th, 2006 07:20 PM   IP           Reply with quote Edit Post Delete post


Ok, so I added all of the birthdays in. Started with 2 to check and make sure it worked.....it did. After I added all the others in the box changed....first it didnt have the "members having their bday this month" section....just the "members having their bday today" section.

I KNOW I didnt touch anything on the second part of the script.

The only thing I can think that happened, is I added the name of someone who isnt a member....would that matter? His name did show, he was one of the first ones that I tested with and it worked.

ggggrrrrrrrrr
[Edited by Catchow]
DIVA6371

Member
Posts: 54
Registered: Mar 2005
 
 Posted January 9th, 2006 10:04 AM   IP           Reply with quote Edit Post Delete post
Ok...got it all straightened away.

Thanks again to everyone...especially Liz who held my hand.
BluAngelGrrl

Unregistered
Posts: 1784
Registered: Apr 2004
 
 Posted March 7th, 2006 07:53 PM   IP           Reply with quote Edit Post Delete post
To update. I replaced the entire code, following the directions given by shellspeare in the original post, and added the names and dates as directed being sure the correct name went with the correct date. It will only show the Member having birthday today, but not members having birthdays this month. Until last night, it was showing both, but I wanted to update and remove members names from the list that are no longer members. I made sure that each person's name is entered as it is found on the boards, but now it will only show the Members today section, not both.
seb_thib_55

Member
Posts: 1832
Registered: Apr 2005
 
 Posted March 13th, 2006 12:00 AM   IP           Reply with quote Edit Post Delete post
What is your Excoboard URL? I only find invisiofree links in ur siggie
seb_thib_55

Member
Posts: 1832
Registered: Apr 2005
 
 Posted March 14th, 2006 12:18 AM   IP           Reply with quote Edit Post Delete post
One of my predictions:
At the end of your list of name and dates remove the , on the last name/date:
Quote:
'metalheart');
'29/11');


I have a feeling the javascript is trying to read the , as part of a script. Most of the time, one extra letter can ruin the code

If that doesn't work, let me know. I will keep studying it!

BluAngelGrrl

Unregistered
Posts: 1784
Registered: Apr 2004
 
 Posted March 14th, 2006 12:58 AM   IP           Reply with quote Edit Post Delete post
That did it Seb....thanks. Hadn't EVEN noticed the last comma on either of those.....
seb_thib_55

Member
Posts: 1832
Registered: Apr 2005
 
 Posted March 14th, 2006 01:05 AM   IP           Reply with quote Edit Post Delete post
Glad I can help!
Koyana Nuva

Member
Posts: 755
Registered: Jan 2006
 
 Posted April 1st, 2006 12:59 AM   IP           Reply with quote Edit Post Delete post
Hey, did you know you can stuff this Birthday Box into a Custom Info Center?
BluAngelGrrl

Unregistered
Posts: 1784
Registered: Apr 2004
 
 Posted April 1st, 2006 01:26 AM   IP           Reply with quote Edit Post Delete post
Wanna post exactly how to put it like you did in your Info Center? The box within the part, where there is so much "white space". It would help to clean up the info center a bit, and use some of the dead space at the same time.
Koyana Nuva

Member
Posts: 755
Registered: Jan 2006
 
 Posted April 1st, 2006 01:07 PM   IP           Reply with quote Edit Post Delete post
This is really easy to do. I just combined two scripts. No real work here...

Just put this in your Index Template (Custom Templates). Put it where you want it to show up.

In the BOLD Text, just put in the birthdays by number: For example, my birthday is on November 13th. So, I put 13/11 (11 for November...)

Quote:

<table width="92%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="95%" class="Tableborder">
<table border="0" cellpadding="5" cellspacing="1" width="100%">
<tr>
<td width="70%" class="Heading"><span class="HeadingText"><b>Online:</b></span><span class="SmallText">
<!-- BEGIN whoonline -->
<b>{whoonline.users}</b> Members | <b>{whoonline.guests}</b> Guests
</span></td>
<td width="30%" rowspan="6" valign="top" class="SecondAlt"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top"> <span class="SmallText"> Current time is {curtime}<br>
You last visited {lastvisit}<br>
<br>
<div= "center">
{center}
<script language="JavaScript">
//
var Nicks = new Array('USER HERE', 'USER2 HERE', 'ETC.');
var Dates = new Array('DATE/MONTH HERE', 'DATE/MONTH HERE', 'ETC.');
</script>
<table border="0" bordercolor="#000000" bgcolor="#FFCC00">
<tr>
<td class="Heading" align="left" colspan="1"><b><span class="HeadingText">Birthdays</span></b>
</tr>
<tr>
<td class="FirstAlt" align="left">
<script language="javascript">
var today = new Date()
var todaym = today.getMonth()
var todayd = today.getDate()
var bdate
var bmonth
var flag = 0;

document.write('<span class="SmallText">' + "<b>Members having their birthdays today </b>" + '<span><br>');

for(i=0; i<Dates.length; i++) {
var x1 = Dates[i].split("/");
if(todayd == x1[0] && (todaym+1) == x1[1]) {
document.write('<span class="SmallText"><b>' + Nicks[i].replace("+", " ") + '</b></span><br>');
flag = 1;
}
}
if(flag == 0) {
document.write(" none<br>");
}

document.write('<br>');

flag = 0;
document.write('<span class="SmallText">' + "<b>Members having their birthdays this month</b>" + '</span><br>');

for(i=0; i<Dates.length; i++) {
var x2 = Dates[i].split("/")
bmonth = x2[1];
if((todaym+1) == bmonth) {
document.write('<span class="SmallText"><b>' + Nicks[i].replace("+", " ") + " - " + x2[0] + '</b></span><br>')
flag = 1;
}
}

if(flag == 0) {
document.write(" none");
}

</script></td>
</tr>
</table>
<a href="index.php?boardid={boardid}&action=mark">Mark all
boards as read</a><br>
<a href="index.php?boardid={boardid}&action=logout">Logout</a></span></td>
</tr>
</table></td>
</tr>
<tr>
<td width="70%" class="FirstAlt"><span class="SmallText"> {whoonline.usersonline}
<!-- END whoonline -->
<br>
<br>
<!-- BEGIN iftrue_statistics -->
Most users ever online: <b>{iftrue_statistics.ever}</b> ({iftrue_statistics.evertime})
<!-- END iftrue_statistics -->
</span></td>
</tr>
<tr>
<td width="70%" class="Heading"><span class="HeadingText"><b>Statistics</b></span></td>
</tr>
<tr>
<td width="70%" class="FirstAlt"><span class="SmallText">
<!-- BEGIN iftrue_statistics -->
Posts: <b>{iftrue_statistics.totalposts}</b><br>
Members: <b>{iftrue_statistics.nrreg}</b><br>
Newest member: <b>{iftrue_statistics.lastreg}</b><br>
Visitors since (since {iftrue_statistics.started}): <b>{iftrue_statistics.total}</b>
<!-- END iftrue_statistics -->
<br>
<a href="javascript:leaders({boardid})">Community Leaders</a> </span></td>
</tr>
<tr>
<td class="Heading"><span class="HeadingText"><b>User Status</b></span></td>
</tr>
<tr>
<td class="FirstAlt"><!-- BEGIN iftrue_logincode -->
<table border="0" cellpadding="0" cellspacing="2"><form action="index.php" method="post">
<tr>
<td><span class="SmallText"><b>Username</b></span></td>
<td><span class="SmallText"><b>Password</b></span></td>
<td rowspan="2" valign="bottom"><input type="submit" class="SubmitButtons" value="Login" name="B1"></td>
</tr>
<tr>
<td><input type="text" class="TextInputField" name="fieldusername" size="10"></td>
<td><input type="password" class="TextInputField" name="fieldpassword" size="10"></td>
</tr>
<input type="hidden" name="action" value="login"><input type="hidden" name="boardid" value="{boardid}"></form></table>
<!-- END iftrue_logincode -->
<!-- BEGIN newpm -->
<span class="SmallText">
<a href="pm.php?boardid={boardid}"><b>Private Messages</b></a>: You have <b>{newpm.newpms}</b> unread messages</span>
<!-- END newpm -->
</td>
</tr>
</table>
</td>
</tr>
</table>
BluAngelGrrl

Unregistered
Posts: 1784
Registered: Apr 2004
 
 Posted April 1st, 2006 10:38 PM   IP           Reply with quote Edit Post Delete post
Thanks. I'll try it out on my test board and see what I think.....*smile*
Angel97

Member
Posts: 265
Registered: Jun 2006
 
 Posted June 28th, 2006 07:27 PM   IP           Reply with quote Edit Post Delete post
Is there a preview available?
<center></center>
Koyana Nuva

Member
Posts: 755
Registered: Jan 2006
 
 Posted July 14th, 2006 08:14 PM   IP           Reply with quote Edit Post Delete post
A preview? Um, sorry, no. Not yet... But it works.
Catchow

Member
Posts: 4452
Registered: May 2004
 
 Posted July 14th, 2006 09:07 PM   IP           Reply with quote Edit Post Delete post
Koyana make a screenshot because even if you do have a preview unless it is someone's bday it wont show much.
Goodbye to all my friends.
Angel97

Member
Posts: 265
Registered: Jun 2006
 
 Posted July 18th, 2006 12:12 PM   IP           Reply with quote Edit Post Delete post
I'll just test it out on my test board and then check it out.
<center></center>
Angel97

Member
Posts: 265
Registered: Jun 2006
 
 Posted July 18th, 2006 12:23 PM   IP           Reply with quote Edit Post Delete post
Oh that's so cool..
I just tried it out and I love it! THANKS!!

<center></center>
MarinesMami

Member
Posts: 121
Registered: Jul 2006
 
 Posted July 28th, 2006 08:22 PM   IP           Reply with quote Edit Post Delete post
ok..i did this and i used a fake bday *todays date* and it worked...i went in to add more bdays and...now it says no birthdays today when it just did?

seb_thib_55

Member
Posts: 1832
Registered: Apr 2005
 
 Posted July 31st, 2006 02:02 PM   IP           Reply with quote Edit Post Delete post
Post the code Marines.
MarinesMami

Member
Posts: 121
Registered: Jul 2006
 
 Posted August 1st, 2006 03:09 AM   IP           Reply with quote Edit Post Delete post
<script language="JavaScript">
var Nicks = new Array('dellickerswife,'amy_9922');
var Dates = new Array('09/08','12/08');
</script>

<table border="0" bordercolor="#000000" bgcolor="#FFFFFF">
<tr>
<td class="Heading" align="left" colspan="1"><b><span class="HeadingText">Birthdays</span></b>
</tr>
<tr>
<td class="FirstAlt" align="left">
<script language="javascript">
var today = new Date()
var todaym = today.getMonth()
var todayd = today.getDate()
var bdate
var bmonth
var flag = 0;

document.write('<span class="SmallText">' + "Birthdays Today" + '<span><br>');

for(i=0; i<Dates.length; i++) {
var x1 = Dates[i].split("/");
if(todayd == x1[0] && (todaym+1) == x1[1]) {
document.write('<span class="SmallText"><b>'+ Nicks[i].replace("+", " ") + '</b></span><br>');
flag = 1;
}
}
if(flag == 0) {
document.write(" none<br>");
}

document.write('<br>');

flag = 0;
document.write('<span class="SmallText">' + "Birthdays This Month" + '</span><br>');

for(i=0; i<Dates.length; i++) {
var x2 = Dates[i].split("/")
bmonth = x2[1];
if((todaym+1) == bmonth) {
document.write('<span class="SmallText"><b>' + Nicks[i].replace("+", " ") + " - " + x2[0] + '</b></span><br>')
flag = 1;
}
}

if(flag == 0) {
document.write(" none");
}

</script></td>
</tr>
</table>




Koyana Nuva

Member
Posts: 755
Registered: Jan 2006
 
 Posted August 3rd, 2006 05:31 PM   IP           Reply with quote Edit Post Delete post
I think I see what you did wrong... at the "var dates" area (where you put the month/day)... I don't think you put zeros before the number. Try removing the first zeros. don't remove zeros after the number.

Example: 01= 1
Example: 10= 10
BluAngelGrrl

Unregistered
Posts: 1784
Registered: Apr 2004
 
 Posted August 3rd, 2006 07:01 PM   IP           Reply with quote Edit Post Delete post
It's the day first and month second for example 17/7 for one of my members. 17th of July is what it would be.

So KN is right. try putting the dates in as 9/8, 12/8 etc.....

I had to go look at control panel and see how it was in my template to be sure before I answered that though.
MarinesMami

Member
Posts: 121
Registered: Jul 2006
 
 Posted August 4th, 2006 01:48 AM   IP           Reply with quote Edit Post Delete post
still doesnt recognize the birthday is today

Catchow

Member
Posts: 4452
Registered: May 2004
 
 Posted August 4th, 2006 08:15 PM   IP           Reply with quote Edit Post Delete post
Ok post it again.
Goodbye to all my friends.
MarinesMami

Member
Posts: 121
Registered: Jul 2006
 
 Posted August 5th, 2006 07:55 AM   IP           Reply with quote Edit Post Delete post
ahh i got it to work..im pretty sure..i forgot to add a ' to the end of the name..thanx so much ur all wonderful!




Posts:
Registered:

 Posted    IP           Reply with quote Edit Post Delete post
Mark all forums read
Logout
All times are EST
Forum jump:

Thread Options: Delete thread / Open/Close thread / Rename thread / Stick thread / Move thread / Merge thread
Post new topic Post reply

< Previous thread | Next thread > | Subscribe to thread |