<a href="https://console.cloud.google.com/apis/credentials">Get Your Api Credentials Here</a> <a href="https://calendar.google.com/calendar">Get your Calender ID</a> <?php include_once("wp-load.php"); function get_calender_events() { $params = array(); /*Get current date*/ $current_date = date('Y-m-d H:i:s'); /*Convert it to google calendar's rfc_format */ $rfc_format = date("c", strtotime($current_date)); $params[] = 'orderBy=startTime'; $params[] ='maxResults=100'; $params[] = 'timeMin='.urlencode($rfc_format); $url_param = ''; foreach($params as $param) { $url_param.= '&'.$param; } $calender_id = "calender_id"; $client_key = "client_key"; $url = "https://www.googleapis.com/calendar/v3/calendars/".$calender_id."/events?key=".$client_key."&singleEvents=true".$url_param; $list_events = wp_remote_post($url, ...
Add jQuery.noConflict() In Magento
In app\design\frontend\base\default\layout\page. xml add following code.
In app\design\frontend\base\default\layout\page. xml add following code.
<reference name="head">
<block type="core/text" name="google.jquery"><action method="setText"><text><![CDATA[<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>]]></text></action></block>
<block type="core/text" name="google.jquery.noconflict" after="google.jquery"><action method="setText"><text><![CDATA[<script type="text/javascript">var $j = jQuery.noConflict(); </script>]]></text></action></block>
</reference>
This will cause no conflicts with prototype, if you define noConflict()
in the footer, you will already receive messages such as method not
defined etc.
Comments
Post a Comment