Profile Moderator Management

Started by Diego Andrés, June 11, 2007, 05:29:03 PM

Previous topic - Next topic

Diego Andrés

Link to the mod




Profile Moderator Management
Developed by Diego Andrés
Original Developer: ディン1031




Introduction
Profile Moderator Management provides a very simple way to grant moderator privileges to your users in specific boards.

Features
  • Remove/Add the user as moderator from their profile
  • Select multiple boards at once
  • Select entire categories

Localization
English
Spanish


Changelog
GitHub

SMF Tricks - Free & Premium Responsive Themes for SMF.

Foxi


www.hatira.net (Closed)

HecKel

Great idea!

Hope this can be added to SMF as default feature :D

HecKel
Quote from: Eliana Tamerin on August 23, 2008, 04:10:10 PM
SMF 7 is where it gets good. That has time travel. You can go back and post before the guy who flamed you. :P

Badboy

Special thx to ディン1031... Because he did the mod with my suggestion... Thx a lot...
Nothing is true, everything is permitted.

Yağız...


!Hachi!

should be default feature. excellent mod.
Happy Ramadan

mgimadu

.ıl I love you simplemachines lı.
Forumgil.com - Enter my site.
My Mods        - Enter my Mods.
I wait you SMF 2.0

DeMar

Nice mod.
Where I can se permission of moderator created that way?
thanks

[embed-flash(width,height)]

ディン1031

I use the same Premission as the one in the Manage Boards. (Normal only Admins can do that).

Bye
DIN1031
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

Perochak

what changes are needed in .xml file and the others inorder to use it in Bablyon template?
Gain Knowledge,Try it, Modify it if you can and Spread it.

******************************************
www.vusr.net

ディン1031

<edit file>
$themedir/Profile.template.php
</edit file>

<search for>
?>
</search for>

<add before>
// The template for Moderator Board Managment ;).
function template_moderatorSettings()
{
global $context, $settings, $options, $scripturl, $txt;

//Some Javascript things ;)
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
function selectBoards(ids)
{
var toggle = true;

for (i = 0; i < ids.length; i++)
toggle = toggle & document.forms.creator["brd" + ids[i]].checked;

for (i = 0; i < ids.length; i++)
document.forms.creator["brd" + ids[i]].checked = !toggle;
}
// ]]></script>';

// The main containing header.
echo '
<form action="', $scripturl, '?action=profile2" method="post" accept-charset="', $context['character_set'], '" name="creator" id="creator">
<table border="0" width="85%" cellspacing="1" cellpadding="4" align="center" class="bordercolor">
<tr class="titlebg">
<td height="26">
&nbsp;<img src="', $settings['images_url'], '/icons/profile_sm.gif" alt="" align="top" />&nbsp;
', $txt['moderatorSettings_Headline'], '
</td>
</tr><tr class="windowbg">
<td class="smalltext" style="padding: 2ex;">
', $txt['moderatorSettings_info'], '
</td>
</tr><tr>
<td class="windowbg2" style="padding-bottom: 2ex;">
<table border="0" width="100%" cellpadding="3">
<tr>
<td>';

//Load the Boards...
echo '
<fieldset class="windowbg2" style="padding: 10px; margin-left: 5px; margin-right: 5px;">
<strong>'.$txt['moderatorSettings_selectBoards'].'</strong><br />
<table id="searchBoardsExpand" width="100%" border="0" cellpadding="1" cellspacing="0" align="center" style="margin-top: 1ex;">';

$alternate = true;
foreach ($context['board_columns'] as $board)
{
if ($alternate)
echo '
<tr>';
echo '
<td width="50%">';

if (!empty($board) && empty($board['child_ids']))
echo '
<label for="brd', $board['id'], '" style="margin-left: ', $board['child_level'], 'ex;"><input type="checkbox" id="brd', $board['id'], '" name="brd[', $board['id'], ']" value="', $board['id'], '"', $board['is_moderator'] ? ' checked="checked"' : '', ' class="check" />', $board['name'], '</label>';
elseif (!empty($board))
echo '
<a href="javascript:void(0);" onclick="selectBoards([', implode(', ', $board['child_ids']), ']); return false;" style="text-decoration: underline;">', $board['name'], '</a>';

echo '
</td>';
if (!$alternate)
echo '
</tr>';

$alternate = !$alternate;
}

echo '
</table><br />
<input type="checkbox" name="all" id="check_all" value=""'.($context['all_checked'] ? ' checked="checked"' : '').' onclick="invertAll(this, this.form, \'brd\');" class="check" /><i> <label for="check_all">', $txt[737], '</label></i><br />
</fieldset>
</td>
</tr>';


template_profile_save();

echo '
</table>
</td>
</tr>
</table>
</form>';

}
</add before>

This is the only Theme Change ;).

I don't use .xml for my mods, only the language changes i made with this ;).

Bye
DIN1031
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

Perochak

which file have to change and where to put change?
Gain Knowledge,Try it, Modify it if you can and Spread it.

******************************************
www.vusr.net

ディン1031

<edit file>
$themedir/Profile.template.php
</edit file>

Stand in the text

Bye
DIN1031
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

JungleBunny

Thanks Dude !!!!!!!! ;D ;D ;D ;D
Have many child boards and must add a moderator manuelly.
Much work when a moderator has got 40 child boards !!!
But this is now history :D :D :D :D

kamili34

Hi all

I have style Saf-Multicolor but this mod dosn't work. What should i chage.

Please write me step by step. I'm begginer with smf.

Regarts kamili34

ディン1031

Quote from: kamili34 on June 28, 2007, 09:15:24 PM
Hi all

I have style Saf-Multicolor but this mod dosn't work. What should i chage.

Please write me step by step. I'm begginer with smf.

Regarts kamili34
What are the errors that be shown?

Bye
DIN1031
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

kamili34

Quote from: ディン1031 on June 29, 2007, 01:57:12 AM

What are the errors that be shown?



Mod install ok, but only work on default style. What I should do that this mod work on style Saf-Multicolor.  ???

ディン1031

Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

kamili34

But I don't know how tu do this. I'm very beginner somebeody like noob ;D


I paste this small code and after install this mod i get error with Profile.template

ディン1031

?_? what kind of error did occur?

Bye
DIN1031
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

Advertisement: