SproutCMS

This is the code documentation for the SproutCMS project

source of /modules/Welcome/views/checklist.php

  1. <?php
  2. /*
  3.  * kate: tab-width 4; indent-width 4; space-indent on; word-wrap off; word-wrap-column 120;
  4.  * :tabSize=4:indentSize=4:noTabs=true:wrap=false:maxLineLen=120:mode=php:
  5.  *
  6.  * Copyright (C) 2016 Karmabunny Pty Ltd.
  7.  *
  8.  * This file is a part of SproutCMS.
  9.  *
  10.  * SproutCMS is free software: you can redistribute it and/or modify it under the terms
  11.  * of the GNU General Public License as published by the Free Software Foundation, either
  12.  * version 2 of the License, or (at your option) any later version.
  13.  *
  14.  * For more information, visit <http://getsproutcms.com>.
  15.  */
  16.  
  17. use Sprout\Helpers\Enc;
  18. ?>
  19.  
  20.  
  21. <style>
  22. .login-box {
  23. max-width: 900px;
  24. margin: 2em auto;
  25. padding-top: 0;
  26. }
  27. .test {
  28. background: #EEF0F3;
  29. border: 1px solid #CED2DC;
  30. padding: 10px 30px;
  31. margin: 30px 0;
  32. }
  33. .test[data-result="0"] {
  34. border-left: #F77450 solid 10px;
  35. }
  36. .test[data-result="1"] {
  37. border-left: #28943E solid 10px;
  38. }
  39. .test h3 {
  40. margin-top: 10px;
  41. }
  42. .test h3 small {
  43. vertical-align: middle;
  44. margin-left: 10px;
  45. font-size: 1.5rem;
  46. }
  47. .test .message {
  48. font-size: 12px;
  49. }
  50. code {
  51. border: none;
  52. padding: 2px;
  53. background: rgba(255, 255, 255, 0.5);
  54. }
  55. </style>
  56.  
  57.  
  58. <p>Before you can use SproutCMS, you'll need to complete the following tasks:</p>
  59.  
  60.  
  61. <div class="test" data-test="dbconf" data-result="<?php echo (int)$results['dbconf'][0]; ?>">
  62. <h3>1. Create database config</h3>
  63.  
  64. <p>
  65. Use our <a href="welcome/db_conf_form">database config generator</a> to create
  66. a <code>database.php</code> file and then save that in the <code>config/</code> directory.
  67. </p>
  68.  
  69. <?php if (!empty($results['dbconf'][1])): ?>
  70. <p class="message">
  71. <b>Tried to connect to database, but got an error:</b>
  72. <br>
  73. <?php echo Enc::html($results['dbconf'][1]); ?>
  74. </p>
  75. <?php endif; ?>
  76. </div>
  77.  
  78.  
  79. <div class="test" data-test="dbsync" data-result="<?php echo (int)$results['dbsync'][0]; ?>">
  80. <h3>2. Generate tables</h3>
  81.  
  82. <p>
  83. Run the <a href="welcome/sync">database sync</a> tool, which will generate your tables.
  84. </p>
  85. </div>
  86.  
  87.  
  88. <div class="test" data-test="superop" data-result="<?php echo (int)$results['superop'][0]; ?>">
  89. <h3>3. Create a super operator</h3>
  90.  
  91. <p>
  92. Super-operators are special accounts which are stored in a config file, so they can be
  93. used even when a database is unavailable. They also have access to the full set of developer
  94. tools.
  95. </p>
  96.  
  97. <p>
  98. You'll need to <a href="welcome/super_op_form">create a super operator</a>.
  99. </p>
  100. </div>
  101.  
  102.  
  103. <div class="test" data-test="sample" data-result="<?php echo (int)$results['sample'][0]; ?>">
  104. <h3>4. Add sample content <small>(optional)</small></h3>
  105.  
  106. <p>
  107. There is some sample content available to get you started with the CMS.
  108. </p>
  109. <p>
  110. <a href="welcome/add_sample_action">Add sample content</a>
  111. </p>
  112. </div>
  113.  
  114.  
  115. <div class="test" data-test="welcome" data-result="<?php echo (int)$results['welcome'][0]; ?>">
  116. <h3>5. Remove welcome module</h3>
  117.  
  118. <p>
  119. Open the file <code>config/config.php</code>, and remove the registration of
  120. the <code>Welcome</code> module from line <?php echo $welcome_line_num; ?>.
  121. </p>
  122. </div>
  123.  
  124. <?php if ($overall_success): ?>
  125. <div class="test" data-result="1" style="text-align: center">
  126. <h3>All done!</h3>
  127. <p>
  128. <a href="admin" class="button">Log in to SproutCMS now!</a>
  129. </p>
  130. </div>
  131. <?php else: ?>
  132. <div style="text-align: center">
  133. <a href="javascript:window.location.reload();" class="button icon-before icon-rotate_right">Reload</a>
  134. </div>
  135. <?php endif; ?>
  136.  
  137.  
  138. <p>&nbsp;</p>
  139.  
  140. <p>
  141. <b>Tools:</b>
  142. &nbsp;
  143. <a href="welcome/info">PHP information</a>
  144. </p>
  145.