Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Calendar Script - development.

Quote Reply
Calendar Script - development.
The calendar is on hold til next week. I have to bang out the ratings/review integrated script (separate thread).

Anyone who has calendar code, GT::SQL based, preferred, and wants to share for a somewhat large calendar, I'd love to get it :)

What's coming is not a groupware thing, but a calendar that can display site events, and even pick off birthdays, etc. It will allow users to keep their own lists of birthdays, reminders, etc that are overlayed on the calendar when they view it, so, for example, if they view the classes calendar, their "previous engagements" will be automatically overlayed.

I like the simple clean interface of Calendar Script, but I like the display options of Perl Cal (?). I want to have the option for the user (or administrator) pick the view (template sets) and allow month, week, 2 week, 3 week, 4 week, 6 week views, with the option to have the events listed down the side -- either current day/week for active sites, or the full date range for less active sites.

I also want the ability to set up several calendars, so you can have a "general" calendar, and then specific ones like "class schedule" or "birthdays", and the users can pick them from the "View" list easily.

See: http://gossamer-threads.com/...orum.cgi?post=241099;
for the full list of what I'm working on.

The two very active ones are Calendar and Ratings/Review at the moment.
ratings thread: http://www.gossamer-threads.com/...orum.cgi?post=241512

Suggestions welcome.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Calendar Script - development. In reply to
Also, (need to put it here before I forget), the ability to hot-link direct from the calendar to the event, or to the detail page, on an event-by-event basis.

I need this since I want my "New Arrivals" for that day to link to the forum message or posted photos, rather than a duplicated description.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Calendar Script - development. In reply to
Pugdog,

I've been searching for Event calendar scripts and I could'n find one that really satisfied my need. What I want is NOT a personal scheduler like 99% of all calendar applications on the web, but a SIMPLE event calendar where I can submit an event and have a small box that I can place via <%include calendar_day|week|month.html%> anywhere I like. The small box will be based on the template and it will just show a simple calendar showing the EVENTS that users have submitted. The process for validating events is exactly the same used for Links.

Now, I'm getting ready to start and develop this as a plugin for my personal use but it looks like you already have something in the works that looks exactly like the one I need. Can you PM me or simply discuss here additional information related to your script?

Thanks,
Quote Reply
Re: [jaltuve] Calendar Script - development. In reply to
Hi,

That is somewhat what I'm doing, and it is _certainly_ something that would be possible from this plugin.

"events" can be stored in the main database. I guess this would require a user to be validated, or something, to submit an event.

The events can be called with a standard "select" statement, and listed by day, or you can show a small calendar, with hot-links on each date to link to a list of events for that day.

All my plugins allow extensive template control of the formatting, since that is a _primary_ goal of my programming, ie: separating the html from the code, ie: output from data or code.

I'm looking at using Matt's caldar and Perl Cal as prototypes, but their back end is so different from Links, and don't seem to use the CPAN DateCalc module which has virtually all the functionality you need (or the perl port of Date Calc).

I'm going to try to support both, for those who can't install (compile) Date::Calc on their servers (it will be faster, as key parts are in C)

If you'd like to contribute to this, coming up with the add/submit forms and the routines to handle that would be helpful :) There is a lot that has to go on in the templates, and the "submit_event.cgi" script before it gets to the calendar. The form for Matt's calendar is a bit complex, and on too many pages for my liking. I think it needs to allow an event to be submitted/edited on one page, with a confirm page at most.

Suggestions?


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Calendar Script - development. In reply to
I'm banging on this again, and I have a question about caching pages. Generating a "detailed" calendar page on each user request seems to be a huge waste of resources, especially since the calendar will only change when an event changes.

The "unit" in a calendar is an "Event". That has a bunch of associated characteristics, the "key" is a "Date".

Events are assembled into display units called "Days".

Days are then assembled into calendars, which can be weeks or months.

The units change only as often as the smallest unit within them changes. A calendar changes if a Day changes, and a day changes if an event changes.

Right now, I'm generating the calendar by selecting events within a range, then sorting them into days, and then into a calendar.

Has anyone thought about caching this sort of data?

If I store "days" then when a calendar is assembled, I can just "include" the days that are part of that calendar.

If I then store the calendar, I can just "include" that whole unit, and only update that unit if a "day" changes.

I can trigger the updates through the calendar admin (ie: when an event is changed/added/deleted), or it can be done the first time that view is called.

There are problems with each sort of view, but it seems extremely wasteful to re-generate a calendar without caching at least _some_ data.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Calendar Script - development. In reply to
The silence is deafening.

Hard to build in, or create features, without feedback.

Makes me wonder if this sort of thing is worth stuffing into a plugin?


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Calendar Script - development. In reply to
Pugdog;

Perhaps it is unclear how a Calendar Plugin would be utilized.

Could you perhaps an explanation of where in Links SQL and how this Calendar Script/Plugin would be used? An example or two would help me visualise this. Then maybe I would be able to understand how your plugin would be used.
Quote Reply
Re: [webslicer] Calendar Script - development. In reply to
Hi,

I think I explained it, maybe I crossed threads.

