admin

admin

Postby lawrie » Tue Jun 03, 2008 12:09 pm

Hi,
Thanks for the script :-)
I am creating an admin folder and have moved index.php to it.
I have managed to alter the paths for the includes but cannot get the path right for lang.php.
admin & availability are folders in root.
Any advice appreciated.
Lawrie
lawrie
 
Posts: 3
Joined: Tue Jun 03, 2008 11:07 am

Re: admin

Postby chris » Tue Jun 03, 2008 12:34 pm

Hi there and welcome to the forum ;)

Strange that you can get the other paths working but not the language one????
In theory it should work in the same way as the functions.inc.php file for example-

I might have over confused the code with so many variables and constants :(
In your admin version of the calendar, try finding this line:

$the_file=DIR_LANG.LANG.".lang.php";

and replace it with the path hardcoded to where you "think" the lang file should be.
eg
$the_file="/availability/lang/.LANG.".lang.php";
or
$the_file="../availability/lang/.LANG.".lang.php";

etc.

Chris
User avatar
chris
Site Admin
 
Posts: 1089
Joined: Mon Dec 17, 2007 7:42 pm
Location: Málaga, Spain

Re: admin

Postby lawrie » Tue Jun 03, 2008 3:22 pm

Hi Chris,
I have tried all those variations and still get a file not found.
I have even put in an absolute url which goes to the file in a browser but cannot find the file in the script.
Made it work by duplicating the docs in the admin folder :)

Any way to make the calendar show 12 months by default?

(could always hard code the link to: ../availabilty_calendar/?months_to_show=12)

Thanks

Lawrie
lawrie
 
Posts: 3
Joined: Tue Jun 03, 2008 11:07 am

Re: admin

Postby chris » Tue Jun 03, 2008 3:30 pm

I have tried all those variations and still get a file not found.
I have even put in an absolute url which goes to the file in a browser but cannot find the file in the script.

An absolute url probably won't work as you are using a php inlcude and they normally need realative urls.

Where do you actually have the lang file?
Try using this:
Code: Select all
$the_file=$_SERVER["DOCUMENT_ROOT"]."/availability/".LANG.".lang.php";

also, add an "echo" there just to see what path you are actually using - maybe you have not defined the LANG???


Any way to make the calendar show 12 months by default?

(could always hard code the link to: ../availabilty_calendar/?months_to_show=12)

This is the bit where it defines the number of months to show:
Code: Select all
//    define number months to show
if(isset($_REQUEST["months_to_show"]))    define("MONTHS_TO_SHOW",   $_REQUEST["months_to_show"]);
else                           define("MONTHS_TO_SHOW",   12);

if you only ever wnat 12 months, just replace those 2 lines with:
Code: Select all
define("MONTHS_TO_SHOW",   12);


Chris
User avatar
chris
Site Admin
 
Posts: 1089
Joined: Mon Dec 17, 2007 7:42 pm
Location: Málaga, Spain

Re: admin

Postby lawrie » Tue Jun 03, 2008 9:04 pm

Hi Chris,
By absolute url I meant:
http://www.mysite/availability/lang/en.lang.php.
Anyway, I tried the latest suggestion and the file is not found.
If I cut & paste the path in IE it gives it goes to the file.
I have not changed the directory structure.

By duplicating the files in the admin folder it works fine.

The 12 month display also works.

Thanks for all your help with this :)

lawrie

happy to give you ftp access if you want to play but I am fine as it is working
lawrie
 
Posts: 3
Joined: Tue Jun 03, 2008 11:07 am

Re: admin

Postby chris » Tue Jun 03, 2008 9:24 pm

send me a pm with the ftp access if you want, I would like to see why it isn't working ;)

Chris
User avatar
chris
Site Admin
 
Posts: 1089
Joined: Mon Dec 17, 2007 7:42 pm
Location: Málaga, Spain


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron