Super Admin

Started by Bulakbol, August 04, 2008, 06:44:30 PM

Previous topic - Next topic

heavyccasey

Hi, is there/could there be a version of this mod without the spy user functionality? I just don't want that extra bulk. Thanks in advance.

Bulakbol

@mlw4428
I'll look into it but no promises. Too busy atm.

@Mechanical Karasu
Quote from: Mechanical Karasu on April 19, 2009, 09:25:48 PM
5.     Execute Modification     ./Sources/ManageBoards.php     Test failed
You have to edit your ManageBoards.php manually. It is only 3 lines.

@mlw4428
I'm sorry. Removing that functionality is like making another mod. But if you want to remove the spy prompt from profile, comment-out or delete snippet of code. For version 1.1.8, edit default/Profile.template.php.
Code (find and remove) Select
if ($context['user']['id'] == 1)
{
echo '
<tr>
<td width="40%"><b>', $txt['spy_prompt'], '</b></td>
<td><input type="hidden" name="spy" value="0" /><input type="checkbox" name="spy"', $context['member']['spy'] ? ' checked="checked"' : '', ' value="1" class="check" /></td>
</tr>';
}


For version 2.0, edit Sources/Profile-Modify.php.
Code (find and remove) Select
'spy' => array(
'type' => 'check',
'label' => $txt['spy_prompt'],
'permission' => 'profile_identity',
'enabled' => $user_info['id'] == 1,
),
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Mechanical Karasu

What do I have to edit, and how?  :)

Bulakbol

@Mechanical Karasu
Edit the file that failed the search test. The ManageBoards.php. It is only two lines for version 2.0 RC1 and three lines for version 1.1.8. What version of SMF anyway?
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

kota069

Updated v1.1.8
Installing 1.1.7 w/ UOT

RE:  (ManageBoards.php)
<operation><!-- 430 -->

I do NOT have:
<search position="before"><![CDATA['permission_mode' => 'normal',]]></search>

Instead, I have:
if (empty($modSettings['permission_enable_by_board']))
{
$boardOptions['permission_mode'] = (int) $_POST['permission_mode'];
$boardOptions['inherit_permissions'] = false;
}


The only (2) instances of permission_mode in the file.


I'm not quite sure how to add
'admin1' => 0,
into that.

Thanks....

Bulakbol

@kota069
If you can't find
'permission_mode' => 'normal',
then look for
'no_children' => true,
than add the
'admin1' => 0,
either before or after.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

kota069

Quote from: Bulakbol on April 27, 2009, 11:17:39 AM
@kota069
If you can't find
'permission_mode' => 'normal',
then look for
'no_children' => true,
than add the
'admin1' => 0,
either before or after.

Got it.

Thank you !!

Mechanical Karasu

Quote from: Bulakbol on April 25, 2009, 11:08:56 PM
@Mechanical Karasu
Edit the file that failed the search test. The ManageBoards.php. It is only two lines for version 2.0 RC1 and three lines for version 1.1.8. What version of SMF anyway?

But in what way should I edit it? Where in the file, and how should that be edited? You'll have to excuse me, I'm pretty dense with this stuff. ^_^;;

I'm currently using 1.1.8

Bulakbol

@kota069
You're welcome.  8)


@Mechanical Karasu
You have to use FTP program such as FileZilla to download files from your server to your PC. Then use text editor such as Notpad++ to edit the file and then upload it again to your server after. Make sure to make a backup before editing your file in case you make mistake.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Jessikard

is it possible to run it for 2 admins ?

thx Jessi

Lamarck

Installed and is working fine (2.0 RC1).Only one thing,I think

8: Undefined index: spy_prompt
Aplicar filtro: Mostrar sólo los errores de este archivo
Archivo: /home/silvanos/public_html/Sources/Profile-Modify.php
Línea: 693

I get this again and again on my error log,usually when a user update their profile,etc.

691: 