It would be based on a wall calendar, similar to Matt Kruse's calendar script, in look and feel, but with changes to make it more Links-like or GT interface compatible. Also, to be SQL back end, template driven, etc.

From the webmaster point of view, he can set up calendars, which would be automatically perpetual. They would show the current month, or day, etc, without any interventions.

You can add dates, events and such to them. Recurring events, single events, whatever.

The idea is to allow a webmaster to post events going on. In my case, I have a rock & bead shop, and I want to post events, classes, and other things going on.

In addition, a user who has an account, can log on, and add their own personal events to the calendar. Such as birthdays, gift days, whatever. These events are ONLY seen on that users calendar.

This is not a groupware calendar, it's not a project planning or scheduling calendar, just a "Community Events" type calendar.

I'm at about 80% of it. The last 10-20% is always a killer. And then I have to make it a plugin (but since it's not a part of Links, that shouldn't be hard).

It will need a lot of template work, if people want fancy features, since I don't do javascript.

Actually, Matt's calendar program is _far_ more complex than it has to be, because he has to include database routines, a template parser, etc, all of which, and more, are built into any Links SQL installation. The date routines are built into PerlCalc (and I'm trying to allow the use of either DateCalc (if it's available) or PerlCalc since PerlCalc can be installed into your Links SQL directory if necessary (see the other thread here on date calculations). There are also a few CPAN available perl modules for doing calendar output, and I'm trying to integrate them, and make this pure-perl and as standard as I can.

The "tricks" are all done from the admin interface, and all involve Links stuff.

My templates are pretty poor, admittedly (but since this is a PUGWARE license) you'll be able to contribute back by developing better ones <G>. Actually, that is part of what a PUGWARE license is. You *MUST* contribute back any changes you make, or you are in violation of the license. That makes it a cooperative license, where EVERYONE has to contribute unless they use just the stock program, and make no significant changes to it. Since templates are 90% of the effort here, unlike most programs, there should be a wealth of templates to chose from, and the "core" set should get better with all the group effort.

Right now, I'm "stuck" on a logic flow for recurring events. My needs are odder than other calendars, and there are subtle things I have not worked out yet. Maybe I'll release a pre-beta that only has single events. That might get other people interested?

I have logic for recurring "static" events, such as "3rd tuesday of every month". I think I released a working global for that (and it works for GForum too, if you want to add a notification of conferences, meetings, etc to certain forums <G>)

What I'm looking for is what other stuff people want in a calendar. I'd like to get the database set up, and at least the back-end logic pretty set in stone before the first release, to prevent compatibility issues. You can always add fields (I *LOVE* that about passing hash-refs <G>), but the core fields need to be set, as does the driving functionality.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Calendar Script - suggestions In reply to
Pudog;

Thanks for the overview.

So this would mainly be utilized by webmasters that have actual events scheduled for surfers, like chat sessions, lessons, physical meeting, etc. Also, ones with a large user community.

I have a few feature requests:

Could you design it up to:

1) Take webmaster birthdays and registration dates out of the link owner profiles and maybe EM plus UM (Editor Monitor and User Monitor by Ian), and insert them into the calendar - send them an birthday email, and list the birthday also. You could also email link owners after 30 days or 6 months ot 1 year, thanking them, reminding them to keep the listing up to date, etc. That, for me would be cool.

2) Set calendar listings to trigger events - scripts, template changes, emailings (Oct 31 would trigger a orange and black theme change or a special popup.)

3) To show what was added or done that day: x links added (with link to page with listing of links added. That way we could look at July of 2002 and visually see how many links were approved per day.

4) I'd like to see a small (very small) calendar form that could be used to search a date range.

Say, to even simply list links added between June 1 and June 15th.

Finally, can you integrate it into a CMS/News script?

Articles could be displayed by week/month/searched range. And the Titles of the articles (linked to the pages) could be displayed on the weekly listing.

If not a CMS script, then Links with added article, author, heading, lead-in, etc fields.
I presently have a mod of liks that works well as an article/story database, but it could use a number of calendar functions.


These are functions we do not presently have that may be desired by enough webmasters to make it worth your time to implement them...

Regards!
Quote Reply
Re: [webslicer] Calendar Script - suggestions In reply to
Hi,

I need to look at your list, but to interact with other plugins, I need to have access to those plugins, and that isn't happening.

The code will be open source (even for them), so maybe the plugin authors would create the code to allow that.

The emailings sound like part of code for the classifieds. Actually, a "Trigger" plugin, sort of analogous to Yogi's page builder. You can enter "trigger" events, and the code will initiate some action on that trigger.

Actually, it might really be better as part of the calendar plugin since scheduling (trigger events) is part of the core logic.

I like the idea of tying "themes" to the calendar <G> I never thought of that, but that would be the best reason to integrate the "trigger" codes.

Code:


if date = holiday
set default_theme = holiday_theme
endif


all that would really need to be done, is to have a single cron job manage the trigger.cgi.

If you have an active site, it might be possible to avoid that by using a trigger in one of the other .cgi programs at a slight overhead penalty.

At any rate, it's a bunch of stuff to think about ;)

