News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

MCLegendII.1

Started by Bulakbol, January 28, 2008, 07:44:55 PM

Previous topic - Next topic

Bulakbol

Quote from: уιℓмαz on April 05, 2008, 01:25:53 AM
Quote from: JohnyB on April 05, 2008, 12:39:58 AM
You have to turn off the built-in legend.

Thanks now it works.

That's great. Good to hear it's working. Thank for using this mod.  8)
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Manu.G

#142
Hi,

and again a great mod  :D
I saw it in the 2.0 version and wanted to have it too, now I have it, thanky JohnyB!  :D

I'm a dumb with php-coding, that's why I asking for some help.
I'm using the User Online Mod and tried to move the MCLegend under the User-Online Mod, but I wasn't to able to move it to the place I want to have it.
Can you help me please?  :)


I think I got it.
I found out, after a lot of tries, where I have to put the code and what I have to
remove.

I made this:

I searched in $themedir/BoardIndex.template.php for

        <td class="windowbg" width="20" valign="middle" align="center">
            <img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt['uot_users_online_today'], '" border="0" />
        </td>


and replaced it with

        <td rowspan="2" class="windowbg" width="20" valign="middle" align="center">
            <img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt['uot_users_online_today'], '" border="0" />
        </td>


I add at the end of this
<td class="windowbg2" valign="top">
                        <b><a href="', $scripturl, '?action=pm">', $txt[159], '</a></b>
                        <div class="smalltext">
                            ', $txt[660], ' ', $context['user']['messages'], ' ', $context['user']['messages'] == 1 ? $txt[471] : $txt[153], '.... ', $txt[661], ' <a href="', $scripturl, '?action=pm">', $txt[662], '</a> ', $txt[663], '
                        </div>
                    </td>
                </tr>';


