The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Event Attendance 2.0 Details »» | |||||||||||||||||||||||||
This is an update version of the vB 3.0x "Event Attendance" hack found HERE. Thanks to Kentaurus for allowing redistribution.
I have rebuild/rewritten the hack for vB 3.5 - now it is no longer a hack but a plugin. No template modifications and no code modifications required. This plugin allows users to enroll for events. When a new event is created, the user can decide if this feature is available for this event. This plugin includes (from the 3.0x Version and Thread):
It does not include (from the old thread):
Additional Features:
Installation:
Known Problems:
If you upgrade from 3.0x:
I list the feature requests here - this does not mean that I will code it. If you are a coder feel free to code it and release it as addon or allow me to include it here.
Please click INSTALL if you like this plugin. Show Your Support
|
Comments |
#192
|
|||
|
|||
Quote:
I am unable to find the ""Display Event Details on Thread Page" Plugin. Does anybody have the same problem? Edit: Somehow I downloaded version 1.2 of this hack. Now I have the correct version and modification is very easy. |
#193
|
|||
|
|||
Quote:
Also, when you enroll, it adds the profile fields, but when you say you will no longer be attending the event, it removes only the username, the profile fields are left behind... Thanks for your efforts! |
#194
|
|||
|
|||
Quote:
Alrighty, now we are gettin somewhere! This works, excepting I'd like to have the profile fields next to the username, the way this is setup, it put's the fields in the same column as the username... FYI, I've also added the variables to the unset area so that when the user removes him/herself from the event, the custom fields also remove, here is the code so far: Code:
//Check time till event $time_until_event=$eventinfo['dateline_from']-(TIMENOW+$vbulletion->userinfo['timezoneoffset']*3600); if ($vbulletin->userinfo['dstonoff']) { $time_until_event=$time_until_event-3600; } //echo $time_until_event." "; $show['enroll']=(($time_until_event>0) || ($vbulletin->options['lateenroll'])) ? true : false; //Enroll/Cancel if ($_REQUEST['ea'] == "attend" || $_REQUEST['ea'] == "unattend" AND ($time_until_event>0 OR $vbulletin->options['lateenroll']) ) { if (!$eventinfo['roll']) { $roll = array(); } else { $roll = @unserialize($eventinfo['roll']); } if ($_REQUEST['ea'] == "attend") { if ($vbulletin->userinfo[userid]) { $roll[$vbulletin->userinfo['userid']] = $vbulletin->userinfo['username']; $roll[$vbulletin->userinfo['field14']] = $vbulletin->userinfo['field14']; } else { print_no_permission(); } } else { if ($vbulletin->userinfo[userid]) { unset($roll[$vbulletin->userinfo['userid']]);unset($roll[$vbulletin->userinfo['field14']]); unset($roll[$vbulletin->userinfo['field15']]); } else { print_no_permission(); } } $eventinfo['roll'] = serialize($roll); $db->query_write("UPDATE ".TABLE_PREFIX."event SET roll='".addslashes($eventinfo['roll'])."' WHERE eventid='".$eventinfo['eventid']."'"); $_REQUEST['do'] = "getinfo"; } //show enrolled people $rollcount=0; if ($eventinfo['useroll']) { // Roll for this event unset($rollbits); $show['userattending'] = false; if (($roll = @unserialize($eventinfo['roll'])) && is_array($roll)) { if ($vbulletin->options['roll_sort']) { uasort($roll, "strnatcasecmp"); } if (array_key_exists($vbulletin->userinfo['userid'], $roll)) { $show['userattending']=true; } while ($rollusername = current($roll)) { $rolluserid = key($roll); eval('$rollbits .= "' . fetch_template('calendar_rollbit') . '";'); $rollcount++; next($roll); } } else { $eventinfo['roll'] = ""; } eval ('$eventinfo[roll] = "' . fetch_template('calendar_roll') . '";'); $eventinfo['event'].=$eventinfo['roll']; // End Roll } else { $eventinfo['roll'] = "";} |
#195
|
|||
|
|||
Oh I love talking to myself!
Thanks for all your help btw! appreciated! Here I finally got what I was after---This allows you to add chosen profile fields next to the username----simply replace field14 with whatever field you are after: Code:
//Check time till event $time_until_event=$eventinfo['dateline_from']-(TIMENOW+$vbulletion->userinfo['timezoneoffset']*3600); if ($vbulletin->userinfo['dstonoff']) { $time_until_event=$time_until_event-3600; } //echo $time_until_event." "; $show['enroll']=(($time_until_event>0) || ($vbulletin->options['lateenroll'])) ? true : false; //Enroll/Cancel if ($_REQUEST['ea'] == "attend" || $_REQUEST['ea'] == "unattend" AND ($time_until_event>0 OR $vbulletin->options['lateenroll']) ) { if (!$eventinfo['roll']) { $roll = array(); } else { $roll = @unserialize($eventinfo['roll']); } if ($_REQUEST['ea'] == "attend") { if ($vbulletin->userinfo[userid]) { $roll[$vbulletin->userinfo['userid']] = $vbulletin->userinfo['username']." __ ".$vbulletin->userinfo['field14']; } else { print_no_permission(); } } else { if ($vbulletin->userinfo[userid]) { unset($roll[$vbulletin->userinfo['userid']]);unset($roll[$vbulletin->userinfo['field14']]); } else { print_no_permission(); } } $eventinfo['roll'] = serialize($roll); $db->query_write("UPDATE ".TABLE_PREFIX."event SET roll='".addslashes($eventinfo['roll'])."' WHERE eventid='".$eventinfo['eventid']."'"); $_REQUEST['do'] = "getinfo"; } //show enrolled people $rollcount=0; if ($eventinfo['useroll']) { // Roll for this event unset($rollbits); $show['userattending'] = false; if (($roll = @unserialize($eventinfo['roll'])) && is_array($roll)) { if ($vbulletin->options['roll_sort']) { uasort($roll, "strnatcasecmp"); } if (array_key_exists($vbulletin->userinfo['userid'], $roll)) { $show['userattending']=true; } while ($rollusername = current($roll)) { $rolluserid = key($roll); eval('$rollbits .= "' . fetch_template('calendar_rollbit') . '";'); $rollcount++; next($roll); } } else { $eventinfo['roll'] = ""; } eval ('$eventinfo[roll] = "' . fetch_template('calendar_roll') . '";'); $eventinfo['event'].=$eventinfo['roll']; // End Roll } else { $eventinfo['roll'] = ""; } |
#196
|
|||
|
|||
Quote:
Your modification is a big step forward, but there are these problems: 1. You have to enable html in the event forum to be able to see the enrolled member list correctly. Otherwise you get this error: https://vborg.vbsupport.ru/showpost....&postcount=185 2. There are no links to attend or unattend the event in showthread. 3. Showthread does not explain "There are 5 people enrolled for this event:", so some users might wonder why those members are listed. 4. There is a javascript error: left corner of the status bar says "error on page". Anyone able to improve this? |
#197
|
|||
|
|||
Quote:
2/3. Very odd, if you refer to my screenshots (which aren't doctored) I definitely have links and text showing the ability to attend/unattend and the phrase "There are # people enrolled for this event:" in Showthread. 4. I don't get a javascript error, I do have other hacks installed. Not sure if something else is conflicting. |
#198
|
|||
|
|||
Which screen shots do you mean? Those of post 172?(https://vborg.vbsupport.ru/showpost....&postcount=172)
Don' t they show the calendar view only? That is working without problem for me, too, but the showthread view in the forum does not show those links and the explanation. I think that is the reason for the javascript error on my installation, because when I disable both hacks (attendance and event forums) the error is not present any more. |
#199
|
|||
|
|||
Cool! Allowing html fixed the one problem.
I do see the same 2, 3 and 4 issues, though. javascript error text is: Line: 66 Char: 3 Error: 'vB_Editor[...]' is null or not an object. Code: 0 URL: http://www.sitename.com/forums/showthread.php?t=8814 |
#200
|
||||
|
||||
Quote:
1. had to enable HTML & Moderate Threads options in event forum. so that i can view if any member included any bad html code for 2 & 3. Just did this tweak.. in templates 'calendar_roll' find: Code:
$vbphrase[roll_cancel] Code:
I will no longer be attending this event
Code:
$vbphrase[roll_enroll] Code:
I will be attending this event
Code:
$vbphrase[roll_nobody] Code:
Nobody yet Code:
<phrase 1="$rollcount">$vbphrase[roll_text]</phrase> Code:
There are $rollcount people enrolled for this event:
|
#201
|
|||
|
|||
The replacement of the phrases is a workaround for single language forums, but I have two languages installed... It is not a big problem, since most users are using the default language anyway. But somehow I am not satisfied with this solution.
And it does not help solving to show the number of enrolled people. If anybody does not need the amount of enrolled users, you should just replace the phrase with "these people are enrolled for this event". |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|