setup-options.php 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. /**
  3. * Script to interact with user during blogit package install
  4. *
  5. * Copyright 2015 by Menno Pietersen info@mpthemes.com
  6. * Created on 09-02-2015
  7. *
  8. * blogit is free software; you can redistribute it and/or modify it under the
  9. * terms of the GNU General Public License as published by the Free Software
  10. * Foundation; either version 2 of the License, or (at your option) any later
  11. * version.
  12. *
  13. * blogit is distributed in the hope that it will be useful, but WITHOUT ANY
  14. * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  15. * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License along with
  18. * blogit; if not, write to the Free Software Foundation, Inc., 59 Temple
  19. * Place, Suite 330, Boston, MA 02111-1307 USA
  20. *
  21. * @package blogit
  22. */
  23. /**
  24. * Description: Script to interact with user during blogit package install
  25. * @package blogit
  26. * @subpackage build
  27. */
  28. /* The return value from this script should be an HTML form (minus the
  29. * <form> tags and submit button) in a single string.
  30. *
  31. * The form will be shown to the user during install
  32. *
  33. * This example presents an HTML form to the user with two input fields
  34. * (you can have as many as you like).
  35. *
  36. * The user's entries in the form's input field(s) will be available
  37. * in any php resolvers with $modx->getOption('field_name', $options, 'default_value').
  38. *
  39. * You can use the value(s) to set system settings, snippet properties,
  40. * chunk content, etc. based on the user's preferences.
  41. *
  42. * One common use is to use a checkbox and ask the
  43. * user if they would like to install a resource for your
  44. * component (usually used only on install, not upgrade).
  45. */
  46. /* This is an example. Modify it to meet your needs.
  47. * The user's input would be available in a resolver like this:
  48. *
  49. * $changeSiteName = (! empty($modx->getOption('change_sitename', $options, ''));
  50. * $siteName = $modx->getOption('sitename', $options, '').
  51. *
  52. * */
  53. $output = '<img src="https://blogit.mpthemes.com/assets/components/blogit/img/blogIt-logo.png" alt="BlogIt logo" style="width: 323px; display: block; margin-bottom: 14px;">
  54. <h3>Thank you for installing BlogIt</h3>
  55. <p>We spend a lot of time creating and maintaining this MODX Extra, please visit <a href="https://mpthemes.com" target="_blank">MPThemes.com</a> to find our premium MODX Revolution themes and support us.</p>
  56. <p>Sincerely, <br>
  57. Menno Pietersen <br>
  58. <a href="https://mpthemes.com" target="_blank">MPThemes.com</a> <br>
  59. <a href="https://anyscreensize.com" target="_blank">Any Screen Size.com</a></p>';
  60. return $output;