Author |
Message |
fkelly
Former Moderator in Good Standing

Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY
|
Posted:
Thu Feb 07, 2008 9:15 pm |
|
Just replaced Sweetphp's calendar with Gremmie's great Gcalendar. One request for future consideration:
when you have the calendar block activated it shows the current month. When you click the >> it opens the next month up in the center of the home page. It would be cool if the block could scroll through the months when you do >>
and just a tip that Gremmie probably covered somewhere but, if you load up the block but you don't want a list of events displayed below the calendar itself (left block space is expensive) you can edit the block file to set the number of events to zero. Very considerate of you to put that in there Gremmie. |
|
|
|
 |
Gremmie
Former Moderator in Good Standing

Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA
|
Posted:
Thu Feb 07, 2008 9:53 pm |
|
Yeah the block does that by design. I'd have to use some kind of AJAX or something to redraw the block without a page refresh. It's hard to pass parameters to a block.
But now with my Google map thing I am totally digging AJAX, so I'll think about that. Another user on this site wanted the block to popup in a window and it would be useful to have that behavior there too.
Thanks I hope people like it, it was a very good learning experience to put that together. I still have a few minor issues I want to address on it. |
_________________ Only registered users can see links on this board! Get registered or login! - An Event Calendar for PHP-Nuke
Only registered users can see links on this board! Get registered or login! - A Google Maps Nuke Module |
|
|
 |
Gremmie

|
Posted:
Thu Feb 07, 2008 9:55 pm |
|
Wow, I can totally see using AJAX on the block like that.....  |
|
|
|
 |
fkelly

|
Posted:
Thu Feb 07, 2008 11:24 pm |
|
I'm not sure a page refresh would be all that bad. We do page refreshes in Nuke all the time for lesser reasons than that. Gcalendar is very nice and I am so glad to be rid of the Sweetphp calendar. It was a good application but it went away from Open Source and the author over extended himself into a dozen other things that he couldn't support either. |
|
|
|
 |
montego
Site Admin

Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Fri Feb 08, 2008 6:13 am |
|
Gremmie wrote: | Wow, I can totally see using AJAX on the block like that..... |
Very much agreed!
BTW, with hosts restricting number of SQL calls and with how "beefy" nuke is in that area, avoiding refreshes is actually a really good thing.
Besides, I am of the opinion that if we don't push people into the 21st century (such as the whole GoPHP5 effort tried to do), they'll continue to rot away in their tombs... Let us open their eyes and give them "life more abundantly".
 |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
 |
montego

|
Posted:
Fri Feb 08, 2008 6:17 am |
|
Of course, one thing that I have been thinking about is that a technology such as AJAX really should be a core service of RavenNuke. Can you imagine each and every one of us ending up distributing a set of AJAX libraries? Believe me, I've woken up out of a deep sleep with cold sweats with that very thought! lol. I was at least going to start building out a TegoNuke(tm) core set of libraries for all my stuff related to nuke, but I could just as easily have a more "smart" installer that could check for certain key services that are already installed. Something for us to consider... |
|
|
|
 |
Gremmie

|
Posted:
Fri Feb 08, 2008 8:32 am |
|
fkelly wrote: | I'm not sure a page refresh would be all that bad. We do page refreshes in Nuke all the time for lesser reasons than that. |
I think AJAX is the way to go here. How would you do it otherwise, I'm trying to think out loud here. The user clicks on the next month link in the block. How do I pass that to Nuke so the block knows how to draw the next month during the next refresh? Just create a new GET variable and hope some other module doesn't consume it? Set a cookie? You can't use the database unless you do it on a user by user basis. Yuck. I think AJAX is the cleaner solution.
Unfortunatly I have found that you pretty much have to load mainfile.php in the AJAX request so you get access to the standard nuke facilities. At first I tried doing direct PHP file requests, but soon I was missing things like the $db and is_user(). So finally my AJAX requests went back to the usual modules.php?name=xxx&file=ajax.php scheme. It works well but I was hoping for a more lighter "hit" on the system. Still it is not a complete redraw of the page and only a tiny amount of data is transferred. |
|
|
|
 |
Gremmie

|
Posted:
Fri Feb 08, 2008 8:34 am |
|
As far as AJAX libraries, montego, I am finding that very little needs to be done on the PHP side. It is mainly all Javascript, and not too much at that, at least so far for what I am doing in the member map module I am creating. |
|
|
|
 |
fkelly

