Birthday Mod 2.0 New in 2.0 by Demon Slayer --------------------------------------------- -Admin options to display at top or bottom -Admin option for guest ability to view birthdays -Integrated into bottom panel 1.0 by Max --------------------------------------------- This is the first version for showing who are birthday today in infocentre eg. Todays birthday: userabc(29) usern(543) with a link to their user profile This is version 1.0 the next version will include some admin functions Max, Demon Slayer http://www.the-chronicles.com/cgi-bin/YaBB/YaBB.cgi Sources/Admin.pl if ($enable_ubbc) { $ubbcchecked = ' checked'; } if ($bdayshowtop) { $bdayshowtopchecked = ' checked'; } if ($bdayshowbottom) { $bdayshowbottomchecked = ' checked'; } if ($bdayshowguest) { $bdayshowguestchecked = ' checked'; } $txt{'521'} $bday{'01'} $bday{'02'} $bday{'03'}
# Set as 0 or 1 if box was checked or not push(@onoff, "bdayshowtop"); push(@onoff, "bdayshowbottom"); push(@onoff, "bdayshowguest"); # If empty fields are submitted, set them to default-values to save yabb from crashing $bdayshowtop = $FORM{'bdayshowtop'} || 0; $bdayshowbottom = $FORM{'bdayshowbottom'} || 0; $bdayshowguest = $FORM{'bdayshowguest'} || 0; \$enable_ubbc = $enable_ubbc; # Set to 1 if you want to enable UBBC (Uniform Bulletin Board Code) \$bdayshowtop = $bdayshowtop; # Set to 1 if want to display birthdays at the top of the fourm index \$bdayshowbottom = $bdayshowbottom; # Set to 1 if want to display birthdays at the bottom of the fourm index \$bdayshowguest = $bdayshowguest; # Set to 1 if want to display birthdays for guests Sources/BoardIndex.pl &header; ############################################### #Birthday mod plugin for YaBB 1Gold # # By Max : staff@my.netvigator.com # ############################################### require "$sourcedir/Subs.pl"; &timeformat($date); ($tocheckm, $tocheckd, $years) = split(/\//, $date); ($year, $trash) = split(/ /, $yeary); $whobd = ""; $countbd = 0; ## get the userlist to check open(FILE, "$memberdir/memberlist.txt") || die "cannot open list file"; @members = ; close(FILE); foreach $usernames (@members) { chomp $usernames; open(FILE, "$memberdir/$usernames.dat") || die "cannot open user file"; @userbd = ; close(FILE); chomp $userbd[16]; ($matchm, $matchd, $useryear) = split(/\//, $userbd[16]); if(($tocheckm == $matchm) && ($tocheckd == $matchd)) { $userbd[6] =~ s/ //g; chomp $userbd[6]; $age = $year - $useryear + 2001; $whobg .=qq~$userbd[1] ($age). ~; $countbd++; }#end if }#end foreach chomp $whobg; &timeformat($date); ($day, $month, $yearis) = split(/\//, $date); ($yearis, $trashis) = split(/ /, $yearis); if($whobg eq '') { $whobg = "No one has a birthday on $tocheckm/$tocheckd/$yearis"; } print <<"EOT";
$curforumurl $txt{'19'}: $memcount  •  $txt{'95'} $totalm  •  $txt{'64'} $totalt EOT if ($showlatestmember == 1) { print <<"EOT";
$thelatestmember
EOT } print <<"EOT";
EOT
print <<"EOT"; EOT if( $bdayshowguest == '0' && $bdayshowtop == '1' ) { if( $username eq 'Guest') { print <<"EOT"; EOT } else { print <<"EOT"; EOT } } if( $bdayshowguest == '1' && $bdayshowtop == '1' ) { print <<"EOT"; EOT } print <<"EOT";
Birthdays:
$whobg
Birthdays:
$whobg
$curforumurl $txt{'19'}: $memcount  •  $txt{'95'} $totalm  •  $txt{'64'} $totalt EOT if ($showlatestmember == 1) { print <<"EOT";
$thelatestmember
EOT } print <<"EOT";
EOT
if( $username eq 'Guest' ) { print <<"EOT"; » $txt{'34'} if( $bdayshowguest == '0' && $bdayshowbottom == '1' ) { if( $username eq 'Guest') { print <<"EOT"; EOT } else { print <<"EOT"; » Birthdays $whobg EOT } } if( $bdayshowguest == ' 1' && $bdayshowbottom == '1' ) { print <<"EOT"; » Birthdays $whobg EOT } english.lng keys(%img) = 30; $bday{'01'} = "Show birthdays at top of fourm index?"; $bday{'02'} = "Show birthdays at bottom of fourm index?"; $bday{'03'} = "Allow guests to see birthdays on fourm index?";