-
Posts
46 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by Aikanaro
-
Cmq era molto improbabile che avrebbero sviluppato una patch di compatibilità tra Ka-50 e A-10C, perchè le differenze sono sostanziali, forse un po' meno per i non addetti ai lavori. Si pensi solo alla gestione delle skin di Ka-50 e A-10C be chi di noi non ne ha fatte. Io ne ho fatte un paio qualche giorno fa e vi assicuro che l'una non ha nulla a che fare con l'altra, idem dicasi per il mission editor, e questi sono solo due punti a sfavore visibili ad occhio nudo. Pensate quanti altri legati alla programmazione protrebbero esserci. Purtroppo Ka-50 era stato sviluppato su basi FC, mentre per A-10 gli sviluppatori ne hanno stravolto il liguaggio di programmazione, forse per alcune funzionalità che il programma base FC non poteva soddisfare. Ora creare una patch di compatibilità tra BS e A-10 sarebbe stato come riscrivere BS da zero a quel punto cosa piu' intelligente da fare è ceare un modulo aggiuntivo per A-10. Io credo proprio che i due rimarranno simulatori a se stanti, ed a questo punto mi auspico che DCS butti fuori qualche modulo in più per A-10, che ne sò sarebbe bello avere un Apache, un caccia russo ed un caccia Americano, oltre al vecchio ka-50. Ne basterebbero tre per rendere questo sim molto piu' interessante. Over!!!
-
Ragazzi altro aggiornamento, mi sono accorto che nelle statistiche del pilota, nonostante in tabella p.e. ci fossero 4 abbattimneti, ne mostrava solo uno. Ho corretto il bug, ed ora mostra esattamente il numero di abbattimanti come in tabella. Ultimo Changelog: // 2011-08-01 (Update by Aikanaro) // * ADDED Italian localization // * ADDED Group Field // * ADDED Group in Event // * MODIFIED css file colour // * ADDED Destroyed in pilot stats // * Fix bug count display destroyed in pilot stats by Aikanaro // * MODIFIED & ADDED icon IMAGES Bomb, Parachutist, Chaff, Flare, Hit // * ADDED images in BIBLIO // * MODIFIED debriefing.php // * Fix bug display multy file .xml in debriefing.php // * Fix bug display Kill in pilots stats In allegato il solito pacchetto completo. PHPTacview.rar
-
Allora ultimo aggiornamento effettuato. Ho corretto il bug nel file bedriefing.php che non permetteva la visualizzazione corretta di piu' file .xml contemporaneamente. Ultimo changelog: // 2011-08-01 (Update by Aikanaro) // * ADDED Italian localization // * ADDED Group Field // * ADDED Group in Event // * MODIFIED css file colour // * ADDED Destroyed in pilot stats // * MODIFIED & ADDED icon IMAGES Bomb, Parachutist, Chaff, Flare, Hit // * ADDED images in BIBLIO // * MODIFIED debriefing.php // * Fix bug display multy file .xml in debriefing.php // * Fix bug display Kill in pilots stats In allegato il pacchetto completo. PHPTacview.rar
-
Ok queta è l'ultima versione aggiornata. Vi ringrazio anticipatamente a chiunque apporti modifiche sostanziali al file e pregherei anche di aggiornare il file tacview.php con l'elenco delle modifiche apportate in successione alle mie con relativo nick in modo da poter quanto meno tenere traccia di chi ha effettuato il lavoro nel tempo. Grazie a tutti. PHPTacview.rar
-
Ho aggiornato il file domani lo posto completo, per il momento visualizza solo gli abbattimenti A/A per gli altri non ne sono ancora venuto a capo.
-
Mago sarà anche morto per gli U.S.A. ma è ancora vivo tra le fila dell'aviazione Iraniana ed in quanto a performance è ancora superiore al suo sotituto F/A-18E/F Super Hornet per cui non è ancora per IL2 :megalol:
-
E si forse perchè ti sei perso queste righe:
-
Direi che hai avuto uno sfogo legittimo. La simulazione che tu intendi e vuoi ha però molti limiti che tu ci creda o no. Tu vorresti mettere in un unico software quello che ti da p.e. Arma II + A10-c + BlackShark + Falcon ( qualunque versione sia + ecc. ecc. . Sarebbe veramente bello e magari si puo' anche fare, magari si puo' fare tutto nella maniera piu' realistica possibile, ma tieni conto anche delle variabili quando fai questi sfoghi e ti spiego il perchè: 1° Probabilmente dvd con capacità di immagazzinare un software di tale spessore non ne esistono ancora. 2° Sicuramente per far girare un software di tale spessore serve un mega PC del Pentagono che non è alla portata delle tasche del consumatore. 3° Per sviluppare un software di tale portata sicuramente ci vorranno decine di anni prima che sia nelle mani del consumatore e 10 anni di lavoro di migliaia di persone a livello di marketing e costi per il consumatore, be fatti due conti ma onestamente credo che nessuno di noi possa permetterselo un game così costoso. 4° Una casa sicuramente non porterà mai avanti un progetto così a lungo termine, perche' potrebbe dimostrarsi un flop o perche' con la tecnilogia che avanza ogni 6 mesi dopo 10 anni sarebbe già obsoleto per il mercato. 5° Ultima considerazione, ammesso e non concesso che quanto detto ai punti precedenti fosse fattibile, immagina un utente comune come noi siamo alle prese con un editor di missione con migliaia di variabili da settare per fare una mix di 1 ora ( piani di volo, logistica a terra, truppe d'assalto, piani di volo rescue ecc.ecc. ) onestamente io mi romperei i cosiddetti solo a editare la missione figurati a volarla, e poi come se non bastasse il manuale di falcon conta piu' o meno 400 pagine e per un software del genere dovrebbero produrre un'enciclopedia multimediale allegata. Detto questo mi defilo dalla discussione. Walzer!!!!
-
Passa pure la mia email la trovi sul nostro sito.
-
Sono riuscito a fixare il bug che non visualizzava i kill nelle statistiche. Adesso come potete vedere dalla figura vengono visualizzati. La parte di script originale è questa: case "HasBeenHitBy": $this->stats[$event["Object"]["Pilot"]]["Hited"]["Count"]++; $this->stats[$event["Object"]["Pilot"]]["Hited"][$event["SecondaryObject"]["Parent"]["Name"]]++; if($event["SecondaryObject"]["Parent"]["Pilot"] != "" AND substr($event["SecondaryObject"]["Parent"]["Pilot"], 0, 6) != "Pilote") { // Teamkill ? if($event["AuxiliaryObject"]["Parent"]["Coalition"] == $event["Object"]["Coalition"]) { $this->stats[$event["AuxiliaryObject"]["Parent"]["Pilot"]]["TeamKilled"]["Count"]++; $this->stats[$event["AuxiliaryObject"]["Parent"]["Pilot"]]["TeamKilled"][$event["Object"]["Name"]]++; } else { $this->stats[$event["AuxiliaryObject"]["Parent"]["Pilot"]]["Killed"][$event["Object"]["Type"]]["Count"]++; $this->stats[$event["AuxiliaryObject"]["Parent"]["Pilot"]]["Killed"][$event["Object"]["Type"]][$event["Object"]["Name"]]++; } if(is_array($this->stats[$event["AuxiliaryObject"]["Parent"]["Pilot"]]["Events"])) { array_push($this->stats[$event["AuxiliaryObject"]["Parent"]["Pilot"]]["Events"], $event); } else { $this->stats[$event["AuxiliaryObject"]["Parent"]["Pilot"]]["Events"] = array(); array_push($this->stats[$event["AuxiliaryObject"]["Parent"]["Pilot"]]["Events"], $event); } } break; Mentre quella corretta è questa: case "HasBeenHitBy": $this->stats[$event["Object"]["Pilot"]]["Hited"]["Count"]++; $this->stats[$event["Object"]["Pilot"]]["Hited"][$event["SecondaryObject"]["Parent"]["Name"]]++; if($event["SecondaryObject"]["Parent"]["Pilot"] != "" AND substr($event["SecondaryObject"]["Parent"]["Piot"], 0, 6) != "Pilot"){ //Teamkill if($event["SecondaryObject"]["Parent"]["Coalition"] == $event["Object"]["Coalition"]) { // Fix bug display Kill change from AuxiliaryObject to SecondaryObject $this->stats[$event["SecondaryObject"]["Parent"]["Pilot"]]["TeamKilled"]["Count"]++; // Fix bug display Kill change from AuxiliaryObject to SecondaryObject $this->stats[$event["SecondaryObject"]["Parent"]["Pilot"]]["TeamKilled"][$event["Object"]["Name"]]++; // Fix bug display Kill change from AuxiliaryObject to SecondaryObject } else { $this->stats[$event["SecondaryObject"]["Parent"]["Pilot"]]["Killed"][$event["Object"]["Type"]]["Count"]++; // Fix bug display Kill change from AuxiliaryObject to SecondaryObject $this->stats[$event["SecondaryObject"]["Parent"]["Pilot"]]["Killed"][$event["Object"]["Type"]][$event["Object"]["Name"]]++; // Fix bug display Kill change from AuxiliaryObject to SecondaryObject } if(is_array($this->stats[$event["SecondaryObject"]["Parent"]["Pilot"]]["Events"])) { // Fix bug display Kill change from AuxiliaryObject to SecondaryObject array_push($this->stats[$event["SecondaryObject"]["Parent"]["Pilot"]]["Events"], $event); // Fix bug display Kill change from AuxiliaryObject to SecondaryObject } else { $this->stats[$event["SecondaryObject"]["Parent"]["Pilot"]]["Events"] = array(); // Fix bug display Kill change from AuxiliaryObject to SecondaryObject array_push($this->stats[$event["SecondaryObject"]["Parent"]["Pilot"]]["Events"], $event); // Fix bug display Kill change from AuxiliaryObject to SecondaryObject } } break; Nonostante la fix mi sono accorto che vengono visualizzati solo i Kill A/A mentre tutti gli altri no. Pazientate per futuri aggiornamenti ci sto ancora lavorando.
-
Cosa non ti funziona, anche se hai la versione Pro non cambia nulla nella conversione del file tacview in xml.
-
Come si suol dire, tentare non cuoce. Io nel frattempo sono riuscito a creare la connessione della pagina al database mysql ora si tratta di vedere come fare a popolare i campi della tabella.
-
Il file del tacview lo tiro giu' io direttamente dal server dalle prossime missioni, così da avere una certa affidabilità di dati, poi se dovesse occorerti nessun problema me lo dici e te lo metto in share sul vostro spazio FTP così te lo puoi scaricare.
-
Chrom, tenendo presente che non conosco nemmeno la programmazione php quello che sono riuscito a fare è già un miracolo. Vediamo anzi speriamo che si affacci qualche anima pia che mastichi meglio in php cosi' da integrare la parte di script per il database. Ad ogni modo non demordo ma continuo a lavorarci su.
-
Ragazzi c'e' bisogno che qualcuno mi dia una mano e si occupi quanto meno di trovare il modo di esportare i dati in maniera automatica in un database MySQL. Il terzo passo è vedere come automatizzare la conversione del file di tacview in .xml
-
C'e' da dire anche che la cartella biblio così come la cartella images, sono incomplete, per cui potrebbe capitarvi come è capitato a noi di fare un prova con una missione training per il rifornimento in volo e di riscontrare che nelle statistiche non venga mostrata l'immagine del KC-135 Stratotanker. Bene niente paura non viene mostrata solo perchè non c'e', così come l'immagine del A-10c perchè la nuova versione del Tacview lo nomina come A-10C Thunderbolt II, percui anche se nella cartella biblio l'immagine dell'A-10C c'e' non viene caricata perche' nominata in maniera diversa. Inserire le immagini mancanti non è poi cosi' difficile, basta aprire il file .xml con un semplice notepad ed andare a vedere come viene nominato l'oggetto in questione, a questo punto basta rinominare l'immagine esistente nella cartella bilbio oppure crearne una nuova con le identiche dimensioni. Passiamo ora alla cartella images. Qui vengono raccolte le icone che vengono visualizzate negli eventi. La cartella originale si presenta con queste icone: Io l'ho opportunamente modificata rinominando e aggiungendo alcune icone mancanti, questo sempre a seguito di mancata visualizzazione durante alcune prove. In sostanza ho modificato l'icona degli hit, ho rinominato le icone Parachutist con Infantry, ho aggiunto le icone dei Chaff e dei Flare ed in fine ho aggiunto le icone delle Bombe e quella del Parachutis, ottenendo negli eventi questo: Ora è possibile negli eventi identificare come si vede dalle frecce gialle e rosse, quando il velivolo viene abbattutto, se il pilota si è iettato e se è sopravvissuto o è stato abbattuto. In questa videata entrambi i piloti iettati per un qualsiasi motivo sono stati abbattuti. Nel caso in cui uno dei due o entrambi fossero sopravvissuti non avremmo avuto l'evento di abbattimento successivo al loro eject identificato dalla riga celeste. Ora per ottenere la visualizzazione di queste icone ho dovuto modificare la porzione di script in questo modo: # type $this->addOutput('<td class="ptv_rowType">'); switch($event["Object"]["Type"]) { case "SAM/AAA": $lImage = '<img src="'.$this->image_path.'images/SAM-AAA_'.$event["Object"]["Coalition"].'.gif" alt="" />'; break; case "Parachutist": $lImage = '<img src="'.$this->image_path.'images/Parachutist.gif" alt="" />'; //Aggiunta icona Paracadutista by Aikanaro break; case "CBU-97": $lImage = '<img src="'.$this->image_path.'images/CBU-97_'.$event["Object"]["Coalition"].'.gif" alt="" />'; //Aggiunta icona Bomba by Aikanaro break; case "Chaff": $lImage = '<img src="'.$this->image_path.'images/Chaff_'.$event["Object"]["Coalition"].'.gif" alt="" />'; //Aggiunta icona Chaff by Aikanaro break; case "Flare": $lImage = '<img src="'.$this->image_path.'images/Flare_'.$event["Object"]["Coalition"].'.gif" alt="" />'; //Aggiunta icona Flare by Aikanaro break; default: $lImage = '<img src="'.$this->image_path.'images/'.$event["Object"]["Type"].'_'.$event["Object"]["Coalition"].'.gif" alt="" />'; break;In allegato trovate la versione completa con tutti gli aggiornamenti effettuati. PHPTacview.rar
-
Ciao ragazzi. Oggi andiamo avanti con le modifiche effettuate. Come sapete già cliccando sul nome del pilota nella tabella delle statistiche si apre l'applet java che vi mostra le statistiche del profilo pilota come mostrato nella figura da PHPTacview originale. La parte di script originale si presenta così: $this->addOutput('<br /><h2>'.$this->L("pilotStats").'</h2>'); $this->addOutput('</tr>'); $this->addOutput('<tr>'); $this->addOutput('<td style="text-align: center; width: 50%;">'); $this->addOutput('<br /><strong>'.$this->L("takeoff_long").' :</strong><br />'); if(is_array($stat["TakeOffs"])){ foreach($stat["TakeOffs"] as $k => $v){ if($k != "Count") $this->addOutput(' - '.$k.' ('.$v.')<br />'); } } if($stat["TakeOffs"]["Count"] == "") $this->addOutput('('.$this->L("nothing").')<br />'); $this->addOutput('<br /><strong>'.$this->L("landing_long").' :</strong><br />'); if(is_array($stat["Lands"])){ foreach($stat["Lands"] as $k => $v){ if($k != "Count") $this->addOutput(' - '.$k.' ('.$v.')<br />'); } } if($stat["Lands"]["Count"] == "") $this->addOutput('('.$this->L("nothing").')<br />'); $this->addOutput('<br /><strong>'.$this->L("firedArmement_long").' :</strong><br />'); if(is_array($stat["Fired"])){ foreach($stat["Fired"] as $k => $v){ if($k != "Count") $this->addOutput(' - '.$k.' ('.$v.')<br />'); } } if($stat["Fired"]["Count"] == "") $this->addOutput('('.$this->L("nothing").')<br />'); $this->addOutput('<br /><strong>'.$this->L("teamKill").' :</strong><br />'); if(is_array($stat["TeamKilled"])){ foreach($stat["TeamKilled"] as $k => $v){ if($k != "Count") $this->addOutput(' - '.$k.' ('.$v.')<br />'); } } if($stat["TeamKilled"]["Count"] == "") $this->addOutput('('.$this->L("nothing").')<br />'); $this->addOutput('<br /><strong>'.$this->L("hitedBy").' :</strong><br />'); if(is_array($stat["Hited"])){ foreach($stat["Hited"] as $k => $v){ if($k != "Count") $this->addOutput(' - '.$k.' ('.$v.')<br />'); } } if($stat["Hited"]["Count"] == "") $this->addOutput('('.$this->L("nothing").')<br />'); $this->addOutput('</td>'); $this->addOutput('<td style="text-align: center;">'); $this->addOutput('<br /><strong>'.$this->L("killedAircraft").' :</strong><br />'); if(is_array($stat["Killed"]["Aircraft"])){ foreach($stat["Killed"]["Aircraft"] as $k => $v){ if($k != "Count") $this->addOutput(' - '.$k.' ('.$v.')<br />'); } } if($stat["Killed"]["Aircraft"]["Count"] == "") $this->addOutput('('.$this->L("nothing").')<br />'); $this->addOutput('<br /><strong>'.$this->L("killedHelo").' :</strong><br />'); if(is_array($stat["Killed"]["Helicopter"])){ foreach($stat["Killed"]["Helicopter"] as $k => $v){ if($k != "Count") $this->addOutput(' - '.$k.' ('.$v.')<br />'); } } if($stat["Killed"]["Helicopter"]["Count"] == "") $this->addOutput('('.$this->L("nothing").')<br />'); $this->addOutput('<br /><strong>'.$this->L("killedShip").' :</strong><br />'); if(is_array($stat["Killed"]["Ship"])){ foreach($stat["Killed"]["Ship"] as $k => $v){ if($k != "Count") $this->addOutput(' - '.$k.' ('.$v.')<br />'); } } if($stat["Killed"]["Ship"]["Count"] == "") $this->addOutput('('.$this->L("nothing").')<br />'); $this->addOutput('<br /><strong>'.$this->L("killedSAM").' :</strong><br />'); if(is_array($stat["Killed"]["SAM/AAA"])){ foreach($stat["Killed"]["SAM/AAA"] as $k => $v){ if($k != "Count") $this->addOutput(' - '.$k.' ('.$v.')<br />'); } } if($stat["Killed"]["SAM/AAA"]["Count"] == "") $this->addOutput('('.$this->L("nothing").')<br />'); $this->addOutput('<br /><strong>'.$this->L("killedTank").' :</strong><br />'); if(is_array($stat["Killed"]["Tank"])){ foreach($stat["Killed"]["Tank"] as $k => $v){ if($k != "Count") $this->addOutput(' - '.$k.' ('.$v.')<br />'); } } if($stat["Killed"]["Tank"]["Count"] == "") $this->addOutput('('.$this->L("nothing").')<br />');Ho pensato di modificarla in questo modo aggiungendo alle statistiche anche gli abbattimenti e la videata si presenta così: Come potete notare a differenza dell'immagine originale ho suddiviso le statistiche in 3 colonne aggiungendo anche quella degli abbattimenti e la porzione di script modificato si presenta così: $this->addOutput('<br /><h2>'.$this->L("pilotStats").'</h2>'); $this->addOutput('</tr>'); $this->addOutput('<tr>'); // Decolli $this->addOutput('<td style="text-align: center; width: 33%;">'); $this->addOutput('<br /><strong>'.$this->L("takeoff_long").' :</strong><br />'); if(is_array($stat["TakeOffs"])){ foreach($stat["TakeOffs"] as $k => $v){ if($k != "Count") $this->addOutput(' - '.$k.' ('.$v.')<br />'); } } if($stat["TakeOffs"]["Count"] == "") $this->addOutput('('.$this->L("nothing").')<br />'); // Atterraggi $this->addOutput('<br /><strong>'.$this->L("landing_long").' :</strong><br />'); if(is_array($stat["Lands"])){ foreach($stat["Lands"] as $k => $v){ if($k != "Count") $this->addOutput(' - '.$k.' ('.$v.')<br />'); } } if($stat["Lands"]["Count"] == "") $this->addOutput('('.$this->L("nothing").')<br />'); // Armamento Utilizzato $this->addOutput('<br /><strong>'.$this->L("firedArmement_long").' :</strong><br />'); if(is_array($stat["Fired"])){ foreach($stat["Fired"] as $k => $v){ if($k != "Count") $this->addOutput(' - '.$k.' ('.$v.')<br />'); } } if($stat["Fired"]["Count"] == "") $this->addOutput('('.$this->L("nothing").')<br />'); $this->addOutput('</td>'); // Fuoco Amico $this->addOutput('<td style="text-align: center; width: 33%;">'); $this->addOutput('<br /><strong>'.$this->L("teamKill").' :</strong><br />'); if(is_array($stat["TeamKilled"])){ foreach($stat["TeamKilled"] as $k => $v){ if($k != "Count") $this->addOutput(' - '.$k.' ('.$v.')<br />'); } } if($stat["TeamKilled"]["Count"] == "") $this->addOutput('('.$this->L("nothing").')<br />'); // Fuoco Nemico $this->addOutput('<br /><strong>'.$this->L("hitedBy").' :</strong><br />'); if(is_array($stat["Hited"])){ foreach($stat["Hited"] as $k => $v){ if($k != "Count") $this->addOutput(' - '.$k.' ('.$v.')<br />'); } } if($stat["Hited"]["Count"] == "") $this->addOutput('('.$this->L("nothing").')<br />'); // Abbattuto $this->addOutput('<br /><strong>'.$this->L("destroyed").' :</strong><br />'); // Aggiunta statistica abbattimenti nel profilo statistiche pilota by Aikanaro if(is_array($stat["Destroyed"]))$this->addOutput('('.$v.')<br />'); if($stat["Destroyed"]["Count"] == "") $this->addOutput('('.$this->L("nothing").')<br />'); $this->addOutput('</td>'); // Kill A/A $this->addOutput('<td style="text-align: center; width: 33%;">'); $this->addOutput('<br /><strong>'.$this->L("killedAircraft").' :</strong><br />'); if(is_array($stat["Killed"]["Aircraft"])){ foreach($stat["Killed"]["Aircraft"] as $k => $v){ if($k != "Count") $this->addOutput(' - '.$k.' ('.$v.')<br />'); } } if($stat["Killed"]["Aircraft"]["Count"] == "") $this->addOutput('('.$this->L("nothing").')<br />'); // Kill Helo $this->addOutput('<br /><strong>'.$this->L("killedHelo").' :</strong><br />'); if(is_array($stat["Killed"]["Helicopter"])){ foreach($stat["Killed"]["Helicopter"] as $k => $v){ if($k != "Count") $this->addOutput(' - '.$k.' ('.$v.')<br />'); } } if($stat["Killed"]["Helicopter"]["Count"] == "") $this->addOutput('('.$this->L("nothing").')<br />'); // Kill Ship $this->addOutput('<br /><strong>'.$this->L("killedShip").' :</strong><br />'); if(is_array($stat["Killed"]["Ship"])){ foreach($stat["Killed"]["Ship"] as $k => $v){ if($k != "Count") $this->addOutput(' - '.$k.' ('.$v.')<br />'); } } if($stat["Killed"]["Ship"]["Count"] == "") $this->addOutput('('.$this->L("nothing").')<br />'); // Kill SAM/AAA $this->addOutput('<br /><strong>'.$this->L("killedSAM").' :</strong><br />'); if(is_array($stat["Killed"]["SAM/AAA"])){ foreach($stat["Killed"]["SAM/AAA"] as $k => $v){ if($k != "Count") $this->addOutput(' - '.$k.' ('.$v.')<br />'); } } if($stat["Killed"]["SAM/AAA"]["Count"] == "") $this->addOutput('('.$this->L("nothing").')<br />'); // Kill Tank $this->addOutput('<br /><strong>'.$this->L("killedTank").' :</strong><br />'); if(is_array($stat["Killed"]["Tank"])){ foreach($stat["Killed"]["Tank"] as $k => $v){ if($k != "Count") $this->addOutput(' - '.$k.' ('.$v.')<br />'); } } if($stat["Killed"]["Tank"]["Count"] == "") $this->addOutput('('.$this->L("nothing").')<br />');
-
Passiamo al secondo passo. A questo punto ho effettuato alcune mofiche alla pagina tacview.php . Come prima cosa ho pensato di aggiungere alla tabella statistiche pilota il campo Gruppo, cosi' ho aggiunto al file originale : // List only main aircrafts' pilots if(!array_key_exists("Parent",$event["Object"]) and ($event["Object"]["Type"] == "Aircraft" or $event["Object"]["Type"] == "Helicopter")) { $this->stats[$event["Object"]["Pilot"]]["Aircraft"] = $event["Object"]["Name"]; La stringa di codice come sotto riportato: // List only main aircrafts' pilots if(!array_key_exists("Parent",$event["Object"]) and ($event["Object"]["Type"] == "Aircraft" or $event["Object"]["Type"] == "Helicopter")) { $this->stats[$event["Object"]["Pilot"]]["Aircraft"] = $event["Object"]["Name"]; // Aggiunto campo Gruppo nella tabella statistiche pilota by Aikanaro $this->stats[$event["Object"]["Pilot"]]["Group"] = $event["Object"]["Group"]; Ovviamente aggiungendo solo questa stringa di codice non basta, per cui ho modificato anche questa parte di codice originale : # display stats by pilot $this->addOutput('<br /><br /><h2>'.$this->L('statsByPilot').'</h2>'); $this->addOutput('<table cellpadding="0" cellspacing="1" class="ptv_statsTable" align="center">'); $this->addOutput('<tr>'); $this->addOutput('<th width="150">'.$this->L('pilotName').'</td>'); $this->addOutput('<th>'.$this->L('aircraft').'</td>'); //$this->addOutput('<th>'.$this->L('takeoff').'</td>'); //$this->addOutput('<th>'.$this->L('landing').'</td>'); $this->addOutput('<th>'.$this->L('firedArmement').'</td>'); $this->addOutput('<th width="55">'.$this->L('killedAircraft').'</td>'); $this->addOutput('<th width="55">'.$this->L('killedHelo').'</td>'); $this->addOutput('<th width="55">'.$this->L('killedShip').'</td>'); $this->addOutput('<th width="55">'.$this->L('killedSAM').'</td>'); $this->addOutput('<th width="55">'.$this->L('killedTank').'</td>'); $this->addOutput('<th width="55">'.$this->L('teamKill').'</td>'); $this->addOutput('<th>'.$this->L('hited').'</td>'); //$this->addOutput('<th>'.$this->L('destroyed').'</td>'); $this->addOutput('</tr>'); $class = "row1"; foreach($this->stats as $key => $stat) { if($key != "" AND substr($key, 0, 5) != "Pilot") { //$this->displayEventRow($event); $this->addOutput('<tr class="ptv_'.$class.'">'); $this->addOutput('<td><a href="javascript: showDetails(\''.$key.'\')">'.$key.'</a></td>'); //$this->addOutput('<td><img src="biblio/'.$stat["Aircraft"].'.jpg" alt="" class="biblio" /></td>'); // Riga decommentata by Aikanaro $this->addOutput('<td>'.$stat["Aircraft"].'</td>'); //$this->addOutput('<td>'.$stat["TakeOffs"]["Count"].'</td>'); //$this->addOutput('<td>'.$stat["Lands"]["Count"].'</td>'); $this->addOutput('<td>'.$stat["Fired"]["Count"].'</td>'); $this->addOutput('<td>'.$stat["Killed"]["Aircraft"]["Count"].'</td>'); $this->addOutput('<td>'.$stat["Killed"]["Helicopter"]["Count"].'</td>'); $this->addOutput('<td>'.$stat["Killed"]["Ship"]["Count"].'</td>'); $this->addOutput('<td>'.$stat["Killed"]["SAM/AAA"]["Count"].'</td>'); $this->addOutput('<td>'.$stat["Killed"]["Tank"]["Count"].'</td>'); $this->addOutput('<td>'.$stat["TeamKilled"]["Count"].'</td>'); //$this->addOutput('<td>'.($stat["Hited"]["Aircraft"]["Count"]+$stat["Hited"]["SAM/AAA"]["Count"]+$stat["Hited"]["Tank"]["Count"]).'</td>'); $this->addOutput('<td>'.$stat["Hited"]["Count"].'</td>'); //$this->addOutput('<td>'.$stat["Destroyed"]["Count"].'</td>'); $this->addOutput('</tr>');In questo modo aggiungendo la riga di codice per la visualizzazione della cella " Gruppo ", decommentando le righe di " Takeoff , Landing e Destroyed" per la visualizzazione delle celle " Decolli , Atterraggi e Abbattimenti" e rimuovendo la dimensione predefinita delle celle di modo che si adattino automaticamente al contenuto della cella stassa in questo modo: # display stats by pilot $this->addOutput('<br /><br /><h2>'.$this->L('statsByPilot').'</h2>'); $this->addOutput('<table cellpadding="0" cellspacing="1" class="ptv_statsTable" align="center">'); $this->addOutput('<tr>'); $this->addOutput('<th>'.$this->L('pilotName').'</td>'); $this->addOutput('<th>'.$this->L('model').'</td>'); $this->addOutput('<th>'.$this->L('aircraft').'</td>'); $this->addOutput('<th>'.$this->L('group').'</td>'); // Aggiunto campo Gruppo nella tabella statistiche pilota by Aikanaro $this->addOutput('<th>'.$this->L('takeoff').'</td>'); // Riga decommentata by Aikanaro $this->addOutput('<th>'.$this->L('landing').'</td>'); // Riga decommentata by Aikanaro $this->addOutput('<th>'.$this->L('firedArmement').'</td>'); $this->addOutput('<th>'.$this->L('killedAircraft').'</td>'); $this->addOutput('<th>'.$this->L('killedHelo').'</td>'); $this->addOutput('<th>'.$this->L('killedShip').'</td>'); $this->addOutput('<th>'.$this->L('killedSAM').'</td>'); $this->addOutput('<th>'.$this->L('killedTank').'</td>'); $this->addOutput('<th>'.$this->L('teamKill').'</td>'); $this->addOutput('<th>'.$this->L('hited').'</td>'); $this->addOutput('<th>'.$this->L('destroyed').'</td>'); // Riga decommentata by Aikanaro $this->addOutput('</tr>'); $class = "row1"; foreach($this->stats as $key => $stat) { if($key != "" AND substr($key, 0, 5) != "Pilot") { //$this->displayEventRow($event); $this->addOutput('<tr class="ptv_'.$class.'">'); $this->addOutput('<td><a href="javascript: showDetails(\''.$key.'\')">'.$key.'</a></td>'); $this->addOutput('<td><img src="biblio/'.$stat["Aircraft"].'.jpg" width="50" height="30" alt="" class="biblio" /></td>'); $this->addOutput('<td>'.$stat["Aircraft"].'</td>'); $this->addOutput('<td>'.$stat["Group"].'</td>'); // Aggiunto campo Gruppo nella tabella statistiche pilota by Aikanaro $this->addOutput('<td>'.$stat["TakeOffs"]["Count"].'</td>'); // Riga decommentata by Aikanaro $this->addOutput('<td>'.$stat["Lands"]["Count"].'</td>'); // Riga decommentata by Aikanaro $this->addOutput('<td>'.$stat["Fired"]["Count"].'</td>'); $this->addOutput('<td>'.$stat["Killed"]["Aircraft"]["Count"].'</td>'); $this->addOutput('<td>'.$stat["Killed"]["Helicopter"]["Count"].'</td>'); $this->addOutput('<td>'.$stat["Killed"]["Ship"]["Count"].'</td>'); $this->addOutput('<td>'.$stat["Killed"]["SAM/AAA"]["Count"].'</td>'); $this->addOutput('<td>'.$stat["Killed"]["Tank"]["Count"].'</td>'); $this->addOutput('<td>'.$stat["TeamKilled"]["Count"].'</td>'); //$this->addOutput('<td>'.($stat["Hited"]["Aircraft"]["Count"]+$stat["Hited"]["SAM/AAA"]["Count"]+$stat["Hited"]["Tank"]["Count"]).'</td>'); $this->addOutput('<td>'.$stat["Hited"]["Count"].'</td>'); $this->addOutput('<td>'.$stat["Destroyed"]["Count"].'</td>'); $this->addOutput('</tr>');Cosi' ho ottenuto anche i campi " Decolli, Atterraggi e Abbattimenti come indicato dalle frecce gialle in figura. Ovviamente siccome siamo italiani e non tutti masticano le lingue ho localizzato la pagina in italiano andando ad aggiungere nella cartella languages il file tacview_it.php tradotto in italiano cosi' : <?php // Traduzione italiana by Aikanaro $_LANGUAGE = array(); $_LANGUAGE['information'] = 'Informazione Missione'; $_LANGUAGE['events'] = 'Eventi'; $_LANGUAGE['missionName'] = 'Nome Missione'; $_LANGUAGE['missionTime'] = 'Ora Inizio'; $_LANGUAGE['missionDuration'] = 'Durata'; $_LANGUAGE['time'] = 'Tempo'; $_LANGUAGE['action'] = 'Azione'; $_LANGUAGE['type'] = 'Tipo'; $_LANGUAGE['HasLanded'] = 'e\' atterrato all\'aeroporto'; $_LANGUAGE['HasTakeOff'] = 'e\' decollato dall\'aeroporto'; $_LANGUAGE['HasBeenDestroyed'] = 'e\' stato abbattuto'; $_LANGUAGE['HasEnteredTheArea'] = 'e\' entrato nell\'area'; $_LANGUAGE['HasLeftTheArea'] = 'e\' uscito dall\'area'; $_LANGUAGE['HasFired'] = 'ha lanciato'; $_LANGUAGE['HasBeenHitBy'] = 'e\' stato colpito da'; $_LANGUAGE['statsByPilot'] = 'Statistiche Piloti'; $_LANGUAGE['pilotStats'] = 'Statistiche'; $_LANGUAGE['takeoff'] = 'Decolli'; $_LANGUAGE['takeoff_long'] = 'Decolli'; $_LANGUAGE['landing'] = 'Atterraggi'; $_LANGUAGE['landing_long'] = 'Atterraggi'; $_LANGUAGE['aircraft'] = 'Velivolo'; $_LANGUAGE['pilotName'] = 'Pilota'; $_LANGUAGE['firedArmement'] = 'Armi Utilizzate'; $_LANGUAGE['firedArmement_long'] = 'Armamento Utilizzato'; $_LANGUAGE['killedAircraft'] = 'Kill A/A'; $_LANGUAGE['killedSAM'] = 'Kill A/SAM'; $_LANGUAGE['killedTank'] = 'Kill A/Tank'; $_LANGUAGE['killedHelo'] = 'Kill A/Helo'; $_LANGUAGE['killedShip'] = 'Kill A/Ship'; $_LANGUAGE['teamKill'] = 'Fuoco Amico'; $_LANGUAGE['hited'] = 'Colpito'; $_LANGUAGE['destroyed'] = 'Abbattuto'; $_LANGUAGE['hitedBy'] = 'Colpito da'; $_LANGUAGE['nothing'] = '0'; $_LANGUAGE['ObjectShell'] = 'proiettile'; $_LANGUAGE['ObjectBullet'] = 'proiettile'; $_LANGUAGE['group'] = 'Gruppo'; // Aggiunto by Aikanaro $_LANGUAGE[''] = ''; $_LANGUAGE['model'] = 'Modello'; // Aggiunto by Aikanaro $_LANGUAGE[''] = ''; $_LANGUAGE[''] = ''; $_LANGUAGE[''] = ''; ?>Queste sono alcune modifiche che ho fatto su questo file e scommetto che qualcuno si starà chiedendo come mai non visualizzo l'immagine dell'aereo nella tabella statistiche del pilota? Be' la risposta è dentro di te ma è SBAGLIATA :megalol: Scherzo mi sono dimenticato di dirvi che bisogna decommentare la riga //$this->addOutput('<td><img src="biblio/'.$stat["Aircraft"].'.jpg" alt="" class="biblio" /></td>');che ho modificato aggiungendogli le diensioni per ridimensionare in automatico l'immagine contenuta nella cartella biblio in questo modo: $this->addOutput('<td><img src="biblio/'.$stat["Aircraft"].'.jpg" width="50" height="30" alt="" class="biblio" /></td>'); // Riga decommentataAdesso si è fatto tardi domani se ho tempo posto le altre modifiche. Walzer!!!
-
Ciao a tutti. Tanto per cominciare è d'obbligo dire che la versione di PHPTacview allo stato attuale è aggiornata per modo di dire ovvero retrogradata alla versione 0.93 del Tacview, con l'ultimo aggiornamento effettuato da Vyrtuoz il 9 Aprile 2011. Sostanzialmente il " Programma PHP " così come è funziona regolarmente, ma presenta alcuni malfunzionamenti che non sono veri e propri bug, ma solo mancanze dovute all'aggiornamento del software Tacview ed alla sua estrazione di dati. Ora detto questo andiamo ad esaminare il file example.php originale che si sviluppa cosi': <html> <head> <title>PHPTacview</title> <link rel="stylesheet" href="tacview.css" /> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> </head> <body class="lockonBody"> <?php require_once "./tacview.php"; $tv = new tacview("en"); $tv->proceedStats("./debriefings/Tacview-20061026-232652.xml", "Mission Test"); // $tv->proceedStats("./debriefings/Tacview-Demo-Ironhand-A-10A-M02.xml", "Mission Test"); // $tv->proceedStats("./debriefings/Tacview-20081017-221834 Black Shark Simple Flight.xml", "Mission Test"); echo $tv->getOutput(); ?> </body> </html>Questa non è altro che la pagina che noi andiamo a richiamare con il browser, che a sua volta chiede alla pagina tacview.php di processare i dati espressi dal file Tacview-xxxxx-xxxxx.xml contenuto all'interno della cartella debriefing. Come avete potuto notare la sintassi che legge il file .xml è questa: $tv->proceedStats("./debriefings/Tacview-20061026-232652.xml", "Mission Test");Questo cosa significa. Significa che ogni qual volta che esportiamo il file .xml con Tacview bisogna aprire il file example.php e modificare il nome del file .xml nella riga di sintassi sopra riportata affinche' il file venga letto. Siccome questa è un'operazione macchinosa nonostante sia semplice ho modificato il file example.php in questo modo: <html> <head> <title>PHPTacview</title> <link rel="stylesheet" href="tacview.css" /> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> </head> <body class="lockonBody"> <?php // 2011-08-01 (Updated by Aikanaro) // Automatizzata la lettura dei file XML nella cartella debriefig. require_once "./tacview.php"; foreach (glob("debriefings/*.xml") as $filexml) { $tv = new tacview("it"); $tv->proceedStats("$filexml","Mission Test"); echo $tv->getOutput(); } ?> </body> </html>La sintassi così modificata fa si che richiamando la pagina example.php dal browser questa richieda alla pagina tacview.php di processare i dati di qualunque file .xml sia contenuto nella cartella debriefing anche piu' di uno e che questo sia nominato (Tacview-20061026-232652.xml,Pippo.xml,Ciccio.xml) non gli interessa piu', l'importante e che sia un file con estensione .xml . E questo è il primo passo.
-
Salve ragazzi, coem Para vi ha anticipato ci sto lavorando da un bel po' su questo file e per farlo funzionare correttamente ho dovuto apportare alcune modifiche. Al momento sono al lavoro per cui non ho tempo a disposizione per menzionarle ma non appena rientro a casa vi posto qualcosa.