Jump to content

Txmmy83

Members
  • Posts

    493
  • Joined

  • Last visited

Posts posted by Txmmy83

  1. what I meant with amend is the placement of the following php code parts

    important parts are:

    <?php echo $page_htmlhead; ?>
    <?php
    Template::Show('core_htmlhead.tpl');
    ?>
    
    </head>
    <body>
    <?php $page_htmlreq; ?>
    

    and for the Content

    			<?php
    /* This will insert all of the "meat" of the page in there - the template
     which is generated, depending on which page you're on. To change these
     templates, check out the docs on the site. They're under the /core/templates
     folder, and to change them, copy them into the folder of your skin (the
     folder this file is in right now.
     */
    
    echo $page_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

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

    http://www.flyeurope-va.org

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

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

  5. 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?

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

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

  8. 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?

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

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

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

×
×
  • Create New...