Moving the "What's New" and such to the calendar, is also a good idea. People not only will see a list of new links, but will see the whole week or month of "new" and be able to use the calendar to navigate.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Calendar Script - suggestions In reply to
Pugdog,

If It could be used by registered users to add links for their sites/organizations then I could use something like this on my site. I have a events calendar now but it doesn't integrate into my links portal and isn't sql based so its not very effective.

CCUnet
my Christian web
Quote Reply
Re: [ccunet] Calendar Script - suggestions In reply to
Well, I'm working on this, and hoped to have it done already, but life keeps getting in the way.

I really need this functionalilty, or at least the functionality I mentioned in the first post. I will try to add what else I can.

I might put up a pre-beta, but I'm still looking for some feedback, first.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Calendar Script - development. In reply to
I'm getting closer to an initial release.

Hopefully once the first release is out, there will be more input.

I'm still trying to figure out the clone/recurring events logic in a way that makes sense, (server load, resources, etc) wise.

But the first release should have:

1) add/update/delete an event. (No cron manager, yet).
2) administrator status, logged in user required. Uses Links User table for this.
3) monthly, day, week views (year view ?)
4) "clone" event, so you can have it appear on additional days, as separate entry (not _true_ recurring event).

a) upload images, automated image tags, shells, skins, etc.
b) users can add "private" events.
c) users can allow other users to view their events


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Calendar Script - development. In reply to
I've made some changes to my logic, on displaying the calendars.

I've been looking a large number of calendars out there, many CPAN modules, and some ideas have merit. It's just odd no one has put something together in all this time (I guess like DMOZ/RDF stuff).

The change in this case, (and I might keep both sorts of functionality in) is to look at how the calendar/day was built.

It's less expensive, from a database call point of view, to call all events within a date range, at one time, then build the calendar day-by-day by reading through the block of returned results. This logic is similar to the group-by-date logic on the New page. The calendar is then built reading through this sorted hash of sorted hash values, inserting a "blank" page where no values are found.

It's a tad less "expensive" to handle the no-events exception in the code, rather than execute a build_day routine.

But, in order to allow dates/days and a days of events to be used on other pages, it "pays" to put in the logic (develop the system) to build-by-day so the "core" logic of the system uses "Events" as objects (the "stored" object), and assembles them into "days" which are then assembled into the calendar.

Each portion is template driven, and hopefully, it will be easy to pass in a template from any point to override the default set, for display on different pages, or inclusion into a "Today" type listing.

Also, I'm toying with storing "recurring" events in a different table, so it would mean two database calls, but it would make processing easier:

1) gather all fixed-date events
2) request all recurring events
3) sort recurring events into the event-hash based on the date-range parameters.

The problem with a recurring event, is it has no "date" parameters, so they have to be assigned when the event is requested. "Tuesdays", "3rd Monday", etc are not "dates".

this gets complex really, really fast, with all sorts of "exceptions", so it's still for a later release,

Again -- any suggestions or comments....


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Calendar Script - development. In reply to
Exceptions:

I'm working on adding in "exceptions" to the logic.

I wanted to schedule classes for saturday, for example, but I didn't want them to show up for this weekend. Using current software, I couldn't see how to do this, so I'm adding this in to the Links Calendar.

What will happen, is if you enter a list of exceptions for an event, when the template is being printed out, the exception will be removed.

This is using a separate list, like Cat_Links, to match an Event_ID with an Exception_Date.

If anyone has suggestions or comments, now is the time.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
LSQL for Timeline? In reply to
We have a potential project, possibly some time next year, which could be done (perhaps) in LSQL if we were able to obtain date-based listings.

Imagine that every link refers to an historical event (our timescale would be from about 1500 years ago to the present). They would certainly be categorized by theme and place, but we would also require date-based search results and a calendar that could be adjusted interactively so that the basic display unit could be anything from a century down to a week.

Ideally, users would be able to submit event-links through the calendar as well as through conventional categories.

Would that be within the scope of your calendar script?
Quote Reply
Re: [YoYoYoYo] LSQL for Timeline? In reply to
I just saw this, on a random search. Missed it the first time.

It's possible. I'd need to know what you are specifically wanting in terms of output, but once the calendar routines are installed, you can do significant date arithmetic, display and such. I have not tried to print out more than a single year at a time... a century would be interesting... especially if you wanted to see what happened on every Jan 13th in the 1900's, for example.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] LSQL for Timeline? In reply to
pugdog
What became of this plugin?
ccunet
my Christian web
Quote Reply
Re: [ccunet] LSQL for Timeline? In reply to
It's still in planning. A few other things came up, and a potentially "bigger" project for this. Once I finish MyFavLinks that and the Amazon Book/Video shop are next in line.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] LSQL for Timeline? In reply to
Thanks for the update

ccunet
my Christian web
Quote Reply
Re: [pugdog] LSQL for Timeline? In reply to
I need this too? ANy timeframe? Maybe i can throw some cash your way to finish it up?
Quote Reply
Re: [netnow21] LSQL for Timeline? In reply to
This any good?

http://www.ultranerds.com/...ns/CalendarPro_L209/

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!