PDA

View Full Version : Move Birthdays from stats module to Upcoming events?


MotoUp
01-04-2005, 07:25 PM
How would I go about moving the birthday from the stats module to the upcoming events under the mini-calendar.

I tried taking the chunk of code from birthdays and copying to the mini-cal template, but it didn't work...

Brian
01-04-2005, 07:50 PM
You would also need to move the chunk of code for the birthdays from the stats.php file to your minicalendar.php file.

Our Sponsors
 

MotoUp
01-04-2005, 08:26 PM
Ahhhhhhhh, thank you very much.

MotoUp
01-05-2005, 02:03 PM
Well, I tried that, and it made the Upcoming events module not even show up. Any suggestions? Can you show me which code exactly I need to pull out of stats and put into minicalendar?

Our Sponsors
 

Brian
01-05-2005, 02:04 PM
$tdate = vbdate('Y-m-d', TIMENOW);
$birthdaystore = unserialize($datastore['birthdaycache']);
if (!is_array($birthdaystore) OR ($tdate != $birthdaystore['day1'] AND $tdate != $birthdaystore['day2']))
{
include_once('./includes/functions_databuild.php');
$birthdaystore = build_birthdays();
}
switch($tdate)
{
case $birthdaystore['day1']:
$birthdays = $birthdaystore['users1'];
break;

case $birthdaystore['day2'];
$birthdays = $birthdaystore['users2'];
break;
}
$birthdays = str_replace(array('member.php', ','), array($vboptions['bburl'] . '/member.php', '<br />'), $birthdays);


Make sure you place it above the call to the calendar template.

MotoUp
01-05-2005, 03:52 PM
Okay, that worked. I missed the very first line, and started with $birthdaystore. Thanks.

MotoUp
01-06-2005, 01:02 PM
Hey Brian, where in the world is the option to set how many days Upcoming events is displayed for? I for the life of me can't find it.

Brian
01-06-2005, 01:17 PM
There is no option to display upcoming events in the CMPS, only the calendar.

MotoUp
01-06-2005, 01:31 PM
Wierd, I thought I saw it somewhere. So there's no way to change how many days ahead the Upcoming Events shows for then?

Brian
01-06-2005, 01:37 PM
The upcoming events isn't a default CMPS module, so you'll need to ask in the hack thread.

Tom M
01-06-2005, 03:43 PM
AdminCP > Forums Home Page Options > Display Calendar Events

Set the number to how many days you want displayed.

MotoUp
01-06-2005, 03:49 PM
Thanks, I knew I saw it somewhere! LOL

Dantenator
03-03-2005, 02:28 PM
I would love this functionality but I can't seem to get it to work. I copied the above code into my minicalendar.php and checked all my permission but still get nothing on the frontpage. The birthday event is viewable on the main calendar page so I know it's there. Maybe I pasted the above code into the wrong spot? I placed mine in the minicalendar.php file right after:
// ### TODAY'S EVENTS #################################################
if ($vboptions['showevents'])
{
require_once('./includes/functions_calendar.php');
Is that the right spot?