Quote:
Originally Posted by D|ver
is it possible to show the number of attendees of an event next to the event titel on forumhome where the next events are shown?
can somebody help me with this?
that would be really great 
|
I got this working by modifying calendar.php
find
Code:
if ($eventinfo['useroll']) {
unset($rollbits);
// Roll for this event
$show['userattending'] = false;
if (($roll = @unserialize($eventinfo['roll'])) && is_array($roll))
{
if (array_key_exists($bbuserinfo['userid'], $roll))
{
$show['userattending'] = true;
}
foreach ($roll as $rollusername)
{
eval ('$rollbits .= "' . fetch_template('calendar_rollbit') . '";');
}
}
and replace with:
Code:
$rollcount=0;
if ($eventinfo['useroll']) {
unset($rollbits);
// Roll for this event
$show['userattending'] = false;
if (($roll = @unserialize($eventinfo['roll'])) && is_array($roll))
{
if (array_key_exists($bbuserinfo['userid'], $roll))
{
$show['userattending'] = true;
}
foreach ($roll as $rollusername)
{
eval ('$rollbits .= "' . fetch_template('calendar_rollbit') . '";');
$rollcount++;
}
}
then edit calendar_roll template and add
Code:
There are currently $rollcount Participants enrolled in this event.
to whereever you want it to be displayed.