How to make a comment for battle report?

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

    • you have disquis solution. use battle report ID to generate unique "posts" to comment.
    • this is what is looks like tpl and php the php whas used from another file and renamed..thats how this one was done

      Smarty-Template

      1. <table class="tablesorter ally_ranks">
      2. <tbody>
      3. <div id="disqus_thread"></div>
      4. <script type="text/javascript">
      5. /* * * CONFIGURATION VARIABLES * * */
      6. var disqus_shortname = 'this will be your id given by disqus';
      7. /* * * DON'T EDIT BELOW THIS LINE * * */
      8. (function() {
      9. var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
      10. dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
      11. (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
      12. })();
      13. </script>
      14. </tbody>
      15. </table>
      Display All


      PHP Source Code

      1. <?php
      2. class ShowwhateveryoucallitPage extends AbstractPage
      3. {
      4. public static $requireModule = 0;
      5. function __construct()
      6. {
      7. parent::__construct();
      8. }
      9. function show(){
      10. global $USER, $PLANET, $LNG, $UNI, $CONF,$resource,$pricelist;
      11. $this->tplObj->assign_vars(
      12. array(
      13. )
      14. );
      15. $this->display("page.whateveryoucallit.default.tpl");
      16. }
      17. }
      18. ?>
      Display All
    • is it really needed a new page for it? I believe adding to shared.mission.raport is enough, since you do not need anything from php ;)
    • your right you can just add this to the bottom of the report page shared.mission.raport

      Source Code

      1. <div id="disqus_thread"></div>
      2. <script type="text/javascript">
      3. /* * * CONFIGURATION VARIABLES * * */
      4. var disqus_shortname = 'youownname';
      5. /* * * DON'T EDIT BELOW THIS LINE * * */
      6. (function() {
      7. var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
      8. dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
      9. (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
      10. })();
      11. </script>
      Display All
    • or you can add your chat in their also

      <div id="chat" class="conteiner" style="overflow:hidden;">
      <form name="chat_form">
      <iframe src="./chat/index.php?action={$smarty.get.action|default:''|escape:'html'}" style="border: 0px;width:100%;height:400px;margin-top:-70px;" ALLOWTRANSPARENCY="true"></iframe>
      </div>
    • you can use use something like this in the tpl it is an example taken from tutorial mod but looks like what your pic looks...again this is just an example of what looks like your looking for.....

      Smarty-Template

      1. <table class="table517">
      2. <tbody><tr>
      3. <td class="kategorie" colspan="10"><div align="center"><strong>tut_tut</strong></div></td>
      4. </tr>
      5. <tr>
      6. <th width="56" colspan="1"><div align="center"><a href="game.php?page=tutorial&mode=m1">Task 1 <img src="styles/resource/images/gruener-haken.png"></a></div></th>
      7. <th width="56" colspan="1"><div align="center"><a href="game.php?page=tutorial&mode=m2">Task 2 <img src="styles/resource/images/gruener-haken.png"></a></div></th>
      8. <th width="56" colspan="1"><div align="center"><a href="game.php?page=tutorial&mode=m3">Task 3 <img src="styles/resource/images/roter-haken.png"></a></div></th>
      9. <th width="56" colspan="1"><div align="center"><a href="game.php?page=tutorial&mode=m4">Task 4 <img src="styles/resource/images/roter-haken.png"></a></div></th>
      10. <th width="56" colspan="1"><div align="center"><a href="game.php?page=tutorial&mode=m5">Task 5 <img src="styles/resource/images/roter-haken.png"></a></div></th>
      11. <th width="56" colspan="1"><div align="center"><a href="game.php?page=tutorial&mode=m6">Task 6 <img src="styles/resource/images/roter-haken.png"></a></div></th>
      12. <th width="56" colspan="1"><div align="center"><a href="game.php?page=tutorial&mode=m7">Task 7 <img src="styles/resource/images/roter-haken.png"></a></div></th>
      13. <th width="56" colspan="1"><div align="center"><a href="game.php?page=tutorial&mode=m8">Task 8 <img src="styles/resource/images/roter-haken.png"></a></div></th>
      14. <th width="56" colspan="1"><div align="center"><a href="game.php?page=tutorial&mode=m9">Task 9 <img src="styles/resource/images/roter-haken.png"></a></div></th>
      15. </tr>
      16. <tr>
      17. <td class="k" colspan="10"><h3 class="textBeefy">Task 3 - Planet supplies - <font color="red">Incomplete</font> <img src="styles/resource/images/roter-haken.png"></h3></td>
      18. </tr>
      19. <tr>
      20. <td class="k" colspan="3">
      21. <p id="aufgabentext"><img src="./styles/theme/gow/gebaeude/3.gif" class="pic"></p>
      22. </td><td class="k" colspan="7">
      23. <p>After the foundations for supply have been laid, you should intensify them. Please always make sure there is enough energy available.</p>
      24. </td>
      25. </tr>
      26. <tr>
      27. <td class="k" colspan="10">
      28. <h3 style="text-align:left;">Tasks:</h3>
      29. <ul id="aufgabe_liste" style="text-align: left;">
      30. <li class="aufzaehlungszeichen">Upgrade your metal mine onto level 10 <img src="styles/resource/images/gruener-haken.png"></li>
      31. <li class="aufzaehlungszeichen">Upgrade your crystal mine onto level 8 <img src="styles/resource/images/roter-haken.png"></li>
      32. <li class="aufzaehlungszeichen">Upgrade the deuterium synthesizer to level 5 <img src="styles/resource/images/roter-haken.png"></li>
      33. </ul>
      34. <div style="color:orange;"><font color="orange">Reward : 200 of Dark Matter</font></div>
      35. </td>
      36. </tr>
      37. <tr>
      38. </tr>
      39. </tbody></table>
      Display All


      CSS Source Code

      1. /* Start tutorial style */
      2. #aufgabe_liste{width:90%;list-style-type:none}
      3. .aufzaehlungszeichen{background:url("./images/arrow_right.png") no-repeat left 0.2em;padding:0.1em 0 0 1.8em;margin:1em 0 0.4em 5em;height:20px}
      4. .table517{width:670px !important}
      5. .boxWrapper .tutHeader{background:url("./img/pagination/wrapper_head.gif") no-repeat scroll 0% 0% transparent;height:29px}
      6. #hidden_tutcontent{display:none}
      7. #tutList{width:360px;margin-left:auto;margin-right:auto;text-align:center}
      8. #tutList ul li{display:inline;list-style-type:none;list-style-position:inside}
      9. .tutSelected{color: rgb(3, 180, 204)}
      10. #tutorialBack{background:url("./img/pagination/bg-steps.gif") no-repeat scroll 0% 0% transparent;float:left;height:23px;line-height:23px;margin:4px 5px;text-align:center;text-decoration:none;width:26px}
      11. #planet.shortHeader{background: url("./img/navigation/short/tutorial.jpg") no-repeat scroll 0% 0% transparent;height:40px;margin:0px auto 3px;position:relative;width:654px}
      12. #planet h2{color:rgb(255, 255, 255);font:bold 18px/22px Verdana,Arial,Helvetica,sans-serif;height:22px;margin:0px 0px 0px 144px;overflow:hidden;padding-top:7px;white-space:nowrap;width:470px;text-overflow:ellipsis}
      13. #tutorialBack, .boxWrapper, .content, div{padding:0px}
      14. #tutorial-content{margin:10px 0px}
      15. .boxWrapper{color:rgb(132, 132, 132);margin-top:3px;width:667px}
      16. .help_buttons{height:40px;width:620px}
      17. #helptext_headline{float:left;width:200px}
      18. #tutorial_helptext{background:none repeat scroll 0% 0% rgb(19, 24, 29);border:1px solid rgb(3, 3, 3);color:rgb(132, 132, 132);display:none;font-size:10px;margin:0px 10px;padding:20px;width:560px}
      19. #tut_sol_but{background:url("./img/navigation/haupnavi_a.gif") no-repeat scroll left top transparent;height:29px;width:176px;padding:0px;margin:0px}
      20. #aufgabentext{float:left;width:620px;margin:0px 0px 10px;padding:0px;line-height:130%}
      21. #aufgabentext img{float:left}
      22. #reward{margin:10px 20px;color:rgb(153, 204, 0)}
      23. /* End tutorial style */
      Display All
    • you can make a extra colum row on the page and add this tested on my and works.....if you
      want it saved you will need to edit and add save storage for you comments


      Source Code

      1. <textarea id="title" type="text "rows="10" cols="20" onkeyup="Allow()" ></textarea>
      2. <input type="submit" value="POST COMMENT" onclick="insert()" /></form>
      3. <div id="display"></div>
      4. <script type="text/javascript">
      5. var titles = [];
      6. var titleInput = document.getElementById("title");
      7. var messageBox = document.getElementById("display");
      8. function Allow()
      9. {
      10. if (!user.title.value.match(/[a-zA-Z]$/) && user.title.value !="")
      11. {
      12. user.title.value="";
      13. alert("Please Enter only alphabets");
      14. }
      15. window.location.reload()
      16. }
      17. function insert () {
      18. titles.push(titleInput.value);
      19. clearAndShow();
      20. }
      21. function clearAndShow ()
      22. {
      23. titleInput.value = "";
      24. messageBox.innerHTML = "";
      25. messageBox.innerHTML += " " + titles.join("<br/> ") + "<br/>";
      26. }
      27. </script>
      Display All
      wanr

      The post was edited 1 time, last by Russoll ().