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
Automatic Calendar Reminders Details »»
Automatic Calendar Reminders
Version: 1.0.3b, by Farcaster Farcaster is offline
Developer Last Online: Jun 2014 Show Printable Version Email this Page

Version: 3.5.4 Rating:
Released: 09-25-2006 Last Update: 09-27-2006 Installs: 7
DB Changes Uses Plugins Template Edits
Code Changes  
No support by the author.

For 3.5.x version only.
For a 3.6.x version, go here

What does it do?

This hack allows your members to receive automatic reminders for all upcoming events in one or more calendars of their choice without having to request individual reminders for each event. In effect, this operates like a subscription to a calendar.

How does it work?

When opening a calendar, the user will be presented with an option just under the calendar title to subscribe or unsubscribe to the calendar. Members can request automatic reminders for all events on the calendar for one, two or three days in advance. Once per day, a digest of all upcoming events will be sent to the user advising them of upcoming events in the time frame they chose. (see attached screenshot)

Users can also unsubscribe from a calendar by going to the UserCP and Event Reminders section (see attached screenshot)

Example Email (uses the event reminder email template):
Quote:
Dear Farcaster,

The following events are scheduled to begin soon at YOUR FORUM NAME.

Upcoming events:
************
Test Event 1 (In less than 23 hour(s))
http://YOUR_URL_HERE/calendar.php?do=getinfo&e=1
In Calendar: Calendar #1 Name
************
Test Event 3 (In less than 47 hour(s))
http://YOUR_URL_HERE/calendar.php?do=getinfo&e=3
In Calendar: Calendar #2 Name
************
Test Event 2 (In less than 47 hour(s))
http://YOUR_URL_HERE/calendar.php?do=getinfo&e=2
In Calendar: Calendar #3 Name


All the best,
YOUR FORUM NAME

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unsubscription information:

To unsubscribe from this email, please visit this page and delete any future reminders:
http://YOUR_URL_HERE/calendar.php?do=viewreminder
Upgrading from previous version:
You do not need to uninstall the previous version.

To upgrade from previous version to 1.0.3b:

1. Remove the Calendar Subscription cron job if it exists.
2. Delete the file includes/cron/calendar_reminder.php
3. Make the changes to the reminder.php file as specified in the instructions below.


Installation Instructions
- 1 XML upload
- 1 template modification
- 1 file edit

1. Use the Product Manager to import the product file product-rah_calendar_autoremind_1_0_3b.xml

3. Use the Style Manager to add the following code to the bottom of your CALENDAR_REMINDER template:
HTML Code:
<!-- calendar subscriptions table -->
<br />
<form action="calendar.php?do=dosubscriptions" method="post" name="unsubscribe">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="do" value="dosubscriptions" />


<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
    <td class="tcat" colspan="3">
        Calendar Subscriptions
    </td>
</tr>
<if condition="$show['havesubscriptions']">
<tr>
    <td class="thead">
        Calendar
    </td>
    <td class="thead" nowrap="nowrap"><a href="$sorturl&order=asc&sort=reminder">$vbphrase[reminder]</a> $sortarrow[reminder]</td>
    <td class="thead" align="center"><input name="allbox" type="checkbox" value="Check All" title="$vbphrase[check_uncheck_all]" onclick="checkall(this.form);" /></td>
</tr>
$subscriptionbits
<tr>
    <td class="tfoot" colspan="5" align="$stylevar[right]"><div class="smallfont">
        
        $vbphrase[selected_events]
        <select name="what">
            <optgroup label="$vbphrase[delete_reminders]">
                <option value="delete">$vbphrase[delete]</option>
            </optgroup>                            
        </select>$gobutton
        
    </div></td>
</tr>
<else />
    <tr>
        <td class="alt1" align="center" colspan="5">
            <br />
            You have no calendar subscriptions.
            <br />
            <br />
        </td>
    </tr>
</if>
</table>

