Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks
Author Message
fkelly
Former Moderator in Good Standing


Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY

PostPosted: Thu Feb 07, 2008 9:15 pm Reply with quote

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.
 
View user's profile Send private message Visit poster's website
Gremmie
Former Moderator in Good Standing


Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA

PostPosted: Thu Feb 07, 2008 9:53 pm Reply with quote

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 
View user's profile Send private message
Gremmie
PostPosted: Thu Feb 07, 2008 9:55 pm Reply with quote

Wow, I can totally see using AJAX on the block like that..... Smile Smile Smile
 
fkelly
PostPosted: Thu Feb 07, 2008 11:24 pm Reply with quote

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: 9449
Location: Arizona

PostPosted: Fri Feb 08, 2008 6:13 am Reply with quote

Gremmie wrote:
Wow, I can totally see using AJAX on the block like that..... Smile Smile Smile


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".

ROTFL killing me

_________________
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! 
View user's profile Send private message Visit poster's website
montego
PostPosted: Fri Feb 08, 2008 6:17 am Reply with quote

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. Wink Something for us to consider...
 
Gremmie
PostPosted: Fri Feb 08, 2008 8:32 am Reply with quote

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
PostPosted: Fri Feb 08, 2008 8:34 am Reply with quote

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
PostPosted: Fri Feb 08, 2008 11:06 am Reply with quote

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
PostPosted: Fri Feb 08, 2008 11:21 am Reply with quote

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. Smile
 
montego
PostPosted: Fri Feb 08, 2008 6:37 pm Reply with quote

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? Wink 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
PostPosted: Fri Feb 08, 2008 6:59 pm Reply with quote

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

PostPosted: Tue Mar 11, 2008 11:51 am Reply with quote

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. Very Happy
 
View user's profile Send private message
fkelly
PostPosted: Tue Mar 11, 2008 2:49 pm Reply with quote

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
PostPosted: Tue Mar 11, 2008 3:07 pm Reply with quote

That would be very cool! Very Happy
 
Gremmie
PostPosted: Tue Mar 11, 2008 5:48 pm Reply with quote

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
PostPosted: Wed Mar 12, 2008 5:47 am Reply with quote

Gremmie, oh please do not say "last revision"... Sad 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". Wink
 
Gremmie
PostPosted: Wed Mar 12, 2008 7:29 am Reply with quote

Well perhaps I am being somewhat melodramatic. Smile 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
PostPosted: Thu Mar 13, 2008 7:06 pm Reply with quote

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
PostPosted: Sun Mar 16, 2008 4:55 pm Reply with quote

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. Smile
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©