Forum Replies Created

Viewing 15 replies - 16 through 30 (of 30 total)
  • Plugin Author Cerzky

    (@cerzky)

    Thank you for your feedback and review. I haven’t had that problem yet. If you could give me more details how the error was generated then let me know. I will try to add a fix in a future release.

    Brandon

    Thread Starter Cerzky

    (@cerzky)

    Resolved.

    Thread Starter Cerzky

    (@cerzky)

    Here is one of my javascript files.. After editing it, it still doesn’t work with wordPress core jquery. It will work with a new jQuery registered script though.

    I assume I’m not wrapping it right.

    /*
     * FullCalendar v1.5.4 Google Calendar Plugin
     *
     * Copyright (c) 2011 Adam Shaw
     * Dual licensed under the MIT and GPL licenses, located in
     * MIT-LICENSE.txt and GPL-LICENSE.txt respectively.
     *
     * Date: Tue Sep 4 23:38:33 2012 -0700
     *
     */
     jQuery(document).ready(function($) {
    (function($) {
    
    var fc = $.fullCalendar;
    var formatDate = fc.formatDate;
    var parseISO8601 = fc.parseISO8601;
    var addDays = fc.addDays;
    var applyAll = fc.applyAll;
    
    fc.sourceNormalizers.push(function(sourceOptions) {
    	if (sourceOptions.dataType == 'gcal' ||
    		sourceOptions.dataType === undefined &&
    		(sourceOptions.url || '').match(/^(http|https):\/\/www.google.com\/calendar\/feeds\//)) {
    			sourceOptions.dataType = 'gcal';
    			if (sourceOptions.editable === undefined) {
    				sourceOptions.editable = false;
    			}
    		}
    });
    
    fc.sourceFetchers.push(function(sourceOptions, start, end) {
    	if (sourceOptions.dataType == 'gcal') {
    		return transformOptions(sourceOptions, start, end);
    	}
    });
    
    function transformOptions(sourceOptions, start, end) {
    
    	var success = sourceOptions.success;
    	var data = $.extend({}, sourceOptions.data || {}, {
    		'start-min': formatDate(start, 'u'),
    		'start-max': formatDate(end, 'u'),
    		'singleevents': true,
    		'max-results': 9999
    	});
    
    	var ctz = sourceOptions.currentTimezone;
    	if (ctz) {
    		data.ctz = ctz = ctz.replace(' ', '_');
    	}
    
    	return $.extend({}, sourceOptions, {
    		url: sourceOptions.url.replace(/\/basic$/, '/full') + '?alt=json-in-script&callback=?',
    		dataType: 'jsonp',
    		data: data,
    		startParam: false,
    		endParam: false,
    		success: function(data) {
    			var events = [];
    			if (data.feed.entry) {
    				$.each(data.feed.entry, function(i, entry) {
    					var startStr = entry['gd$when'][0]['startTime'];
    					var start = parseISO8601(startStr, true);
    					var end = parseISO8601(entry['gd$when'][0]['endTime'], true);
    					var allDay = startStr.indexOf('T') == -1;
    					var url;
    					$.each(entry.link, function(i, link) {
    						if (link.type == 'text/html') {
    							url = link.href;
    							if (ctz) {
    								url += (url.indexOf('?') == -1 ? '?' : '&') + 'ctz=' + ctz;
    							}
    						}
    					});
    					if (allDay) {
    						addDays(end, -1); // make inclusive
    					}
    					events.push({
    						id: entry['gCal$uid']['value'],
    						title: entry['title']['$t'],
    						url: url,
    						start: start,
    						end: end,
    						allDay: allDay,
    						location: entry['gd$where'][0]['valueString'],
    						description: entry['content']['$t']
    					});
    				});
    			}
    			var args = [events].concat(Array.prototype.slice.call(arguments, 1));
    			var res = applyAll(success, this, args);
    			if ($.isArray(res)) {
    				return res;
    			}
    			return events;
    		}
    	});
    
    }
    
    // legacy
    fc.gcalFeed = function(url, sourceOptions) {
    	return $.extend({}, sourceOptions, { url: url, dataType: 'gcal' });
    };
    
    })(jQuery);
    });

    Assuming that this is the wrong way to do it.. Any suggestions?

    Thread Starter Cerzky

    (@cerzky)

    I have this in the javascript code.

    $(document)

    Do I need to change that to
    jQuery(document)

    And there is code like this.
    if ($.isFunction(accept)

    Does this become…
    if (jQuery.isFunction(accept)

    Thanks alot.

    Thread Starter Cerzky

    (@cerzky)

    So do i need to use the wrapper to register and enqueue my other scripts?
    Or do I just need to put the enqueue_script(‘jquery’); in a wrapper for it to load properly? I am confused..
    I want to load jquery first from core.
    then load customscript.js which requires jquery.

    wp_enqueue_script('jquery');
    wp_register_script('custom_script', ...);
    wp_enqueue_script('custom_script');

    The problem is, either jquery is not loading from core properly or it is loading after custom_script.

    I have never used a no conflict wrapper, hence the confusion.

    Cerzky

    (@cerzky)

    I understand not to deregister… Although my jquery is not loading right and my plugin doesn’t work without jquery. Perhaps the jquery is loading after the other scripts I am loading which require jquery? I am confused… seems like this is not the only person with the same problem as I. Why not deregister if it works, when WordPress core jquery isn’t working.

    Thread Starter Cerzky

    (@cerzky)

    I like the last link you’ve showed me. This is all great except I need an easy way for the user to enter the URL. How would I take the embed link and turn it into just a calender id… I would have to do some kind of crazy string thing to get the id out of there.

    This just seems too complicated.

    Right now I am using the google html configuration tool too add multiple calendars into one agenda view. I was not able to combine the feeds any other way than using google calendar Agenda. You can store all of your calendar feeds into the Agenda and turn off the other buttons. I used transform and width to kind of get the font-size down and I also used overflow: scroll !important;

    What I want to do is to be able to use css properties like font-size, word-wrap, and white-space. These are not allowed for some reason through the google iframe.

    Let me know if you get the jquery-gcal-flow to work or if you have any ideas. Thanks.

    Thread Starter Cerzky

    (@cerzky)

    Have any solutions? I’ve been trying to get an RSS of my google events for sometime and would like to aggregate them or merge them into one feed sorted by event time if Possible. If you could figure this out that would be a big plus for your plugin. Let me know if you have any solutions. Thanks for the support.

    Thread Starter Cerzky

    (@cerzky)

    I want to sort on the when: “starttime” google data and not the created by date. If you look the date created are all feb 15th. and the When date is the date needed to get and to sort by.

    Thread Starter Cerzky

    (@cerzky)

    Thread Starter Cerzky

    (@cerzky)

    Results are sorting by date created, I need to sort by starttime. I mentioned earlier that it was sorting correctly, and that is false. I am wondering how I would display the starttime (event time) even if I was able to sort by it.

    Thread Starter Cerzky

    (@cerzky)

    Thread Starter Cerzky

    (@cerzky)

    I’m using category feed filter separated by comma’s option. And I’m trying to sort by starttime. Ascending. Aggregated.

    Thread Starter Cerzky

    (@cerzky)

    Line 155 is @
    if ( !wp_verify_nonce( $_POST[$new_meta_box[‘name’].’_noncename’], plugin_basename(__FILE__) )){

    Hello, Has anyone been able to resolve this issue. I am having the same difficulty. I even try to add my new event via the ‘Add to Google Calendar’ link and it gives me this error…

    Settings Error

    Could not fetch the URL.

    Perhaps because I am using a localhost?

    Please help.

Viewing 15 replies - 16 through 30 (of 30 total)