I also reset the variable that calendar script uses to create it's links so that it reads like the link above. Now this work fine but now I have a new problem which I don't know why it is doing. When you click on a link to say change the month of the calendar say January the link to do that on my page reads. www.mypage.com?page=http://www.mypage.com/cgi-bin/calendar.pl?month=1
This works but lets say I want to go to another month, say Febuary, nows where the problem starts. The link to Febuary reads like this www.mypage.com?page=http://www.mypage.com/cgi-bin/calendar.pl?month=1&month=2
Notice how the month variable got repeated agian, this does not produce the results I was looking for and I don't understand why it does this, and it only repeates twice, what I mean by that is the variable only repeates twice. So if I where to click on another link say the month after that it would link to... www.mypage.com?page=http://www.mypage.com/cgi-bin/calendar.pl?month=1&month=3
Wierd, anyone know why it does this? Please help!
Also I did not change the $base_dir because I changed it once to where it was located "www.mypage.com/cgi-bin/" and it made the page blank after that so I left $base_dir alone.
Because that's the way it is designed to work.
** and it only repeates twice **
Yes because CalendarScript deletes the extra ones when it assembles the new links for the page. It only acts on the final most one.
Did you look at how CalendarScript's URL works when it's on its own (ie. not included into your page)?
** Notice how the month variable got repeated agian, this does not produce the results I was looking for **
Why? What does it produce?
Maybe a link to your real installation would help us to see what's going on ourselves?
BTW. When including the script the way you are, what happens to the cookies CalendarScript sets??
Dan O.
[This message has been edited by DanO (edited June 14, 2004).]
I don't know what would cause that. How are you including the CalendarScript code into the planner.php page?
------------------
Maybe if Matt drops by he can offer a suggestion?
[This message has been edited by DanO (edited June 15, 2004).]
All I can do is guess (because you never did say exactly how your script is doing what it's doing) that when you send the calendar's URL back to your PHP script, PHP is breaking down some of the calendar's query string into its own query string variables.
Eg. In a URL like: http://www.s88781369.onlinehome.us/personal/planner.php?page=http://www.s88781369.onlinehome.us/personal/cgi-bin/calendar.pl?month=6&date=29&year=2004&year=2004&month=8&date=6
the planner.php script may be ending up with the following variables:
page=htp://ww.s88781369.onlinehome.us/personal/cgi-bin/calendar.pl?month=6
date=29
year=2004
month=8
date=6
If you're just passing the $page value back to your include() PHP function, no wonder the script isn't generating the correct results.
Note: If you properly URL encode the calendar.pl query string (so the PHP script doesn't think CalendarScript's variables are its own - like in the following URL), it seems to work.
http://www.s88781369.onlinehome.us/personal/planner.php?page=http://www.s88781369.onlinehome.us/personal/cgi-bin/calendar.pl%3Fmonth%3D6%26date%3D29%2 6year%3D2004%26year%3D2004%26month%3D8%26date%3D6
Maybe that observation will help? Otherwise I'm not sure there's much anyone here will be able to help you with without seeing exactly what code you're using.
JMO
[This message has been edited by DanO (edited June 22, 2004).]
The only thing now is I can get the first quotation mark on by modifing the variable calendar script uses to create it's links but I can't get the completing one on because calendar script tacks on extra variables at the end. Do you know of an easier way to fix this then going though all the calendar script code and adding the ending quotation mark to everything. Thanks.
...planner.php?htp://ww.s88781369.onlinehome.us/personal/cgi-bin/calendar.pl?month=8&year=2004&month=8&date=18
(note: NO "page=" designation)
Then that whole query string should be able to be retrieved in its entirety using the $QUERY_STRING environment variable which should be able to be passed to your PHP include function.
I still don't know what you're going to be doing with the cookies CalendarScript sets and uses although if your page is just used for viewing the calendar, they may not be needed.
[This message has been edited by DanO (edited June 25, 2004).]
Now I need to get the admin side working, it doesn't operate the same way the calendar side does though, even though it has a variable to set the URL in the config.txt file I can't find where it uses it. So I've looked around in the perl code and found that most of the linkage and everthing is done by a $CGI_URL variable that gets defined at runtime by the calendar_admin.pl script. It looks a little somthin like this...
# The CGI URL for call-back$Template::CGI_URL = $ENV{'SCRIPT_NAME'} | | $ENV{'REQUEST_URI'};
Now I tried changing this to what we have discussed earlier....
# The CGI URL for call-back$Template::CGI_URL = "http://www.s88781369.onlinehome.us/personal/planner.php?http://www.s88781369.onlinehome.us/personal/cgi-bin/calendar_admin.pl";
Yet it doesn't seam to do anything, when I try to login it just submits to itself and does nothing. Hmmm....