PDA

View Full Version : ECP using wrong paths


eikman
09-07-2005, 12:36 PM
hi,

i managed to integrate EPC into my current wordpress site and everything seems to be working fine, except that when I click on the next/previous month button or select a month from the dropdown menu (in TOC mode), it is using a wrong path.

you can see my calendar here (http://thelastbeat.com/dates/)

once you click on the arrows in the top-right corner it is using /dates/XXXXXX, although it should be using /calendar/XXXXXX obviously.

any ideas how to fix this?

thanks in advance and keep up the good work!
-E

Brian
09-07-2005, 12:40 PM
This generally happens when using absolute paths to "require" the calendar instead of relative paths. Can you confirm which type you're using?

You can also use the $thisFile="x"; command to set the file name of the page.

eikman
09-07-2005, 12:47 PM
wow, that was fast!

i'm using <?php $CSS=1; require("calendar/calendar.php"); ?>


how do i use this $thisfile command?

eikman
09-07-2005, 12:47 PM
(posted twice)

Brian
09-07-2005, 12:50 PM
Just inset that before the require that displays the calendar on your page...

$thisFile="pageName.php";
require("calendar/calendar.php");

eikman
09-07-2005, 01:11 PM
hmm, this doesn't seem to work. it's still using domain/dates instead of domain/calendar...

guess i'll have to find another way around it...

Brian
09-07-2005, 01:16 PM
Are you including the calender from another page within that page (hope that makes sense) like a template? if so, the PHP could report the wrong path/fileName information to the calendar. If this is the case, it's best to require the file from the primary page and not an included file.

eikman
09-07-2005, 01:20 PM
thelastbeat.com/dates links to a file called dates.php in a different folder. in that dates.php i've included the

<?php $TOC=1;
require ("calendar/calendar.php");
?>

part.

eikman
09-07-2005, 02:08 PM
seems like i fixed it. i created a mod rewrite rule that changes /dates to /index and it's working now.

thanks for your help again :)