Posted on: 12/27/05 12:38pm
By: LWC
I have some questions about the calendar:
First of all, as an admin can I add/edit/view my users' calendars?
Secondly, if I want to get reminders via e-mail, I assume I have to do it through a cronjob. If so, do you know how can I run a PHP file in a cronjob? Should I just write "whatever.php" in a cronjob or maybe "php whatever.php" or what?
Thirdly, do you realize the calendar only has a list of states and not even an input text for a country?
Thanks!
Calendar's reminders and administration
Posted on: 12/27/05 12:51pm
By: 1000ideen
Hm, there is a states array in the config.php. Couldn't you just change / expand it to the necessary places? $_STATES = array
You can also change the type of events there: $_CONF['event_types']
As far as I know the GL 1.4.0 will run without cron jobs.
Calendar's reminders and administration
Posted on: 12/27/05 06:32pm
By: LWC
Yes, but not only would I lose the states in favor of countries, but the title would still read "State:".
Calendar's reminders and administration
Posted on: 12/27/05 07:26pm
By: machinari
you can always edit the language file to change "state" to "country"
and the calendar is being worked on by tokyoahead, afaik. perhaps shoot him a feature request.
Calendar's reminders and administration
Posted on: 12/28/05 06:58am
By: LWC
Yea, in each and every language file...everytime there's a Geeklog upgrade...
What about the first two questions?
Calendar's reminders and administration
Posted on: 12/28/05 12:21pm
By: machinari
[QUOTE BY= LWC]
So first of all, as an admin can I add/edit/view my users' calendars?
[/QUOTE]have you tried?
Calendar's reminders and administration
Posted on: 12/28/05 07:32pm
By: LWC
Why would I ask if I knew how...?
Calendar's reminders and administration
Posted on: 12/28/05 07:56pm
By: machinari
[QUOTE BY= LWC]
So first of all, as an admin can I add/edit/view my users' calendars?
[/QUOTE]obviously, the answer is no, you cant edit a member's private calendar. that would be like editing their preferences. It isn't built into the calendar functions and so the only way to edit their stuff would be to do it throught the db.
Calendar's reminders and administration
Posted on: 12/29/05 05:08am
By: 1000ideen
Just one more thought on that in general: It would be very helpful if the root admin could go into every account and settle things like uploading a user pic, editing the calendar etc. There are enough helples users who don`t get things done even with a description.
Calendar's reminders and administration
Posted on: 12/29/05 11:17am
By: LWC
I agree with 1000ideen. Even though such general tasks could easily be done in PHPMyAdmin, it's still annoying to log in there when I'm already in Geeklog. But controlling users' calendars would really be a chore in there as for something like that you really need a GUI of a calendar.
As for Crontab, I guess I must use "lynx -dump my.php" (do you think it's at least offline?)...or add it to the $asql checks in /index.php - the downsides are that in theory "no visitors=no reminders" and that it might create a heavy loads that is kind of a waste for events that may just happen in the far future. Then again, if Geeklog had supported reminders, I guess that's what it would have done anyway (that is, using /index.php).
Calendar's reminders and administration
Posted on: 12/29/05 11:49am
By: LWC
Ok, Lynx didn't work with it offline. It just treated it like a TXT file. But I've learned I can simply use "php myfile.php" (and since - at least in my server - the PHP's API is not really CGI, there's no need for me to make the PHP file executable or declare a CGI header and also -q isn't even needed!) and then it's truly offline and all I have to do is call /public_html/lib-common.php's COM_printUpcomingEvents function or just do a similar code.
Calendar's reminders and administration
Posted on: 12/29/05 02:13pm
By: machinari
[QUOTE BY= LWC]
Secondly, if I want to get reminders via e-mail, I assume I have to do it through a cronjob. If so, do you know how can I run a PHP file in a cronjob? Should I just write "whatever.php" in a cronjob or maybe "php whatever.php" or what?
[/QUOTE]well, the calendar is not a plugin yet, but the function, PLG_runScheduledTask(), in lib-plugins.php may help when it becomes a plugin. Until that time you could make use of the function, CUSTOM_runSheduledTask(), in lib-custom.php. Throw some COM_mail stuff in there with checks for whatever your users are being reminded of, etc. and you're good to go.
I think that is all Gl 1.4 stuff, but it's nothing to put it in a 1.3x setup.
Calendar's reminders and administration
Posted on: 12/29/05 06:50pm
By: LWC
You're right. I was thinking about the links and polls.
I've taken a look at those PLG_runScheduledTask() and CUSTOM_runSheduledTask() from the beta. Interesting. Basically, you define a period (the default is once a day) - let's call it X. Every time a visitor comes in, the site check if the scheduler has already run this X (e.g. today). If not, it runs...an empty function, which yousFrom the outer reaches of your mindsthe plugin can fill up.
Maybe I shall already implement it in 1.3.11sr3.
Anyway, finally spammers, who make sure our sites are never left alone, would have a purpose!
The next step is to run a SETI like thing using spammers (a "Useful Behavior" plugin, anybody?).
P.S.
CUSTOM_runSheduledTask (and yes, I know it's really like that and it's not your own mistake)?
Calendar's reminders and administration
Posted on: 12/30/05 10:26am
By: LWC
Throw some COM_mail stuff in there
Ah, but it's not that easy...COM_printUpcomingEvents only works for the
current user! If only it was COM_printUpcomingEvents(...,$uid) than I would have told CUSTOM_runSheduledTask() to call , say, COM_printUpcomingEvents(...,2).
But without it, it means a user would have to enter the site in person and log in just in order to activate the reminders!
Meanwhile, there's the master calendar but this forces me to run the admin's calendar as a public calendar (public at least for registered users)!
I guess I can just create a new function which is identical to COM_printUpcomingEvents except that it accepts $uid as a parameter and then keeps using it instead of $_USER['id'].
Or alternatively, an identical function except that it runs through all of personal calendars (by removing the "WHERE uid =" and the "AND !empty( $uid )" clauses).
But I was just thinking how the calendar has no recurring events, which doesn't exactly gives me extra motivation.
Calendar's reminders and administration
Posted on: 12/30/05 02:10pm
By: machinari
[QUOTE BY= LWC]
But I was just thinking how the calendar has no recurring events, which doesn't exactly gives me extra motivation.[/QUOTE]yet.
if it was me, I would just copy the function into my lib-custom function and edit it according to my needs.
Calendar's reminders and administration
Posted on: 08/03/06 02:19pm
By: Anonymous (loard)
BUMP.
Event reminder, It woud be cool. Any new suggestions?
Calendar's reminders and administration
Posted on: 08/03/06 06:45pm
By: hatric
This isn't about reminders per say, but as far as new suggestions...
I would like to see recurring events. As in when you plug in a birthday it would show up in every year and not just the current one.
It doesn't have to populate to hundreds of years in the future (too many datapoints) but maybe 3 or 5 years in the future would be good. Even better if you can determine how far in the future you would like the reccuration to continue.
Calendar's reminders and administration
Posted on: 08/04/06 04:50am
By: LWC
Actually, I've created a function that goes through each user's calendar and sends them reminders.
But since the GUI has no place to set reminders, I use the title. For example, if user X's event's title is "Ceremony (1 week)", then user X would be e-mailed 1 week before the event. The e-mail message he/she shall recieve would even contain a link to the event's edit URL.
My plan was to create myself users for my clients. I don't need them to set their calendars or even surf to my site (or even know they have users in it!). I just want to create calendars for them, so all they would get is event reminders (e.g. "time to renew the domain's registration").
The downsides are:
- You have to somehow know which keywords to use in the title. Like "(X week)", "(Y days)", etc. That's not a main issue because like I said my plan was to do it myself anyway,
- This is the main issue - as mentioned above, I can't edit users' calendars directly!
Calendar's reminders and administration
Posted on: 08/16/06 07:11pm
By: Anonymous (loard)
[QUOTE BY= LWC]
But since the GUI has no place to set reminders, I use the title. For example, if user X's event's title is "Ceremony (1 week)", then user X would be e-mailed 1 week before the event. The e-mail message he/she shall recieve would even contain a link to the event's edit URL.[/QUOTE]
Sounds Cool.
Can you post any progress or code about that reminder by title?
It will push for high that subscribe some events to Calendar would be very usefull things.
Thanks / Marco
Calendar's reminders and administration
Posted on: 08/17/06 05:55am
By: LWC
Sounds Cool.
Thanks.
Can you post any progress or code about that reminder by title?
What do you mean? I wasn't describing a plan. I've described the working code I've actually made.
It will push for high that subscribe some events to Calendar would be very usefull things.
Ha? Anyway, when you create your event, you just need to know and use the right title.