Hı guys, ı have created two custom fıeld for my calendar, ı want to show them ın the my forum homepage($upcomingevents)
I thıng to show the custom fıeld whıch ı have created. to show them on the forum home ı need to edıt the code below ın the forumroot/ındex.php :
PHP Code:
$upcomingevents = '';
foreach($events AS $index => $value)
{
$pastevent = 0;
$pastcount = 0;
$comma = $eventdates = $daysevents = '';
if (!$vbulletin->options['showeventtype'])
{ // Group by Event // $index = $eventid
$eventinfo = $eventstore["$index"];
if (empty($eventinfo['recurring']) AND empty($eventinfo['singleday']))
{ // ranged event -- show it from its real start and real end date (vbgmdate)
$fromdate = vbdate($vbulletin->options['dateformat'], $eventinfo['dateline_from_user'], false, true, false, true);
$todate = vbdate($vbulletin->options['dateformat'], $eventinfo['dateline_to_user'], false, true, false, true);
if ($fromdate != $todate)
{
$eventdates = construct_phrase($vbphrase['event_x_to_y'], $fromdate, $todate);
}
else
{
$eventdates = vbdate($vbulletin->options['dateformat'], $eventinfo['dateline_from_user'], false, true, false, true);
}
$day = vbdate('Y-n-j', $eventinfo['dateline_from_user'], false, false);
}
else
{
unset($day);
foreach($value AS $key => $dateline)
{
if (($dateline - 86400) == $pastevent AND !$eventinfo['holidayid'])
{
$pastevent = $dateline;
$pastcount++;
continue;
}
else
{
if ($pastcount)
{
$eventdates = construct_phrase($vbphrase['event_x_to_y'], $eventdates, vbdate($vbulletin->options['dateformat'], $pastevent, false, true, false));
}
$pastcount = 0;
$pastevent = $dateline;
}
if (!$day)
{
$day = vbdate('Y-n-j', $dateline, false, false, false);
}
$eventdates .= $comma . vbdate($vbulletin->options['dateformat'], $dateline, false, true, false);
$comma = ', ';
}
if ($pastcount)
{
$eventdates = construct_phrase($vbphrase['event_x_to_y'], $eventdates, vbdate($vbulletin->options['dateformat'], $pastevent, false, true, false));
}
}
if ($eventinfo['holidayid'])
{
$callink = '<a href="calendar.php?' . $vbulletin->session->vars['sessionurl'] . "do=getinfo&day=$day\">" . $vbphrase['holiday' . $eventinfo['holidayid'] . '_title'] . "</a>";
}
else
{
$callink = '<a href="calendar.php?' . $vbulletin->session->vars['sessionurl'] . "do=getinfo&day=$day&e=$eventinfo[eventid]&c=$eventinfo[calendarid]\">$eventinfo[title]</a>";
}
}
else
{ // Group by Date
$eventdate = vbdate($vbulletin->options['dateformat'], $index, false, true, false);
$day = vbdate('Y-n-j', $index, false, false, false);
foreach($value AS $key => $eventid)
{
$eventinfo = $eventstore["$eventid"];
if ($eventinfo['holidayid'])
{
$daysevents .= $comma . '<a href="calendar.php?' . $vbulletin->session->vars['sessionurl'] . "do=getinfo&day=$day\">" . $vbphrase['holiday' . $eventinfo['holidayid'] . '_title'] . "</a>";
}
else
{
$daysevents .= $comma . '<a href="calendar.php?' . $vbulletin->session->vars['sessionurl'] . "do=getinfo&day=$day&e=$eventinfo[eventid]&c=$eventinfo[calendarid]\">$eventinfo[title]</a>";
}
$comma = ', ';
}
}
($hook = vBulletinHook::fetch_hook('forumhome_event')) ? eval($hook) : false;
eval('$upcomingevents .= "' . fetch_template('forumhome_event') . '";');
}
// memory saving
unset($events, $eventstore);
}
$show['upcomingevents'] = iif ($upcomingevents, true, false);
$show['todaysevents'] = iif ($vbulletin->options['showevents'] == 1, true, false);
}
else
{
$show['upcomingevents'] = false;
}
But ı dont know what codes ı need to add to call the custom fıeld Any ıdea please ??