Version: 1.00, by Kentaurus
Developer Last Online: Jul 2014
Version: 3.0.0
Rating:
Released: 04-04-2004
Last Update: Never
Installs: 164
No support by the author.
Request by: DaveLogic
With this hack when you create an event you can give the users an option to "register" to the event. Then you can view which people have registered to that event.
This could be used so you create an event and then other people notify that they will be attending to the event. You can then keep track of all the people that would be attending each event.
Info for hackers:
You may modify, improve, upgrade, redistribute this hack, include it
in another hack or yours or translate it provided you do it free of
charge and you distribute it in www.vbulletin.org at least, there is no
need to pm me asking for permission
Some portions of the code are (c) Jelsoft Enterprises Ltd.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
That's the hard part--the pseudocode. It's the logic behind the code. That's where ideas on how to do something get tested, shot down, optimized and the like. The coding is the easy part once you have the logic. Then it's just a matter of making the chosen language do what the pseudocode dictates.
That would return all events that a user was attending.
Note that the SQL matches the entire user information, as performing wildcard LIKE's are never good because if we just did the userid we might match events that had the same number of attendees as the user id... or worse, if we compared on username, there may be a user named Rob and one named RobSmith and we'd match that.
So that's the SQL... and it works... so it shouldn't be too hard to write the rest
Please, when writing the rest, bear in mind whether the event is publicly viewable, i.e. that the calendar that it appears on is viewable.
Question - does anyone know of any easy way to update the mod so that when a user signs up for an event, as opposed to just listing their post name, it actually uses their name as a link to their public profile?
For me that would be a handy feature as even organizers could easily pull the user info from the custom fields in the user profile that I have enabled on the site.
I'm going to play with it and see what I can come up with.
<p><strong>People attending this event</strong>:</p>
<if condition="$rollbits">
<ul>
$rollbits
</ul>
<else />
<p><i>Nobody yet!</i></p>
</if>
<if condition="$bbuserinfo[userid] > 0">
<if condition="$show[userattending]">
[<a href="calendar.php?$session[sessionurl]do=unattend&e=$eventinfo[eventid]">I will no longer be attending this event</a>]
<else />
[<a href="calendar.php?$session[sessionurl]do=attend&e=$eventinfo[eventid]">I will be attending this event</a>]
</if>
</if>
Finally... find and correct the label title for the checkbox in the calendar_edit template... it should be:
Code:
<div><label for="cb_roll"><input type="checkbox" name="useroll" value="1" id="cb_roll" tabindex="3" $useroll />Allow users to specify that they will be attending this event.</label></div>
Some of that may not work in old versions of PHP, you'll have to try it and see
Here it is. This code doesn't include the duplicate member listing fix, so you'll have to implement that, but it's got everything else.