Events Calendar simple integration w/ Google
Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums Modifications
Forum Description: Mod's and Add-on's for Web Wiz Forums.
URL: https://forums.webwiz.net/forum_posts.asp?TID=30868
Printed Date: 29 March 2026 at 4:22am Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com
Topic: Events Calendar simple integration w/ Google
Posted By: alabamatoy
Subject: Events Calendar simple integration w/ Google
Date Posted: 27 October 2013 at 2:47pm
modification to add a "add to your google calendar" button to events.
modified file is Forum_posts.asp
Insert at about line 155 the following:
Dim strGoogleCalendar
Insert at approx line 1055, after the line "If isDate(dtmEventDateEnd) Then Response.Write(" - " & stdDateFormat(dtmEventDateEnd, False))" the following:
strGoogleCalendar = right(dtmEventDate,4)
if len(dtmEventDate) = 10 then strGoogleCalendar = strGoogleCalendar & mid(dtmEventDate, 1, 2) & mid(dtmEventDate, 4, 2) else if len(dtmEventDate) = 9 then if mid(dtmEventDate,2,1) = "/" then strGoogleCalendar = strGoogleCalendar & "0" & mid(dtmEventDate, 1, 1) & mid(dtmEventDate, 3, 2) else strGoogleCalendar = strGoogleCalendar & mid(dtmEventDate, 1, 2) & "0" & mid(dtmEventDate, 4, 1) end if else strGoogleCalendar = strGoogleCalendar & "0" & mid(dtmEventDate, 1, 1) & "0" & mid(dtmEventDate, 3, 1) end if End if if isDate(dtmEventDateEnd) then
strGoogleCalendar = strGoogleCalendar & "/" & right(dtmEventDateEnd,4)
if len(dtmEventDateEnd) = 10 then strGoogleCalendar = strGoogleCalendar & mid(dtmEventDateEnd, 1, 2) & mid(dtmEventDateEnd, 4, 2) else if len(dtmEventDateEnd) = 9 then if mid(dtmEventDateEnd,2,1) = "/" then strGoogleCalendar = strGoogleCalendar & "0" & mid(dtmEventDateEnd, 1, 1) & mid(dtmEventDateEnd, 3, 2) else strGoogleCalendar = strGoogleCalendar & mid(dtmEventDateEnd, 1, 2) & "0" & mid(dtmEventDateEnd, 4, 1) end if else strGoogleCalendar = strGoogleCalendar & "0" & mid(dtmEventDateEnd, 1, 1) & "0" & mid(dtmEventDateEnd, 3, 1) end if end if else strGoogleCalendar = strGoogleCalendar & "/" & strGoogleCalendar End if strGoogleCalendar = "<a href=""http://www.google.com/calendar/event?action=TEMPLATE&text=" & strSubject & "&dates=" & strGoogleCalendar strGoogleCalendar = strGoogleCalendar & "&details=" & strForumPath & strLinkPage & """ target=""_blank"" title=""Add this event to your Google Calendar!""><img src=""//www.google.com/calendar/images/ext/gc_button6.gif"" border=0 alt=""Add this event to your Google Calendar!""></a>"
Response.Write(" " & strGoogleCalendar)
This will add an icon at the end of an event display subject line that looks like and is hyperlinked to the user's personal google calendar with the correct start and end date of the event, correct subject, and a description that includes a link back to the original event posting on the webwiz forum.
If I have stepped outside of what's allowed or this is inappropriate modification, I apologize in advance. I hope this mod is useful to someone else.
|
Replies:
Posted By: alabamatoy
Date Posted: 26 January 2017 at 9:08pm
Webwiz - apparently the latest major version breaks this mod. We would like it reimplemented (its something we use a lot), but I havent taken the time to figure out what's wrong, so its gone from the version we have hosted on your service.
Is there any intent to roll this into a near-term release? I dont want to waste my time trying to get this working again if yall are going to do it for me....and you will probably implement it much better than I will....
???
|
Posted By: WebWiz-Bruce
Date Posted: 27 January 2017 at 8:03am
If there is time will look at it, but there is nothing stopping you from providing the code to include in the next release.
------------- https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting
|
Posted By: alabamatoy
Date Posted: 27 January 2017 at 1:55pm
WebWiz-Bruce wrote:
If there is time will look at it, but there is nothing stopping you from providing the code to include in the next release.
|
Well, <ahem> I thought that's what I was doing with the original 2013 post, but it was not incorporated into the code base going forward.
I will try to get it working in the current version and repost the new code. It may be a few weeks. Do you have a deadline for the next release?
|
Posted By: WebWiz-Bruce
Date Posted: 27 January 2017 at 4:01pm
Not at the present time
------------- https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting
|
Posted By: alabamatoy
Date Posted: 04 February 2017 at 12:37am
UPDATED! This is based on version 11.06
Modification to add a "add to google calendar" button to events. User can click on the button and a draft event on the uers personal calendar will be created. User can modify it, toss it, save it whatever.
Modified file is Forum_posts.asp
Insert after line 155 the following:
Dim strGoogleCalendar
Insert at approx line 1061 (including the added line above), after the line "If isDate(dtmEventDateEnd) Then Response.Write(" - " & stdDateFormat(dtmEventDateEnd, False))" the following:
'added to support google calendar integration
'Google calendar api requires full day events to end on the day after they start, so 'set event end to either 1 day after date of the event for single day events 'or 1 day after the specified end date if multiday event
If not isDate(dtmEventDateEnd) Then dtmEventDateEnd = DateAdd("d",1,dtmEventDate) else dtmEventDateEnd = DateAdd("d",1,dtmEventDateEnd) end if
'provide correctly formatted date yyyymmdd for calendar API from start date strGoogleCalendar = cstr(datepart("yyyy",dtmEventDate)) if datepart("m",dtmEventDate) <= 9 then strGoogleCalendar = strGoogleCalendar & "0" & cstr(datepart("m",dtmEventDate)) else strGoogleCalendar = strGoogleCalendar & cstr(datepart("m",dtmEventDate)) end if if datepart("d",dtmEventDate) <= 9 then strGoogleCalendar = strGoogleCalendar & "0" & cstr(datepart("d",dtmEventDate)) else strGoogleCalendar = strGoogleCalendar & cstr(datepart("d",dtmEventDate)) end if
'Add a slash strGoogleCalendar = strGoogleCalendar & "/"
'Provide correctly formatted end date strGoogleCalendar = strGoogleCalendar & cstr(datepart("yyyy",dtmEventDate)) if datepart("m",dtmEventDateEnd) <= 9 then strGoogleCalendar = strGoogleCalendar & "0" & cstr(datepart("m",dtmEventDateEnd)) else strGoogleCalendar = strGoogleCalendar & cstr(datepart("m",dtmEventDateEnd)) end if if datepart("d",dtmEventDateEnd) <= 9 then strGoogleCalendar = strGoogleCalendar & "0" & cstr(datepart("d",dtmEventDateEnd)) else strGoogleCalendar = strGoogleCalendar & cstr(datepart("d",dtmEventDateEnd)) end if
'Create the HTML string for the API call, and write it to browser strGoogleCalendar = "<a href=""http://www.google.com/calendar/event?action=TEMPLATE&text=" & strSubject & "&dates=" & strGoogleCalendar strGoogleCalendar = strGoogleCalendar & "&details=" & strForumPath & strLinkPage & """ target=""_blank"" title=""Add this event to your Google Calendar!""><img src=""//www.google.com/calendar/images/ext/gc_button6.gif"" border=0 alt=""Add this event to your Google Calendar!""></a>" Response.Write(" " & strGoogleCalendar)
'end of additional code for google calendar integration
This will add an icon at the end of an event display subject line that looks like and is hyperlinked to the user's personal google calendar with the correct start and end date of the event, correct subject, and a description that includes a link back to the original event posting on the webwiz forum.
Please include in next release after you have suitably tested it.
|
Posted By: WebWiz-Bruce
Date Posted: 06 February 2017 at 12:24pm
Looks good will look at adding it.
What date format does it use?
It looks like an ISO date in which case the forums built in function internationalDateTime() should be able to format the date by just using;
strGoogleCalendar = strGoogleCalendar & cstr(internationalDateTime(dtmEventDateEnd))
|
------------- https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting
|
Posted By: alabamatoy
Date Posted: 06 February 2017 at 1:30pm
It uses yyyymmdd but the year and date must have a leading zero when less than 10. If the built-in function will do that, then it will shave off a bunch of code. I will attempt to implement it that way, but it will be a couple days before I can get to it.
|
Posted By: WebWiz-Bruce
Date Posted: 06 February 2017 at 2:37pm
Yes it does use the ISO date yyyy-mm-dd with leading 0's but does also include the time.
If it is looking for the ISO date then it should work as it is a standard.
------------- https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting
|
Posted By: alabamatoy
Date Posted: 20 February 2017 at 6:35pm
I have found a javascript capability that provides a little dropdown which implements add to google, yahoo, Apple and Outlook calendars, all in one script. It essentially replicates the "evenbrite" capability. I am looking into what is necessary to integrate that. It would be more useful than just the google calendar. http://github.com/carlsednaoui/add-to-calendar-buttons" rel="nofollow - https://github.com/carlsednaoui/add-to-calendar-buttons
|
Posted By: WebWiz-Bruce
Date Posted: 22 February 2017 at 8:05am
Looks very good, you would need to have this as a mod though rather than being included in Web Wiz Forums due to the licensing.
------------- https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting
|
Posted By: rune
Date Posted: 22 February 2017 at 6:25pm
Actually, I don't think licensing would be a problem.
OuiCal is under MIT license, which basically allows you to do anything you like. The only requirement is to include a copy of the license somewhere.
|
Posted By: alabamatoy
Date Posted: 22 February 2017 at 6:39pm
I have implemented this on our Webwiz site. Here is an example with the calendar integration: http://www.rocketcityrockcrawlers.com/forum/nws-severe-storm-spotter-class_topic12095.html" rel="nofollow - http://www.rocketcityrockcrawlers.com/forum/nws-severe-storm-spotter-class_topic12095.html you should see the link text immediately below the post subject.
However, my friend with a Mac is telling me that he doesnt see it, and my locked down IE is not seeing it. My Firefox on several different machines DOES see it however. So I still have some TS to do, it would seem. Any thoughts on this would be appreciated.
|
Posted By: rune
Date Posted: 22 February 2017 at 6:55pm
@alabamatoy Your demo works for me, using Chrome for Android and Firefox for Android.
A small detail is that Chrome shows a "desktop site" warning when I choose Google Calendar. Firefox opens the desktop gcal without warning about it.
|
Posted By: alabamatoy
Date Posted: 22 February 2017 at 6:58pm
rune wrote:
Actually, I don't think licensing would be a problem.
OuiCal is under MIT license, which basically allows you to do anything you like. The only requirement is to include a copy of the license somewhere.
|
After reading it, I would agree. I'm no lawyer, but it seems pretty clear:
"Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software."
|
Posted By: rune
Date Posted: 22 February 2017 at 7:02pm
Maybe your friend and your IE have some old data cached?
|
Posted By: alabamatoy
Date Posted: 22 February 2017 at 7:14pm
rune wrote:
Maybe your friend and your IE have some old data cached? |
I dont think so. I must have something messed up in the actual HTML. The other browsers show the ouical example, but not my implementation.
|
Posted By: PlainPlounder
Date Posted: 23 February 2017 at 4:41am
|
Create a Event in Forum Calender for ready working!
I'll be missing some Expample description for correct use at owning.
First time: Of course I don't see this text: "Add this event to my personal calendar!" like in your demo website. http://www.rocketcityrockcrawlers.com/forumws-severe-storm-spotter-_topic12095. - http://www.rocketcityrockcrawlers.com/forum/nws-severe-storm-spotter-class_topic12095.html Unlike: Never seen this Google Button " http://http://www.google.com/calendar/s/ext/gc_6.gif%20 - Google onley online!" I visiting some others Sites of your forum and there was no displaying for this calender too. Like: http://www.rocketcityrockcrawlers.com/forumew-club-meeting-time_topic10374. - http://www.rocketcityrockcrawlers.com/forum/new-club-meeting-time_topic10374.html
So I do belive there are something wrong in useing be me.
Tell us more about requirements of this for ready using by an expample.
Do I must create a Event in Forum Calender for ready working? Or will it displaying Events of everything of this website? In second example URL of here there was no text for add to calender. So I belive it will only working, if I do created a Event in Web Wiz Forum Calender System, by creating a new topic onley. Is it correct? YES!
Will this script be usally in Intranet Connecting with online internet, like to use it offline in LAN for testing on Micosoft IIS with internet connection? YES!
This script will working in diverent (older) Versions of WWF, you must only read instructions to install this, follow this and it will works.
|
Posted By: WebWiz-Bruce
Date Posted: 23 February 2017 at 9:44am
rune wrote:
Actually, I don't think licensing would be a problem.
OuiCal is under MIT license, which basically allows you to do anything you like. The only requirement is to include a copy of the license somewhere.
|
Effectively by including the MIT license which is the requirement of using the code it would mean that Web Wiz Forums is also released under the MIT license. There are no plans at this time to release Web Wiz Forums under a MIT license.
Therefore the code could not be included with Web Wiz Forums but you can have it as an add on modification.
------------- https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting
|
Posted By: alabamatoy
Date Posted: 23 February 2017 at 1:20pm
Bruce, its your game and so we play by your rules, but I respectfully submit this is incorrect interpretation. The license can be applied to specific sections, for example the script can be a separate included file (part of it already is) which would have the license statement not affecting the rest of the code base.
|
Posted By: rune
Date Posted: 24 February 2017 at 10:40pm
On the licences question, I agree with @alabamatoy. This is the critical difference between permissive licenses like MIT and BSD versus copy-left licenses like GPL. GPL would typically require the entire program to be licensed under GPL just to include a small part of code. Whereas a permissive license allows you to license the whole anyway you like.
That's why most companies prefer using permissively licensed code -- they can effectively do as they please with it. Whereas companies often want to use a copy-left license for their own work that they publish, so that it limits the competitors to only using the code in an equal way.
|
Posted By: alabamatoy
Date Posted: 23 February 2019 at 1:56pm
|
Webwiz, yall must have made the decision to not include this functionality in the base code. A recent upgrade to 12.01 removed the calendar integration on our site. I would like to have it back. I think others seem to find it useful as well.
What is the best way to accomplish this so that it doesn't get wiped out by a subsequent upgrade?
I think there are other better newer approaches to the event integration than the method I employed. Google calendar integration is just a specially crafted URL, Outlook integration is DL of a dot ICS file, and I haven't the foggiest notion of how the fruity calendars work.
|
Posted By: alabamatoy
Date Posted: 18 March 2019 at 12:22pm
|
http://stackoverflow.com/questions/10488831/link-to-add-to-google-calendar" rel="nofollow - https://stackoverflow.com/questions/10488831/link-to-add-to-google-calendar
Post is old, but still seems to work. Would very much like this added to Webwiz.
|
Posted By: alabamatoy
Date Posted: 18 March 2019 at 12:31pm
May be even better solution: http://www.addevent.com/add-to-calendar-button" rel="nofollow - https://www.addevent.com/add-to-calendar-button
|
|