새창 작성 수정 목록 링크 Edit G카랜다 HDD HDD HDD 게시물 주소 복사


달력(fullcalendar)과 구글 캘린더 API 연동 (30분만에 관리형 달력 완성!)

♨ 카랜더 일정 : 2021년07월05일
  • 링크

  • 첨부

  • 컨텐츠 정보

    본문

    ● 달력(fullcalendar)과 구글 캘린더 API 연동 (30분만에 관리형 달력 완성!)


    내용


    ▶ 부제목

    내용


     https://11q.kr 에 등록된 자료 입니다.

    [ 추가 정보 ... 더보기) ]
    뷰PDF 1,2



    office view

    관련자료

    댓글목록

    profile_image

    11qkr님의 댓글

    11qkr 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 아이피 (192.♡.0.1) 작성일

    구글 달력 추가더 공개 생성 ifram 복사 홈페이지 list에 복사 붙이면 공개된 일정이 보입니다

    <!-- W:wwwskinboardNB-Basic_reservation_sourceplaylistreservationlist.skin.php -->
    <iframe src="https://calendar.google.com/calendar/embed?src=8jf9hi8abbetpmp3muranm80js@group.calendar.google.com&ctz=Asia/Seoul" style="border: 0" width="800" height="600" frameborder="0" scrolling="no"></iframe>
    <section id="bo_list" class="mb-4">

    profile_image

    11qkr님의 댓글

    11qkr 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 아이피 (192.♡.0.1) 작성일

    api key 생성방법으로 등록 사용 소스
    ===================================================

    
    <script type="text/javascript" src="http://www.google.com/jsapi?key=YOUR_KEY_HERE"></script>
    <script type="text/javascript">
    <!--
    /* Loads the Google data JavaScript client library */
    google.load("gdata", "2.x");
    
    function init() {
      // init the Google data JS client library with an error handler
      google.gdata.client.init(handleGDError);
      // load the code.google.com developer calendar
      loadDeveloperCalendar();
    }
    
    /**
     * Loads the Google Developers Event Calendar
     */
    function loadDeveloperCalendar() {
    }
    
    /**
     * Adds a leading zero to a single-digit number.  Used for displaying dates.
     */
    function padNumber(num) {
      if (num <= 9) {
        return "0" + num;
      }
      return num;
    }
    
    /**
     * Determines the full calendarUrl based upon the calendarAddress
     * argument and calls loadCalendar with the calendarUrl value.
     *
     * @param {string} calendarAddress is the email-style address for the calendar
     */
    function loadCalendarByAddress(calendarAddress) {
      var calendarUrl = 'https://www.google.com/calendar/feeds/' +
                        calendarAddress +
                        '/public/full';
      loadCalendar(calendarUrl);
    }
    
    /**
     * Uses Google data JS client library to retrieve a calendar feed from the specified
     * URL.  The feed is controlled by several query parameters and a callback
     * function is called to process the feed results.
     *
     * @param {string} calendarUrl is the URL for a public calendar feed
     */
    function loadCalendar(calendarUrl) {
      var service = new
          google.gdata.calendar.CalendarService('gdata-js-client-samples-simple');
      var query = new google.gdata.calendar.CalendarEventQuery('https://www.google.com/calendar/feeds/n5r6def5n1l3omunjsap8bvj9c%40group.calendar.google.com/public/full');
      query.setOrderBy('starttime');
      query.setSortOrder('ascending');
      query.setFutureEvents(true);
      query.setSingleEvents(true);
      query.setMaxResults(10);
    
      service.getEventsFeed(query, listEvents, handleGDError);
    }
    
    /**
     * Callback function for the Google data JS client library to call when an error
     * occurs during the retrieval of the feed.  Details available depend partly
     * on the web browser, but this shows a few basic examples. In the case of
     * a privileged environment using ClientLogin authentication, there may also
     * be an e.type attribute in some cases.
     *
     * @param {Error} e is an instance of an Error
     */
    function handleGDError(e) {
      document.getElementById('jsSourceFinal').setAttribute('style',
          'display:none');
      if (e instanceof Error) {
        /* alert with the error line number, file and message */
        alert('Error at line ' + e.lineNumber +
              ' in ' + e.fileName + 'n' +
              'Message: ' + e.message);
        /* if available, output HTTP error code and status text */
        if (e.cause) {
          var status = e.cause.status;
          var statusText = e.cause.statusText;
          alert('Root cause: HTTP error ' + status + ' with status text of: ' +
                statusText);
        }
      } else {
        alert(e.toString());
      }
    }
    
    /**
     * Callback function for the Google data JS client library to call with a feed
     * of events retrieved.
     *
     * Creates an unordered list of events in a human-readable form.  This list of
     * events is added into a div called 'events'.  The title for the calendar is
     * placed in a div called 'calendarTitle'
     *
     * @param {json} feedRoot is the root of the feed, containing all entries
     */
    function listEvents(feedRoot) {
      var entries = feedRoot.feed.getEntries();
      var eventDiv = document.getElementById('events');
      if (eventDiv.childNodes.length > 0) {
        eventDiv.removeChild(eventDiv.childNodes[0]);
      }
      /* create a new unordered list */
      var ul = document.createElement('ul');
      /* set the calendarTitle div with the name of the calendar */
      document.getElementById('calendarTitle').innerHTML =
        "Calendar: " + feedRoot.feed.title.$t;
      /* loop through each event in the feed */
      var len = entries.length;
      for (var i = 0; i < len; i++) {
        var entry = entries[i];
        var title = entry.getTitle().getText();
        var startDateTime = null;
        var startJSDate = null;
        var times = entry.getTimes();
        if (times.length > 0) {
          startDateTime = times[0].getStartTime();
          startJSDate = startDateTime.getDate();
        }
        var entryLinkHref = null;
        if (entry.getHtmlLink() != null) {
          entryLinkHref = entry.getHtmlLink().getHref();
        }
        var dateString = (startJSDate.getMonth() + 1) + "/" + startJSDate.getDate();
        if (!startDateTime.isDateOnly()) {
          dateString += " " + startJSDate.getHours() + ":" +
              padNumber(startJSDate.getMinutes());
        }
        var li = document.createElement('li');
    
        /* if we have a link to the event, create an 'a' element */
        if (entryLinkHref != null) {
          entryLink = document.createElement('a');
          entryLink.setAttribute('href', entryLinkHref);
          entryLink.appendChild(document.createTextNode(title));
          li.appendChild(entryLink);
          li.appendChild(document.createTextNode(' - ' + dateString));
        } else {
          li.appendChild(document.createTextNode(title + ' - ' + dateString));
        }
    
        /* append the list item onto the unordered list */
        ul.appendChild(li);
      }
      eventDiv.appendChild(ul);
    }
    
    google.setOnLoadCallback(init);
    //-->
    </script>
    <div id="calendarTitle"></div>
    <div id="events"></div>
    
    <script type="text/javascript">
    loadCalendar('');
    </script>


    새창 작성 수정 목록 링크 Edit G카랜다 HDD HDD HDD 게시물 주소 복사


    ♥간단_메모글♥


    최근글


    새댓글



    PHP 안에 HTML ☞ 홈페이지 화면갱신 시간은 ♨
    ▶ 2024-12-27 11:04:40

    오늘의 홈 현황


    • 현재 접속자♨ 264(1) 명
    • 오늘 가입자※ 2 명
    • 어제 가입자※ 1 명
    • 주간 가입자※ 8 명
    • 오늘 방문자 4,012 명
    • 어제 방문자 3,681 명
    • 최대 방문자 13,042 명
    • 전체 방문자 4,925,574 명
    • 전체 게시물※ 8,877 개
    • 전체 댓글수※ 25,307 개
    • 전체 회원수 11,384 명

    QR코드


    ☞ QR코드 스캔은 kakao앱 자체 QR코드

    알림 0








    최신글↑