Añadir pic a fleetsteep1?

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Añadir pic a fleetsteep1?

      Hola quiero agregar a la pag fleetsteep1 en la seccion planetas una pequeña img del planeta en 2moons 2.0. EJ debajo:


      Agregue este fragmento pero esta {$planetimage}.png no esta definida por lo que me lanza error, como puedo definir dicha variable para que cargue las img de cada respectivo planeta. Saludos.

      Source Code: Page.FleetStep1.default.tpl

      1. <img src="./styles/theme/gow/planeten/small/{$planetimage}.png" style="width: 35px;">
      Error:
    • If you want to add the image of the planets to the list that the player has, you must add your variable in the corresponding php part to send it to your vie

      PHP

      PHP Source Code

      1. private function GetColonyList()
      2. {
      3. global $PLANET, $USER;
      4. $ColonyList = array();
      5. foreach ($USER['PLANETS'] as $CurPlanetID => $CurPlanet) {
      6. if ($PLANET['id'] == $CurPlanet['id'])
      7. continue;
      8. $ColonyList[] = array(
      9. 'name' => $CurPlanet['name'],
      10. 'galaxy' => $CurPlanet['galaxy'],
      11. 'system' => $CurPlanet['system'],
      12. 'planet' => $CurPlanet['planet'],
      13. 'type' => $CurPlanet['planet_type'],
      14. 'planetimage' => $CurPlanet['image'],
      15. );
      16. }
      17. return $ColonyList;
      18. }
      Display All
      TPL

      Smarty-Template

      1. <img src"{$dpath}planeten/small/{$ColonyRow.planetimage}.png">

      The post was edited 4 times, last by Danter14 ().

    • Danter14 wrote:

      If you want to add the image of the planets to the list that the player has, you must add your variable in the corresponding php part to send it to your vie

      PHP

      PHP Source Code

      1. private function GetColonyList()
      2. {
      3. global $PLANET, $USER;
      4. $ColonyList = array();
      5. foreach ($USER['PLANETS'] as $CurPlanetID => $CurPlanet) {
      6. if ($PLANET['id'] == $CurPlanet['id'])
      7. continue;
      8. $ColonyList[] = array(
      9. 'name' => $CurPlanet['name'],
      10. 'galaxy' => $CurPlanet['galaxy'],
      11. 'system' => $CurPlanet['system'],
      12. 'planet' => $CurPlanet['planet'],
      13. 'type' => $CurPlanet['planet_type'],
      14. 'planetimage' => $CurPlanet['image'],
      15. );
      16. }
      17. return $ColonyList;
      18. }
      Display All
      TPL

      Smarty-Template

      1. <img src"{$dpath}planeten/planet2d/{$ColonyRow.planetimage}.png">
      Exacto Muchas Gracias :D