View Full Version : Add Event link from public calendar doesn't work.
mltsy
01-04-2007, 11:06 AM
The calendar is in /calendar and I have a page at /page2.php to which I added the calendar in normal mode.
When I am logged in, it allows me to click on a date in the calendar on /page2.php to "Add Event", but when I click it goes to /index.php?... which doesn't exist.
It should be going to /calendar/index.php?... shouldn't it? I don't know how it would know the correct path, but I figured there would either be a configuration option for that or the php script would use $_SERVER['DOCUMENT_ROOT'] and __FILE__ or something.
Am I doing something wrong?
Brian
01-04-2007, 04:14 PM
You can only edit events from the Event Manager. If you're seeing these links in your 'integrated' page, they won't work and should disappear after logging out of the Event Manager.
This is due to some systems carrying over login credentials to second browser windows when they actually shouldn't.
Your normal users will never see this.
mltsy
01-04-2007, 07:01 PM
Well, it was in the same browser window - I just added some events from the event manager and then when I was done, I went to my home page (without logging out). And the calendar displayed "add event" on rollover.
You're right that it probably shouldn't be a problem since the public won't see it, but I'm planning on buying the calendar and using it for a church website and not everyone who will be using it will know a lot about the internet :) I'm just afraid they will log in to add an event and then forget to log out and then get frustrated when they click on the calendar to add another evend (from the home page) and it doesn't work. Maybe you could add an option in the calendar display for suppressing the add event links or something?
Or even better would just be to make the link always link directly to the event manager no matter where it's coming from using $_SERVER['DOCUMENT_ROOT'], __FILE__ and $_SERVER['HTTP_HOST']... ?
mltsy
02-23-2007, 12:20 PM
I'm still having this problem. I'm wondering if it would be possible to add a "command line option" that just makes the calendar act as if you are not logged in on some pages... ?
I'm making the website for someone else, and it does seem to be an error, which I just don't want to have to explain to them... :)
-Joe
mltsy
02-23-2007, 12:35 PM
Alternately, you could solve the problem by using this in calendar.php instead of whatever you're using now for the "Add Event" link:
if (isset($_SERVER['DOCUMENT_ROOT']))
$addEventPage = str_replace($_SERVER['DOCUMENT_ROOT'], "", dirname(__FILE__))."/events/index.php";
else
$addEventPage = "index.php";
I'm also curious how it is that the calendar displayed by demo.php doesn't have the "add event" links on every date when you're logged in. That's exactly what I want, but I can't figure out how you do it. Any help?
Brian
02-23-2007, 12:51 PM
I'll see what I can do, but in all honesty, there aren't may reports of this being an issue and with our development schedule, it would take some time before I can do anything.
mltsy
02-23-2007, 06:31 PM
Thanks, I'd really appreciate the fix. I'd do it myself if I had the code! :)
How do you suppress the links in demo.php? Or is it a trade secret?
Brian
02-23-2007, 06:50 PM
If you're referring to the manager, etc. links at the top, just remove them by editing the demo.php file. :)
mltsy
02-24-2007, 01:38 PM
Oh, no I mean on the demo.php page, there is a small calendar displayed, and even when I'm logged in, the dates aren't displayed as links to "Add Event", they are just text. I'm wondering how that is done, because that's what I want. Just text dates - not links to "Add Event"
ve9gra
02-24-2007, 05:04 PM
If I'm not mistaken, it's because that page doesn't have anything initializing a session... So since there is no session started, it's the same as being logged off. If your other pages use a session that still has the credentials of the calendar, you will see those links.
mltsy
02-26-2007, 11:42 AM
I get it :) Well, can't do it that way I guess, hehe. Thanks.
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.