|
Posted:
Fri Feb 08, 2008 11:06 am |
|
When you draw the block the first time could you essentially cache a couple of month's worth of calendars (say the next month and the month after that) into Javascript arrays? Then if the user clicks "next month" (or a graphic representation) make that an onclick event which would execute the javascript to display that "cached" month. You would probably be able to "catch" 90 percent of the requests by having cached the next two months and then you'd have to go to the page refresh approach to go beyond that.
This wouldn't require Ajax or anything like that. Sorry, I know I haven't fully thought this through. |
|
|
|
 |
Gremmie

|
Posted:
Fri Feb 08, 2008 11:21 am |
|
Yeah that sounds like that would work. It would mean extra processing if they never clicked on those links though. AJAX would keep the processing to only on demand.
Having never played with AJAX before until now, I'm really surprised at how easy it is. We should leverage this more in RavenNuke.  |
|
|
|
 |
montego

|
Posted:
Fri Feb 08, 2008 6:37 pm |
|
Gremmie wrote: | As far as AJAX libraries, montego, I am finding that very little needs to be done on the PHP side. It is mainly all Javascript, and not too much at that, at least so far for what I am doing in the member map module I am creating. |
However, there are still .js files to cache at the browser and parse right? Plus you have to write the js code to call what you need to call and respond to what comes back in the XML response.
So, yes, it can be "lite". Just saying that it would be nice to have core libraries for doing this in RN. We have to also think about what happens when so many different implementations of AJAX start to "bleed" into the mix... depending upon how these libraries are included, loaded, the risk of "collisions" in function names and variables and _____ start creeping in. If a developer could count on having a working library for RN, he/she could check for the ravennuke version constant (see rnconfig.php in SVN) and maybe not load his/her own.
Al cool stuff! Cannot wait to see the final product. |
|
|
|
 |
Gremmie

|
Posted:
Fri Feb 08, 2008 6:59 pm |
|
Sure, I can see a need for packaging up a few things, like the creation of the request object (which is browser dependent). But with only a few lines of javascript code you can do a lot. Most of the code to parse what comes back is application dependent. And if you use JSON instead of XML it is even easier, you just eval it (of course there are some security implications with that!).
Its definitely worth exploring some more. |
|
|
|
 |
jakec
Site Admin

Joined: Feb 06, 2006
Posts: 3048
Location: United Kingdom
|
Posted:
Tue Mar 11, 2008 11:51 am |
|
Just slightly off-topic, have you produced/looked at doing a countdown block for the next event in the calender?
I know you are busy, but just thought I would ask on the off chance.  |
|
|
|
 |
fkelly

|
Posted:
Tue Mar 11, 2008 2:49 pm |
|
To extend this a little. Would it be feasible to use the caching and boxover.js techniques that Kguske uses for incoming RSS feeds for the calendar. With feeds when you mouseover the headline in a feed box it reads (I think by javascript) from the cache and displays the full details of the feed. How cool would it be to have a month block in the left column and when you mouse over a date see all the detail of events in a Javascript drawn box.
Then move to another date and see the details of the events for that date. And I don't think there would be any page refreshes involved at all. |
|
|
|
 |
jakec

|
Posted:
Tue Mar 11, 2008 3:07 pm |
|
That would be very cool!  |
|
|
|
 |
Gremmie

|
Posted:
Tue Mar 11, 2008 5:48 pm |
|
I'm gearing up to make what might be my last revision to GCalendar, so thanks for the idea. I'm already doing some things with title tags on dates in the block, but a javascript box sounds cool. |
|
|
|
 |
montego

|
Posted:
Wed Mar 12, 2008 5:47 am |
|
Gremmie, oh please do not say "last revision"... You have the absolute best calendar module for *nuke on the market today. It would be a shame to not continue as ideas "hit you".  |
|
|
|
 |
Gremmie

|
Posted:
Wed Mar 12, 2008 7:29 am |
|
Well perhaps I am being somewhat melodramatic. I made it for my site and it does what I want it to do, so any changes beyond that I have to schedule in with my other interests and lack of free time. I think if I work on it in spurts I can keep going for a while. I just can't have it occupy all my time. I also find working in PHP4 a big non-starter now, and maybe I will refactor it into OO PHP5 to keep my interest in it.
(Edit: removed whine) |
Last edited by Gremmie on Sun Mar 16, 2008 4:54 pm; edited 1 time in total |
|
|
 |
Gremmie

|
Posted:
Thu Mar 13, 2008 7:06 pm |
|
Just found a stupid bug where exceptions to weekly events weren't getting handled at all in the monthly view! Oops. Another reason for me to work on the next version! |
|
|
|
 |
Gremmie

|
Posted:
Sun Mar 16, 2008 4:55 pm |
|
Well I've done some thinking and looking at the code. I think I'll start work on GCalendar 2.0. It will add some features people have asked for. But it will be in PHP5 to keep me interested.  |
|
|
|
 |
|