[BUG-FIX]show missiles on the page Records >1.8

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

    • [BUG-FIX]show missiles on the page Records >1.8

      Esto se mostrará en las defensa
      Buscar

      Source Code: ShowRecordsPages.class.php

      1. } elseif (in_array($recordRow['elementID'], $reslist['build'])) {
      2. $buildList[$recordRow['elementID']][] = $recordRow;
      Agregar después

      PHP Source Code

      1. } elseif (in_array($recordRow['elementID'], $reslist['missile'])) {
      2. $defenseList[$recordRow['elementID']][] = $recordRow;



      Si lo quieres mostrar así:


      Buscar

      Source Code: ShowRecordsPages.class.php

      1. $buildList = array_fill_keys($reslist['build'], array());

      Agregar después

      Source Code

      1. $missileList = array_fill_keys($reslist['missile'], array());
      Buscar

      Source Code

      1. } elseif (in_array($recordRow['elementID'], $reslist['build'])) {
      2. $buildList[$recordRow['elementID']][] = $recordRow;
      Agregar después

      Source Code

      1. } elseif (in_array($recordRow['elementID'], $reslist['missile'])) {
      2. $missileList[$recordRow['elementID']][] = $recordRow;

      Buscar

      Source Code

      1. 'buildList' => $buildList,
      Agregar después

      Source Code

      1. 'missileList' => $missileList,


      Luego buscar

      Source Code: page.records.default.tpl

      1. <tr class="title">
      2. <th></th>
      3. <th>{$LNG.tech.400}</th>
      4. <th>{$LNG.rec_players}</th>
      5. <th>{$LNG.rec_count}</th>
      6. </tr>
      7. {foreach $defenseList as $elementID => $elementRow}
      8. <tr>
      9. <td><img src="{$dpath}gebaeude/{$elementID}.{if $elementID >=600 && $elementID <= 699}jpg{else}gif{/if}" width="50" height="50"></td>
      10. <td>{$LNG.tech.{$elementID}}</td>
      11. {if !empty($elementRow)}
      12. <td>{foreach $elementRow as $user}<a href='#' onclick='return Dialog.Playercard({$user.userID});'>{$user.username}</a>{if !$user@last}<br>{/if}{/foreach}</td>
      13. <td>{$elementRow[0].level|number}</td>
      14. {else}
      15. <td>-</td>
      16. <td>-</td>
      17. {/if}
      18. </tr>
      19. {/foreach}
      Display All
      Agregar después

      Source Code

      1. <tr class="title">
      2. <th></th>
      3. <th>{$LNG.tech.500}</th>
      4. <th>{$LNG.rec_players}</th>
      5. <th>{$LNG.rec_count}</th>
      6. </tr>
      7. {foreach $missileList as $elementID => $elementRow}
      8. <tr>
      9. <td><img src="{$dpath}gebaeude/{$elementID}.{if $elementID >=600 && $elementID <= 699}jpg{else}gif{/if}" width="50" height="50"></td>
      10. <td>{$LNG.tech.{$elementID}}</td>
      11. {if !empty($elementRow)}
      12. <td>{foreach $elementRow as $user}<a href='#' onclick='return Dialog.Playercard({$user.userID});'>{$user.username}</a>{if !$user@last}<br>{/if}{/foreach}</td>
      13. <td>{$elementRow[0].level|number}</td>
      14. {else}
      15. <td>-</td>
      16. <td>-</td>
      17. {/if}
      18. </tr>
      19. {/foreach}
      Display All
      Saludos. mi aporte a la comunidad espero que les sea útil. :D :D :D :D

      The post was edited 3 times, last by yamilrh ().