Forum Replies Created

Viewing 15 replies - 121 through 135 (of 257 total)
  • Plugin Author Poco

    (@poco)

    Looking at the page source at lacrosseareasynod.org it appears that you are still requesting the basic calendar…

    <script type="text/javascript" defer="defer">
    ko_calendar.loadCalendarDefered('widget-ko_calendar-4-widget_title', 'widget-ko_calendar-4-widget_events', 7, false, 'http://www.google.com/calendar/feeds/lacrosseareasynod.org_gf86p9au28aubrij0n2hsdmud0%40group.calendar.google.com/public/basic', '', '', '[STARTTIME - ][TITLE]');
    </script>

    http://www.google.com/calendar/feeds/lacrosseareasynod.org_gf86p9au28aubrij0n2hsdmud0%40group.calendar.google.com/public/basic

    Plugin Author Poco

    (@poco)

    I will take a look, but I make no guarantees. I don’t have a lot of time to add new features.

    If you send me your changes I might be able to make some suggestions. Also, looking at a page with your changes might be helpful as I can see what HTML it is generating.

    Plugin Author Poco

    (@poco)

    It would seem that you are using the wpng-calendar (wordpress-google-calendar) plugin, not the google-calendar-widget plugin. I know, it’s confusing.

    You want this one.
    http://wordpress.org/extend/plugins/wordpress-google-calendar/

    You should posts your questions here.
    http://wordpress.org/tags/wordpress-google-calendar?forum_id=10

    Plugin Author Poco

    (@poco)

    That’s a good question. There is no map link provided in the calendar API. We are getting the data accessible through the google.gdata.calendar.CalendarEntry object.

    However, it looks like all the calendar does is a standard Google Query with the location name.

    So with a name of “Kennedy Center”, the query is “http://maps.google.com/maps?hl=en&q=Kennedy%20Center&#8221;. It should be possible to create a (map) link in the location tag.

    The function buildLocation(entry) in ko-calendar.js is where the location string is compiled.

    Something like the following change might work, but I have not tested it. I may consider adding something like this in the future just to make it more consistent with the default calendar.

    function buildLocation(entry)
    	{
    		var locationDiv = document.createElement('div');
    		var locationString = entry.getLocations()[0].getValueString();
    		if (locationString != null)
    		{
    			locationDiv.appendChild(document.createTextNode(locationString));
    
    	//////
    	// Insert here
    	var link = document.createElement('a');
    	link.setAttribute('href', 'http://maps.google.com/maps?hl=en&q=' + locationString);
    	var map = document.createTextNode(' map');
    	link.appendChild(map);
    	locationDiv.appendChild(link);
    	//////
    
    			locationDiv.setAttribute('className','ko-calendar-entry-location-text');
    			locationDiv.setAttribute('class','ko-calendar-entry-location-text');
    		}
    
    		return locationDiv;
    	}
    Plugin Author Poco

    (@poco)

    No, it won’t. You need to check your server logs. It might be logged in a an extra file in one of the directories of your blog (probably the root). You can also enable debug output to see it in the output stream sent to the browser. Try making an obvious mistake in some php code and see what happens.

    You can try changing the error reporting levels
    http://www.php.net/manual/en/function.error-reporting.php

    Plugin Author Poco

    (@poco)

    Not sure I can explain it. Are you getting any php errors around there?

    We can see the “Loading…”/></div></div> followed by a bunch of </div> where $after_widget should be printed. I cannot explain why the code following that wouldn’t be printed unless there was some sort of error. Not sure. Do you have any other plugins that could be messing with things?

    echo '<div class="ko-calendar-widget-events" id="' . $event_id . '">';
    echo '<div class="ko-calendar-widget-loading"><img class="ko-calendar-widget-image" src="' . KO_CALENDAR_URL . '/loading.gif" alt="Loading..."/></div>';
    echo '</div>';
    echo $after_widget;
    ?>
    <script type="text/javascript" defer="defer">
    	ko_calendar.loadCalendarDefered('<?php echo $title_id ?>', '<?php echo $event_id ?>', <?php echo $maxresults ?>, <?php echo empty($autoexpand) ? 'false' : 'true' ?>, '<?php echo $url ?>', '<?php echo $url2 ?>', '<?php echo $url3 ?>', '<?php echo $titleformat ?>');
    </script>
    			<?php
    Plugin Author Poco

    (@poco)

    You seem to be missing the Javascript that is required to load the calendar.

    <div class="ko-calendar-widget-events" id="widget-ko_calendar-3-widget_events">
    <div class="ko-calendar-widget-loading">
    <img class="ko-calendar-widget-image" src="http://www.stephaniefocquet.be/wp/wp-content/plugins/google-calendar-widget/loading.gif" alt="Loading..."/>
    </div>
    </div>
    ...

    There is no <script> tag there to load the calendar.

    The code below, from ko_calendar.php, should output the <script> to load the calendar shortly after the loading icon. I don’t see that output in your source anywhere.

    <script type="text/javascript" defer="defer">
    	ko_calendar.loadCalendarDefered('<?php echo $title_id ?>', '<?php echo $event_id ?>', <?php echo $maxresults ?>, <?php echo empty($autoexpand) ? 'false' : 'true' ?>, '<?php echo $url ?>', '<?php echo $url2 ?>', '<?php echo $url3 ?>', '<?php echo $titleformat ?>');
    </script>
    Plugin Author Poco

    (@poco)

    So I got it working by changing the “basic” to “full” in your calendar URL.

    Plugin Author Poco

    (@poco)

    I don’t have time to investigate right now, but a quick check shoes some syntax errors on your site (look at your Javascript console output while loading) and that you are loading the “basic” version of the calendar. You must change the “basic” to “full” in the calendar URL. I will take a look again later when I have more time.

    Plugin Author Poco

    (@poco)

    You can probably remove wiky.js and references to it if you don’t need the formatting. Also, you can try to pack the files it comes with. Please let me know how small you can make it all and how you did it so that I can make similar changes for everyone. Thanks.

    Plugin Author Poco

    (@poco)

    I don’t have a Mac to test your page and it works with the Windows version of Firefox.

    Can you provide the output from Web Console? It is accessible through the “Web Developer” menu in the Windows version of Firefox – I don’t know how you access it on a Mac.

    Open the Web Console, Clear it, and refresh the page.

    This is what I get with Firefox 4 in Windows.

    [09:43:54.974] GET http://shahryar.net/wp-content/plugins/google-calendar-widget/loading.gif [HTTP/1.1 304 Not Modified 123ms]
    [09:43:52.510] GET http://shahryar.net/ [HTTP/1.1 200 OK 885ms]
    [09:43:53.285] GET http://shahryar.net/wp-content/themes/shahryar/js/cufon-yui.js [HTTP/1.1 304 Not Modified 249ms]
    [09:43:53.301] GET http://shahryar.net/wp-content/themes/shahryar/js/nevis.font.js [HTTP/1.1 304 Not Modified 199ms]
    [09:43:53.312] GET http://twitterjs.googlecode.com/svn/trunk/src/twitter.min.js [HTTP/1.1 304 Not Modified 42ms]
    [09:43:53.322] GET http://shahryar.net/wp-includes/js/l10n.js?ver=20101110 [HTTP/1.1 304 Not Modified 520ms]
    [09:43:53.332] GET http://shahryar.net/wp-content/themes/shahryar/style.css [HTTP/1.1 304 Not Modified 519ms]
    [09:43:53.343] GET http://www.google.com/jsapi?ver=1 [HTTP/1.1 200 OK 50ms]
    [09:43:53.354] GET http://shahryar.net/wp-content/plugins/google-calendar-widget/date.js?ver=alpha-1 [HTTP/1.1 304 Not Modified 587ms]
    [09:43:53.367] GET http://shahryar.net/wp-content/plugins/google-calendar-widget/wiky.js?ver=1.0 [HTTP/1.1 304 Not Modified 373ms]
    [09:43:53.381] GET http://shahryar.net/wp-content/plugins/google-calendar-widget/ko-calendar.js?ver=3.1.3 [HTTP/1.1 304 Not Modified 300ms]
    [09:43:53.394] GET http://shahryar.net/wp-includes/js/jquery/jquery.js?ver=1.4.4 [HTTP/1.1 304 Not Modified 439ms]
    [09:43:53.408] GET http://shahryar.net/wp-includes/js/hoverIntent.js?ver=3.1.3 [HTTP/1.1 304 Not Modified 538ms]
    [09:43:53.421] GET http://shahryar.net/wp-content/plugins/commentluv/js/commentluv.js?ver=3.1.3 [HTTP/1.1 304 Not Modified 612ms]
    [09:43:53.467] GET http://shahryar.net/wp-content/plugins/commentluv/style/cl_style.css [HTTP/1.1 304 Not Modified 941ms]
    [09:43:53.481] GET http://shahryar.net/wp-content/plugins/google-calendar-widget/ko-calendar.css [HTTP/1.1 304 Not Modified 455ms]
    [09:43:53.892] GET http://www.google.com/uds/?file=gdata&v=2.x [HTTP/1.1 200 OK 57ms]
    [09:43:53.950] GET http://www.google.com/uds/api/gdata/2.4/9c597f6780f49935322b8dc6d9f79364/core,batch,mediarss,geo,opensearch,atom,threading,app,gdata,gbase,finance,blogger,contacts,analytics,acl,maps,calendar,sidewiki,default.I.js [HTTP/1.1 200 OK 685ms]
    [09:43:54.935] GET http://shahryar.net/wp-content/themes/shahryar/images/logo.png [HTTP/1.1 304 Not Modified 124ms]
    [09:43:54.955] GET http://shahryar.net/wp-content/uploads/2010/04/Shahryars-YouTube-page-edited.jpg [HTTP/1.1 304 Not Modified 130ms]
    [09:43:55.002] GET http://shahryar.net/wp-content/themes/shahryar/images/bg.jpg [HTTP/1.1 304 Not Modified 128ms]
    [09:43:55.021] GET http://shahryar.net/wp-content/themes/shahryar/images/back.jpg [HTTP/1.1 304 Not Modified 132ms]
    [09:43:55.040] GET http://shahryar.net/wp-content/themes/shahryar/images/menu.png [HTTP/1.1 304 Not Modified 121ms]
    [09:43:55.061] GET http://shahryar.net/wp-content/themes/shahryar/images/sidetitle.png [HTTP/1.1 304 Not Modified 230ms]
    [09:43:55.142] GET http://shahryar.net/wp-content/uploads/2010/05/spinner.gif [HTTP/1.1 304 Not Modified 114ms]
    [09:43:55.161] GET http://www.google-analytics.com/ga.js [HTTP/1.1 304 Not Modified 55ms]
    [09:43:55.180] GET http://www.youtube.com/p/55E5AFE457CE9900?hl=en_US&fs=1 [HTTP/1.1 200 OK 86ms]
    [09:43:55.281] GET http://www.google-analytics.com/__utm.gif?utmwv=4.9.4&utms=8&utmn=355177008&utmhn=shahryar.net&utmcs=UTF-8&utmsr=1680x1050&utmsc=24-bit&utmul=en-gb&utmje=1&utmfl=10.0%20r45&utmdt=Shahryar.net%C2%A0%7C%C2%A0&utmhid=701145754&utmr=-&utmp=%2F&utmac=UA-20244767-1&utmcc=__utma%3D102534979.1232741021.1307982457.1307982457.1307982457.1%3B%2B__utmz%3D102534979.1307982457.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B&utmu=H~ [HTTP/1.1 200 OK 55ms]
    [09:43:55.404] GET http://www.twitter.com/statuses/user_timeline/shahryar.json?callback=twitterCallback1&count=20&cb=0.8936627861207693 [HTTP/1.1 200 OK 309ms]
    [09:43:55.477] GET http://gdata.youtube.com/feeds/api/playlists/55E5AFE457CE9900?&v=2&max-results=50 [HTTP/1.1 304 Not Modified 128ms]
    [09:43:55.760] GET http://www.google.com/calendar/feeds/dajq7voop0gh5r8u2jmusptjig%40group.calendar.google.com/public/full?orderby=starttime&sortorder=ascending&futureevents=true&singleevents=true&max-results=5&alt=json-in-script&reqid=1&user-agent=google-calendar-widget%20GData-JavaScript%2F2.1%201307983435706-993&v=2.1 [HTTP/1.1 200 OK 347ms]
    Plugin Author Poco

    (@poco)

    I have heard a couple of issues with time zones recently.

    Do you have a link that I can look at? It is hard to figure out the problem without a reference. If you don’t have a public link the can you provide the Google Calendar link?

    Plugin Author Poco

    (@poco)

    Alright, I have a proper fix for the plugin that works with your current page.

    Just change the “if” to a “while” in ko-calendar.js. I will submit this change to the trunk soon and it will eventually become a new version.

    The code below is the same as the first code I posted above but the if is now a while.

    function processFinalFeed(feedRoot) {
    	// var entries = feedRoot.feed.getEntries();
    	var entries = feedRoot;
    	var eventDiv = document.getElementById(outputId);
    	while (eventDiv.childNodes.length > 0) {
    		eventDiv.removeChild(eventDiv.childNodes[0]);
    	}

    Plugin Author Poco

    (@poco)

    Ah, I see the problem now – should have waited to reply.

    The problem is the newlines in the source around the “widget-ko_calendar–1-widget_events” tag. The code I posted above is designed to remove the first, and only, child of that tag, but there are 3 children. The newline right after the <div> tag and the newline after the next <div> tag. So the first child is the newline, not the “loading icon”.

    <div class="ko-calendar-widget-events" id="widget-ko_calendar--1-widget_events">
    <div class="ko-calendar-widget-loading"><img class="ko-calendar-widget-image" src="http://dev.jesuschurch.no/wp-content/plugins/google-calendar-widget/loading.gif" alt="Loading..."/></div>
    </div>

    I suspect that replacing the code above with the code below will fix the problem. How are you generating that code? I guess I never noticed this because it is all generated by the plugin – but you say that you are doing it manually, so that might be the difference.

    <div class="ko-calendar-widget-events" id="widget-ko_calendar--1-widget_events"><div class="ko-calendar-widget-loading"><img class="ko-calendar-widget-image" src="http://dev.jesuschurch.no/wp-content/plugins/google-calendar-widget/loading.gif" alt="Loading..."/></div></div>

    As for a proper solution, I should fix that script so that it can handle white space around the <div> tags. Can you try the fix above and let me know if it works, I will hopefully get around to fixing the script up as well.

    Plugin Author Poco

    (@poco)

    Curious…

    It seems that the code is not working correctly, but there are no errors that I can see. It could have something to do with having multiple calendars on the same page, but it shouldn’t be a problem since they are both named differently.

    The code that should have removed the loading gif is below “eventDiv.removeChild”. For some reason it isn’t doing the right thing. I suspect that I can change that to do it differently (better?) that might help.

    Still looking at it.

    function processFinalFeed(feedRoot) {
    	// var entries = feedRoot.feed.getEntries();
    	var entries = feedRoot;
    	var eventDiv = document.getElementById(outputId);
    	if (eventDiv.childNodes.length > 0) {
    		eventDiv.removeChild(eventDiv.childNodes[0]);
    	}
Viewing 15 replies - 121 through 135 (of 257 total)