</form>
4. Open a copy of the includes/cron/reminder.php file and find the following:
PHP Code:
AND event.visible 
"); 
Replace with the following:
PHP Code:
AND event.visible 
".$calendar_subscription); 
Above that, near the top of the reminder.php file, find:
PHP Code:
$eventlist = array(); 
$eventcache = array(); 
$userinfo = array(); 
Below that add:
PHP Code:
$dsq $vbulletin->db->query_read(
        SELECT     * 
        FROM     " 
TABLE_PREFIX "datastore 
        WHERE     title = 'lastautoremind' 
"
); 
$ds $vbulletin->db->fetch_array($dsq); 

$daynumber round($timenow/86400); 

    if (
$ds['data'] < $daynumber) {
        
build_datastore('lastautoremind',$daynumber);

        
$calendar_subscription "UNION ALL
        SELECT event.eventid, event.title, recurring, recuroption, dateline_from, dateline_to, IF (dateline_to = 0, 1, 0) AS singleday,
            dateline_from AS dateline_from_user, dateline_to AS dateline_to_user, utc, recurring, recuroption, event.calendarid,
            subscribecalendar.userid, 0 as lastreminder, 0 as subscribeeventid, subscribecalendar.reminder,
            user.email, user.languageid, user.usergroupid, user.username, user.timezoneoffset, IF(user.options & 128, 1, 0) AS dstonoff,
            calendar.title AS calendar_title
        FROM " 
TABLE_PREFIX "event AS event
        INNER JOIN " 
TABLE_PREFIX "subscribecalendar AS subscribecalendar ON (subscribecalendar.calendarid = event.calendarid)
        INNER JOIN " 
TABLE_PREFIX "user AS user ON (user.userid = subscribecalendar.userid)
        LEFT JOIN " 
TABLE_PREFIX "calendar AS calendar ON (event.calendarid = calendar.calendarid)
        WHERE ((dateline_to >= 
$beginday AND dateline_from < $endday) OR (dateline_to = 0 AND dateline_from >= $beginday AND dateline_from <= $endday ))
            AND event.visible = 1"
;
    } 
(Note: If a user chooses to receive a reminder 3 days in advance, they will receive a daily reminder on each day from the 3 days out to 1 day out)

And, that's it. I hope you enjoy. Please click "install" if you use this hack.

I have not tested this with 3.6.1 yet, but there shouldn't be any reason it won't work with it.

Revision History
Version 1.0.2b - Initial Release for version 3.5.x forums
Version 1.0.3b - Removed calendar_reminder.php and merged email code with existing reminder.php.

This version WILL NOT work with 3.6.x. For a 3.6.x version, go here.

Show Your Support

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

Comments
  #2  
Old 09-26-2006, 12:03 PM
bada_bing's Avatar
bada_bing bada_bing is offline
 
Join Date: Feb 2004
Location: Michigan
Posts: 1,698
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is awesome... I would like to request an additional feature to adhance the features of this already great hack. Currently a member had to subscribe to a specific calandar if you have multiple caladars on your forum which is nice BUT when the member does this they get a reminder of all the events on that calandar which can be bad if you have a busy calandar with lots of events, this can become overwelming for someone and will ptentiall shy away from using this feature.

So with all that said what would be nice is to have an event reminder option for each event. Either when in calandar mode it shows a list of all the events and the member can click on that event and choose remind me within xxxx days,weeks,hours,years.

Doing this will make this calandar reminder hack superb! Like myself I would never subscribe to a calandar with events I dont care about just so that I can get reminded of one event I really want. BUT if I can get reminded of the event of my choice then now your talking..

If this feature is released on the next version I will install....

Thanks
Reply With Quote
  #3  
Old 09-26-2006, 03:42 PM
Farcaster Farcaster is offline
 
Join Date: Dec 2005
Posts: 386
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am still a little lost on this request, Bada. Out of the box, vBulletin lets members request reminders for specific events for anywhere between one hour and three days. A cron job is run every half hour to do that. How would what your requesting be different than what vBulletin already does?
Reply With Quote
  #4  
