Google Calendar - Embed?

LeDudeLeDude Registered Users Posts: 501 Major grins
[EDIT:

For those browsing and curious, here's a link that'll show what can be done very easily with access to smugmug customization and a google calendar. For more info on how to get it done read on, but the basic deal is found here.

]


Alright ye grand cats of customization, I'm fairly certain this has not yet been tackled:

I'd like to create a gallery or otherwise devote a portion of my smugmug site (ledudeprojects.smugmug.com) to upcoming musical events in DC. Integrating photos of the acts to be playing would be a major plus. However, the manual entry of events in need of constant updating and a potential, quasi-complicated table layout will make using the ole JournalStyle-caption technique laborious/impossible.

So I'm brainstorming... should I study hard on smugmug customization and build from scratch?

Or, would it be possible to use the new Google Calendar interface within my smugmug site? If so, my data entry problems could possibly be halved by making the calendar public and putting it to the individuals playing to enter their upcoming shows! Then I could just move and shake the appropriate photos to match and voila!

At this point I still need to create a basic layout/flowchart/etc. in my head... but I'm curious to know my options.

I know I've got help coming, so thanks in advance.
We are the music-makers; and we are the dreamers of dreams.
... come along.
«1

Comments

  • AndyAndy Registered Users Posts: 50,016 Major grins
    edited April 19, 2006
    LeDude wrote:
    Alright ye grand cats of customization, I'm fairly certain this has not yet been tackled:

    I'd like to create a gallery or otherwise devote a portion of my smugmug site (ledudeprojects.smugmug.com) to upcoming musical events in DC. Integrating photos of the acts to be playing would be a major plus. However, the manual entry of events in need of constant updating and a potential, quasi-complicated table layout will make using the ole JournalStyle-caption technique laborious/impossible.

    So I'm brainstorming... should I study hard on smugmug customization and build from scratch?

    Or, would it be possible to use the new Google Calendar interface within my smugmug site? If so, my data entry problems could possibly be halved by making the calendar public and putting it to the individuals playing to enter their upcoming shows! Then I could just move and shake the appropriate photos to match and voila!

    At this point I still need t
    o create a basic layout/flowchart/etc. in my head... but I'm curious to know my options.

    I know I've got help coming, so thanks in advance.

    http://andydemo.smugmug.com/gallery/1381486

    http://www.google.com/googlecalendar/event_publisher_guide.html


    HTML Page tips from my FAQ:
    http://www.dgrin.com/showthread.php?t=26043

    http://www.dgrin.com/showpost.php?p=186127&postcount=19
  • LeDudeLeDude Registered Users Posts: 501 Major grins
    edited April 19, 2006
    Andy wrote:

    okay, I missed some of this...11doh.gif


    I have a feeling it's going to be more complicated before long... but until then, thank you much-I've got to test some ideas.
    We are the music-makers; and we are the dreamers of dreams.
    ... come along.
  • AndyAndy Registered Users Posts: 50,016 Major grins
    edited April 19, 2006
    LeDude wrote:
    okay, I missed some of this...11doh.gif


    I have a feeling it's going to be more complicated before long... but until then, thank you much-I've got to test some ideas.


    Cool - I hadn't really tested it out until your post, so thanks for the prompting :D

    wave.gif good luck, ledude, let us know how you make out!
  • LeDudeLeDude Registered Users Posts: 501 Major grins
    edited April 19, 2006
    getting the project in view
    Alright, Andy, thank you, but I'm back and I'm getting more technical.

    What I can do:
    Create buttons which will create events in visitor's GCalendars.

    Problem:
    Because I will be updating the events on a weekly/bi-weekly basis this will be extremely time consuming. It will also be limiting to those that have and use GCalendars, which for now is not enough people. Ultimately, the simple solution provided above is not robust enough to handle the expansion I plan.

    What I want to do:
    (1) Input dates, venues, etc. using the GCalendar interface.
    (2) Link that data for viewing on my smugmug site.
    (3) Associate photos with the data (this can come later... kind of a finishing touch)
    (4) Other (RSS feed?...many ideas, but one thing at a time)

    What's at my disposal:
    XML! I know almost nothing about this but, from what I've read at Google the link provided (http://www.google.com/calendar/feeds/ledudeprojects@gmail.com/public/basic) is for public use of my calendar data. (There is also a private version) When using the link I am sent to a text-only screen with calendar data with a header saying, "This XML file does not appear to have any style information associated with it."

    -Can I add style using Smugmug CSS?

    In sum:
    I have data at GCalandar (dates, venues, etc.) I have data at Smugmug (photos). I want to integrate this data for display at Smugmug while keeping any data editing activity within its respective sphere.

    I will read and work on this; please point me in a direction and/or provide some advice. Thank you.

    -Rich

    (i must sleep now... very tired)
    We are the music-makers; and we are the dreamers of dreams.
    ... come along.
  • LeDudeLeDude Registered Users Posts: 501 Major grins
    edited April 19, 2006
    Calling Mike Lane rolleyes1.gif

    I am so eager to do this I've been customizing other aspects of my site all day!

    This thread hasn't fallen far on the list, but I'm giving it an early bump because I'm impatient AND... this is a great opportunity for cross promotional activities.

    My vision of the future of my site:

    LeDude Projects as the place to see the D.C. music scene up close and personal. From LDP, visitors can view photos, buy pics, see playing dates and link directly to the sites of their favorite local artists!

    LeDude Projects as a hub for D.C.'s music community: LDP will shoot your live performances (pics available for purchase for personal memorialization/advertising purposes), provide an additional platform from which to advertise and serve as a cross-artist networking tool!

    A music community Google Calendar will enable artists to personally add upcoming shows and have those shows appear on LDP Smugmug. (Meanwhile, I am reducing my workload without giving direct access to my smugmug site.)

    ---

    I hope this is possible.
    We are the music-makers; and we are the dreamers of dreams.
    ... come along.
  • AndyAndy Registered Users Posts: 50,016 Major grins
    edited April 19, 2006
    I was gonna say, we need an egg-spurt for the follow-on work mwink.gif
  • LeDudeLeDude Registered Users Posts: 501 Major grins
    edited April 20, 2006
    It seems that this will not be possible until the GCalendar API is released, which is "coming soon..."

    I'd love to stand corrected. What the heck does the XML do anyway? Or rather, how does one take advantage of the data it provides?

    In any event, assuming that the release of this API will make what I want to do possible, is there anything I can do to prepare? I'd like to get started very much.

    I am looking currently at the Google Maps API stuff but good lord do I know nothing about this. Arghhh.
    We are the music-makers; and we are the dreamers of dreams.
    ... come along.
  • Mike LaneMike Lane Registered Users Posts: 7,106 Major grins
    edited April 20, 2006
    30 Boxes has an API. mwink.gif
    Y'all don't want to hear me, you just want to dance.

    http://photos.mikelanestudios.com/
  • DJ-S1DJ-S1 Registered Users Posts: 2,303 Major grins
    edited April 20, 2006
  • LeDudeLeDude Registered Users Posts: 501 Major grins
    edited April 20, 2006
    DJ-S1 wrote:


    wherrrrd... good lookin my man
    We are the music-makers; and we are the dreamers of dreams.
    ... come along.
  • LeDudeLeDude Registered Users Posts: 501 Major grins
    edited April 20, 2006
    Getting Started
    I have set down a layout for the future of my site. It will include integration of Google Calendar (and Maps, to a lesser degree). I am completely green with regards to API's and java, so I need the help of this community to get going. However, I can make this a wieldy (as opposed to un-wieldy :) ) project. To accomplish this I have broken down the project into 'modules' (terminology?) of scripting and will aim to get done what I'm guessing is "easiest," and most logical, first.

    I have created a new gallery under the music category called "Artists" http://ledudeprojects.smugmug.com/gallery/1385353
    While under construction I will leave it password protected. The password is "test" for those who'll be lending a hand here. The gallery is set to filmstrip and most of the options have been turned to 'no' (except for public). I'll eventually want to remove the pulldown that let's viewers select the picture size, but that's customization and I'll worry about that later.

    So, the first 'module' will be placed right above the footer. It will provide a listing of upcoming shows. Show information should include the What, When, Where and Description Fields of events listed on the calendar at http://www.google.com/calendar/render?pli=1. I'd like show data to be shown for the current day + six upcoming days. I'm not sure the best way to display this. 7 days left to right, I imagine. But how best to display each field? This may not be important now, because the first step is to get the code which will retrieve the data.

    Hopefully, whatever is designed here will be very useful to smugmug users at large.

    So what next?

    -Rich


    links:

    http://code.google.com/apis/gdata/calendar.html - Using The Google Calendar Data API
    We are the music-makers; and we are the dreamers of dreams.
    ... come along.
  • Mike LaneMike Lane Registered Users Posts: 7,106 Major grins
    edited April 21, 2006
    The first thing you need to understand is that you'll be working with javascript not java.

    The second thing you need to do is to get a javascript book. I've been told that this one is among the best. My thought is that you may as well learn it right and learn it all the way because building this site of yours is going to be about 10% of the interaction that you're going to have with it. The rest of your time will be spent debugging, updating, and otherwise modifying it.

    Heck, just look at the slideshow that BWG and devbobo built. I don't know how difficult that was, but they had a stable release and then some things changed on smugmug and it was broken. These things happen.

    I'm in the same boat as you are with this and this is exactly the advice I'm going to be taking.
    Y'all don't want to hear me, you just want to dance.

    http://photos.mikelanestudios.com/
  • LeDudeLeDude Registered Users Posts: 501 Major grins
    edited April 21, 2006
    Mike Lane wrote:
    The first thing you need to understand is that you'll be working with javascript not java.

    The second thing you need to do is to get a javascript book. I've been told that this one is among the best.
    javascript, espresso, whateverrolleyes1.gif

    I'm on that book like cold on a witches tit in a brass bra. I was told by one of the experts that trying to learn by doing on this project was inadvisable. Nonetheless, I will be reading and paying strict attention for exactly the reasons you stated. This is really a first step to getting my site where I want it, and I hope to be contributing code-wise more than not before long.

    keep it easy,
    Rich

    p.s. the photo-based art on your site is dope (pardon the neo-hippy lingo)
    We are the music-makers; and we are the dreamers of dreams.
    ... come along.
  • LeDudeLeDude Registered Users Posts: 501 Major grins
    edited April 21, 2006
    I added an event button, just like Andy's example, which can be found here: http://ledudeprojects.smugmug.com/gallery/1354021.

    This is not the page I'll be doing script testing on, but I wanted to get started a little and make sure I could do the "easy" route.

    I'm moving ahead with this thing by reading up on javascripting. If I must get it going alone, then alone I shall :):.
    We are the music-makers; and we are the dreamers of dreams.
    ... come along.
  • Mike LaneMike Lane Registered Users Posts: 7,106 Major grins
    edited April 21, 2006
    LeDude wrote:
    p.s. the photo-based art on your site is dope (pardon the neo-hippy lingo)

    Thanks yo!
    Y'all don't want to hear me, you just want to dance.

    http://photos.mikelanestudios.com/
  • Mike LaneMike Lane Registered Users Posts: 7,106 Major grins
    edited April 23, 2006
    Y'all don't want to hear me, you just want to dance.

    http://photos.mikelanestudios.com/
  • LeDudeLeDude Registered Users Posts: 501 Major grins
    edited April 23, 2006
    Mike Lane wrote:

    clap.gif I've been away for a day and must hit the streets again soon, but this is awesome news!

    many thanks for spottin this one Mike
    We are the music-makers; and we are the dreamers of dreams.
    ... come along.
  • LeDudeLeDude Registered Users Posts: 501 Major grins
    edited April 26, 2006
    I'm on information overload :cry

    I've been reading about javascript. It's fairly simple stuff and very understandable so far. I do have some experience with loop statements, declaring variables, etc. already, and that helps.

    When I start to try and understand how this relates to xml/api/GCalendar I become absolutely baffled, however.

    What I've read seems to be saying that for this API deal you need to be working with Java or C#, not javascript. And what are "client libraries" for anyway?

    I am trying to figure out this non-client library approach provided by Google.
    I've gotten this far:
    To get a feed, you send the following HTTP request to Calendar, using the URL you found in the previous section of this document:
    <code>GET http://www.google.com/calendar/feeds/userID/private-magicCookie/full</code>
    ...using the appropriate link it looks like:
    GET http://www.google.com/calendar/feeds/ledudeprojects@gmail.com/private-4f855295e0ab179320f83a59eaf03fe0/basic

    Okay, but what follows... "So after you've sent the <code>GET</code> request, you have to read the HTTP headers of the response to find the URL with the session ID appended; then you need to send another <code>GET</code> request with that new URL."

    Is this even within the scope of what javascript can handle?

    lost,
    Rich
    We are the music-makers; and we are the dreamers of dreams.
    ... come along.
  • bwgbwg Registered Users, Retired Mod Posts: 2,119 SmugMug Employee
    edited April 26, 2006
    LeDude wrote:
    Okay, but what follows... "So after you've sent the <code>GET</code> request, you have to read the HTTP headers of the response to find the URL with the session ID appended; then you need to send another <code>GET</code> request with that new URL."

    Is this even within the scope of what javascript can handle?

    sure, you need to read up on AJAX and specifically for that statement above the getResponseHeader method.

    http://kb.mozillazine.org/XMLHttpRequest#getResponseHeader.28.29
    Pedal faster
  • bwgbwg Registered Users, Retired Mod Posts: 2,119 SmugMug Employee
    edited April 26, 2006
    bigwebguy wrote:
    sure, you need to read up on AJAX and specifically for that statement above the getResponseHeader method.

    http://kb.mozillazine.org/XMLHttpRequest#getResponseHeader.28.29

    nevermind, i'm an idiot.

    cant use ajax across different domains. you'd need to have some sort of server script to do this (php, asp etc.)
    Pedal faster
  • LeDudeLeDude Registered Users Posts: 501 Major grins
    edited April 26, 2006
    bigwebguy wrote:
    nevermind, i'm an idiot.
    lol, not compared to me right now

    bigwebguy wrote:
    cant use ajax across different domains. you'd need to have some sort of server script to do this (php, asp etc.)
    and this server script is not possible between just smugmug and google? (i have no other site)
    We are the music-makers; and we are the dreamers of dreams.
    ... come along.
  • bwgbwg Registered Users, Retired Mod Posts: 2,119 SmugMug Employee
    edited April 26, 2006
    LeDude wrote:
    lol, not compared to me right now...and this server script is not possible between just smugmug and google? (i have no other site)

    correct. ajax wont work across domains...ie. pages on smugmug.com can only make ajax calls to pages on smugmug.com.

    in the link that mike posted, the guys is more or less forwarding the google rss from his server so he can use an ajax call to read the feed. Even if you had your own server you couldnt implement this type of functionality on a smugmug site because you would still be crossing domains from smugmug.com to yourdomain.com.
    Pedal faster
  • LeDudeLeDude Registered Users Posts: 501 Major grins
    edited April 26, 2006
    bigwebguy wrote:
    correct. ajax wont work across domains...ie. pages on smugmug.com can only make ajax calls to pages on smugmug.com.

    in the link that mike posted, the guys is more or less forwarding the google rss from his server so he can use an ajax call to read the feed. Even if you had your own server you couldnt implement this type of functionality on a smugmug site because you would still be crossing domains from smugmug.com to yourdomain.com.

    then it sounds like this whole project is impossible... if so, what makes this different from the google maps functionality available to smugmug sites?
    We are the music-makers; and we are the dreamers of dreams.
    ... come along.
  • bwgbwg Registered Users, Retired Mod Posts: 2,119 SmugMug Employee
    edited April 26, 2006
    LeDude wrote:
    then it sounds like this whole project is impossible...
    well...at least really difficult. just looking over the doco for the calendar api they're using a proprietrary protocol (GData) that is gonna require the capability to modify and examine http header information...something you cant do w/javascript.
    LeDude wrote:
    ...what makes this different from the google maps functionality available to smugmug sites?
    i'm no google maps expert, but i'm pretty sure it's using a hidden iframe to get results back from the google server.
    Pedal faster
  • LeDudeLeDude Registered Users Posts: 501 Major grins
    edited April 26, 2006
    bigwebguy wrote:
    well...at least really difficult. just looking over the doco for the calendar api they're using a proprietrary protocol (GData) that is gonna require the capability to modify and examine http header information...something you cant do w/javascript.

    i'm no google maps expert, but i'm pretty sure it's using a hidden iframe to get results back from the google server.
    thanks BWG.

    Maybe Onethumb could weigh in here. I don't know the requisite web programming to have an educated view of this, so maybe I'm being ignorant when I say: I'm amazed that what I'm aiming for is not possible here. The process seems simple (as far as the basic steps required).

    -Smugmug contact Google
    -Gather data
    -Display Data at Smugmug

    The display part is already taken care of via javascript/html/css. The data gather step, I don't know; but, it seems that only the contact portion is a problem.

    I would've thought that data manipulation would've been more difficult. Even moreso, I would've thought it difficult to integrate the Google interface into smugmug. I'm not trying to do either, but it seems the highway just does not exist for communitcation between the sites... because of the lack of ability to deal with headers..?!

    [edit: The "problem" is that the examination of http header information is beyond the capability of smugmug customization? This doesn't sound like something that would change anytime soon... uh, oh. Please tell me I'm wrong!]
    We are the music-makers; and we are the dreamers of dreams.
    ... come along.
  • LeDudeLeDude Registered Users Posts: 501 Major grins
    edited April 30, 2006
    bigwebguy wrote:
    well...at least really difficult

    and desired elsewhere! I've been google searching this issue almost daily. It would appear that others are also hoping for a simpler way to implement GCalendar within their webpages... I've seen an html feed requested-this would work with Smugmug, no?

    I wish I knew more about developments on the smugmug end of things... it would seem that this is not something, that this is not on the list of things to do... that is, Smugmug's functionality cannot be extended by import of external routines? GMaps works differently, right? At least, I can't find a way to use hidden iframes with GCalendar

    Any insight provided here is much appreciated... even if it's just an explanation of iframes, for example.

    I'll continue researching; something's bound to pop up that'll solve my problem.

    regards,
    Rich
    We are the music-makers; and we are the dreamers of dreams.
    ... come along.
  • bwgbwg Registered Users, Retired Mod Posts: 2,119 SmugMug Employee
    edited May 1, 2006
    LeDude wrote:
    and desired elsewhere! I've been google searching this issue almost daily. It would appear that others are also hoping for a simpler way to implement GCalendar within their webpages... I've seen an html feed requested-this would work with Smugmug, no?

    I wish I knew more about developments on the smugmug end of things... it would seem that this is not something, that this is not on the list of things to do... that is, Smugmug's functionality cannot be extended by import of external routines? GMaps works differently, right? At least, I can't find a way to use hidden iframes with GCalendar

    Any insight provided here is much appreciated... even if it's just an explanation of iframes, for example.

    I'll continue researching; something's bound to pop up that'll solve my problem.

    regards,
    Rich
    ok, here's the skinny as i see it. It may be possible to have some sort of implementation using a hidden iframe but IMHO it would be unreliable and insecure:

    1) you'd have to hard code your username/password into the script for authentication purposes (do i need to go on?)
    2) getting the timing of the responses and requests to and from the google server would be pretty tricky in everything but IE....and nobody wants an IE only implementation
    3) the javascript parser you would have to write would be INSANE because handling stuff like errors would be next to impossible

    and i'm sure there's more but that's just my initial reaction from glancing over the api. The fundamental difference between the calendar and maps is authentication. maps doesnt care who you are...it doesnt need to. the calendar needs to authenticate you in order to check permissions for updates etc...

    if you want to just have a calendar displayed, then thats a different story and easily done.
    Pedal faster
  • LeDudeLeDude Registered Users Posts: 501 Major grins
    edited May 1, 2006
    bigwebguy wrote:
    if you want to just have a calendar displayed, then thats a different story and easily done.

    Yes! How!? Easily?

    ear.gif
    We are the music-makers; and we are the dreamers of dreams.
    ... come along.
  • LeDudeLeDude Registered Users Posts: 501 Major grins
    edited May 2, 2006
    Originally Posted by bigwebguy
    if you want to just have a calendar displayed, then thats a different story and easily done.

    are you busting my nuts here? are you pondering? should I be able to figure this out on my own?

    I just want the display. If this is easy or feasible (I can certainly understand why website interacion is not so) please let me know how or give me a hint that will get me on the right track.

    please fine sir, I beg of you bowdown.gif
    We are the music-makers; and we are the dreamers of dreams.
    ... come along.
  • bwgbwg Registered Users, Retired Mod Posts: 2,119 SmugMug Employee
    edited May 2, 2006
    LeDude wrote:
    are you busting my nuts here? are you pondering? should I be able to figure this out on my own?

    I just want the display. If this is easy or feasible (I can certainly understand why website interacion is not so) please let me know how or give me a hint that will get me on the right track.

    please fine sir, I beg of you bowdown.gif

    simmer down man...you're wound too tight around this. the calendar has an rss/atom feed, so all you'll need to do is call that up in an iFrame and parse it to display however you want. i'm sure someone's already written a javascript rss/atom parser somewhere too.
    Pedal faster
Sign In or Register to comment.