RossBurke Posted July 29, 2010 Report Share Posted July 29, 2010 Hi All, Basically, I'm more a designer that a 'coder' . What I would like is to be able to have a pop out pilot centre like the one below (seperate from the main website). But obviously its not going to be part of the template however for some of the pages I would like to use the code from the.tpl files ( if you follow me). However I'm kinda confused on how to go about this. Is it too hard for someone who knows little php? Cheers in advanced Ross EDIT: Just had a thoguht. If worse comes to worse i could use PHP includes? or a wrapper something like that Quote Link to comment Share on other sites More sharing options...
Thomas Posted July 29, 2010 Report Share Posted July 29, 2010 Not quite sure what you actually mean, could you explain a little more maybe? Edit I'm more of a style guy myself, like you however I think if you use the include something like this; <?php include("profile_main.tpl"); ?> It may work, not too sure but its worth a try! -Thomas. Quote Link to comment Share on other sites More sharing options...
Flightguy123 Posted July 30, 2010 Report Share Posted July 30, 2010 Well, you could have it on a different page, like not connected to the website..... Or you would have to make it in the .tpl form... If you explain a bit mroe in depth I can help you... Ada Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted July 30, 2010 Administrators Report Share Posted July 30, 2010 If you are trying to lose the phpvms layout and have a different layout for your pilot module but still use data from phpvms and the functions built in to it, there are two ways you can do it. 1 - action.php instead of index.php will bypass the template structure and you can direct the function to bring up a template that has only what you want in it. 2 - create your own pages and load the codon structure at the start to make all the functions available in your stand alone page -> <?php include_once'path to /codon.config.php'; ?> Quote Link to comment Share on other sites More sharing options...
RossBurke Posted July 30, 2010 Author Report Share Posted July 30, 2010 Hi All, Thanks for getting back. simpilot when I add teh codon.config to the file i get an error? http://www.virginatlanticva.co.uk/pilotcentre/index.php Warning: include_once(core/codon.config.php) [function.include-once]: failed to open stream: No such file or directory in /home/virginat/public_html/pilotcentre/index.php on line 465 Warning: include_once() [function.include]: Failed opening 'core/codon.config.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/virginat/public_html/pilotcentre/index.php on line 465 <?php include_once'core/codon.config.php'; ?> Is what I put in. Any ideas? Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted July 31, 2010 Administrators Report Share Posted July 31, 2010 Hi All, Thanks for getting back. simpilot when I add teh codon.config to the file i get an error? http://www.virginatlanticva.co.uk/pilotcentre/index.php Warning: include_once(core/codon.config.php) [function.include-once]: failed to open stream: No such file or directory in /home/virginat/public_html/pilotcentre/index.php on line 465 Warning: include_once() [function.include]: Failed opening 'core/codon.config.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/virginat/public_html/pilotcentre/index.php on line 465 Is what I put in. Any ideas? Your error shows that you are trying to find the file in include_path='.:/usr/lib/php:/usr/local/lib/php' I don't think you have your file in the php library.You need to have the complete path to the file if it in not in the same directory or a sub directory of where the file is that is calling it. -> if phpvms is set up in the root then it should be something like -> ../core/codon.config.php or if that will not work try http ://www.yoursite.com/core/codon.config.php if phpvms is in a subfolder than you will have to add that to the path in your include function. Quote Link to comment Share on other sites More sharing options...
RossBurke Posted July 31, 2010 Author Report Share Posted July 31, 2010 Ok we're getting there, it's found the file, but ... Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/virginat/public_html/pilotcentre/index.php:7) in /home/virginat/public_html/core/codon.config.php on line 40 Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted July 31, 2010 Administrators Report Share Posted July 31, 2010 Ok we're getting there, it's found the file, but ... Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/virginat/public_html/pilotcentre/index.php:7) in /home/virginat/public_html/core/codon.config.php on line 40 Are you starting a session in your standalone file? it is either that or you have white space after your closing php tag. Quote Link to comment Share on other sites More sharing options...
RossBurke Posted July 31, 2010 Author Report Share Posted July 31, 2010 Not sure what you mean, stand alonefile? But there is no white space Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted July 31, 2010 Administrators Report Share Posted July 31, 2010 Not sure what you mean, stand alonefile? But there is no white space Maybe I am mis-understanding but I thought you were building basically a standalone site for your pilots to use but still use the data from phpvms. ie -> your phpvms is "root/phpvms" and your pilot center is "root/pilotcenter" so your pilotcenter is operating outside of the phpvms install. if you are within phpvms you would already have access to the data and functions. If you are just trying to bypass the skin and work within the phpvms install then I would use the action.php method. When I say whitespace, check and see if there are any spaces after the last php tag in your files, have those will give you the "headers already sent" error Quote Link to comment Share on other sites More sharing options...
RossBurke Posted July 31, 2010 Author Report Share Posted July 31, 2010 your phpvms is "root/phpvms"and your pilot center is "root/pilotcenter" This is correct, and there are no spaces im sure :/ <?php include_once'../core/codon.config.php';?><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Untitled Document</title></head><body> Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted August 1, 2010 Administrators Report Share Posted August 1, 2010 Can you post your code to pastebin and post the link here in the forum. Please dont post entire pages of code here in the forum. Quote Link to comment Share on other sites More sharing options...
RossBurke Posted August 1, 2010 Author Report Share Posted August 1, 2010 http://pastebin.com/FmMeP2ms Quote Link to comment Share on other sites More sharing options...
RossBurke Posted August 2, 2010 Author Report Share Posted August 2, 2010 Is this the code you wanted to see? ^ Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted August 2, 2010 Administrators Report Share Posted August 2, 2010 I loaded your script on my local server and it works fine, no errors outside of not having the images. It may be the way your server is configured, try putting the file in another directory and linking to the config file with the new path. Quote Link to comment Share on other sites More sharing options...
RossBurke Posted August 2, 2010 Author Report Share Posted August 2, 2010 Tried that, same Issue. We're using hosting from here, so maybe Nabeel could shed some light? Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted August 4, 2010 Administrators Report Share Posted August 4, 2010 What's the exact error? Quote Link to comment Share on other sites More sharing options...
Moderators mark1million Posted August 4, 2010 Moderators Report Share Posted August 4, 2010 Have you tried to include the codon config with the actual path not a url. Example my test server the include path is, <?php include_once'/srv/www/directory_name/public_html/core/codon.config.php';?> Just a thought. Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted August 5, 2010 Administrators Report Share Posted August 5, 2010 It'll give you an error with the exact line the error is on Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.