Txmmy83
-
Posts
493 -
Joined
-
Last visited
Content Type
Profiles
Forums
phpVMS Resources
Downloads
Posts posted by Txmmy83
-
-
gives that error
Fatal error: Call to undefined method Aircraft_Condition::__constructor() in /home/flyeurop/public_html/core/modules/Aircraft_Condition/Aircraft_Condition.php on line 6
-
Sorry to bump an old topic, but I have recently discovered phpvms. I have a website in joomla and use artisteer to make template, can someone please give tips in what format to export a template in artisteer and how to convert this format to phpvms template?
Many thanks to all in advance.
Regards,
Márcio
to use artisteer templates with phpVMS
you have to save the artisteer template in html and need to manually amend the index.html via dreamweaver or any other suitable html editor
it sounds bit difficult but it is easier than it sounds
rename the index.html to layout.tpl after you made the changes
making backup of the original 'unedited' template would be a good idea in case something goes wrong!
I use a Artisteer Template for my own VA
-
I have added the changes that Nabeel suggested to the code a couple of post above this. Please try.
what post do you mean #32?
if yes! getting that error with the code
Fatal error: Call to undefined method CodonModule::__constructor() in /home/flyeurop/public_html/core/modules/Aircraft_Condition/Aircraft_Condition.php on line 9
-
getting a Fatal error: Can't use function return value in write context in /home/flyeurop/public_html/core/modules/Aircraft_Condition/Aircraft_Condition.php on line 34
-
Just going over everything, and wanted to make sure, is this statement correct (I know the figures are insane, but just for testing purposes)
//Figure out the $cond that needs to be placed into the if($pirepinfo->landingrate > -1 && $pirepinfo->landingrate <-2000) $cond = $aircraft->cond -20;
Shouldn't it be:
//Figure out the $cond that needs to be placed into the if($pirepinfo->landingrate > -1)&& ($pirepinfo->landingrate <-2000) $cond = $aircraft->cond -20;
//Figure out the $cond that needs to be placed into the if(($pirepinfo->landingrate > -1)&& ($pirepinfo->landingrate <-2000)) $cond = $aircraft->cond -20;
but not completly sure
and if you look at this example from activity module
if(!$activities) { $activities = array(); }
could it be that we left out some {
}
so that the if never takes effect?
best regards
Thomas
-
unfortunately I have less to null expirience in writing functions
PS:
it does still not update the cond column
so will try again now! changed one thing
-
what is it expected to do now? when a PIREP is filed
I think cond column is also involved in aircraft price calculation have to look what file type is expected
-
Also to check
1. Is there a 'cond' column in the aircraft table?
2. What is the type of the 'cond' column?
'cond' column is there when Nighthawks addon is installed
'cond' column is varchar(15) as I have now looked up in DB which I think is another Problem
since it looks like we compare apples with stones
cond- a value wont work since a varchar works more like a extended version of string type?
-
maybe the reason why it doesnt set is in that code from OperationsData.class
public static function editAircraft($data) { $data['icao'] = DB::escape(strtoupper($data['icao'])); $data['name'] = DB::escape(strtoupper($data['name'])); $data['registration'] = DB::escape(strtoupper($data['registration'])); $data['range'] = ($data['range'] == '') ? 0 : $data['range']; $data['weight'] = ($data['weight'] == '') ? 0 : $data['weight']; $data['cruise'] = ($data['cruise'] == '') ? 0 : $data['cruise']; $data['range'] = str_replace(',', '', $data['range']); $data['weight'] = str_replace(',', '', $data['weight']); $data['cruise'] = str_replace(',', '', $data['cruise']); $data['maxpax'] = str_replace(',', '', $data['maxpax']); $data['maxcargo'] = str_replace(',', '', $data['maxcargo']); $data['price'] = ($data['price'] == '') ? 0 : $data['price']; $data['bought'] = ($data['bought'] == '') ? 0 : $data['bought']; $data['cond'] = ($data['cond'] == '') ? 0 : $data['cond']; $data['rep'] = ($data['rep'] == '') ? 0 : $data['rep']; if (empty($data['minrank'])) { $data['minrank'] = 0; } if ($data['enabled'] === true || $data['enabled'] == '1') $data['enabled'] = 1; else $data['enabled'] = 0; if ($data['minrank'] > 0) { $data['ranklevel'] = RanksData::getRankLevel($data['minrank']); } else { $data['ranklevel'] = 0; } $sql = "UPDATE " . TABLE_PREFIX . "aircraft SET "; $sql .= DB::build_update($data); $sql .= " WHERE `id`={$data['id']}"; /*$sql = "UPDATE " . TABLE_PREFIX."aircraft SET `icao`='{$data['icao']}', `name`='{$data['name']}', `fullname`='{$data['fullname']}', `registration`='{$data['registration']}', `downloadlink`='{$data['downloadlink']}', `imagelink`='{$data['imagelink']}', `range`='{$data['range']}', `weight`='{$data['weight']}', `cruise`='{$data['cruise']}', `maxpax`='{$data['maxpax']}', `maxcargo`='{$data['maxcargo']}', `minrank`={$data['minrank']}, `ranklevel`={$rank_level}, `enabled`={$data['enabled']}, `bought`={$data['bought']}, `cond`={$data['cond']},`rep`={$data['rep']} WHERE `id`={$data['id']}";*/ $res = DB::query($sql); if (DB::errno() != 0) return false; CodonCache::delete('all_aircraft'); CodonCache::delete('all_aircraft_enabled'); CodonCache::delete('all_aircraft_search'); CodonCache::delete('all_aircraft_search_enabled'); return true; }
best regards
Thomas
-
default name of datafield for registration in PIREP is Aircraft it gives an Int Value
example:
my ATR72 registration IEA0004 has Int value 195 this number equals the datafield ID in Aircraft Tab in DB
-
if I add that to Aircraft_Condition.php in modules folder
I get that error:
Parse error: syntax error, unexpected ';', expecting T_FUNCTION in /home/flyeurop/public_html/core/modules/Aircraft_Condition/Aircraft_Condition.php on line 40
the error is now fixed missed the closing }
or did I miss something?
guys if we get that Project to work it will enhance Nighthawks great mod by 1000%
-
I guess it is on the right track, but I get the following error:
Parse error: syntax error, unexpected T_STRING, expecting T_FUNCTION in /home/jdsarcco/public_html/uvsaaf/core/modules/Aircraft_Condition/Aircraft_Condition.php on line 21
dont exactly know what the error is
but from what I see in the error warning it gets a String but wants a Function as return value
how does Aircraft_Condition.php look like?
-
you could try adding a custom pirep field for landing rate
maybe it is possible to hand over that value to the datafield in DB
where do you but this function?
-
I would be better to add the code to the pirep acceptance code. That way all pireps no matter where they come from would run through the script.
what is the filename PIREPAdmin.php? and where have no expirience messing around with the PIREP functions
thanks in advance!
Thomas
-
Johan the condition table has nummeric int value not %
Instead of:
$cond = $cond -7%
try using:
$cond = $cond -7
etc.
but even then I am not sure if it is possible to modify the kACARS_Free.php free to do what you want
-
found it
it is in ops_aircraftbuysell.tpl starting line 14
// Condition for new Plane
$newrd= rand(95, 100);
// Price Calculation for new Plane
$acprice1="$aircraft->weight"*"$aircraft->maxpax"*("$aircraft->cruise"/100)*("$aircraft->range"*0.7 /"$aircraft->cruise");
-
wear factor is not yet implemented!
-
the airport icao lookup doesn't work at the moment or at least it is maybe only terrible slow
but I think you can still add an airport (search wikipedia in the info you find coordinates a click on it gives you LAT LON to work with phpVMS) you can use to set manually
-
Yeah. I actually have a lot more info about the hub in there, but this is a start for you.
thank you very much
-
Hi there,
I did something similar but had the problem that if one of my hub managers changed something on the page through the admin centre it messed up the code that i had added via the cpanel. Is there a way to avoid this??
Thanks
I expirienced the same especially if you use inline style definitions when someone modify later which I wanted to do by myself layout will mix up
I don't have a better solution at the moment as direct edit on the server which is a bit of a problem when an airline hand that task away to its hub manager or whatever the position in a VA is called (since hand over of FTP and server login data = not good idea! only do if you really trust in your hub manager and even then I as admin would think twice if I want to give a member that much competence!)
-
yes please post the codes I am interested too
-
i think their have to be a second elseif for the "on time"
with something like ($actualtime <= $schedtime)
best regards
Thomas
-
or in case you want restore it anytime later
<!--
<li><a href="<?php echo url('/finances');?>">View VA Finances</a></li>
-->
that just comment it out and it would not show up!
-
Parkho,
you get an reputation point from me too
but a question is there a public function that gives all tail-registration for aircraft type (icao) ?
Artisteer
in Skinning
Posted
what I meant with amend is the placement of the following php code parts
important parts are:
and for the Content
best way to start a template from scratch by clicking 'website or blog' which is the first icon on row 1 on start screen if you use Artisteer 3.1
here is my layout.tpl zipped which you can use as referrence
layout.zip