Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Diego Andrés on June 11, 2007, 05:29:03 PM

Title: Profile Moderator Management
Post by: Diego Andrés on June 11, 2007, 05:29:03 PM
Link to the mod (https://custom.simplemachines.org/index.php?mod=833)

(https://smftricks.com/logos/logo.png) (https://smftricks.com/)

(https://img.shields.io/badge/License-MPL%202.0-248049) (https://img.shields.io/badge/Hooks%20Only-Yes-6041a3) (https://img.shields.io/badge/SMF-2.1-3f73a0)

Profile Moderator Management
Developed by Diego Andrés (https://smftricks.com/index.php?action=profile;u=1)
Original Developer: ディン1031 (https://www.simplemachines.org/community/index.php?action=profile;u=10466)




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

Features

Localization
(https://www.simplemachines.org/site_images/lang/english.gif) English
(https://www.simplemachines.org/site_images/lang/spanish_es.gif) Spanish


Changelog (https://github.com/SMFTricks/Profile-Mod-Management/blob/master/CHANGELOG.md)
GitHub (https://github.com/SMFTricks/Profile-Mod-Management)
Title: Re: Profil Moderator Managment
Post by: Foxi on June 12, 2007, 05:28:21 AM
Nice mod  :D
Great
Title: Re: Profil Moderator Managment
Post by: HecKel on June 12, 2007, 07:35:02 AM
Great idea!

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

HecKel
Title: Re: Profil Moderator Managment
Post by: Badboy on June 13, 2007, 07:56:10 AM
Special thx to ディン1031... Because he did the mod with my suggestion... Thx a lot...
Title: Re: Profil Moderator Managment
Post by: Yağız... on June 13, 2007, 08:26:55 AM
Nice Mod DIN1031.Thanks.
Title: Re: Profil Moderator Managment
Post by: !Hachi! on June 13, 2007, 09:26:27 AM
should be default feature. excellent mod.
Title: Re: Profil Moderator Managment
Post by: mgimadu on June 16, 2007, 08:40:18 AM
Nice mod , much thank you
Title: Re: Profil Moderator Managment
Post by: DeMar on June 18, 2007, 01:58:43 AM
Nice mod.
Where I can se permission of moderator created that way?
thanks
Title: Re: Profil Moderator Managment
Post by: ディン1031 on June 18, 2007, 04:12:01 AM
I use the same Premission as the one in the Manage Boards. (Normal only Admins can do that).

Bye
DIN1031
Title: Re: Profil Moderator Managment
Post by: Perochak on June 19, 2007, 06:32:14 AM
what changes are needed in .xml file and the others inorder to use it in Bablyon template?
Title: Re: Profil Moderator Managment
Post by: ディン1031 on June 19, 2007, 06:37:16 AM
<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
Title: Re: Profil Moderator Managment
Post by: Perochak on June 19, 2007, 07:29:07 AM
which file have to change and where to put change?
Title: Re: Profil Moderator Managment
Post by: ディン1031 on June 19, 2007, 09:57:37 AM
<edit file>
$themedir/Profile.template.php
</edit file>

Stand in the text

Bye
DIN1031
Title: Re: Profil Moderator Managment
Post by: JungleBunny on June 23, 2007, 08:01:29 PM
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
Title: Re: Profil Moderator Managment
Post by: 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
Title: Re: Profil Moderator Managment
Post by: ディン1031 on June 29, 2007, 01:57:12 AM
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
Title: Re: Profil Moderator Managment
Post by: kamili34 on June 29, 2007, 08:14:45 AM
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.  ???
Title: Re: Profil Moderator Managment
Post by: ディン1031 on June 29, 2007, 11:34:08 AM
http://www.simplemachines.org/community/index.php?topic=176445.msg1131784#msg1131784 <- There Stand the Theme Change for this Mod ;).

Bye
DIN1031
Title: Re: Profil Moderator Managment
Post by: kamili34 on June 29, 2007, 01:34:28 PM
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
Title: Re: Profil Moderator Managment
Post by: ディン1031 on June 29, 2007, 03:57:04 PM
?_? what kind of error did occur?

Bye
DIN1031
Title: Re: Profil Moderator Managment
Post by: minnik on July 01, 2007, 05:34:34 PM
It is perfect !!! I had wanted it for a long time in Turkish forum...

Thank you ;)
Title: Re: Profil Moderator Managment
Post by: kamili34 on July 01, 2007, 07:06:48 PM
Uff i do it it works thanks for great mod. :)
Title: Re: Profil Moderator Managment
Post by: tones_ie on August 01, 2007, 10:14:34 PM
one of the best mods ive seen in ages...  Thanks alot for creating this...makes admin work lots easier....
Title: Re: Profil Moderator Managment
Post by: Apllicmz on April 19, 2008, 05:16:41 AM
man..
in not suport 114...

translate portugues

<file name="$languagedir/Profile.portuguese.php" error="skip">
<operation>
<search position="after"><![CDATA[?>]]></search>
<add><![CDATA[
//Moderator Profil Edit Version ;D
$txt['moderatorSettings_Headline'] = 'Selecione quadro de moderadores';
$txt['moderatorSettings_info'] = 'Você pode selecionar aqui, onde este membro poderá ser um Moderador.';
$txt['moderatorSettings'] = 'Gestão moderação';
$txt['moderatorSettings_selectBoards'] = 'Selecione quadros para fazer a moderação';
]]></add>
</operation>
</file>


<file name="$languagedir/Profile.brazilian.php" error="skip">
<operation>
<search position="after"><![CDATA[?>]]></search>
<add><![CDATA[
//Moderator Profil Edit Version ;D
$txt['moderatorSettings_Headline'] = 'Selecione quadro de moderadores';
$txt['moderatorSettings_info'] = 'Você pode selecionar aqui, onde este membro poderá ser um Moderador.';
$txt['moderatorSettings'] = 'Gestão moderação';
$txt['moderatorSettings_selectBoards'] = 'Selecione quadros para fazer a moderação';
]]></add>
</operation>
</file>
Title: Re: Profil Moderator Managment
Post by: ディン1031 on April 19, 2008, 08:39:37 AM
Quote from: joomlamz on April 19, 2008, 05:16:41 AM
man..
in not suport 114...
Sorry i did forget to insert it...

Thx for the Translations

Bye
DIN1031
Title: Re: Profil Moderator Managment
Post by: Sabre™ on April 20, 2008, 10:36:33 PM
This is an excellent mod, and should be implemented into smf. imo.
Great job DIN1031 (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.postsmile.net%2Fimg%2F19%2F1942.gif&hash=42cd69283eccfe590865ee3fae6fe4254686921d) and thank you buddy :)
Title: Re: Profil Moderator Managment
Post by: questions_dude on April 02, 2009, 09:48:25 AM
Spanish-latin-utf8 translation

//Moderator Profil Edit Version ;D
$txt['moderatorSettings_Headline'] = 'Seleccionar Foros de Moderaci&oacute;n';
$txt['moderatorSettings_info'] = 'Aqu&iacute; puedes seleccionar, d&oacute;nde este usuario puede ser un Moderador.';
$txt['moderatorSettings'] = 'Gesti&oacute;n de Moderaci&oacute;n';
$txt['moderatorSettings_selectBoards'] = 'Selecciona los foros a Moderar';


Thanks for this mod :)
Title: Re: Profil Moderator Managment
Post by: ディン1031 on April 02, 2009, 10:09:27 AM
Thanks i will add it in the next few days :D.
Title: Re: Profil Moderator Managment
Post by: verbotten on July 14, 2009, 08:57:35 AM
really cool and useful
Title: Re: Profil Moderator Managment
Post by: imno007 on October 17, 2009, 06:50:25 PM
Awesome mod! I have a forum with many child boards and I just couldn't believe that smf requires you to assign each board individually like it does. Many thanks! 8)
Title: Re: Profil Moderator Managment
Post by: Joker™ on December 02, 2009, 05:22:15 AM
can u plz make it for RC2.0
Title: Re: Profil Moderator Managment
Post by: Robbo_ on December 03, 2009, 10:42:10 PM
Are you planning to update this to 2.0 RC2 anytime soon? If not please say so, so I can update it myself.
Title: Re: Profil Moderator Managment
Post by: shumilica on December 05, 2009, 12:17:16 PM
Ok. I modified this VERY USEFUL MOD so that it will work with 2.0 RC2 (it works in my board!). I just altered what to search for replacement (adding after/before).
I also removed all the languages because I didn't needed them. It's easy to do it yourself if you want.

ディン1031, when you upgrade your mod to 2.0 RC2 you can erase (or report if you can't erase) my message. Hope I didn't bother with this little change...
Title: Re: Profil Moderator Managment
Post by: Joker™ on December 06, 2009, 03:46:17 AM
Quote from: shumilica on December 05, 2009, 12:17:16 PM
Ok. I modified this VERY USEFUL MOD so that it will work with 2.0 RC2 (it works in my board!). I just altered what to search for replacement (adding after/before).
I also removed all the languages because I didn't needed them. It's easy to do it yourself if you want.

ディン1031, when you upgrade your mod to 2.0 RC2 you can erase (or report if you can't erase) my message. Hope I didn't bother with this little change...


thanx a lot

working fine for me  :D
Title: Re: Profil Moderator Managment
Post by: ディン1031 on December 07, 2009, 05:01:17 AM
I will update it this week, me sickness get better and i think i do update a lot mods...
Title: Re: Profil Moderator Managment
Post by: Badboy on December 07, 2009, 08:13:43 AM
I think permissions can be changed from "moderate_forum" to "manage_boards". Because who has the permissions to add/edit boards from admin panel also must add/edit board's moderators from profile panel too, not only admin(s). ;)
Title: Re: Profil Moderator Managment
Post by: Afro on December 07, 2009, 08:41:06 AM
welldone
Title: Re: Profil Moderator Managment
Post by: C4G-TK on December 15, 2009, 11:47:42 PM
Can't wait!

Hope you feel better!
Title: Re: Profil Moderator Managment
Post by: MissyNL on January 07, 2010, 08:26:47 AM
Quote from: ディン1031 on December 07, 2009, 05:01:17 AM
I will update it this week, me sickness get better and i think i do update a lot mods...

Hai... have you updated it?? I really want this mod :D I think its very usefull and should be default in SMF...
Title: Re: Profil Moderator Managment
Post by: Confused Too on January 23, 2010, 03:47:54 PM
Is there an update for SMF 1.1.11 as it stopped working since I updated my boards.
It is an excellent tool and as mentioned should become default in SMF.
Title: Re: Profil Moderator Managment
Post by: ディン1031 on January 25, 2010, 04:09:29 PM
Hmmm normal it should work in 1.1.11 oO. I will look at it...
Title: Re: Profil Moderator Managment
Post by: oOo--STAR--oOo on February 13, 2010, 03:48:28 AM
Awsome Thanks shumilica

What exactly did u change. works perfectly
Title: Re: Profil Moderator Managment
Post by: ディン1031 on February 16, 2010, 12:48:24 PM
nothing ;) i made only the package compatible *g*
Title: Re: Profil Moderator Managment
Post by: bud01100 on July 17, 2010, 07:39:21 AM
Quote from: ディン1031 on February 16, 2010, 12:48:24 PM
nothing ;) i made only the package compatible *g*
It fails in the 1.1.11 install?
Title: Re: Profil Moderator Managment
Post by: blow on July 25, 2010, 03:59:45 PM
Is this mod going to be updated to a RC3-compatible version?
Thanks. :)
Title: Re: Profil Moderator Managment
Post by: Joker™ on July 25, 2010, 04:05:06 PM
Quote from: blow on July 25, 2010, 03:59:45 PM
Is this mod going to be updated to a RC3-compatible version?
Thanks. :)

http://www.simplemachines.org/community/index.php?topic=176445.msg2391246#msg2391246
that will do the trick for you ;) , you may just need to emulate to RC2 in package manager
Title: Re: Profil Moderator Managment
Post by: blow on July 25, 2010, 05:57:03 PM
It's done. Thank you, Joker.
Title: Re: Profil Moderator Managment
Post by: Joker™ on July 26, 2010, 05:12:32 AM
Thanks to mod author and shumilica ;)
Title: Re: Profil Moderator Managment
Post by: Jessica. on February 22, 2011, 10:40:57 PM
Make compatible for 1.1.13 please?
Title: Re: Profil Moderator Managment
Post by: ディン1031 on April 19, 2011, 12:13:45 PM
If someone else will update my mod i give the rights to anyone who like to update it. ;)
Title: Re: Profil Moderator Managment
Post by: ascaland on April 19, 2011, 12:38:54 PM
I actually might be interested in updating this. :)
Title: Re: Profil Moderator Managment
Post by: ディン1031 on April 20, 2011, 04:46:58 AM
You can do what you want with the code =). I've nothing against it.
Title: Re: Profil Moderator Managment
Post by: Shorti25 on September 14, 2011, 06:58:02 PM
please update for 2.0 final
Title: Re: Profile Moderator Management
Post by: Diego Andrés on June 14, 2012, 11:22:56 PM
Updated to SMF 2.0.2
Title: Re: Profile Moderator Management
Post by: mgrmgr on September 05, 2012, 03:27:50 AM
could anyone install it without errors in 2.0.2 ??? I doubt that because there is nothing like $txt&#91;'... in the original profile php. Looks like an editor converted the (correct) $txt[' ... to HTML entities. Is there nothing like quality control ???
Title: Re: Profile Moderator Management
Post by: MoreBloodWine on March 16, 2013, 08:46:01 PM
Jut installed in 2.0.4, works great as farr as I can tell. You do need to emulate 2.0.2 though even though the mod states 2.0.3. In either event, installed fine without error on 2.0.4 emulating 2.0.2 in the package manager.

