Open nabeelio opened 12 years ago
Don't forget to change the install templates to PHP. got those errors.. and I changed all of the install templates to PHP and it worked.
Notice: The template file "htdocs\phpVMS_tpl/install/templates\header.php" doesn't exist in htdocs\phpVMS_tpl\core\classes\TemplateSet.class.php on line 231
Notice: The template file "htdocs\phpVMS_tpl/install/templates\s1_db_setup.php" doesn't exist in htdocs\phpVMS_tpl\core\classes\TemplateSet.class.php on line 231
Notice: The template file "htdocs\phpVMS_tpl/install/templates\footer.php" doesn't exist in htdocs\phpVMS_tpl\core\classes\TemplateSet.class.php on line 231
I'll keep you updated.
What the...
Nabeel, When I installed this VMS from Github, I filled out the MySQL info, and I got those errorrs...
Writing to "" table...
Table 'tpl.phpvms_news' doesn't exist Writing to "" table...
Table 'tpl.phpvms_airports' doesn't exist Writing to "" table...
Table 'tpl.phpvms_ranks' doesn't exist Writing to "" table...
Table 'tpl.phpvms_groups' doesn't exist Writing to "" table...
Table 'tpl.phpvms_groups' doesn't exist Writing to "" table...
Table 'tpl.phpvms_groups' doesn't exist Writing to "" table...
Table 'tpl.phpvms_settings' doesn't exist Writing to "" table...
Table 'tpl.phpvms_settings' doesn't exist Writing to "" table...
Table 'tpl.phpvms_settings' doesn't exist Writing to "" table...
Table 'tpl.phpvms_settings' doesn't exist Writing to "" table...
Table 'tpl.phpvms_settings' doesn't exist Writing to "" table...
Table 'tpl.phpvms_settings' doesn't exist Writing to "" table...
Table 'tpl.phpvms_settings' doesn't exist
Warning: file_get_contents(htdocs\phpVMS_tpl/install/templates/config.tpl) [function.file-get-contents]: failed to open stream: No such file or directory in htdocs\phpVMS_tpl\install\includes\Installer.class.php on line 110
The tables weren't created.
I suppose we need to fix a few things in the Installer.class.php.
http://tomsterritt.com/phpvms/vms/core/templates/acarsmap.php Shows me a couple of lines of code in the source:
<script type="text/javascript">
var acars_map_defaults = {
autozoom: true,
zoom: 4,
center: new google.maps.LatLng("
@tomsterritt If you add this line, does it show anything?
<?php if(!defined('IN_PHPVMS') && IN_PHPVMS !== true) { die(); } ?>
@Vansers Yeah, I have to fix the clean install stuff, I'll try to do that today. This was more meant as a patch to existing installs.
Thanks guys!
Completely empty after adding that line. Huzzah
@tomsterritt Awesome! And the template still works as normal on the ACARS page? I'm going to push a commit with this change in all templates
Yep, all looks fine!
Few changes...
ref #72
@Vansers When you commit/push request next time, include the ticket # in the commit (like I did above) and it will include it directly into this ticket... no biggie :)
How does everything look? I fixed the database stuff.
When I went to /core/templates/acarsmap.php in the web browser, got this error message...
Notice: Use of undefined constant IN_PHPVMS - assumed 'IN_PHPVMS' in htdocs\test\core\templates\acarsmap.php on line 1
And it still works from the acars page? Great. I'll clean up the instructions. I gotta clean up the template code next.
Just got this in the Admin Center. Blank pages, with texts and error.
'Notice: The template file "htdocs\test\/admin/lib/layout\header.php" doesn't exist in htdocs\test\core\classes\TemplateSet.class.php on line 231'
We forgot the header.tpl and the footer.tpl to be changed. Should that been done?
Changed the header.tpl and footer.tpl to it's php. It's all good.
I think everything looks fine so far! Well done Nabeel!
Ahh yeah, those two - the new version doesn't use that anymore so that's why I missed it. Those do also need to be changed, yes - any .tpl files
Are we talking about the Admin Center layout? They still use header and footer.
Oh, woops. Guess I missed that one... :)
:), No worries.
pull request #96 is related
I guess this is completed? Maybe we should close or not?
Ongoing instructions (see commit logs)
Instructions:
Rename all .tpl files to .php
By hand if you're a masochist, or run in admin/templates, core/templates and in skin folders:
rename s/.tpl/.php/ *.tpl
Make code changes
core/classes/TemplateSet.class.php (line 48)
public $tpl_ext = 'php';
core/app.config.php (Line 30 ish), add the following:
define('IN_PHPVMS', true);
Also, find:
Config::Set('TPL_EXTENSION', '.tpl');
And change to:
Config::Set('TPL_EXTENSION', '.php');
Template changes
Add the following line to the top of every template file in core/templates, admin/templates and the templates in your skin:
<?php if(!defined('IN_PHPVMS') && IN_PHPVMS !== true) { die(); } ?>
Change to template engine
Note: If you do this change, you don't need to do the next step.
Find
public function getTemplate($tpl_name, $ret = false, $checkskin = true, $force_base = false) {
And add right below it:
Remove extension references from function calls
See commit ### for details of changes (not completed yet)