Old 09-26-2006, 03:49 PM
GrandAmGuru's Avatar
GrandAmGuru GrandAmGuru is offline
 
Join Date: Jan 2002
Location: Cary, IL
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just to clarify, I have the Event Attendance hack installed. Does your hack send a reminder for EVERY upcoming event on a specific calendar, or does it send them for just the ones you've RSVP'd to?

What I'm hoping to get (and I think bada_bing is asking the same thing) is a reminder email that only includes a listing of events they have RSVP'd to.
Reply With Quote
  #5  
Old 09-26-2006, 04:05 PM
bada_bing's Avatar
bada_bing bada_bing is offline
 
Join Date: Feb 2004
Location: Michigan
Posts: 1,698
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Farcaster
I am still a little lost on this request, Bada. Out of the box, vBulletin lets members request reminders for specific events for anywhere between one hour and three days. A cron job is run every half hour to do that. How would what your requesting be different than what vBulletin already does?
Farcaster ,
You are 100% correct.. Duuu I forgot that that was a feature that was built in VB. So basically the difference between VB out of the box method of sending a request per entry your hack allows the user to be notified for every event on the calandar?
Reply With Quote
  #6  
Old 09-26-2006, 05:16 PM
Farcaster Farcaster is offline
 
Join Date: Dec 2005
Posts: 386
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That's exactly it. It functions kind of like you'd expect a calendar version of the forum subscription to work. It allows a member to be notified of everything that's coming up rather than having to go and subscribe to every event they might be interested in. It all comes in a kind of digest format like the sample message I posted.
Reply With Quote
  #7  
Old 09-26-2006, 05:19 PM
Farcaster Farcaster is offline
 
Join Date: Dec 2005
Posts: 386
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by GrandAmGuru
Just to clarify, I have the Event Attendance hack installed. Does your hack send a reminder for EVERY upcoming event on a specific calendar, or does it send them for just the ones you've RSVP'd to?

What I'm hoping to get (and I think bada_bing is asking the same thing) is a reminder email that only includes a listing of events they have RSVP'd to.

Ah.. It does not interfere with the Event Attendance hack, but neither does it work in conjunction. This hack will send out a notification to every event that occurs on the calendar. But, that is a pretty good idea. I might add that to a future revision -- although, I am planning my own version of the Event Attendance as well that allows my members to RSVP "Yes," "No," or "Tentative," and will handle recurring events.
Reply With Quote
  #8  
Old 09-26-2006, 05:42 PM
GrandAmGuru's Avatar
GrandAmGuru GrandAmGuru is offline
 
Join Date: Jan 2002
Location: Cary, IL
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Farcaster
But, that is a pretty good idea. I might add that to a future revision -- although, I am planning my own version of the Event Attendance as well that allows my members to RSVP "Yes," "No," or "Tentative," and will handle recurring events.

holy crap, that's exactly what I'm looking for.. I'm willing to send a lil scratch your way if that helps expedite it.
Reply With Quote
  #9  
Old 09-28-2006, 04:25 PM
Farcaster Farcaster is offline
 
Join Date: Dec 2005
Posts: 386
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This hack has been updated to merge the calendar_reminder.php file with the existing reminder.php file. No new functionality has been added in this revision.

Quote:
Originally Posted by GrandAmGuru
holy crap, that's exactly what I'm looking for.. I'm willing to send a lil scratch your way if that helps expedite it.
It is one of the items at the top of my list. It'll probably be the next public hack I write.
Reply With Quote
  #10  
Old 09-28-2006, 04:50 PM
apdcanari apdcanari is offline
 
Join Date: May 2005
Location: Belgique
Posts: 97
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have this error ? :surprised:

Fatal error: Call to undefined function: query_read_slave() in /home/www/24bafe388801b7a495b70129f0b529c5/web/forum/calendar.php(2106) : eval()'d code on line 2
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 12:03 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.04838 seconds
  • Memory Usage 2,336KB
  • Queries Executed 23 (?)
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
  • (1)bbcode_html
  • (4)bbcode_php
  • (5)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
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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