Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Event Attendance 2.0 Details »»
Event Attendance 2.0
Version: 2.00, by arpy arpy is offline
Developer Last Online: Mar 2014 Show Printable Version Email this Page

Version: 3.5.0 RC2 Rating:
Released: 08-06-2005 Last Update: Never Installs: 427
DB Changes Uses Plugins
 
No support by the author.

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):



  • Links to userprofile (by buro9)
  • Counter for enrolled users (by Sanni)
  • and most (all?) fixes from old version
  • no additional queries! (for reading, if you enroll/cancel there is one additional query)

It does not include (from the old thread):
  • Fix for reoccuring events (complete redesign needed)
  • Addon for guest-count (I don't need this, feel free to re-add)

Additional Features:
  • Event Attendance can be deactivated for reoccuring events (see Options in AdminCP)
  • Enroll/Cancel can be deactivated for events that are already started (AdminCP)
  • Sorting of enrolled people can be switched via AdminCP
  • All text is now in phrases

Installation:
  • Go to ACP/ Plugin System/ Manage Products.
  • Click Add/Import Product, select the product XML File you downloaded here and click Import.
  • Thats all - Have fun!

Known Problems:
  • calendar_roll and calendar_rollbit templates are not cached. I've not found a way to do this by using a plugin. But this is not really an issue.
  • Aug. 24th: Bug found by endquote in post#36: Typo in var name, this will cause Event enrollment to be disable at the wrong time (depending on time zome). Will be fixed in next release.

If you upgrade from 3.0x:
  • This plugin is fully database compatible to the old hack, if you upgrade no data will be lost.
  • You need to revert your calendar templates: calendar_showeventsbit, calendar_roll and calendar_rollbit.
  • If you do not want to revert your calendar_weekly_event and calendar_monthly_event please use "Mark enrolled in month/weekly view"=NO in Event Attendance Options to avoid event to be marked twice ("*").
Feature Requests:
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.

  • Change text after event is over. (Post #21) (very likely)
  • "It would be better if the plugin wouldn't let you add yourself after it's ended rather than started." (Post #35) (very likely)
  • "Another suggestion would be to have an admin option to just set all events to have the attendance functionality, rather than providing an option when posting." (Post #35) (very likely)
  • List of attended events in User Profile (Post #11) (maybe later)
  • CVS-Export of attending users (Post #8) (unlikely)
Aug. 15th: Beta-Tag removed, no code changes.

Please click INSTALL if you like this plugin.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #212  
Old 06-23-2006, 02:55 AM
Tyegurl's Avatar
Tyegurl Tyegurl is offline
 
Join Date: Mar 2006
Location: NY
Posts: 480
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can someone update this for 3.6.0? i have it installed the only thing i can see that it is missing are the 2 links to enroll or unenroll....
Reply With Quote
  #213  
Old 06-26-2006, 05:44 AM
Lqd's Avatar
Lqd Lqd is offline
 
Join Date: Apr 2006
Location: In a house.
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lqd
It seems everybody loves this hack and the Event forums hack...

Still no-one is able to do it. (No disrespect towards TomasDR, I just do not wish to enable html)

So maybe we need to encourage people a bit more...

I suggest we all dump a few quaters in a box and offer the box to the magician who is able to put this together like the event attendance is 100% functional on the tread and not the calendar.

So let's start...

I'll add $5 in the box too start. I'll send it over paypal once it is done.

Total in the box: $5 (please copy in next post)
anyone?
Reply With Quote
  #214  
Old 06-29-2006, 02:55 PM
louis_chypher's Avatar
louis_chypher louis_chypher is offline
 
Join Date: Mar 2006
Location: Boise, Idaho
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

To allow an attendee to input an attendence count I did the following:


Template Edits

In calendar_showeventsbit

find (near top):
Code:
<form action="calendar.php" method="post" >
change to:
Code:
<form action="calendar.php" method="post" name="calendar_showeventsbit">
In calendar_roll

replace entire contents with:
Code:
<p><strong><phrase 1="$rollcount">$vbphrase[roll_text]</phrase></strong></p>
<if condition="$rollbits">
<ul>
$rollbits
</ul>
<else />
<p><i>$vbphrase[roll_nobody]</i></p>
</if>

<if condition="$bbuserinfo[userid] > 0 && $show[enroll]">
<if condition="$show[userattending]">
<a href="calendar.php?$session[sessionurl]do=getinfo&amp;ea=unattend&amp;e=$eventinfo[eventid]">$vbphrase[roll_cancel]</a>]
<else />
<input type="text" name="partycount" onkeyup="doAttendCount();">
<input type="hidden" name="pc_surl" value="$session[sessionurl]">
<input type="hidden" name="pc_eventid" value="$eventinfo[eventid]">
<input type="hidden" name="pc_pharse" value="$vbphrase[roll_enroll]">
</br>
<div id="attendlink">
<a 
href="calendar.php?$session[sessionurl]do=getinfo&amp;ea=attend&amp;e=$eventinfo[eventid]">$vbphrase[roll_enroll]</a>
</div>
</br>


<script language="javascript">

function doAttendCount()
{
var sVar;
sVar= '<a href="calendar.php?'+document.calendar_showeventsbit.pc_surl.value+ 'do=getinfo&amp;ea=attend&amp;e='+
document.calendar_showeventsbit.pc_eventid.value +
'&amp;pc=' +
document.calendar_showeventsbit.partycount.value+'">' +
document.calendar_showeventsbit.pc_pharse.value+'</a>';
document.getElementById("attendlink").innerHTML = sVar;
}


</script>

</if>
</if>

In Plugin System | Plugin Manager

Edit: Event Attendance - show/enroll

Find:
Code:
 ($vbulletin->options['lateenroll'])) ? true : false;
Add below:
Code:
$inparty = $_REQUEST['pc'];

if ($inparty == "")
{
 $inparty = "1";
}
if (!(is_numeric($inparty)))
{
$inparty="1";
}
Find:

Code:
$roll[$vbulletin->userinfo['userid']] = $vbulletin->userinfo['username']
change to:
Code:
$roll[$vbulletin->userinfo['userid']] = $vbulletin->userinfo['username'] . ", " . $inparty;
If you'd like to be sent an email when someone signs up for an event then under

Code:
 $roll[$vbulletin->userinfo['userid']] = $vbulletin->userinfo['username'] . ", " . $inparty;
add:

Code:
vbmail("youremailaddress@yourdomainname.com", "Attend " . $eventinfo['title'], "Alias: " 
. $vbulletin->userinfo['username'] . " will be attending " . $eventinfo['event'] . 
" Party count =" . $inparty, 
false, $vbulletin->userinfo['email'], '', $vbulletin->userinfo['username']);
to properly display attendace count find:

Code:
$rollcount++;
replace with:

Code:
list($usrName, $pcount)=split(",",$rollusername);
$rollcount=$rollcount + $pcount;

Oh! and if you do use the send email do not forget to set the email address you want the event sent to.
Reply With Quote
  #215  
Old 06-29-2006, 03:16 PM
Lqd's Avatar
Lqd Lqd is offline
 
Join Date: Apr 2006
Location: In a house.
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by louis_chypher
To allow an attendee to input an attendence count I did the following:

Code:
Template Edits

In calendar_showeventsbit

find (near top):

<form action="calendar.php" method="post" >

change to:

<form action="calendar.php" method="post" name="calendar_showeventsbit">

In calendar_roll

replace entire contents with:

<p><strong><phrase 1="$rollcount">$vbphrase[roll_text]</phrase></strong></p>
<if condition="$rollbits">
<ul>
$rollbits
</ul>
<else />
<p><i>$vbphrase[roll_nobody]</i></p>
</if>

<if condition="$bbuserinfo[userid] > 0 && $show[enroll]">
<if condition="$show[userattending]">
<a href="calendar.php?$session[sessionurl]do=getinfo&amp;ea=unattend&amp;e=$eventinfo[eventid]">$vbphrase[roll_cancel]</a>]
<else />
<!-- Number in Party field -->
<input type="text" name="partycount" onkeyup="doAttend();">
<input type="hidden" name="pc_surl" value="$session[sessionurl]">
<input type="hidden" name="pc_eventid" value="$eventinfo[eventid]">
<input type="hidden" name="pc_pharse" value="$vbphrase[roll_enroll]">
</br>
<div id="attendlink">
<a 
href="calendar.php?$session[sessionurl]do=getinfo&amp;ea=attend&amp;e=$eventinfo[eventid]">$vbphrase[roll_enroll]</a>
</div>
</br>


<script language="javascript">

function doAttend()
{
var sVar;
sVar= '<a href="calendar.php?'+document.calendar_showeventsbit.pc_surl.value+ 'do=getinfo&amp;ea=attend&amp;e='+
document.calendar_showeventsbit.pc_eventid.value +
'&amp;pc=' +
document.calendar_showeventsbit.partycount.value+'">' +
document.calendar_showeventsbit.pc_pharse.value+'</a>';
document.getElementById("attendlink").innerHTML = sVar;
}


</script>

<!-- / Number in Party field -->
</if>
</if>
In Plugin System | Plugin Manager

Code:
In Plugin System | Plugin Manager

Edit: Event Attendance - show/enroll

Find: ($vbulletin->options['lateenroll'])) ? true : false;

Add below:

$inparty = $_REQUEST['pc'];

if ($inparty == "")
{
 $inparty = "1";
}


Find:


$roll[$vbulletin->userinfo['userid']] = $vbulletin->userinfo['username'] 

change to: 

$roll[$vbulletin->userinfo['userid']] = $vbulletin->userinfo['username'] . ", " . $inparty;

If you did the email mod:


then replace with(goes under > $roll[$vbulletin->userinfo['userid']] = $vbulletin->userinfo['username'] . ", " . $inparty;:

vbmail("youremailaddress@yourdomainname.com", "Attend " . $eventinfo['title'], "Alias: " 
. $vbulletin->userinfo['username'] . " will be attending " . $eventinfo['event'] . 
" Party count =" . $inparty, 
false, $vbulletin->userinfo['email'], '', $vbulletin->userinfo['username']);
I will work on getting the proper attendee count to appear on the event page .
What does this do?
Reply With Quote
  #216  
Old 06-29-2006, 03:28 PM
louis_chypher's Avatar
louis_chypher louis_chypher is offline
 
Join Date: Mar 2006
Location: Boise, Idaho
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lqd
What does this do?

It puts an input box on the screen that enables the antendee to enter a number in party.
Reply With Quote
  #217  
Old 06-29-2006, 03:58 PM
Tyegurl's Avatar
Tyegurl Tyegurl is offline
 
Join Date: Mar 2006
Location: NY
Posts: 480
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Tyegurl
can someone update this for 3.6.0? i have it installed the only thing i can see that it is missing are the 2 links to enroll or unenroll....
guess i shouldn't work on things when i am tired....disreagard the above quote from the above post lmao!
Reply With Quote
  #218  
Old 07-03-2006, 12:39 PM
andreamarucci's Avatar
andreamarucci andreamarucci is offline
 
Join Date: Nov 2005
Posts: 254
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! I've made the modifications and everything work flawlessly The only thing I wasn't able to do was to find "$rollcount++;" but I'll search more deeply...

Thanks again
Reply With Quote
  #219  
Old 07-03-2006, 03:00 PM
andreamarucci's Avatar
andreamarucci andreamarucci is offline
 
Join Date: Nov 2005
Posts: 254
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Found a bug I think. The system work but the total number of people is always 1 for one person also if this person will attend in 2 or 3. For example

Andrea, 2
Tony, 3
John, 2

Will show as "There will be 3 people attending" and not "There will be 7 people attending".

What do you think? Maybe is because I've not modified $rollcount++; ?
Reply With Quote
  #220  
Old 07-03-2006, 03:06 PM
andreamarucci's Avatar
andreamarucci andreamarucci is offline
 
Join Date: Nov 2005
Posts: 254
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Forget about my last post. Was because I have not updated $rollcount++

Wonderful work!!!!!!
Reply With Quote
  #221  
Old 07-03-2006, 06:35 PM
andreamarucci's Avatar
andreamarucci andreamarucci is offline
 
Join Date: Nov 2005
Posts: 254
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

louis_chypher has done a wonderful work and everyhting is working very very well.

I've a suggestion for you...

Instead of putting a text field where the user input the number, will be possible to have a popup menu with only the available values?

I run a bikers club and when the people subscribe to the event, they could be just one or two people per bike so I would like to have a popup menu with the values of 1 or 2 so nobody can input numbers like 1.5 or -12 or 500...

I suppose, but maybe I'm wrong that this is the code that draw the input box

Code:
<input type="text" name="partycount" onkeyup="doAttendCount();">
So I think that if I put this code instead of the one above

Code:
<select name="partycount" size="1">
		<option>Number of people</option>
		<option value="1">1</option>
		<option value="2">2</option>
	</select>
A popup menu will appear. The problem is where to put onkeyup="doAttendCount();" ?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:51 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05400 seconds
  • Memory Usage 2,336KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (15)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete