PageRenderTime 43ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/wp-content/plugins/simple-forum/admin/panel-profiles/forms/sfa-profiles-options-form.php

https://bitbucket.org/crypticrod/sr_wp_code
PHP | 132 lines | 117 code | 8 blank | 7 comment | 1 complexity | 11b3838c7360ee4ee2ac87282fa6c9e8 MD5 | raw file
Possible License(s): AGPL-1.0, GPL-2.0, LGPL-2.1, GPL-3.0, LGPL-2.0, AGPL-3.0
  1. <?php
  2. /*
  3. Simple:Press
  4. Admin Profile Options Form
  5. $LastChangedDate: 2010-08-02 05:43:04 -0700 (Mon, 02 Aug 2010) $
  6. $Rev: 4344 $
  7. */
  8. if (preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF']))
  9. {
  10. die('Access Denied');
  11. }
  12. function sfa_profiles_options_form()
  13. {
  14. ?>
  15. <script type="text/javascript">
  16. jQuery(document).ready(function() {
  17. jQuery('#sfoptionsform').ajaxForm({
  18. target: '#sfmsgspot',
  19. success: function() {
  20. jQuery('#sfmsgspot').fadeIn();
  21. jQuery('#sfmsgspot').fadeOut(6000);
  22. }
  23. });
  24. });
  25. </script>
  26. <?php
  27. $sfoptions = sfa_get_options_data();
  28. $ahahURL = SFHOMEURL."index.php?sf_ahah=profiles-loader&amp;saveform=options";
  29. ?>
  30. <form action="<?php echo($ahahURL); ?>" method="post" id="sfoptionsform" name="sfoptions">
  31. <?php echo(sfc_create_nonce('forum-adminform_options')); ?>
  32. <?php
  33. sfa_paint_options_init();
  34. #== PROFILE OPTIONS Tab ============================================================
  35. sfa_paint_open_tab(__("Profiles", "sforum")." - ".__("Profile Options", "sforum"));
  36. sfa_paint_open_panel();
  37. sfa_paint_open_fieldset(__("Display Name Format", "sforum"), true, 'display-name-format');
  38. $values = array(__("Let Member Choose Display Name", "sforum"), __("Use Member's Logon Name", "sforum"), __("Use First Name - Last Name", "sforum"));
  39. sfa_paint_radiogroup(__("Display Name Format", "sforum"), 'nameformat', $values, $sfoptions['nameformat'], false, true);
  40. sfa_paint_close_fieldset();
  41. sfa_paint_close_panel();
  42. sfa_paint_open_panel();
  43. sfa_paint_open_fieldset(__("Profile Link", "sforum"), true, 'profile-link');
  44. $values = array(__("Member's Display Name", "sforum"), __("Member's Avatar", "sforum"), __("Profile Icon", "sforum"));
  45. sfa_paint_radiogroup(__("Set Profile Link To", "sforum"), 'profilelink', $values, $sfoptions['profilelink'], false, true);
  46. sfa_paint_checkbox(__("Always Use Profile Link in Statistics Lists", "sforum"), "profileinstats", $sfoptions['profileinstats']);
  47. sfa_paint_close_fieldset();
  48. sfa_paint_close_panel();
  49. sfa_paint_open_panel();
  50. sfa_paint_open_fieldset(__("Website Link", "sforum"), true, 'website-link');
  51. $values = array(__("Member's Display Name", "sforum"), __("Member's Avatar", "sforum"), __("Website Icon", "sforum"));
  52. sfa_paint_radiogroup(__("Set Website Link To", "sforum"), 'weblink', $values, $sfoptions['weblink'], false, true);
  53. sfa_paint_close_fieldset();
  54. sfa_paint_close_panel();
  55. sfa_paint_open_panel();
  56. sfa_paint_open_fieldset(__("Personal Photos", "sforum"), true, 'personal-photos');
  57. sfa_paint_input(__("Maximum Number of Photos Allowed", "sforum"), "photosmax", $sfoptions['photosmax'], false, false);
  58. sfa_paint_input(__("Maximum Pixel Width of Photo Display", "sforum"), "photoswidth", $sfoptions['photoswidth'], false, false);
  59. sfa_paint_close_fieldset();
  60. sfa_paint_close_panel();
  61. sfa_paint_open_panel();
  62. sfa_paint_open_fieldset(__("Signature Image Size", "sforum"), true, 'sig-images');
  63. echo('<tr><td colspan="2">&nbsp;<u>'.__("If you are allowing Signature Images (zero = not limited)", "sforum").':</u></td></tr>');
  64. sfa_paint_input(__("Maximum Signature Width (pixels)", "sforum"), "sfsigwidth", $sfoptions['sfsigwidth']);
  65. sfa_paint_input(__("Maximum Signature Height (pixels)", "sforum"), "sfsigheight", $sfoptions['sfsigheight']);
  66. sfa_paint_close_fieldset();
  67. sfa_paint_close_panel();
  68. sfa_paint_open_panel();
  69. sfa_paint_open_fieldset(__("First Forum Visit", "sforum"), true, 'first-forum-visit');
  70. sfa_paint_checkbox(__("Display Profile Form on Login", "sforum"), "firstvisit", $sfoptions['firstvisit']);
  71. $show_password_fields = apply_filters('show_password_fields', true);
  72. if ($show_password_fields)
  73. {
  74. sfa_paint_checkbox(__("Force Password Change", "sforum"), "forcepw", $sfoptions['forcepw']);
  75. }
  76. sfa_paint_close_fieldset();
  77. sfa_paint_close_panel();
  78. sfa_paint_tab_right_cell();
  79. sfa_paint_open_panel();
  80. sfa_paint_open_fieldset(__("Display Profile Mode", "sforum"), true, 'display-profile-mode');
  81. $values = array(__("Popup Window", "sforum"), __("Forum Profile Page", "sforum"), __("Buddy Press Profile", "sforum"), __("WordPress Author Page", "sforum"), __("Other Page", "sforum"));
  82. sfa_paint_radiogroup(__("Display Profile Information In", "sforum"), 'displaymode', $values, $sfoptions['displaymode'], false, true);
  83. sfa_paint_input(__("URL for 'Other' Page", "sforum"), "displaypage", sf_filter_url_display($sfoptions['displaypage']), false, true);
  84. sfa_paint_input(__("Query String Variable Name", "sforum"), "displayquery", sf_filter_title_display($sfoptions['displayquery']), false, true);
  85. sfa_paint_checkbox(__("Wrap Profile Display in Forum Header and Footer", "sforum"), "displayinforum", $sfoptions['displayinforum']);
  86. sfa_paint_close_fieldset();
  87. sfa_paint_close_panel();
  88. sfa_paint_open_panel();
  89. sfa_paint_open_fieldset(__("Profile Entry Form Mode", "sforum"), true, 'profile-entry-form-mode');
  90. $values = array(__("Forum Profile Form", "sforum"), __("WordPress Profile Form", "sforum"), __("Buddy Press Profile", "sforum"), __("Other Form", "sforum"));
  91. sfa_paint_radiogroup(__("Enter Profile Information In", "sforum"), 'formmode', $values, $sfoptions['formmode'], false, true);
  92. sfa_paint_input(__("URL for 'Other' Page", "sforum"), "formpage", sf_filter_url_display($sfoptions['formpage']), false, true);
  93. sfa_paint_input(__("Query String Variable Name", "sforum"), "formquery", sf_filter_title_display($sfoptions['formquery']), false, true);
  94. sfa_paint_checkbox(__("Wrap Profile Form in Forum Header and Footer", "sforum"), "forminforum", $sfoptions['forminforum']);
  95. sfa_paint_close_fieldset();
  96. sfa_paint_close_panel();
  97. sfa_paint_open_panel();
  98. sfa_paint_open_fieldset(__("Custom Profile Message", "sforum"), true, 'profile-message');
  99. $submessage=__("Text you enter here will be displayed to the User on their profile edit page.", "sforum");
  100. sfa_paint_wide_textarea(__("Custom Profile Message", "sforum"), "sfprofiletext", sf_filter_text_edit($sfoptions['sfprofiletext']), $submessage);
  101. sfa_paint_close_fieldset();
  102. sfa_paint_close_panel();
  103. sfa_paint_close_tab();
  104. ?>
  105. <div class="sfform-submit-bar">
  106. <input type="submit" class="sfform-panel-button" id="saveit" name="saveit" value="<?php esc_attr_e(__('Update Profile Options', 'sforum')); ?>" />
  107. </div>
  108. </form>
  109. <?php
  110. return;
  111. }
  112. ?>