Welcome to Geeklog, Anonymous Sunday, December 01 2024 @ 03:41 pm EST

Geeklog Forums

Calendar's reminders and administration


Status: offline

LWC

Forum User
Full Member
Registered: 02/19/04
Posts: 818
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!
 Quote

Status: offline

1000ideen

Forum User
Full Member
Registered: 08/04/03
Posts: 1298
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.
 Quote

Status: offline

LWC

Forum User
Full Member
Registered: 02/19/04
Posts: 818
Yes, but not only would I lose the states in favor of countries, but the title would still read "State:".
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
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.
 Quote

Status: offline

LWC

Forum User
Full Member
Registered: 02/19/04
Posts: 818
Yea, in each and every language file...everytime there's a Geeklog upgrade...

What about the first two questions?
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
Quote by LWC:
So first of all, as an admin can I add/edit/view my users' calendars?
have you tried?
 Quote

Status: offline

LWC

Forum User
Full Member
Registered: 02/19/04
Posts: 818
Why would I ask if I knew how...?
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
Quote by LWC:
So first of all, as an admin can I add/edit/view my users' calendars?
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.
 Quote

Status: offline

1000ideen

Forum User
Full Member
Registered: 08/04/03
Posts: 1298
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.
 Quote

Status: offline

LWC

Forum User
Full Member
Registered: 02/19/04
Posts: 818
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).
 Quote

Status: offline

LWC

Forum User
Full Member
Registered: 02/19/04
Posts: 818
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.
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
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?
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.
 Quote

Status: offline

LWC

Forum User
Full Member
Registered: 02/19/04
Posts: 818
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)?
 Quote

Status: offline

LWC

Forum User
Full Member
Registered: 02/19/04
Posts: 818
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.
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
Quote by LWC:
But I was just thinking how the calendar has no recurring events, which doesn't exactly gives me extra motivation.
yet.

if it was me, I would just copy the function into my lib-custom function and edit it according to my needs.
 Quote

loard

Anonymous
BUMP.
Event reminder, It woud be cool. Any new suggestions? Confused
 Quote

Status: offline

hatric

Forum User
Junior
Registered: 09/19/05
Posts: 22
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.
 Quote

Status: offline

LWC

Forum User
Full Member
Registered: 02/19/04
Posts: 818
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:
  1. 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,
  2. This is the main issue - as mentioned above, I can't edit users' calendars directly!
 Quote

loard

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


Sounds Cool. Big Celebration

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
 Quote

Status: offline

LWC

Forum User
Full Member
Registered: 02/19/04
Posts: 818
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.
 Quote

All times are EST. The time is now 03:41 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content