Jump to content

External 'pilot centre'


RossBurke

Recommended Posts

Hi All,

Basically, I'm more a designer that a 'coder' :P.

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).

post-748-071314600 1280424583_thumb.jpg

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • Administrators

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'; ?>

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

  • Administrators

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • Administrators

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.

Link to comment
Share on other sites

  • Administrators

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

Link to comment
Share on other sites

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>

Link to comment
Share on other sites

  • Administrators

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...