So ya, thx... makes managing moderstors easier when I need to remove one since you don't need to go board by board with this mod installed. Same for adding one if your setting up boards for gaming corps.
Title: Re: Profile Moderator Management
Post by: MoreBloodWine on March 01, 2014, 08:47:06 PM
Doesn't seem to install to 2.0.7 out of the box as the saying goes. I can do a manual edit but someone may want to look in to seeing what's wrong.

I mention this because the mod page shows it as 2.0.7 compatible.
Title: Re: Profile Moderator Management
Post by: Diego Andrés on March 02, 2014, 04:47:16 AM
Quote from: MoreBloodWine on March 01, 2014, 08:47:06 PM
Doesn't seem to install to 2.0.7 out of the box as the saying goes. I can do a manual edit but someone may want to look in to seeing what's wrong.

I mention this because the mod page shows it as 2.0.7 compatible.

You can emulate to install the mod.
However, should be fixed now.

Thanks
Title: Re: Profile Moderator Management
Post by: JerzyLS on September 01, 2016, 10:24:01 AM
Quote2: mysql_free_result() expects parameter 1 to be resource, object given

Since when I'm using MySQL improved.

Impossible to use MySQL on my forum.
Title: Re: Profile Moderator Management
Post by: Diego Andrés on July 25, 2019, 10:54:33 PM
Mod is updated for SMF 2.1
However, I accidentally deleted package for SMF 2.0.x and I can't find it.
Marked for 2.1 only until I can get my hands on the old mod.

