[STYLE]buildingpage 1.8

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

    • [STYLE]buildingpage 1.8


      its a template for the buildingpage.
      testgame <- here u can have a look at it in a game

      26.09.2017 / 1:11 update
      fix - french ' "
      Files
    • Hi, you could add a build and research button to build a maximum for example I need to build 100 levels at a time for one time please :|
    • watch your tpl file
      I remain at your disposal on the forum for any questions or help.

      A help is of course not a creation of a mod



      -------------------------------------------------------
      Spaccon 1.0 will be version 3.0 of 2moons that I'm coding
      Demo and coding 2moons 2.0
    • in the code you have a tag that is not closed which makes the lag
      I remain at your disposal on the forum for any questions or help.

      A help is of course not a creation of a mod



      -------------------------------------------------------
      Spaccon 1.0 will be version 3.0 of 2moons that I'm coding
      Demo and coding 2moons 2.0
    • as it looks, it is near the data-tooltip-content attribut. may it is caused from some tags within the language array.

      you have to look for ' ' or " ". this will cause the error i guess. i'll have a look....
      thy for reporting.
      i have reproduced the error and i try to fix it. one moment
      the problem is about d'une


      replace line 46 - 53 with

      HTML Source Code

      1. <div onclick="return Dialog.info({$ID})" style=" width:172px; height:172px; background:url('{$dpath}gebaeude/{$ID}.gif'); background-size:100% 100%;"><div style="background:rgba(13, 16, 20, 0.95); width:100%;"><a class="tooltip" data-tooltip-content="
      2. <div style='max-width:200px;'>
      3. {$LNG.shortDescription.{$ID}|replace:'"':'\''}<br><br>
      4. {if !empty($Element.infoEnergy)}
      5. {$LNG.bd_next_level|replace:'"':'\''}<br>
      6. {$Element.infoEnergy|replace:'"':'\''}<br><br>
      7. {/if}
      8. {$LNG.bd_remaining|replace:'"':'\''}<br>
      9. {foreach $Element.costOverflow as $ResType => $ResCount}
      10. {$LNG.tech.{$ResType}|replace:'"':'\''}:
      11. <span style='font-weight:700'>{$ResCount|number}</span><br>
      12. {/foreach} </div>" style="font-weight:bold; font-size:1.1em;" href="#" onclick="return Dialog.info({$ID})">{$LNG.tech.{$ID}}<br>{if $Element.level > 0}({$LNG.bd_lvl} {$Element.level}{if $Element.maxLevel != 255}/{$Element.maxLevel}{/if}){else}<br>{/if}</a></div></div>
      Display All


      same error occures with the researchpage it is cased cause of the use of ' and " in the french languagefiles
    • [Blocked Image: https://img11.hostingpics.net/pics/984115bug2.png]

      I still have a small visual bug.

      I would like everything to be put as well as you but at home it is ... bizars

      and I would like to know if it is possible to add:

      Requires XXX More Energy
    • this is cause of the long languagepart for constructiontime. if you shorten it to Tèmps for example the error is gone.
      language\fr\INGAME.php

      PHP Source Code

      1. $LNG['fgf_time'] = 'Temps de construction :';
      if u hover the building name, the needed energy should be showen. or you want it to be showen directly?
    • sure, one moment.
      btw u can delete the ':' in the languagefile then the '::' is only one


      ok
      in styles/templates/game/page.buildings.default.tpl
      line 45 change "height:284px;" to "height:304px;"
      line 65 change "height:60px;" to "height:80px;"



      line 68 add directly after {/foreach}

      Smarty-Template

      1. {if !empty($Element.infoEnergy)}
      2. <b><span style="color:{if $Element.infoEnergy > 0}lime{else}red{/if}">{$Element.infoEnergy}</span></b> <img src="{$dpath}images/energy.gif" alt="{$LNG.tech.{$RessID}}" width="20" height="20"><br>
      3. {/if}

      then change line 314 - 318 of the file includes/pages/game/ShowBuildingsPage.class.php to

      PHP Source Code

      1. if($requireEnergy < 0) {
      2. $infoEnergy = pretty_number($requireEnergy);
      3. } else {
      4. $infoEnergy = pretty_number($requireEnergy);
      5. }