vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Calendar Enhancements - Farcaster's Event Attendance (https://vborg.vbsupport.ru/showthread.php?t=129088)

GrandAmGuru 02-19-2007 12:01 PM

Possible suggestion for a future release:
* set it so admins can go in and edit other members RSVP or comments

Right now I can do it with another hack that lets me login as a member, but it would be nice to be able to edit the RSVP's from the event listing page.

Caster 02-20-2007 12:57 AM

I tried search the thread, but I wasn't able to find anything. I'm trying to let my members RSVP to an event from outside the calendar. I figrued I would just insert the fields into the database myself, but I'm having a little trouble figuring out what "ocdate" is exactly. I was able to find this part in the XML script and I found that that the ocdate field is inserted into the db by the $rsvpdate variable.

PHP Code:

// If the parameter wasn't passed, and this is recurring, get next event from today.
    
if ($eventinfo['recurring'] AND !$rsvpdate) {
        
DEVDEBUG('Fetching date from next event date');
    
        
$gettime TIMENOW  $vbulletin->options['hourdiff']; 

        
// find next occurence within one year.
        
while ($iterations 365)
        {
            
$addcache false;
            
$todaydate getdate($gettime);
            
            if (
cache_event_info($eventinfo$todaydate['mon'], $todaydate['mday'], $todaydate['year'], 1false))
            {
                
$rsvpdate gmmktime(000$todaydate['mon'], $todaydate['mday'], $todaydate['year']);
                
$iterations 999999;
                
DEVDEBUG('Fetched - '.$rsvpdate);
            }

            
$iterations++;
            
$gettime += 86400;
        } 
// end while loop
    
    


I figured that the $gettime is the time and the hour difference, the getdate function puts the unix time into an array and is then converted using gmmktime. What I don't understand is the if statement

PHP Code:

if (cache_event_info($eventinfo$todaydate['mon'], $todaydate['mday'], $todaydate['year'], 1false)) 

and how you're able to find out the next event date (if that matters at all or has anything to do with the "ocdate").

Thanks for the great mod! :D

Farcaster 02-20-2007 01:16 AM

Caster,

ocDate means "Occurrence Date". Since events can be ranged or recurring, the ocDate field is used to determine what date the member was looking at when they RSVP'd. That uniquely ties an RSVP to a day of an event. ocDate is always set to midnight GMT of the day the event, or instance of the event, occurs. Normally, the ocDate can be determined by looking at the "day" parameter from the query string, but if the day isn't passed, the code then attempts to get the date by a couple different methods:
  • If the event is recurring, it looks at the present date and then goes out up to 365 days looking for a recurrence of the event. The first future date the event recurs on will be used.
  • If it is a single day event, then it uses the dateline_from, which is already set to midnight GMT.
  • If the event is ranged, then it is set to midnight GMT of the first day of the event.
All of those methods are only used of a specific day is not specified in the query string.

I hope that helps.

Caster 02-20-2007 01:25 AM

The thing is the events that the members will be rsvping to are all recurring events and I didn't figure out how you found out what day the next event is going to be on.

Edit: Well since they're weekly events, could I figure it out by just multiplying 86400 by 7 (days a week) and adding that to the $gettime?

Thanks for the quick reply as well!

Farcaster 02-20-2007 01:49 AM

Quote:

Originally Posted by Caster (Post 1186429)
I figured that the $gettime is the time and the hour difference, the getdate function puts the unix time into an array and is then converted using gmmktime. What I don't understand is the if statement

PHP Code:

if (cache_event_info($eventinfo$todaydate['mon'], $todaydate['mday'], $todaydate['year'], 1false)) 


In this statement, I am piggybacking on the existing vBulletin functionality. cache_event_info returns true if the event the event array that is passed ($eventinfo) is found to occur on the specified month, day and year that are passed from $todaydate. In order to use this function, you will need to include "functions_calendar.php" in your program.

Caster 02-20-2007 02:22 AM

Oooo okay, I'll give it a shot. Thanks for the help and the mod! =]

Farcaster 02-20-2007 04:52 AM

A new version of the RSVP hack is now available for download. I wish I had the time to get to all of your requests, but I did implement a couple of features which have been heavily requested.

NOTE: This hack may or may not work for 3.5.x. I am no longer supporting that version as I do not have a 3.5.x test board to work with. Only 3.6.x is supported.

Feature: RSVP Moderation
This new feature allows selected user groups and event owners to delete RSVPs from an event. There are two new settings in the options menu that support this feature. "Owner Moderation" allows you to configure whether or not the original event poster will be able to remove RSVPs from their own event, and the option "Moderator Groups" allows you to specify user groups that can remove RSVPs from any event. Sorry, this is not specific to the calendar.

Feature: RSVP Expiration System
By setting the option "RSVP Expiration" to yes (default), event posters can setup the RSVP form to close within a certain time frame before the event start time. The poster can specify a number of days, minutes, hours and seconds. If not otherwise specified, the RSVP will close once the event has started. For single day events, the RSVP form defaults to remain available until the end of the day (11:59pm) and the event expire time will work backwards from that time.

If you do not want events to ever expire, you can turn the entire system off in the options window.

Bug Fix: Changing the date or recurring options of an event now removes all RSVPs.
This resolves a problem where the Email Addon might send a user a false notification about an upcoming event after the event date options had been modified.

ADDED GLOBAL PHRASES
- minutes
- seconds

ADDED CALENDAR PHRASES
- calendar_rsvp_changeby
- calendar_rsvp_maychangeby
- calendar_rsvp_closed
- calendar_rsvp_expires

TEMPLATE CHANGES
- calendar_rsvp_form
- calendar_rsvp_bit

Quantnet 02-20-2007 05:26 AM

updated

WATRD 02-20-2007 01:02 PM

Okay, I am not seeing it, where do I go to moderate RSVP's?

Also, when setting the RSVP expiration, it looks like the word "hours" is missing. I see:

"Time Before Event to Close RSVP: Days Minutes Seconds"

There's a box, but no legend for it. It might be confusing to users.

Farcaster 02-20-2007 01:05 PM

Quote:

Originally Posted by WATRD (Post 1186688)
Okay, I am not seeing it, where do I go to moderate RSVP's?

Also, when setting the RSVP expiration, it looks like the word "hours" is missing. I see:

"Time Before Event to Close RSVP: Days Minutes Seconds"

There's a box, but no legend for it. It might be confusing to users.

WATRD, what version of vBulletin do you run? And, you should see the option to remove RSVPs on the event display screen next to each name.


All times are GMT. The time now is 03:58 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01200 seconds
  • Memory Usage 1,765KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete