diff -r c2f4c900c507 -r dc838fd61a06 plugins/SpecialAdmin.php --- a/plugins/SpecialAdmin.php Wed Dec 19 23:04:17 2007 -0500 +++ b/plugins/SpecialAdmin.php Thu Dec 20 22:23:07 2007 -0500 @@ -219,6 +219,35 @@ if ( in_array($_POST['lockout_policy'], array('disable', 'captcha', 'lockout')) ) setConfig('lockout_policy', $_POST['lockout_policy']); + // Avatar settings + setConfig('avatar_enable', ( isset($_POST['avatar_enable']) ? '1' : '0' )); + // for these next three values, set the config value if it's a valid integer; this is + // done by using strval(intval($foo)) === $foo, which flattens $foo to an integer and + // then converts it back to a string. This effectively verifies that var $foo is both + // set and that it's a valid string representing an integer. + setConfig('avatar_max_size', ( strval(intval($_POST['avatar_max_size'])) === $_POST['avatar_max_size'] ? $_POST['avatar_max_size'] : '10240' )); + setConfig('avatar_max_width', ( strval(intval($_POST['avatar_max_width'])) === $_POST['avatar_max_width'] ? $_POST['avatar_max_width'] : '96' )); + setConfig('avatar_max_height', ( strval(intval($_POST['avatar_max_height'])) === $_POST['avatar_max_height'] ? $_POST['avatar_max_height'] : '96' )); + setConfig('avatar_enable_anim', ( isset($_POST['avatar_enable_anim']) ? '1' : '0' )); + setConfig('avatar_upload_file', ( isset($_POST['avatar_upload_file']) ? '1' : '0' )); + setConfig('avatar_upload_http', ( isset($_POST['avatar_upload_http']) ? '1' : '0' )); + + if ( is_dir(ENANO_ROOT . '/' . $_POST['avatar_directory']) ) + { + if ( preg_match('/^([A-z0-9_-]+)(\/([A-z0-9_-]+))*$/', $_POST['avatar_directory']) ) + { + setConfig('avatar_directory', $_POST['avatar_directory']); + } + else + { + echo '
Users and communication | +|||
---|---|---|---|
User account activation | |||
User account activation | |||
@@ -357,7 +377,7 @@ | |||
Account activation: | + | Account activation: |
Disable registration '; echo ''; @@ -369,7 +389,7 @@ - |
Account lockouts | |||
Account lockouts | |||
Configure Enano to prevent or restrict logins for a specified period of time if a user enters an incorrect password a specific number of times. | |||
Password strength | |||
Password strength | |||
@@ -428,22 +448,125 @@ - | |||
E-mail sent from the site | |||
E-mail sending method: Try using the built-in e-mail method first. If that doesn't work, you will need to enter valid SMTP information here. |
- - |
- ||
SMTP hostname: This option only applies to the external SMTP mode. |
- - | ||
SMTP credentials: This option only applies to the external SMTP mode. |
- Username: - Password: |
- ||
E-mail sent from the site | |||
E-mail sending method: Try using the built-in e-mail method first. If that doesn't work, you will need to enter valid SMTP information here. |
+ + |
+ ||
SMTP hostname: This option only applies to the external SMTP mode. |
+ + | ||
SMTP credentials: This option only applies to the external SMTP mode. |
+ Username: + Password: |
+ ||
Avatars | +|||
+ Avatars are small images that users can display on their profiles and in comments. + + | |||
+ Enable avatar support: + Supported formats are JPEG, PNG, and GIF™. + |
+ + + | +||
+ Maximum avatar file size: + For smaller sites, the highest value for this should be about 50KB, 51200. Larger sites with more visitors will likely want to use something much smaller, such as 10KB. + |
+ + /> bytes + | +||
+ Maximum avatar dimensions: + The format is width × height. Typically you want to have this square (the same width and height). These are only maximum dimensions; users are not prevented from having smaller images. + |
+ + /> × + /> pixels + | +||
+ Allow animated avatars: + If this is checked, users can upload APNG and Animated GIF™ avatars. Sometimes such images can be specifically made to be distracting, like rapidly flashing images. If this is unchecked, these formats will be blocked, and only still PNGs and GIFs will be allowed. + |
+ + + | +||
+ Allowed upload methods: + + |
+
+ + + |
+ ||
+ Avatar storage directory: + This should be relative to your Enano root and should contain only alphanumeric characters and forward slashes, even if your server runs Windows. + |
+ + /> + | +
Sidebar links | +|
---|---|
Promote Enano | +|
+ If you think Enano is nice, or if you want to show your support for the Enano team, you can do so by placing a link to the Enano + homepage in your Links sidebar block. You absolutely don't have to do this, and you won't get degraded support if you don't. Because + Enano is still relatively new in the CMS world, it needs all the attention it can get - and you can easily help to spread the word + using this link. + | ++ + | +
SourceForge.net logo | |
SourceForge.net logo | |
@@ -488,8 +611,8 @@ - | |
W3C compliance logos | |
Enano generates (by default) Valid XHTML 1.1 code, plus valid CSS. If you want to show this off, check the appropriate boxes below. | |
W3C compliance logos | |
Enano generates (by default) Valid XHTML 1.1 code, plus valid CSS. If you want to show this off, check the appropriate boxes below. | |
id="w3c-vh32" name="w3c-vh32" /> | |
id="w3c-vh40" name="w3c-vh40" /> | |
Defective By Design Anti-DRM button | |
Defective By Design Anti-DRM button | |
The Enano project is strongly against Digital Restrictions Management. DRM removes the freedoms that every consumer should have: to freely copy and use digital media items they legally purchased to their own devices. Showing your opposition to DRM is as easy as checking the box below to place a link to DefectiveByDesign.org on your sidebar. | |
/> |