Quote:
Originally Posted by joeychgo
Any idea how we could make it so users who are bringing someone can add a +1 or +2 so we get an accurate count?
I have users who might bring a girlfriend or wife (or both  ) to an event - but there isnt a way to indicate that they are bringing extras.
|
Yea, I just coded this up for another board. Here you go:
calendar_roll template:
Find
PHP Code:
<else />
[<a href="calendar.php?$session[sessionurl]do=attend&e=$eventinfo[eventid]">I will be attending this event</a>]
</if>
Replace with
PHP Code:
<else />
<form action="calendar.php" method="post">
<input type="hidden" name="do" value="attend" />
<input type="hidden" name="e" value="$eventinfo[eventid]" />
[I will be attending this event with <input type="text" name="guests" value="0" size=3 /> guests. <input type="submit" value="Submit" />]
</form>
</if>
calendar.php:
Find
PHP Code:
$roll[$bbuserinfo['userid']] = $bbuserinfo['username'];
Replace with
PHP Code:
$info = $bbuserinfo['username'];
$guests = intval( $_REQUEST['guests']);
if (1 == $guests)
$info .= ' (' . $guests . ' guest)';
else if ($guests > 0)
$info .= ' (' . $guests . ' guests)';
$roll[$bbuserinfo['userid']] = $info;