Edit: Just got it back on the modsite too
Title: Re: Profile Moderator Management
Post by: Blade73 on August 01, 2019, 04:15:50 PM
well thanks for the update  but no go on 2.0.15  it says corrupted file or wrong version
and you version 2.0xxx is still in the download list on you mod page
https://custom.simplemachines.org/mods/index.php?mod=833
Title: Re: Profile Moderator Management
Post by: Diego Andrés on August 01, 2019, 05:18:35 PM
Yea 2.0.x version is back on the page and it's working fine.
Version 3.0 is only for SMF 2.1 won't work on SMF 2.0.x

Edit: It's the wrong file it seems. Removed 2.0.x again until I can find the correct one or package a mod for 2.0
Title: Re: Profile Moderator Management
Post by: Shades. on July 27, 2021, 11:28:39 PM
Great mod! Thanks Diego Andrés! 8)
Title: Re: Profile Moderator Management
Post by: Diego Andrés on September 28, 2021, 10:27:25 PM
3.1 - 28 September 2021
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fsmftricks.com%2FThemes%2FSMFTricks%2Fimages%2Fchangelog%2Ftag--pencil.png&hash=5de0b06bfe982ea5c2d695e1dd548e76ef3e5f20) Moved languages to a dedicated language file.
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fsmftricks.com%2FThemes%2FSMFTricks%2Fimages%2Fchangelog%2Ftag--pencil.png&hash=5de0b06bfe982ea5c2d695e1dd548e76ef3e5f20) Code improvements.