the code for MCLII

            if (!empty($modSettings['arrange_mclegend']))
            {
                echo '
                <tr>
                    <td class="windowbg2" width="100%">
                        <span class="smalltext">';
                        foreach($context['mcl_group'] AS $key => $dummy)
                            for ($i = 0; $i < count($context['mc_legend']); $i++)   
                                if ($context['mc_legend'][$i]['id'] == $context['mcl_group'][$key])
                                {
                                   echo '[', $context['mc_legend'][$i]['link'], ']&nbsp;&nbsp;';
                                   continue;
                                }
                         echo '
                     </span>
                    </td>
                </tr>';


In my test forum it works as you can see at the pic, but please note, I'm a dumb
in php and don't know if it will work in your forum.  :-\
Version SMF 2.0.8
SimplePortal 2.3.5

coolcrustycat

Thanks for the mod - it's the first time that I've tried using any other than the forum software updates, so I was 'just a little nervous' .

However, after reading through all of this thread, it seems that the original reason for using it, won't work.

What I wanted to do, was to allow all of the moderators (who are hidden when online), see how many other mods are likely to be online. Unfortunately, Mods don't have access to the ACP as only Admin modify membergroups, and some earlier posts seem to have said that we wouldn't therefore be able to offer them the facility provided by this mod.

Is there anyway around this (especially for the php illiterate)?

Otherwise - it works great!

Bulakbol

#144
@Manu0372. Looks cool. Cool color too. I'll try your code and see if it doesn't break on IE, FF and Opera. I'll get back to you.

@coolcrustycat. Are talking about 1.1.4 version and global moderators? Do you want your global moderators to see the groups in the legend?

If you want your global moderators to see invisible users, why not give them permission to moderate forum members? The problem is, they will see the IP's too.  :P


<edit>
@manu0372. Yes. It's a good location for the Legend if you have the Users Online Today mod installed. And you got the coding right.  8)
I moved it outside the bracket like this and it works very well.
// If they are logged in, but SP1 style information is off... show a personal message bar.
if ($context['user']['is_logged'] && !$settings['show_sp1_info'])
{
echo '
<tr>
<td class="titlebg" colspan="2">', $txt[159], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
', $context['allow_pm'] ? '<a href="' . $scripturl . '?action=pm">' : '', '<img src="', $settings['images_url'], '/message_sm.gif" alt="', $txt[159], '" />', $context['allow_pm'] ? '</a>' : '', '
</td>
<td class="windowbg2" valign="top">
<b><a href="', $scripturl, '?action=pm">', $txt[159], '</a></b>
<div class="smalltext">
', $txt[660], ' ', $context['user']['messages'], ' ', $context['user']['messages'] == 1 ? $txt[471] : $txt[153], '.... ', $txt[661], ' <a href="', $scripturl, '?action=pm">', $txt[662], '</a> ', $txt[663], '
</div>
</td>
</tr>';
}
if (!empty($modSettings['arrange_mclegend']))
{
echo '
<tr>
<td class="windowbg2" width="100%">
<span class="smalltext">';
foreach($context['mcl_group'] AS $key => $dummy)
for ($i = 0; $i < count($context['mc_legend']); $i++)
if ($context['mc_legend'][$i]['id'] == $context['mcl_group'][$key])
{
  echo '[', $context['mc_legend'][$i]['link'], ']&nbsp;&nbsp;';
  continue;
}
          echo '
          </span>
</td>
</tr>';
}

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

coolcrustycat

#145
Aye - it is the 1.1.4 version. Global and another Mod groups viewing ips isn't a problem, and yes we do want them to be able to see the groups in the legend, but without having access to the ACP.

The problem with allowing them to moderate members, is that we don't want:

access to registration management
access to the view/delete members screen
activate accounts
get approval notifications and approve accounts

These are functions that Admins use - (sites for members with mental health problems can sometimes get 'heated' ) which restricts us from allowing these functions to non-admin.

Bulakbol

#146
Hi coolcrustycat. If you want certain members only to see invisible logged-in members, we'll try to do something. Install the GroupOnlineStatus then give your member a permission and we'll make that member see invisibles. In Sources/BoardIndex.php, look for
elseif (empty($row['showOnline']) && !allowedTo('moderate_forum'))

and replace with
elseif (empty($row['showOnline']) && !allowedTo('hide_online_status'))

Try that if that's the one you are after.

Regarding the list of members in a group, SMF 2.0 Beta 3 has it but not 1.1.4. I think we need database query.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

coolcrustycat

So basically, we would be able to select the people who are mods, and allow them to see all of the hidden members (as Admins currently can)?

That'd be a fantastic help.

Bulakbol

Quote from: coolcrustycat on April 09, 2008, 02:42:34 PM
So basically, we would be able to select the people who are mods, and allow them to see all of the hidden members (as Admins currently can)?

That'd be a fantastic help.

Yes coolcrustycat, I think that's what you want. Have you tried what I told you to edit? Did it work?
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

coolcrustycat

#149
Installed the GroupOnlineStatus without problem.

Changed the line in the BoardIndex.php as you've suggested:

elseif (empty($row['showOnline']) && !allowedTo('hide_online_status'))

Ticked the relevant boxes re allowing each membergroup the option to be hidden.

Mods still can't see other hidden mods - but I feel as though there might be a tick or something missing as it doesn't quite make sense in my head?


Bulakbol

Hi Coolcrustycat. I tried it again and it works on my testboard.  Does some of your mods see hidden online and some don't? 
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

coolcrustycat

Neither of the groups assigned as Moderators can see anybody who's hidden. What I don't understand, is why they should though, as their groups have only the same options at remaining hidden (or not) - wouldn't the code need to be changed for the specific mod groups that we want to be able to view all like admin can?

Bulakbol

Hi coolcrustycat. Why did you allow them to hide their online status anyway?  :P
It's a permission thing.  I allowed special member to hide thier online status but I don't allow them to see hidden members. Only me, the admin.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Apllicmz

thanks she work fine 100% 114 and 2.0b3
translate portuguese pt_PT/pt_BR

Help

<file name="$languagedir/Help.portuguese.php" error="skip">
<operation>
<search position="end"><![CDATA[$helptxt['featuresettings'] = '<b>Editar caracter&#237;sticas e op&#231;&#245;es</b><br />]]></search>
<add><![CDATA[$helptxt['arrange_mclegend'] = 'Organizar a exibi&#231;&#227;o do seu groupo de membros a cor e legenda. Digite o n&#250;mero grupo identifica&#231;ao que devem ser separados por v&#237;rgula. Nenhuma v&#237;rgula ap&#243;s o &#250;ltimo n&#250;mero. (i.e. 1,2,8,7,6,5,4).
Para activar a exibi&#231;&#227;o de desativar o "Show group key on board index" from Admin -> Actual Tema, sob Tema guia Configura&#231;&#245;es.';

]]></add>
</operation>
</file>

<file name="$languagedir/Help.brazilian.php" error="skip">
<operation>
<search position="end"><![CDATA[$helptxt['featuresettings'] = '<b>Editar caracter&#237;sticas e op&#231;&#245;es</b><br />]]></search>
<add><![CDATA[$helptxt['arrange_mclegend'] = 'Organizar a exibi&#231;&#227;o do seu groupo de membros a cor e legenda. Digite o n&#250;mero grupo identifica&#231;ao que devem ser separados por v&#237;rgula. Nenhuma v&#237;rgula ap&#243;s o &#250;ltimo n&#250;mero. (i.e. 1,2,8,7,6,5,4).
Para activar a exibi&#231;&#227;o de desativar o "Show group key on board index" from Admin -> Actual Tema, sob Tema guia Configura&#231;&#245;es.';

]]></add>
</operation>
</file>



ModSettings

<file name="$languagedir/ManageSettings.portuguese.php" error="skip">
<operation>
<search position="before"><![CDATA[$txt['default_personal_text'] = 'Default texto pessoal';]]></search>
<add><![CDATA[
$txt['arrange_mclegend'] = '<div style="color: blue;">Mostrar grupo de membro por Legenda.</div><div class="smalltext">(Devem ser separados por vírgula. i.e. 1,2,8,7,6,5,4)</div>';]]></add>
</operation>
</file>

<file name="$languagedir/ManageSettings.brazilian.php" error="skip">
<operation>
<search position="before"><![CDATA[$txt['default_personal_text'] = 'Default texto pessoal';]]></search>
<add><![CDATA[
$txt['arrange_mclegend'] = '<div style="color: blue;">Mostrar grupo de membro por Legenda.</div><div class="smalltext">(Devem ser separados por vírgula. i.e. 1,2,8,7,6,5,4)</div>';]]></add>
</operation>
</file>





coldy316

i couldnt get this to work on my board and i'm using the 1.1.4 version with the bbpolloskin
Would you believe it that i live in gods country
Australia

klra

works great for me - ver 1.1.4-


Jade Elizabeth

G'day JB :D

Got an error lol
QuoteFatal error: packageinstall() [function.require]: Failed opening required '/home/jade/public_html/forums/Packages/temp/MCLegendDB2B3.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/jade/public_html/forums/Sources/Packages.php on line 883

I don't have trouble installing any other mods, and I have not changed anything.
http://www.simplemachines.org/community/index.php?topic=234033.0 <He has the same problem, however, we both have the temp folder required.

I cant be bothered manually installing it lol ;).
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Bulakbol

#157
@Joomlamz. Thanks for the translation. I have question about them though. In the English help file, the search position is <search postion="before"> but you use "end". Is it okay to use like that? And also the second one is for "ModSettings". The one you gave me is for ManageSettings. I don't know if ModSettings exist in the language files. Please verify. Thanks.

@klra. Cool. That's great.  Thanks for using this mod.

@Coldy316. What happened when you install the mod? Did you get any error?


@Alundra. If your server denied adding something in your database, just enter your groups id in Admin -> Feature and Options. Under Options tab, enter id's in  "Membergroup legend display arrangements".  Let me know if it does not work.

<edit @Alundra> If the mod won't install because of the the error, unzip the package, remove the
<code>MCLegendDB2B3.php</code>
from package-info.xml, re-zip the package and install. If there's no error, you can then enter your group id. Don't forget to turn-off the build-in legend in Admin -> Current Theme, and untick the checkbox for "Show group key on board index".
</edit>
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

coolcrustycat

We have to let Mods remain hidden to stop certain members taking advantage of the fact that there mightn't be many mods online at that particular moment (feelings run high sometimes on the forum when members are stressed). 

Members are given the option of remaining hidden to help remain anonymous - after a while people can be recognised by writing styles and content, and some of the issues causing members to join in the first place can be extremely delicate.

All we need is to able to assign mod groups the ability to see hidden members  :P

Paracelsus

Quote from: coolcrustycat on April 14, 2008, 03:43:16 AM
All we need is to able to assign mod groups the ability to see hidden members  :P

This option is available in permission setting, but it's 'packed up' with a group of others that include somewhat delicate admin tasks. You can find it in Member Administration -> Moderate forum members or something like it.

Advertisement: