The following code changes will allow a forum Administrator to search the member list for banned members (this was a mod request (http://www.simplemachines.org/community/index.php?topic=484082.0) in August 2012).
./Sources/ManageMembers.php
FIND
'activated' => array(
'db_fields' => array('CASE WHEN is_activated IN (1, 11) THEN 1 ELSE 0 END'),
'type' => 'checkbox',
'values' => array('0', '1'),
),
REPLACE WITH
'activated' => array(
'db_fields' => array('is_activated'),
'type' => 'checkbox',
'values' => array('0', '1', '11'),
),
./Themes/default/ManageMembers.template.php
FIND
<label for="activated-1"><input type="checkbox" name="activated[]" value="0" id="activated-1" checked="checked" class="input_check" /> ', $txt['not_activated'], '</label>
REPLACE WITH
<label for="activated-1"><input type="checkbox" name="activated[]" value="0" id="activated-1" checked="checked" class="input_check" /> ', $txt['not_activated'], '</label>
<label for="activated-11"><input type="checkbox" name="activated[]" value="11" id="activated-11" checked="checked" class="input_check" /> ', $txt['banned'], '</label>
./Themes/default/languages/Admin.english.php
FIND
?>
ADD BEFORE
$txt['banned'] = 'Banned';
./Themes/default/languages/Admin.english-utf8.php
FIND
?>
ADD BEFORE
$txt['banned'] = 'Banned';
Thanks!
For simplicity sake you could use ADD AFTER for the ./Themes/default/ManageMembers.template.php edit.
Neat. Thanks :)
ZitatFor simplicity sake you could use ADD AFTER for the ./Themes/default/ManageMembers.template.php edit.
The original/existing line has an amendment.
Nice, very useful.
Does this work on SMF1
Yes, but with some minor changes.
Source:
'activated' => array(
'db_fields' => array('IF(is_activated IN (1, 11), 1, 0)'),
'type' => 'checkbox',
'values' => array('0', '1'),
),(only db_fields change)
Template:
<label for="activated-1"><input type="checkbox" name="activated[]" value="0" id="activated-1" checked="checked" class="check" /> ', $txt['not_activated'], '</label> (only HTML class change. Remember to change the same in the code to replace from input_check to check!)
Everything else is the same.
Thank you.
What is the possibility to create a folder [Banned] and set the path in the program to do it automatically?
Define "folder", please. Is it a file system directory? The members are stored in the database.
Judging by his other topic I think he means a board with topics. The short answer is I don't think that's going to work