Заказ модов

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

    • Заказ модов

      Друзья, хочу предоставить свое свободное время для Ваших идей, смысл в чем - вы говорите что вам нужно, я это пишу, все просто)
      Условия:
      - пишу только для версии 1,7 (она самая распростроненная, так что проблем не будет)
      - задание должно быть максимально понятным
      - после написания мода я выкладываю его в общий доступ (тут в теме), но после этого могу использовать Вашу идею так как захочу сам.

      дерзайте
      Кто к нам с чем зачем, тот от того и того! :D
    • Приветствую!
      1.Не плохо бы было установить на главную страницу фоновую музыку с возможностью ее отключения.
      2. Авторизация(регистрация) в игре через кнопки социальных сетей.
      3.Каждый день если игрок поделится адресом игры в социальных сетях ему за это начислялось определенное количество игровой валюты.
      4. Рассылка сообщений через админ панель игрокам на почту.

      Еще есть куча идей) ну это уже потом если русская ветка будет активной)
    • this is only possible if you have a client. the esiest way would be, to call the game in an i-frame and and use the parent window as player, so you can avoid a reload of the page.
      a real js client is may a bit more difficult :)
      in html 5 a player is very simple to build :) 3-4 lines
    • test

      make a file "test.html" in you gamefolder copy the follwoing code into it. save it. and call it in the browser.
      it should show your game, and beethoven should be played :)
      you can change the music in line 53, and in the playlist below. relativ paths are als taken.
      you find the player in the right bottom corner, hover it with the mouse to control it.

      HTML Source Code

      1. <!DOCTYPE html>
      2. <html>
      3. <head>
      4. <meta charset="UTF-8">
      5. <title>2moons</title>
      6. <script type="text/javascript" src="./scripts/base/jquery.js"></script>
      7. </head>
      8. <style>
      9. #playlist,audio{
      10. width:200px;
      11. padding:0px;
      12. margin:0px;
      13. }
      14. .active a{
      15. color:#5DB0E6 !important;
      16. text-decoration:none;
      17. }
      18. #playlist li a{
      19. text-decoration:none;
      20. color:#eeeedd;
      21. background:none;
      22. padding:0px;
      23. padding-right:2px;
      24. display:block;
      25. }
      26. #playlist li a:hover{
      27. background:#333;
      28. }
      29. #moonsframe{
      30. width: 100vw;
      31. height:100vh;
      32. background:#000;
      33. border:0px;
      34. }
      35. #bmusic{
      36. transform: scale(0.4);
      37. position: absolute;
      38. bottom: -120px;
      39. right: -59px;
      40. width: 200px;
      41. }
      42. #bmusic:hover{
      43. transform: scale(1.0);
      44. bottom:0px;
      45. right:20px;
      46. }
      47. </style>
      48. <body style="margin:0px; overflow:hidden;" >
      49. <div id="bmusic" >
      50. <audio id="audio" preload="auto" controlsList="nodownload" tabindex="1" controls="controls" type="audio/ogg" >
      51. <source type="audio/ogg" src="http://www.archive.org/download/MoonlightSonata_755/Beethoven-MoonlightSonata.mp3">
      52. Sorry, your browser does not support HTML5 audio.
      53. </audio>
      54. <ul id="playlist" style="background:#000; height:150px; text-align:right; overflow-y:scroll;">
      55. <li ><a href="http://www.archive.org/download/bolero_69/Bolero.mp3">Ravel Bolero</a></li>
      56. <li class="active"><a href="http://www.archive.org/download/MoonlightSonata_755/Beethoven-MoonlightSonata.mp3">Moonlight Sonata - Beethoven</a></li>
      57. <li><a href="http://www.archive.org/download/CanonInD_261/CanoninD.mp3">Canon in D Pachabel</a></li>
      58. <li><a href="http://www.archive.org/download/PatrikbkarlChamberSymph/PatrikbkarlChamberSymph_vbr_mp3.zip">patrikbkarl chamber symph</a></li>
      59. </ul>
      60. <script>
      61. var audio;
      62. var playlist;
      63. var tracks;
      64. var current;
      65. init();
      66. function init(){
      67. current = 0;
      68. audio = $('audio');
      69. playlist = $('#playlist');
      70. tracks = playlist.find('li a');
      71. len = tracks.length - 1;
      72. audio[0].volume = .30;
      73. audio[0].play();
      74. playlist.find('a').click(function(e){
      75. e.preventDefault();
      76. link = $(this);
      77. current = link.parent().index();
      78. run(link, audio[0]);
      79. });
      80. audio[0].addEventListener('ended',function(e){
      81. current++;
      82. if(current == len){
      83. current = 0;
      84. link = playlist.find('a')[0];
      85. }else{
      86. link = playlist.find('a')[current];
      87. }
      88. run($(link),audio[0]);
      89. });
      90. }
      91. function run(link, player){
      92. player.src = link.attr('href');
      93. par = link.parent();
      94. par.addClass('active').siblings().removeClass('active');
      95. audio[0].load();
      96. audio[0].play();
      97. }
      98. </script>
      99. </div>
      100. <iframe id="moonsframe" src="index.php"></iframe>
      101. </body>
      102. </html>
      Display All
    • main.footer.tpl

      <div class="clear"></div>
      <div id="footer">
      <script>
      (function(i,s,o,g,r,a,m){ i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
      (i[r].q=i[r].q||[]).push(arguments) },i[r].l=1*new Date();a=s.createElement(o),
      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
      })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

      ga('create', 'UA-57716220-1', 'auto');
      ga('send', 'pageview');

      </script>
      {if $debug == 1}
      <script type="text/javascript">
      onerror = handleErr;
      </script>
      {/if}

      {*<script type="text/javascript">
      Alarm();
      Checkmail();
      </script>*}
      </div>


      </body>
      </html>


      </script>
      </div>
      <div class="clear"></div>
      <div style="visibility:hidden">
      <audio autoplay loop>
      <source src="../audio/plant.mp3">
      </audio>
      </div>
    • Как вставить сам код на главную страницу логина игры без html ? а в index.php или в tpl

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

    • make a music.html and put it in your game root...

      take mimikris code in slightly modified and add it to music.html:

      HTML Source Code

      1. <!DOCTYPE html>
      2. <html>
      3. <head>
      4. <meta charset="UTF-8">
      5. <title>PiS Music</title>
      6. <script type="text/javascript" src="./scripts/base/jquery.js"></script>
      7. </head>
      8. <style>
      9. #playlist,audio{
      10. width:200px;
      11. padding:0px;
      12. margin:0px;
      13. }
      14. .active a{
      15. color:#5DB0E6 !important;
      16. text-decoration:none;
      17. }
      18. #playlist li a{
      19. text-decoration:none;
      20. color:#eeeedd;
      21. background:none;
      22. padding:0px;
      23. padding-right:2px;
      24. display:block;
      25. }
      26. #playlist li a:hover{
      27. background:#333;
      28. }
      29. #moonsframe{
      30. width: 100vw;
      31. height:100vh;
      32. background:#000;
      33. border:0px;
      34. }
      35. #bmusic{
      36. transform: scale(1.0);
      37. bottom:0px;
      38. right:20px;
      39. }
      40. </style>
      41. <body style="margin:0px; overflow:hidden;" >
      42. <div id="bmusic" >
      43. <audio id="audio" preload="auto" controlsList="nodownload" tabindex="1" controls="controls" type="audio/ogg" >
      44. <source type="audio/ogg" src="http://www.archive.org/download/MoonlightSonata_755/Beethoven-MoonlightSonata.mp3">
      45. Sorry, your browser does not support HTML5 audio.
      46. </audio>
      47. <ul id="playlist" style="background:#000; height:150px; text-align:right; overflow-y:scroll;">
      48. <li ><a href="http://www.archive.org/download/bolero_69/Bolero.mp3">Ravel Bolero</a></li>
      49. <li class="active"><a href="http://www.archive.org/download/MoonlightSonata_755/Beethoven-MoonlightSonata.mp3">Moonlight Sonata - Beethoven</a></li>
      50. <li><a href="http://www.archive.org/download/CanonInD_261/CanoninD.mp3">Canon in D Pachabel</a></li>
      51. <li><a href="http://www.archive.org/download/PatrikbkarlChamberSymph/PatrikbkarlChamberSymph_vbr_mp3.zip">patrikbkarl chamber symph</a></li>
      52. </ul>
      53. <script>
      54. var audio;
      55. var playlist;
      56. var tracks;
      57. var current;
      58. playmusic();
      59. function playmusic(){
      60. current = 0;
      61. audio = $('audio');
      62. playlist = $('#playlist');
      63. tracks = playlist.find('li a');
      64. len = tracks.length - 1;
      65. audio[0].volume = .30;
      66. audio[0].play();
      67. playlist.find('a').click(function(e){
      68. e.preventDefault();
      69. link = $(this);
      70. current = link.parent().index();
      71. run(link, audio[0]);
      72. });
      73. audio[0].addEventListener('ended',function(e){
      74. current++;
      75. if(current == len){
      76. current = 0;
      77. link = playlist.find('a')[0];
      78. }else{
      79. link = playlist.find('a')[current];
      80. }
      81. run($(link),audio[0]);
      82. });
      83. }
      84. function run(link, player){
      85. player.src = link.attr('href');
      86. par = link.parent();
      87. par.addClass('active').siblings().removeClass('active');
      88. audio[0].load();
      89. audio[0].play();
      90. }
      91. </script>
      92. </div>
      93. </body>
      94. </html>
      Display All

      in main.navigation.tpl:

      search:
      <div id="disclamer"><a href="index.php?page=disclamer" target="_blank">{$LNG.lm_disclamer}</a></div>
      add below:
      <div> <input style="height: 20px; width: 195px; font.size: 18; font-weight:bold;" name="button" type=button onClick="music();" value="Musik?!"> </div>

      at the end of the file you also add:
      <script language="JavaScript">
      function music() {
      popupWin = window.open('music.html', '761110738', 'width=195,height=150,left=100,top=100,menubar=no,status=no,scrollbars,toolbar=no,hotkeys,location=no')
      }
      </script>

      now it runs even if you change the pages....
      change the playlist via music.html how you want it, done! :)

      to the professionals: is not the best solution but works great!