PDA


View Full Version : Birthday Module


paul41598
06-13-2005, 03:44 PM
I noticed the birthday module doesnt load any templates by default. However I would like to use one, to include some other things. I edited the module and added adv_portal_birthdays to the "templates used" section, I then created the template and put a few test words in there. However the template doesnt show because the test words dont show on my homepage.

What did I do wrong if anything?

KW802
06-13-2005, 03:48 PM
Paul41598,

The contents of the new template won't show unless the underlying PHP module has been changed to use that new template. ;)

What types of changes are you trying to do?

paul41598
06-13-2005, 04:00 PM
adding a graphic/icon on the top left corner of all of my module tables

ConqSoft
06-13-2005, 04:08 PM
Can you add it by editing adv_cmps_shell?

paul41598
06-13-2005, 06:27 PM
no cuz that will change all my tables to the same graphic. I want a diff one on each template.

Where and how do I add the line of code in birthdays.php to pull that template I made?

paul41598
06-14-2005, 09:14 AM
Im assuming something like this I should do?

FIND:

$home["$mods[modid]"]['content'] = iif($birthdays, str_replace(array('member.php', ','), array($vboptions['bburl'] . '/member.php', '<br />'), $birthdays), $vbphrase['none']);

ADD BENEATH:

eval('$home[$mods[\'modid\']][\'content\'] = "' . fetch_template('adv_portal_birthdays') . '";');

paul41598
06-15-2005, 03:08 PM
Ok I need further help. I got it to work, but there are no line breaks, and even though it shows a <br /> in the code, it still wont show on my homepage

Here is the final code in birthdays module.


<?php
// ++=========================================================================++
// || vBadvanced CMPS v2.0 RC1 - 2679
// || © 2003-2004 vBadvanced.com & PlurPlanet, LLC - All Rights Reserved
// || This file may not be redistributed in whole or significant part.
// || http://vbadvanced.com
// || Downloaded 14:48, Fri Jun 3rd 2005
// ||
// ++ ========================================================================++

$tdate = date('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;
}


$show['tablerow'] = true;

$home["$mods[modid]"]['content'] = iif($birthdays, str_replace(array('member.php', ','), array($vboptions['bburl'] . '/member.php', '<br />'), $birthdays), $vbphrase['none']);

eval('$home[$mods[\'modid\']][\'content\'] = "' . fetch_template('adv_portal_birthdays') . '";');

?>

paul41598
06-20-2005, 09:47 AM
I still cant get this :(


eval('$birthdays .= "' . fetch_template('adv_portal_birthdays') . '";');


$home["$mods[modid]"]['content'] = iif($birthdays, str_replace(array('member.php', ','), array($vboptions['bburl'] . '/member.php', '<br />'), $birthdays), $vbphrase['none']);