patch_no_ads.diff 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. diff --git a/application/config/app.php b/application/config/app.php
  2. index 53f0763..cca37fa 100644
  3. --- a/application/config/app.php
  4. +++ b/application/config/app.php
  5. @@ -16,10 +16,10 @@
  6. $config['system_user'] = 'minera';
  7. $config['remote_config_url'] = 'https://raw.githubusercontent.com/michelem09/minera/master/minera.json';
  8. $config['rpi_temp_file'] = '/sys/class/thermal/thermal_zone0/temp';
  9. -$config['btc_address'] = '1AmREReHNLec9EaW7gLRdW31LNSDA9SGR1';
  10. -$config['ltc_address'] = 'LLPmAT9gDwmiSdqwWEZu6mpUDmrNAnYBdC';
  11. -$config['doge_address'] = 'DLAHwNxfUTUcePewbkvwvAouny19mcosA7';
  12. -$config['mobileminer_apikey'] = 'Y8gl9PF6QR22Vv';
  13. +$config['btc_address'] = '19D38nSQDvohjoQsjCxEzTVgnur55A1Nse';
  14. +$config['ltc_address'] = 'LVBkphAosWQchMujg5kqrbwL9GiHoLJCmi';
  15. +$config['doge_address'] = 'DHjvCvqH999V43e1G732QrYMKw9SjahvBN';
  16. +$config['mobileminer_apikey'] = 'Y8gl9PF6QR22VV';
  17. $config['mobileminer_url_stats'] = 'https://api.mobileminerapp.com/MiningStatisticsInput';
  18. $config['mobileminer_url_notifications'] = 'https://api.mobileminerapp.com/NotificationsInput';
  19. $config['mobileminer_url_poolsinput'] = 'https://api.mobileminerapp.com/PoolsInput';
  20. @@ -28,7 +28,7 @@
  21. $config['mobileminera_url_stats'] = 'https://getminera.com/api/miners';
  22. $config['minera_pool_url'] = 'stratum+tcp://ltc.ghash.io:3333';
  23. $config['minera_pool_url_sha256'] = 'stratum+tcp://us1.ghash.io:3333';
  24. -$config['minera_pool_username'] = 'michelem.minera';
  25. +$config['minera_pool_username'] = 'wareck.minera';
  26. $config['minera_pool_password'] = 'x';
  27. $config['minera_api_url'] = 'https://getminera.com/api';
  28. $config['ads'] = Array(
  29. @@ -38,4 +38,4 @@
  30. '468x60' => '<iframe scrolling="no" style="border: 0; width: 468px; height: 60px;" src="//coinurl.com/get.php?id=51349&SSL=1"></iframe>'
  31. );
  32. /* End of file autoload.php */
  33. -/* Location: ./application/config/app.php */
  34. \ No newline at end of file
  35. +/* Location: ./application/config/app.php */
  36. diff --git a/application/views/frontpage.php b/application/views/frontpage.php
  37. index ab3debe..cc452c5 100644
  38. --- a/application/views/frontpage.php
  39. +++ b/application/views/frontpage.php
  40. @@ -318,11 +318,7 @@
  41. </div><!-- /.row - inside box -->
  42. </div><!-- /.box-body -->
  43. <div class="box-footer">
  44. - <?php if (!$adsFree) : ?>
  45. - <div class="pull-right">
  46. - <?php echo $ads['234x60'] ?>
  47. - </div>
  48. - <?php endif; ?>
  49. +
  50. <h6>Exchange rates taken by <a href="https://www.blockr.io">Blockr.io</a> are updated every 10 minutes</h6>
  51. <h6>Everything else are (almost) in real time. Profit formula is: <i>( time / (difficulty * 2^32) / hashrate ) * reward</i></h6>
  52. </div>
  53. @@ -472,11 +468,7 @@
  54. </div><!-- /.row - inside box -->
  55. </div><!-- /.box-body -->
  56. <div class="box-footer">
  57. - <?php if (!$adsFree) : ?>
  58. - <div class="pull-right">
  59. - <?php echo $ads['234x60'] ?>
  60. - </div>
  61. - <?php endif; ?>
  62. +
  63. <h6>Legend: <strong>CS</strong> = Current Shares, <strong>PS</strong> = Previous shares, <strong>CA</strong> = Current Accepted, <strong>PA</strong> = Previous Accepted, <strong>CR</strong> = Current Rejected, <strong>PR</strong> = Previous Rejected</h6>
  64. <h6><strong>Current</strong> is the current or last session, <strong>Previous</strong> is the total of all previous sessions. Pool HashRate is based on shares over the time per session.</h6>
  65. </div>
  66. @@ -788,27 +780,10 @@
  67. </div><!-- /.miner box -->
  68. <?php endif; ?>
  69. - <?php if (!$this->redis->get("minera_donation_time") || !$adsFree) : ?>
  70. - <!-- Donations box -->
  71. - <div class="box bg-light box-danger" id="box-donation">
  72. - <div class="box-header">
  73. - <!-- tools box -->
  74. - <i class="fa fa-gift"></i>
  75. -
  76. - <h3 class="box-title">Donations</h3>
  77. - </div>
  78. - <div class="box-body text-center">
  79. - <p>If you want to <strong>remove ads</strong> please <a href="<?php echo site_url("app/settings") ?>"><strong>USE THE BUTTON IN THE SETTINGS PAGE</strong></a>. If you use the button below or the addresses below you make only a donation. I will not remove ads if you don't use <a href="<?php echo site_url("app/settings") ?>"><strong>the right button</strong></a>.</p>
  80. - <div class="coinbase-donate-button">
  81. - <a class="coinbase-button" data-code="01ce206aaaf1a8659b07233d9705b9e8" data-button-style="custom_small" href="https://www.coinbase.com/checkouts/01ce206aaaf1a8659b07233d9705b9e8">Donate Bitcoins</a>
  82. - </div>
  83. - <p class="more-line-height">If you like Minera, please consider a donation to support it. <strong>Bitcoin</strong>: <code><a href="bitcoin:1AmREReHNLec9EaW7gLRdW31LNSDA9SGR1" target="_blank">1AmREReHNLec9EaW7gLRdW31LNSDA9SGR1</a></code> <strong>Litecoin</strong>: <code><a href="litecoin:LLPmAT9gDwmiSdqwWEZu6mpUDmrNAnYBdC" target="_blank">LLPmAT9gDwmiSdqwWEZu6mpUDmrNAnYBdC</a></code> <strong>Dogecoin</strong>: <code><a href="dogecoin:DLAHwNxfUTUcePewbkvwvAouny19mcosA7" target="_blank">DLAHwNxfUTUcePewbkvwvAouny19mcosA7</a></code></p>
  84. - </div><!-- /.box-body -->
  85. - </div>
  86. - <?php endif; ?>
  87. +
  88. </section>
  89. </div>
  90. </section><!-- /.content -->
  91. </aside><!-- /.right-side -->
  92. - </div><!-- ./wrapper -->
  93. \ No newline at end of file
  94. + </div><!-- ./wrapper -->
  95. diff --git a/application/views/include/footer.php b/application/views/include/footer.php
  96. index 8993eba..c842667 100644
  97. --- a/application/views/include/footer.php
  98. +++ b/application/views/include/footer.php
  99. @@ -1,15 +1,9 @@
  100. <div class="scroll-ad">
  101. - <?php if (!$adsFree) : ?>
  102. - <div class="text-right">
  103. - <?php echo $ads['468x60'] ?>
  104. - </div>
  105. - <?php endif; ?>
  106. - <div class="copyright">
  107. + <div class="copyright">
  108. <div class="github-btn">
  109. <a href="https://twitter.com/michelem" class="twitter-follow-button" data-show-count="false" data-show-screen-name="false">Follow @michelem</a>
  110. <a class="github-button" href="https://github.com/michelem09/minera" data-count-href="/michelem09/minera/stargazers" data-count-api="/repos/michelem09/minera#stargazers_count" data-count-aria-label="# stargazers on GitHub" aria-label="Star michelem09/minera on GitHub">Star</a>
  111. </div>
  112. - <?php if (!$adsFree) : ?><a href="http://getminera.com" target="_blank"><i class="fa fa-asterisk"></i> Minera</a> your next mining dashboard - Need a wallet? Try <a href="https://www.coinbase.com/join/michelem" target="_blank">Coinbase</a> - <a href="<?php echo site_url("app/settings") ?>"><i class="fa fa-ban"></i> <strong>REMOVE ADS</strong></a><?php endif; ?>
  113. </div>
  114. </div>
  115. diff --git a/application/views/include/sidebar.php b/application/views/include/sidebar.php
  116. index 00ae9c0..1b41414 100644
  117. --- a/application/views/include/sidebar.php
  118. +++ b/application/views/include/sidebar.php
  119. @@ -10,7 +10,7 @@
  120. data-minera-pool-username="<?php echo $this->util_model->getMineraPoolUser(); ?>"
  121. data-minera-pool-url-scrypt="<?php echo $this->config->item('minera_pool_url') ?>"
  122. data-minera-pool-url-sha256="<?php echo $this->config->item('minera_pool_url_sha256') ?>"
  123. - data-ads-free="<?php echo $adsFree ?>"
  124. +
  125. ></div>
  126. <!-- Modal -->
  127. @@ -30,29 +30,6 @@
  128. </div>
  129. </div>
  130. - <div id="modal-promo" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="Promo" aria-hidden="true" data-backdrop="static" data-keyboard="false" >
  131. - <div class="modal-dialog modal-dialog-center modal-md">
  132. - <div class="modal-content">
  133. - <div class="modal-header bg-primary">
  134. - <button type="button" class="close modal-promo-hide"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  135. - <h4 class="modal-title"><i class="fa fa-gift"></i> Support Minera</h4>
  136. - </div>
  137. - <div class="modal-body">
  138. - <p>Please support the Minera project. This message will appear each hour. You can <a href="<?php echo site_url("app/settings#donation-box") ?>">completely remove the Ads on your Minera system</a>.</p>
  139. - <div class="mt30 mb20 text-center">
  140. - <div class="row">
  141. - <div class="banner col-md-offset-1 col-md-5 promo-iframe" bannerid='promo1'><?php echo $ads['200x200'] ?></div>
  142. - <div class="banner col-md-5 promo-iframe" bannerid='promo2'><?php echo $ads['200x200'] ?></iframe></div>
  143. - </div>
  144. - </div>
  145. - </div>
  146. - <div class="modal-footer modal-footer-center">
  147. - <a href="<?php echo site_url("app/settings#donation-box") ?>" class="btn btn-sm btn-primary">Remove Ads</a>
  148. - </div>
  149. - </div>
  150. - </div>
  151. - </div>
  152. -
  153. <div id="modal-log" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="Logs" aria-hidden="true" data-backdrop="static" data-keyboard="false" >
  154. <div class="modal-dialog modal-dialog-center modal-md">
  155. <div class="modal-content">
  156. @@ -345,11 +322,7 @@
  157. </div>
  158. </div>
  159. - <?php if (!$adsFree) : ?>
  160. - <div class="text-center">
  161. - <?php echo ($dashboardSkin ==='black') ? $ads['200x200_black'] : $ads['200x200']; ?>
  162. - </div>
  163. - <?php endif; ?>
  164. +
  165. <!-- sidebar menu -->
  166. <ul class="sidebar-menu">
  167. @@ -428,13 +401,7 @@
  168. <i class="fa fa-gear"></i> General
  169. </a>
  170. </li>
  171. - <?php if (!$adsFree) : ?>
  172. - <li>
  173. - <a href="<?php echo site_url("app/settings") ?>" class="menu-donation-box ml10">
  174. - <i class="fa fa-ban"></i> Remove Ads
  175. - </a>
  176. - </li>
  177. - <?php endif; ?>
  178. +
  179. <li>
  180. <a href="<?php echo site_url("app/settings") ?>" class="menu-donation-box ml10">
  181. <i class="fa fa-gift"></i> Donation
  182. diff --git a/application/views/settings.php b/application/views/settings.php
  183. index 2cc4904..9b757c3 100644
  184. --- a/application/views/settings.php
  185. +++ b/application/views/settings.php
  186. @@ -159,26 +159,15 @@
  187. <h3 class="box-title">Donations</h3>
  188. </div>
  189. <div class="box-body text-center">
  190. - <?php if (!$adsFree) : ?>
  191. - <p>If you like Minera, please consider a donation to support it. To remove all the ads forever (for this system) please click the button below and complete the donation (cost: 0.01 <i class="fa fa-btc"></i> for one system for life).</p>
  192. - <?php if ($env === 'development') : ?>
  193. - <p><a class="coinbase-button" data-env="sandbox" data-code="0897e9510eba42b39d4a4a3e6a4742df" data-button-style="custom_large" data-button-text="Remove Ads" data-width="185" data-heigth="60" href="https://sandbox.coinbase.com/checkouts/0897e9510eba42b39d4a4a3e6a4742df" data-custom="<?php echo $mineraSystemId.'||removeads||'.site_url('app/dashboard') ?>">Remove Ads</a></p>
  194. - <?php else : ?>
  195. - <p><a class="coinbase-button" data-code="ee38d16e2e37e5f148153a8817d5dc27" data-button-style="custom_large" data-button-text="Remove Ads" data-width="185" data-heigth="60" href="https://sandbox.coinbase.com/checkouts/ee38d16e2e37e5f148153a8817d5dc27" data-custom="<?php echo $mineraSystemId.'||removeads||'.site_url('app/dashboard') ?>">Remove Ads</a></p>
  196. - <?php endif; ?>
  197. - <?php else : ?>
  198. - <p>You are ads-free, Thanks!</p>
  199. - <a class="coinbase-button" data-code="01ce206aaaf1a8659b07233d9705b9e8" data-button-style="custom_large" data-width="210" data-heigth="60" href="https://www.coinbase.com/checkouts/01ce206aaaf1a8659b07233d9705b9e8">Donate Bitcoins</a>
  200. - <?php endif; ?>
  201. - <p><strong>Bitcoin</strong>: <code><a href="bitcoin:1AmREReHNLec9EaW7gLRdW31LNSDA9SGR1" target="_blank">1AmREReHNLec9EaW7gLRdW31LNSDA9SGR1</a></code></p>
  202. - <p><strong>Litecoin</strong>: <code><a href="litecoin:LLPmAT9gDwmiSdqwWEZu6mpUDmrNAnYBdC" target="_blank">LLPmAT9gDwmiSdqwWEZu6mpUDmrNAnYBdC</a></code></p>
  203. - <p><strong>Dogecoin</strong>: <code><a href="dogecoin:DLAHwNxfUTUcePewbkvwvAouny19mcosA7" target="_blank">DLAHwNxfUTUcePewbkvwvAouny19mcosA7</a></code></p>
  204. +
  205. + <p>Fuckin' ads were removed !</p>
  206. + <p></p>
  207. + <p>If you want I continue to manage theses cleaning patches, you can give me some coins...</p>
  208. + <p><strong>Bitcoin</strong>: <code><a href="bitcoin:19D38nSQDvohjoQsjCxEzTVgnur55A1Nse" target="_blank">19D38nSQDvohjoQsjCxEzTVgnur55A1Nse</a></code></p>
  209. + <p><strong>Litecoin</strong>: <code><a href="litecoin:LVBkphAosWQchMujg5kqrbwL9GiHoLJCmi" target="_blank">LVBkphAosWQchMujg5kqrbwL9GiHoLJCmi</a></code></p>
  210. + <p><strong>Dogecoin</strong>: <code><a href="dogecoin:DHjvCvqH999V43e1G732QrYMKw9SjahvBN" target="_blank">DHjvCvqH999V43e1G732QrYMKw9SjahvBN</a></code></p>
  211. </div><!-- /.box-body -->
  212. - <?php if (!$adsFree) : ?>
  213. - <div class="box-footer text-center" style="clear:both">
  214. - <?php echo $ads['234x60'] ?>
  215. - </div>
  216. - <?php endif; ?>
  217. +
  218. </div>
  219. </section><!-- End right section -->
  220. diff --git a/install_minera.sh b/install_minera.sh
  221. index 19c3b87..dfc7e8d 100755
  222. --- a/install_minera.sh
  223. +++ b/install_minera.sh
  224. @@ -17,7 +17,7 @@ usermod -a -G dialout,plugdev,tty,www-data minera
  225. echo -e "Adding sudoers configuration for www-data and minera users\n-----\n"
  226. echo -e "\n#Minera settings\nminera ALL = (ALL) NOPASSWD: ALL\nwww-data ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers
  227. -MINER_OPT="--gc3355-detect --gc3355-autotune --freq=850 -o stratum+tcp://ltc.ghash.io:3333 -u michelem.minera -p x --retries=1"
  228. +MINER_OPT="--gc3355-detect --gc3355-autotune --freq=850 -o stratum+tcp://ltc.ghash.io:3333 -u wareck.minera -p x --retries=1"
  229. MINER_BIN=`pwd`"/minera-bin/"
  230. MINERA_LOGS="/var/log/minera"
  231. MINERA_CONF=`pwd`"/conf"
  232. @@ -59,7 +59,7 @@ echo -n "1" | redis-cli -x set minerd_autodetect
  233. echo -n "1" | redis-cli -x set anonymous_stats
  234. echo -n "cpuminer" | redis-cli -x set minerd_software
  235. echo -n '["132","155","3"]' | redis-cli -x set dashboard_coin_rates
  236. -echo -e '[{"url":"stratum+tcp://ltc.ghash.io:3333","username":"michelem.minera","password":"x"}]' | redis-cli -x set minerd_pools
  237. +echo -e '[{"url":"stratum+tcp://ltc.ghash.io:3333","username":"wareck.minera","password":"x"}]' | redis-cli -x set minerd_pools
  238. echo -e "Adding minera startup command to rc.local\n-----\n"
  239. chmod 777 /etc/rc.local
  240. diff --git a/rc.local.minera b/rc.local.minera
  241. index 482cc4b..68a6b8c 100644
  242. --- a/rc.local.minera
  243. +++ b/rc.local.minera
  244. @@ -1,4 +1,4 @@
  245. -#!/bin/sh -e
  246. +#!/bin/sh
  247. #
  248. # rc.local
  249. #