'spy' => array(
692:







'type' => 'check',
==>693:







'label' => $txt['spy_prompt'],
694:







'permission' => 'profile_identity',
695:







'enabled' => $user_info['id'] == 2,
696:





),


Bulakbol

@Jessikard
You can probably do it but you have to do a lot of edit.

@Lamarck
Are you using language other than English? In default/languages/index.your_language.php, add this line.
$txt['spy_prompt'] = '<span style="color: red;">Do you want this member to be a spy?</span>';

Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

mattchewone

How can you uninstall this? I checked the tickbox for hiding the package but, how do i uninstall it as i cant find it??

Bulakbol

Quote from: mattchewone on May 04, 2009, 02:21:55 PM
How can you uninstall this? I checked the tickbox for hiding the package but, how do i uninstall it as i cant find it??

Go back to Admin => Current Theme, then untick the checkbox for Hide Super Admin from list of installed packages?. The name of the mod should appear in the list of installed mod. Uninstall.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

mattchewone

Quote from: Bulakbol on May 05, 2009, 10:33:51 PM
Quote from: mattchewone on May 04, 2009, 02:21:55 PM
How can you uninstall this? I checked the tickbox for hiding the package but, how do i uninstall it as i cant find it??

Go back to Admin => Current Theme, then untick the checkbox for Hide Super Admin from list of installed packages?. The name of the mod should appear in the list of installed mod. Uninstall.

Its not there which is why im stumped! Not sure what to do.

Bulakbol

Don't forget, you must be Admin #1 to see the checkbox.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

candidosa2

update portuguese

<!-- default/languages/index.portuguese_pt.php -->
<file name="$languagedir/index.portuguese_pt.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[$txt['spy_stat'] = '<span style="cor: vermelho;">(Spy)</span>';
$txt['spy_prompt'] = '<span style="color: red;">Voc&ecirc; quer este membro a ser um espi&atilde;o?</span>';
$txt['hide_from_list'] = 'Ocultar Superadministrador da lista de pacotes instalados?';
]]></add>
</operation>
</file>
<!-- default/languages/index.portuguese_brazilian.php -->
<file name="$languagedir/index.portuguese_brazilian.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[$txt['spy_stat'] = '<span style="cor: vermelho;">(Spy)</span>';
$txt['spy_prompt'] = '<span style="color: red;">Voc&ecirc; quer este membro a ser um espi&atilde;o?</span>';
$txt['hide_from_list'] = 'Ocultar Superadministrador da lista de pacotes instalados?';
]]></add>
</operation>
</file>
<!-- default/languages/index.portuguese_pt-utf8.php -->
<file name="$languagedir/index.portuguese_brazilian-utf8.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[$txt['spy_stat'] = '<span style="cor: vermelho;">(Spy)</span>';
$txt['spy_prompt'] = '<span style="color: red;">Voc&ecirc; quer este membro a ser um espi&atilde;o?</span>';
$txt['hide_from_list'] = 'Ocultar Superadministrador da lista de pacotes instalados?';
]]></add>
</operation>
</file>
<!-- default/languages/index.portuguese_pt-utf8.php -->
<file name="$languagedir/index.portuguese_pt-utf8.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[$txt['spy_stat'] = '<span style="cor: vermelho;">(Spy)</span>';
$txt['spy_prompt'] = '<span style="color: red;">Voc&ecirc; quer este membro a ser um espi&atilde;o?</span>';
$txt['hide_from_list'] = 'Ocultar Superadministrador da lista de pacotes instalados?';
]]></add>
</operation>
</file>

mattchewone

Quote from: Bulakbol on May 08, 2009, 11:44:20 PM
Don't forget, you must be Admin #1 to see the checkbox.

I am admin 1, still cannot find it.

Bulakbol

@candidosa2
Thanks for the language. I will add it to the next update. I am thinking about merging the two packages.


@mattchewone
Use the default theme, go to Admin => Current Theme and see if you can find it there. Let me know you can't still find it. Are you using custom theme?
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

mattchewone

No i am using Default theme and cannot find it still.

Advertisement: