View Full Version : Not correct URL when clicking on a date in calendar!
johannae
09-01-2005, 04:17 PM
Everything is working quite well, I'm thinking about buying this calendar. One problem though:
The calendar doesn't recognise that it's being used inside a webpage that is not in the calendar folder. When I click on a date, instead of being transferred into the events area
/calendar/events/index.php
the URL is just
index.php
where do I change this? I would also like to add some variables to the query string.
Brian
09-01-2005, 04:20 PM
Can you provide a link to your page?
What variables would you like to pass?
ve9gra
09-01-2005, 06:31 PM
I'm going to take a wild guess and say that you used the full url in your require() statements. You should use a relative path instead and that should fix that issue.
johannae
09-01-2005, 07:35 PM
here is the URL
http://www.feminetik.se/testing.php
Brian
09-01-2005, 07:40 PM
Appears to be working for me?
johannae
09-01-2005, 07:46 PM
Oh and another thing. I would like the current month to be the default view, but as it is now, August seems to be default most of the time. How do I fix this?
johannae
09-01-2005, 07:49 PM
When I try to add an entry by clicking on the calendar, I get my own index.php. You mean you don't?
johannae
09-01-2005, 07:58 PM
By the way: The days are only clickable once I log in throuh my link on the right side of the calendar.
Brian
09-01-2005, 08:34 PM
It works exactly as expected when I view the page. It opens with September and shows me several events. I click >> and see two events in October on the 8th and 9th.
The navigation and mouse-overs work as expected. Could be a cache issue with your browser?
johannae
09-02-2005, 05:04 AM
Two other persons who tried had the same problem. I use Firefox.
1) I open the browser and load testing.php The first time (when there is no session variable) everything is working as expected. It is not possible to click on days in the calendar, the only way to add new entries is through the link
Lägg till/ändra aktivitet (http://www.feminetik.se/calendar/events/index.php?dataMode=s&name=feminetik&pwd=snyggast)
which automatically logs you in. One-mouse-overs and everything else working as expected.
2) The next time I visit the calendar on testing.php the days are clickable (because of the session variable, I guess). That is great, but the URL (when clicking on a date) is not working.
The address is
http://www.feminetik.se/index.php?PHPSESSID=77dd42a62915622b69d778fd258971 4e&add=1&smo=9&sda=20&sye=2005
when it should in fact be
http://www.feminetik.se/calendar/events/index.php?PHPSESSID=77.........
You are suggesting a cache problem. The source code for the link looks like this:
<td class="s2" title="Add Event" style="cursor: pointer;" onclick="location.href='index.php?PHPSESSID=77dd42a62915622 b69d778fd2589714e&add=1&smo=9&sda=15&sye=2005';">15</td>
(with an active session variable)
and I guess that this code is automatically generated somewhere. I can't fint it in any file though.
johannae
09-02-2005, 05:12 AM
I am not sure if you understand the problem. The problem is that when clicking on a day in the calendar for adding an event, the event page is not loaded. Instead my own index page is loaded. This is html code that is generated somewhere, and should not be depending on my cache, since it is generated by the server.
The calendar works as expected when viewed in the event editor mode, because there, the relative link index.php will take you to the index.php file in calendar/events/ where we want to go.
When the calendar is viewed from the root folder of my domain, on the other hand, a link to index.php will lead to my main index page.
So why doesn't my calendar recognize which folder it is being viewed in?
johannae
09-02-2005, 06:05 AM
I found a solution to my problem. Not the best one, but here it is:
When I'm on any page that is not the events manager, the first thing I do is to kill all session variables connected to the calendar:
session_unregister('user');
session_unregister('pw');
session_unregister('dataMode');
session_unregister('mo');
session_unregister('yr');
Now the users never have the option to click on days in the calendar when it is being viewed outside event handler mode.
I still think this problem should be fixed in a better way though...
ve9gra
09-02-2005, 08:39 AM
The easier way would be to just allow the users to logoff from the event manager.... that would clear out all the session variables.
Brian
09-02-2005, 09:57 AM
Everything is working as designed.
You wouldn't want normal visitors to your site to be able to click on your calendar to edit events? (If you do, there's a way to do that too). You can only edit events while in the Event Manager. Not while viewing the test, demo, or integrated calendar on your own pages. It's not designed this way. It can only be done via the Event Manager.
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.